[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.19-706-ge5415e9

cmarrin at apple.com cmarrin at apple.com
Thu Feb 4 21:33:07 UTC 2010


The following commit has been merged in the webkit-1.1 branch:
commit 5045665bda717771e14a92c1bd4aaf6c308f2196
Author: cmarrin at apple.com <cmarrin at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Sat Jan 30 02:17:20 2010 +0000

            Fixed changed virtual function in GraphicsLayerCACF and call order issues
            https://bugs.webkit.org/show_bug.cgi?id=34348
    
            The correct virtual function in GraphicsLayerCACF is now being
            called. We also fixed an issue in QTMovieWin where the size
            of the movie was not being set correctly because the call order
            was changed.
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@54095 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 949359b..bc57258 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,25 @@
+2010-01-29  Chris Marrin  <cmarrin at apple.com>
+
+        Reviewed by Simon Fraser.
+
+        Fixed changed virtual function in GraphicsLayerCACF and call order issues
+        https://bugs.webkit.org/show_bug.cgi?id=34348
+        
+        The correct virtual function in GraphicsLayerCACF is now being
+        called. We also fixed an issue in QTMovieWin where the size
+        of the movie was not being set correctly because the call order
+        was changed.
+
+        * platform/graphics/win/GraphicsLayerCACF.cpp:
+        (WebCore::GraphicsLayerCACF::setContentsToMedia):
+        (WebCore::GraphicsLayerCACF::updateContentsMedia):
+        * platform/graphics/win/GraphicsLayerCACF.h:
+        (WebCore::GraphicsLayerCACF::):
+        * platform/graphics/win/QTMovieWin.cpp:
+        (QTMovieWinPrivate::task):
+        (QTMovieWinPrivate::setSize):
+        (QTMovieWinPrivate::updateMovieSize):
+
 2010-01-29  Jakob Petsovits  <jpetsovits at rim.com>
 
         Reviewed by Nikolas Zimmermann.
diff --git a/WebCore/platform/graphics/win/GraphicsLayerCACF.cpp b/WebCore/platform/graphics/win/GraphicsLayerCACF.cpp
index 5ec90b8..ca7e496 100644
--- a/WebCore/platform/graphics/win/GraphicsLayerCACF.cpp
+++ b/WebCore/platform/graphics/win/GraphicsLayerCACF.cpp
@@ -364,21 +364,18 @@ void GraphicsLayerCACF::setContentsToImage(Image* image)
         updateSublayerList();
 }
 
-void GraphicsLayerCACF::setContentsToVideo(PlatformLayer* videoLayer)
+void GraphicsLayerCACF::setContentsToMedia(PlatformLayer* mediaLayer)
 {
-    bool childrenChanged = false;
-
-    if (videoLayer != m_contentsLayer.get())
-        childrenChanged = true;
+    if (mediaLayer == m_contentsLayer)
+        return;
 
-    m_contentsLayer = videoLayer;
-    m_contentsLayerPurpose = videoLayer ? ContentsLayerForVideo : NoContentsLayer;
+    m_contentsLayer = mediaLayer;
+    m_contentsLayerPurpose = mediaLayer ? ContentsLayerForMedia : NoContentsLayer;
 
-    updateContentsVideo();
+    updateContentsMedia();
 
-    // This has to happen after updateContentsVideo
-    if (childrenChanged)
-        updateSublayerList();
+    // This has to happen after updateContentsMedia
+    updateSublayerList();
 }
 
 void GraphicsLayerCACF::setGeometryOrientation(CompositingCoordinatesOrientation orientation)
@@ -633,9 +630,9 @@ void GraphicsLayerCACF::updateContentsImage()
     }
 }
 
