[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.15.1-1414-gc69ee75

hclam at chromium.org hclam at chromium.org
Thu Oct 29 20:47:59 UTC 2009


The following commit has been merged in the webkit-1.1 branch:
commit d14f63f0cc33cf4af9e8d118be45c589401f8767
Author: hclam at chromium.org <hclam at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Oct 19 20:18:18 2009 +0000

    [v8] typeof(HTMLMediaElement) should return undefined if media
    engine is not available
    https://bugs.webkit.org/show_bug.cgi?id=30343
    
    Patch by Alpha Lam <hclam at chromium.org> on 2009-10-19
    Reviewed by Dimitri Glazkov (dglazkov at chromium.org).
    
    Check for availability of the media engine to disable
    HTMLMediaElement, HTMLAudioElement, HTMLVideoElement, MediaError
    in runtime.
    
    Try runs and review in Chromium:
    http://codereview.chromium.org/276011
    
    Test: manual-tests/chromium/media-player-not-available.html
    
    The above test can work work in Chromium. Testing procedures:
    1. Remove all media support libraries in Chromium (e.g. ffmpeg libraries)
    2. Open Chromium with above test page
    3. Verify the test results according to the test page
    
    * bindings/v8/custom/V8CustomBinding.h:
    Declare enabler methods.
    * bindings/v8/custom/V8DOMWindowCustom.cpp:
    Report enabled only if media player is available.
    * manual-tests/chromium/media-player-not-available.html: Added.
    Manual test, following instruction in this test for procedures.
    * page/DOMWindow.idl:
    Mark HTMLMediaElement, HTMLAudioElement, HTMLVideElement, MediaError
    as enabled at runtime.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@49803 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index e6e4932..564f364 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,35 @@
+2009-10-19  Alpha Lam  <hclam at chromium.org>
+
+        Reviewed by Dimitri Glazkov (dglazkov at chromium.org).
+
+        [v8] typeof(HTMLMediaElement) should return undefined if media
+        engine is not available
+        https://bugs.webkit.org/show_bug.cgi?id=30343
+
+        Check for availability of the media engine to disable
+        HTMLMediaElement, HTMLAudioElement, HTMLVideoElement, MediaError
+        in runtime.
+
+        Try runs and review in Chromium:
+        http://codereview.chromium.org/276011
+
+        Test: manual-tests/chromium/media-player-not-available.html
+
+        The above test can work work in Chromium. Testing procedures:
+        1. Remove all media support libraries in Chromium (e.g. ffmpeg libraries)
+        2. Open Chromium with above test page
+        3. Verify the test results according to the test page
+
+        * bindings/v8/custom/V8CustomBinding.h:
+        Declare enabler methods.
+        * bindings/v8/custom/V8DOMWindowCustom.cpp:
+        Report enabled only if media player is available.
+        * manual-tests/chromium/media-player-not-available.html: Added.
+        Manual test, following instruction in this test for procedures.
+        * page/DOMWindow.idl:
+        Mark HTMLMediaElement, HTMLAudioElement, HTMLVideElement, MediaError
+        as enabled at runtime.
+
 2009-10-19  Kenneth Rohde Christiansen  <kenneth at webkit.org>
 
         Reviewed by Adam Roben.
diff --git a/WebCore/bindings/v8/custom/V8CustomBinding.h b/WebCore/bindings/v8/custom/V8CustomBinding.h
index 71dd88e..d5e02ac 100644
--- a/WebCore/bindings/v8/custom/V8CustomBinding.h
+++ b/WebCore/bindings/v8/custom/V8CustomBinding.h
@@ -254,6 +254,10 @@ namespace WebCore {
 #if ENABLE(VIDEO)
         DECLARE_PROPERTY_ACCESSOR_GETTER(DOMWindowAudio);
         DECLARE_ACCESSOR_RUNTIME_ENABLER(DOMWindowAudio);
+        DECLARE_ACCESSOR_RUNTIME_ENABLER(DOMWindowHTMLMediaElement);
+        DECLARE_ACCESSOR_RUNTIME_ENABLER(DOMWindowHTMLAudioElement);
+        DECLARE_ACCESSOR_RUNTIME_ENABLER(DOMWindowHTMLVideoElement);
+        DECLARE_ACCESSOR_RUNTIME_ENABLER(DOMWindowMediaError);
 #endif
 
         DECLARE_PROPERTY_ACCESSOR_GETTER(DOMWindowImage);
diff --git a/WebCore/bindings/v8/custom/V8DOMWindowCustom.cpp b/WebCore/bindings/v8/custom/V8DOMWindowCustom.cpp
index c3d781e..03d480e 100644
--- a/WebCore/bindings/v8/custom/V8DOMWindowCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8DOMWindowCustom.cpp
@@ -242,6 +242,26 @@ ACCESSOR_RUNTIME_ENABLER(DOMWindowAudio)
     return MediaPlayer::isAvailable();
 }
 
+ACCESSOR_RUNTIME_ENABLER(DOMWindowHTMLMediaElement)
+{
+    return MediaPlayer::isAvailable();
+}
+
+ACCESSOR_RUNTIME_ENABLER(DOMWindowHTMLAudioElement)
+{
+    return MediaPlayer::isAvailable();
+}
+
+ACCESSOR_RUNTIME_ENABLER(DOMWindowHTMLVideoElement)
+{
+    return MediaPlayer::isAvailable();
+}
+
+ACCESSOR_RUNTIME_ENABLER(DOMWindowMediaError)
+{
+    return MediaPlayer::isAvailable();
+}
+
 #endif
 
 #if ENABLE(SHARED_WORKERS)
diff --git a/WebCore/page/DOMWindow.idl b/WebCore/page/DOMWindow.idl
index 903ed18..2d670c0 100644
--- a/WebCore/page/DOMWindow.idl
+++ b/WebCore/page/DOMWindow.idl
@@ -523,11 +523,11 @@ module window {
         attribute StorageEventConstructor StorageEvent;
 #endif
 
-        attribute [CustomGetter,Conditional=VIDEO,EnabledAtRuntime] HTMLAudioElementConstructor Audio; // Usable with the new operator
-        attribute [Conditional=VIDEO] HTMLAudioElementConstructor HTMLAudioElement;
-        attribute [Conditional=VIDEO] HTMLMediaElementConstructor HTMLMediaElement;
-        attribute [Conditional=VIDEO] HTMLVideoElementConstructor HTMLVideoElement;
-        attribute [Conditional=VIDEO] MediaErrorConstructor MediaError;
+        attribute [CustomGetter, Conditional=VIDEO, EnabledAtRuntime] HTMLAudioElementConstructor Audio; // Usable with the new operator
+        attribute [Conditional=VIDEO, EnabledAtRuntime] HTMLAudioElementConstructor HTMLAudioElement;
+        attribute [Conditional=VIDEO, EnabledAtRuntime] HTMLMediaElementConstructor HTMLMediaElement;
+        attribute [Conditional=VIDEO, EnabledAtRuntime] HTMLVideoElementConstructor HTMLVideoElement;
+        attribute [Conditional=VIDEO, EnabledAtRuntime] MediaErrorConstructor MediaError;
 
 #if defined(ENABLE_XPATH) && ENABLE_XPATH
         attribute XPathEvaluatorConstructor XPathEvaluator;

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list