[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

eric at webkit.org eric at webkit.org
Wed Dec 22 12:56:09 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit d88668bc0bdc67bb27cb67cfd3ceb3e032a36845
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Sep 2 09:32:05 2010 +0000

    2010-09-02  Jer Noble  <jer.noble at apple.com>
    
            Reviewed by Darin Adler.
    
            WebKit should not accept PDFs as video.
            https://bugs.webkit.org/show_bug.cgi?id=45013
    
            The code in MediaPlayerPrivate::createQTMovie has been re-arranged.
            First, the component disabling is done only once. In 64-bit QTKit will
            store the list of disabled components and disable them once QTKitServer
            starts, so there is no need to disable them repeatedly.  However,
            because of a bug in 64-bit QTKit, additional requests of the exact same
            component description will be ignored if QTKitServer is not yet running.
            To work around this, we must provide the exact component flags for each
            eat/PDF and grip/PDF component we wish to disable.
    
            * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
            (WebCore::disableComponentsOnce): Added.
            (WebCore::MediaPlayerPrivate::createQTMovie): Moved the component
                disabling code into disableComponentsOnce.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@66652 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 46bd286..64b0aef 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,24 @@
+2010-09-02  Jer Noble  <jer.noble at apple.com>
+
+        Reviewed by Darin Adler.
+
+        WebKit should not accept PDFs as video.
+        https://bugs.webkit.org/show_bug.cgi?id=45013
+
+        The code in MediaPlayerPrivate::createQTMovie has been re-arranged.
+        First, the component disabling is done only once. In 64-bit QTKit will
+        store the list of disabled components and disable them once QTKitServer
+        starts, so there is no need to disable them repeatedly.  However,
+        because of a bug in 64-bit QTKit, additional requests of the exact same
+        component description will be ignored if QTKitServer is not yet running.
+        To work around this, we must provide the exact component flags for each
+        eat/PDF and grip/PDF component we wish to disable.
+
+        * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
+        (WebCore::disableComponentsOnce): Added.
+        (WebCore::MediaPlayerPrivate::createQTMovie): Moved the component
+            disabling code into disableComponentsOnce.
+
 2010-09-02  Philippe Normand  <pnormand at igalia.com>
 
         Unreviewed, GTK build fix.
diff --git a/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.mm b/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.mm
index 14393d5..7b0e7af 100644
--- a/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.mm
+++ b/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.mm
@@ -261,25 +261,40 @@ void MediaPlayerPrivate::createQTMovie(const String& url)
     createQTMovie(cocoaURL, movieAttributes);
 }
 
-void MediaPlayerPrivate::createQTMovie(NSURL *url, NSDictionary *movieAttributes)
+static void disableComponentsOnce()
 {
-    // We must disable components each time we open a movie because we cannot guarantee
-    // that the QTKitServer process hasn't disappeared on us.  eat/PDF and grip/PDF 
-    // components must be disabled twice since they are registered twice with different
-    // flags:
-    uint32_t componentsToDisable[9][5] = {
+    static bool sComponentsDisabled = false;
+    if (sComponentsDisabled)
+        return;
+    sComponentsDisabled = true;
+
+    // eat/PDF and grip/PDF components must be disabled twice since they are registered twice
+    // with different flags.  However, there is currently a bug in 64-bit QTKit (<rdar://problem/8378237>)
+    // which causes subsequent disable component requests of exactly the same type to be ignored if
+    // QTKitServer has not yet started.  As a result, we must pass in exactly the flags we want to
+    // disable per component.  As a failsafe, if in the future these flags change, we will disable the
+    // PDF components for a third time with a wildcard flags field:
+    uint32_t componentsToDisable[11][5] = {
         {'eat ', 'TEXT', 'text', 0, 0},
         {'eat ', 'TXT ', 'text', 0, 0},    
         {'eat ', 'utxt', 'text', 0, 0},  
         {'eat ', 'TEXT', 'tx3g', 0, 0},  
+        {'eat ', 'PDF ', 'vide', 0x44802, 0},
+        {'eat ', 'PDF ', 'vide', 0x45802, 0},
         {'eat ', 'PDF ', 'vide', 0, 0},  
-        {'eat ', 'PDF ', 'vide', 0, 0},  
-        {'grip', 'PDF ', 'appl', 0, 0},  
+        {'grip', 'PDF ', 'appl', 0x844a00, 0},
+        {'grip', 'PDF ', 'appl', 0x845a00, 0},
         {'grip', 'PDF ', 'appl', 0, 0},  
         {'imdc', 'pdf ', 'appl', 0, 0},  
     };
+
     for (size_t i = 0; i < sizeof(componentsToDisable)/sizeof(componentsToDisable[0]); ++i) 
-         wkQTMovieDisableComponent(componentsToDisable[i]);
+        wkQTMovieDisableComponent(componentsToDisable[i]);
+}
+
+void MediaPlayerPrivate::createQTMovie(NSURL *url, NSDictionary *movieAttributes)
+{
+    disableComponentsOnce();
 
     [[NSNotificationCenter defaultCenter] removeObserver:m_objcObserver.get()];
     

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list