[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373

eric at webkit.org eric at webkit.org
Thu Apr 8 02:02:28 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit 01bdf3cd038dd66f96331fe931d700cbd6b08665
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Sat Feb 27 02:59:56 2010 +0000

    2010-02-26  Noam Rosenthal  <noam.rosenthal at nokia.com>
    
            Reviewed by Kenneth Rohde Christiansen.
    
            [Qt] GraphicsLayerQt: artifacts and wrong transformOrigin
            This was due to wrong way of applying cache-mode and transformation
            on a graphics-item with HTML. Cache-mode should be updated
            when the content type updates, even if it was the same cache-mode
    
            https://bugs.webkit.org/show_bug.cgi?id=35382
    
            Test URL attached to the bug now works correctly.
    
            * platform/graphics/qt/GraphicsLayerQt.cpp:
            (WebCore::GraphicsLayerQtImpl::computeTransform):
            (WebCore::GraphicsLayerQtImpl::flushChanges):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@55334 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 0d5e6e9..f73a912 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,20 @@
+2010-02-26  Noam Rosenthal  <noam.rosenthal at nokia.com>
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        [Qt] GraphicsLayerQt: artifacts and wrong transformOrigin
+        This was due to wrong way of applying cache-mode and transformation
+        on a graphics-item with HTML. Cache-mode should be updated
+        when the content type updates, even if it was the same cache-mode
+   
+        https://bugs.webkit.org/show_bug.cgi?id=35382
+
+        Test URL attached to the bug now works correctly.
+
+        * platform/graphics/qt/GraphicsLayerQt.cpp:
+        (WebCore::GraphicsLayerQtImpl::computeTransform):
+        (WebCore::GraphicsLayerQtImpl::flushChanges):
+
 2010-02-26  Luiz Agostini  <luiz.agostini at openbossa.org>
 
         Reviewed by Kenneth Rohde Christiansen.
diff --git a/WebCore/platform/graphics/qt/GraphicsLayerQt.cpp b/WebCore/platform/graphics/qt/GraphicsLayerQt.cpp
index 3b8b4e7..9745bd0 100644
--- a/WebCore/platform/graphics/qt/GraphicsLayerQt.cpp
+++ b/WebCore/platform/graphics/qt/GraphicsLayerQt.cpp
@@ -308,29 +308,26 @@ QTransform GraphicsLayerQtImpl::computeTransform(const TransformationMatrix& bas
     // this has to do with how WebCore implements -webkit-perspective and -webkit-perspective-origin, which are the CSS
     // attribute that call setChildrenTransform
     QPointF offset = -pos() - boundingRect().bottomRight() / 2;
-    const GraphicsLayerQtImpl* ancestor = this;
-    while ((ancestor = qobject_cast<GraphicsLayerQtImpl*>(ancestor->parentObject()))) {
+
+    for (const GraphicsLayerQtImpl* ancestor = this; (ancestor = qobject_cast<GraphicsLayerQtImpl*>(ancestor->parentObject())); ) {
         if (!ancestor->m_state.childrenTransform.isIdentity()) {
-            offset += ancestor->boundingRect().bottomRight() / 2;
+            const QPointF offset = mapFromItem(ancestor, QPointF(ancestor->m_size.width() / 2, ancestor->m_size.height() / 2));
             computedTransform
                 .translate(offset.x(), offset.y())
                 .multLeft(ancestor->m_state.childrenTransform)
                 .translate(-offset.x(), -offset.y());
             break;
         }
-        offset -= ancestor->pos();
     }
 
-    computedTransform.multLeft(baseTransform);
-
     // webkit has relative-to-size originPoint, graphics-view has a pixel originPoint, here we convert
     // we have to manage this ourselves because QGraphicsView's transformOrigin is incompatible
     const qreal originX = m_state.anchorPoint.x() * m_size.width();
     const qreal originY = m_state.anchorPoint.y() * m_size.height();
-    computedTransform = TransformationMatrix()
-                            .translate(originX, originY)
-                            .multiply(computedTransform)
-                            .translate(-originX, -originY);
+    computedTransform
+            .translate3d(originX, originY, m_state.anchorPoint.z())
+            .multLeft(baseTransform)
+            .translate3d(-originX, -originY, -m_state.anchorPoint.z());
 
     // now we project to 2D
     return QTransform(computedTransform);
@@ -511,11 +508,7 @@ void GraphicsLayerQtImpl::flushChanges(bool recursive, bool forceUpdateTransform
             if (!m_state.drawsContent && m_layer->drawsContent())
                 update();
                 if (m_layer->drawsContent() && !m_maskEffect) {
-                    const QGraphicsItem::CacheMode mewCacheMode = isTransformAnimationRunning() ? ItemCoordinateCache : DeviceCoordinateCache;
-
-                    // optimization: QGraphicsItem doesn't always perform this test
-                    if (mewCacheMode != cacheMode())
-                        setCacheMode(mewCacheMode);
+                    setCacheMode(isTransformAnimationRunning() ? ItemCoordinateCache : DeviceCoordinateCache);
 
                     // HTML content: we want to use exposedRect so we don't use WebCore rendering if we don't have to
                     setFlag(QGraphicsItem::ItemUsesExtendedStyleOption, true);

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list