-void GraphicsLayerCACF::updateContentsVideo()
+void GraphicsLayerCACF::updateContentsMedia()
 {
-    // Video layer was set as m_contentsLayer, and will get parented in updateSublayerList().
+    // Media layer was set as m_contentsLayer, and will get parented in updateSublayerList().
     if (m_contentsLayer) {
         setupContentsLayer(m_contentsLayer.get());
         updateContentsRect();
diff --git a/WebCore/platform/graphics/win/GraphicsLayerCACF.h b/WebCore/platform/graphics/win/GraphicsLayerCACF.h
index 93ddf25..0a52764 100644
--- a/WebCore/platform/graphics/win/GraphicsLayerCACF.h
+++ b/WebCore/platform/graphics/win/GraphicsLayerCACF.h
@@ -82,7 +82,7 @@ public:
     virtual void setContentsRect(const IntRect&);
 
     virtual void setContentsToImage(Image*);
-    virtual void setContentsToVideo(PlatformLayer*);
+    virtual void setContentsToMedia(PlatformLayer*);
     
     virtual PlatformLayer* platformLayer() const;
 
@@ -115,7 +115,7 @@ private:
     void updateLayerBackgroundColor();
 
     void updateContentsImage();
-    void updateContentsVideo();
+    void updateContentsMedia();
     void updateContentsRect();
     void updateGeometryOrientation();
     
@@ -129,7 +129,7 @@ private:
     enum ContentsLayerPurpose {
         NoContentsLayer = 0,
         ContentsLayerForImage,
-        ContentsLayerForVideo
+        ContentsLayerForMedia
     };
     
     ContentsLayerPurpose m_contentsLayerPurpose;
diff --git a/WebCore/platform/graphics/win/QTMovieWin.cpp b/WebCore/platform/graphics/win/QTMovieWin.cpp
index 8fd6c71..8714517 100644
--- a/WebCore/platform/graphics/win/QTMovieWin.cpp
+++ b/WebCore/platform/graphics/win/QTMovieWin.cpp
@@ -99,6 +99,7 @@ public:
     void deleteGWorld();
     void clearGWorld();
     void cacheMovieScale();
+    void updateMovieSize();
 
     void setSize(int, int);
 
@@ -259,14 +260,16 @@ void QTMovieWinPrivate::task()
             // we only need to erase the movie gworld when the load state changes to loaded while it
             //  is visible as the gworld is destroyed/created when visibility changes
             bool shouldRestorePlaybackState = false;
-            if (loadState >= QTMovieLoadStateLoaded && m_loadState < QTMovieLoadStateLoaded) {
+            bool movieNewlyPlayable = loadState >= QTMovieLoadStateLoaded && m_loadState < QTMovieLoadStateLoaded;
+            m_loadState = loadState;
+            if (movieNewlyPlayable) {
+                updateMovieSize();
                 if (m_visible)
                     clearGWorld();
                 cacheMovieScale();
                 shouldRestorePlaybackState = true;
             }
 
-            m_loadState = loadState;
             if (!m_movieController && m_loadState >= QTMovieLoadStateLoaded)
                 createMovieController();
             m_client->movieLoadStateChanged(m_movieWin);
@@ -403,7 +406,6 @@ void QTMovieWinPrivate::clearGWorld()
     MacSetPort(savePort);
 }
 
-
 void QTMovieWinPrivate::setSize(int width, int height)
 {
     if (m_width == width && m_height == height)
@@ -421,17 +423,26 @@ void QTMovieWinPrivate::setSize(int width, int height)
     ASSERT(m_scaleCached);
 #endif
 
+    updateMovieSize();
+}
+
+void QTMovieWinPrivate::updateMovieSize()
+{
+    if (!m_movie || m_loadState < QTMovieLoadStateLoaded)
+        return;
+
     Rect bounds; 
     bounds.top = 0;
     bounds.left = 0; 
-    bounds.right = width;
-    bounds.bottom = height;
+    bounds.right = m_width;
+    bounds.bottom = m_height;
     if (m_movieController)
         MCSetControllerBoundsRect(m_movieController, &bounds);
     SetMovieBox(m_movie, &bounds);
     updateGWorld();
 }
 
+
 void QTMovieWinPrivate::deleteGWorld()
 {
     ASSERT(m_gWorld);

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list