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

noam.rosenthal at nokia.com noam.rosenthal at nokia.com
Wed Dec 22 14:43:23 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 621b1de1b3cc8d975f17037a281f56bff2fa5dee
Author: noam.rosenthal at nokia.com <noam.rosenthal at nokia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Oct 18 17:27:44 2010 +0000

    2010-10-18  No'am Rosenthal  <noam.rosenthal at nokia.com>
    
            Reviewed by Andreas Kling.
    
            [Qt] AC rendering bugs
            There were a few missing connections in Qt AC between GraphicsLayer and plugins, like changing the plugin's geometry to the layer's
            contentsRect, and making sure media layers handle ParentChange events and setContentsNeedsDisplay. Now media layers behave correctly.
    
            https://bugs.webkit.org/show_bug.cgi?id=47571
    
            No new tests. This is in preparation for fixing AC+plugins, which already has tests that don't work yet with Qt.
    
            * platform/graphics/qt/GraphicsLayerQt.cpp:
            (WebCore::GraphicsLayerQtImpl::flushChanges):
            (WebCore::GraphicsLayerQt::setContentsNeedsDisplay):
            * platform/graphics/qt/GraphicsLayerQt.h:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@69971 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index cc5d68a..0be8479 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,20 @@
+2010-10-18  No'am Rosenthal  <noam.rosenthal at nokia.com>
+
+        Reviewed by Andreas Kling.
+
+        [Qt] AC rendering bugs
+        There were a few missing connections in Qt AC between GraphicsLayer and plugins, like changing the plugin's geometry to the layer's
+        contentsRect, and making sure media layers handle ParentChange events and setContentsNeedsDisplay. Now media layers behave correctly.
+
+        https://bugs.webkit.org/show_bug.cgi?id=47571
+
+        No new tests. This is in preparation for fixing AC+plugins, which already has tests that don't work yet with Qt.
+
+        * platform/graphics/qt/GraphicsLayerQt.cpp:
+        (WebCore::GraphicsLayerQtImpl::flushChanges):
+        (WebCore::GraphicsLayerQt::setContentsNeedsDisplay):
+        * platform/graphics/qt/GraphicsLayerQt.h:
+
 2010-10-18  Pavel Feldman  <pfeldman at chromium.org>
 
         Reviewed by Simon Fraser.
diff --git a/WebCore/platform/graphics/qt/GraphicsLayerQt.cpp b/WebCore/platform/graphics/qt/GraphicsLayerQt.cpp
index 8fc6519..e0941f5 100644
--- a/WebCore/platform/graphics/qt/GraphicsLayerQt.cpp
+++ b/WebCore/platform/graphics/qt/GraphicsLayerQt.cpp
@@ -37,6 +37,7 @@
 #include <QtGui/qgraphicseffect.h>
 #include <QtGui/qgraphicsitem.h>
 #include <QtGui/qgraphicsscene.h>
+#include <QtGui/qgraphicswidget.h>
 #include <QtGui/qpainter.h>
 #include <QtGui/qpixmap.h>
 #include <QtGui/qpixmapcache.h>
@@ -610,13 +611,13 @@ void GraphicsLayerQtImpl::flushChanges(bool recursive, bool forceUpdateTransform
     if (!m_layer || m_changeMask == NoChanges)
         goto afterLayerChanges;
 
-    if (m_currentContent.contentType == HTMLContentType && (m_changeMask & ParentChange)) {
+    if (m_changeMask & ParentChange) {
         // The WebCore compositor manages item ownership. We have to make sure graphicsview doesn't
         // try to snatch that ownership.
         if (!m_layer->parent() && !parentItem())
             setParentItem(0);
         else if (m_layer && m_layer->parent() && m_layer->parent()->nativeLayer() != parentItem())
-            setParentItem(m_layer->parent()->nativeLayer());
+            setParentItem(m_layer->parent()->platformLayer());
     }
 
     if (m_changeMask & ChildrenChange) {
@@ -680,7 +681,7 @@ void GraphicsLayerQtImpl::flushChanges(bool recursive, bool forceUpdateTransform
         if (scene())
             scene()->update();
 
-    if (m_changeMask & (ChildrenTransformChange | Preserves3DChange | TransformChange | AnchorPointChange | SizeChange | BackfaceVisibilityChange | PositionChange)) {
+    if (m_changeMask & (ChildrenTransformChange | Preserves3DChange | TransformChange | AnchorPointChange | SizeChange | BackfaceVisibilityChange | PositionChange | ParentChange)) {
         // Due to the differences between the way WebCore handles transforms and the way Qt handles transforms,
         // all these elements affect the transforms of all the descendants.
         forceUpdateTransform = true;
@@ -737,6 +738,11 @@ void GraphicsLayerQtImpl::flushChanges(bool recursive, bool forceUpdateTransform
         const QRect rect(m_layer->contentsRect());
         if (m_state.contentsRect != rect) {
             m_state.contentsRect = rect;
+            if (m_pendingContent.mediaLayer) {
+                QGraphicsWidget* widget = qobject_cast<QGraphicsWidget*>(m_pendingContent.mediaLayer.data());
+                if (widget)
+                    widget->setGeometry(rect);
+            }
             update();
         }
     }
@@ -850,6 +856,20 @@ void GraphicsLayerQt::setNeedsDisplayInRect(const FloatRect& rect)
     m_impl->notifyChange(GraphicsLayerQtImpl::DisplayChange);
 }
 
+void GraphicsLayerQt::setContentsNeedsDisplay()
+{
+    switch (m_impl->m_pendingContent.contentType) {
+    case GraphicsLayerQtImpl::MediaContentType:
+        if (!m_impl->m_pendingContent.mediaLayer)
+            return;
+        m_impl->m_pendingContent.mediaLayer.data()->update();
+        break;
+    default:
+        setNeedsDisplay();
+        break;
+    }
+}
+
 /* \reimp (GraphicsLayer.h)
 */
 void GraphicsLayerQt::setName(const String& name)
diff --git a/WebCore/platform/graphics/qt/GraphicsLayerQt.h b/WebCore/platform/graphics/qt/GraphicsLayerQt.h
index 75ca498..ed535eb 100644
--- a/WebCore/platform/graphics/qt/GraphicsLayerQt.h
+++ b/WebCore/platform/graphics/qt/GraphicsLayerQt.h
@@ -75,6 +75,7 @@ public:
     virtual void resumeAnimations();
 #endif // QT_NO_ANIMATION
     virtual void setContentsToImage(Image*);
+    virtual void setContentsNeedsDisplay();
     virtual void setContentsToMedia(PlatformLayer*);
     virtual void setContentsBackgroundColor(const Color&);
 #if ENABLE(3D_CANVAS)

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list