[EFL][Qt] REGRESSION(r144787): A fixed element lags when scrolling and wheeling.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 8 Mar 2013 11:25:47 +0000 (11:25 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 8 Mar 2013 11:25:47 +0000 (11:25 +0000)
https://bugs.webkit.org/show_bug.cgi?id=111829

Patch by Huang Dongsung <luxtella@company100.net> on 2013-03-08
Reviewed by Noam Rosenthal.

Currently, flagsChanged deals with all boolean flags. It introduces this bug
because when another flag (i.e. preserves3D) is changed, fixedToViewport is set
to false. So this patch updates all flags when at least one flag is changed.

In addition, this patch amends isScrollable code to match other flags.

This patch can only be tested manually since there is no automated
testing facilities for in-motion touch.
Test: ManualTests/fixed-position.html
      ManualTests/nested-fixed-position.html

* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
(WebCore::CoordinatedGraphicsLayer::setScrollableArea):
(WebCore::CoordinatedGraphicsLayer::syncLayerState):
* platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
(WebCore::CoordinatedGraphicsScene::setLayerState):
* platform/graphics/texmap/coordinated/CoordinatedGraphicsState.h:
(WebCore::CoordinatedGraphicsLayerState::CoordinatedGraphicsLayerState):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@145207 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp
Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp
Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsState.h

index 973f454..690463f 100644 (file)
@@ -1,3 +1,29 @@
+2013-03-08  Huang Dongsung  <luxtella@company100.net>
+
+        [EFL][Qt] REGRESSION(r144787): A fixed element lags when scrolling and wheeling.
+        https://bugs.webkit.org/show_bug.cgi?id=111829
+
+        Reviewed by Noam Rosenthal.
+
+        Currently, flagsChanged deals with all boolean flags. It introduces this bug
+        because when another flag (i.e. preserves3D) is changed, fixedToViewport is set
+        to false. So this patch updates all flags when at least one flag is changed.
+
+        In addition, this patch amends isScrollable code to match other flags.
+
+        This patch can only be tested manually since there is no automated
+        testing facilities for in-motion touch.
+        Test: ManualTests/fixed-position.html
+              ManualTests/nested-fixed-position.html
+
+        * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
+        (WebCore::CoordinatedGraphicsLayer::setScrollableArea):
+        (WebCore::CoordinatedGraphicsLayer::syncLayerState):
+        * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
+        (WebCore::CoordinatedGraphicsScene::setLayerState):
+        * platform/graphics/texmap/coordinated/CoordinatedGraphicsState.h:
+        (WebCore::CoordinatedGraphicsLayerState::CoordinatedGraphicsLayerState):
+
 2013-03-07  Dean Jackson  <dino@apple.com>
 
         Remove dead label code in snapshotted plugin
index 5437ac5..baaf745 100644 (file)
@@ -524,7 +524,7 @@ void CoordinatedGraphicsLayer::setScrollableArea(ScrollableArea* scrollableArea)
         return;
 
     m_layerState.isScrollable = isScrollable();
-    m_layerState.isScrollableChanged = true;
+    m_layerState.flagsChanged = true;
     didChangeLayerState();
 }
 
@@ -645,6 +645,18 @@ void CoordinatedGraphicsLayer::syncLayerState()
     m_layerState.pos = m_adjustedPosition;
     m_layerState.size = m_adjustedSize;
 
+    if (m_layerState.flagsChanged) {
+        m_layerState.drawsContent = drawsContent();
+        m_layerState.contentsVisible = contentsAreVisible();
+        m_layerState.backfaceVisible = backfaceVisibility();
+        m_layerState.masksToBounds = masksToBounds();
+        m_layerState.preserves3D = preserves3D();
+        m_layerState.fixedToViewport = fixedToViewport();
+        m_layerState.showDebugBorders = isShowingDebugBorder();
+        m_layerState.showRepaintCounter = isShowingRepaintCounter();
+        m_layerState.isScrollable = isScrollable();
+    }
+
     if (m_layerState.showDebugBorders)
         updateDebugIndicators();
 }
index b82e4de..ae245e3 100644 (file)
@@ -355,22 +355,24 @@ void CoordinatedGraphicsScene::setLayerState(CoordinatedLayerID id, const Coordi
         layer->setMasksToBounds(layerState.isRootLayer ? false : layerState.masksToBounds);
         layer->setPreserves3D(layerState.preserves3D);
 
+        bool fixedToViewportChanged = toGraphicsLayerTextureMapper(layer)->fixedToViewport() != layerState.fixedToViewport;
         toGraphicsLayerTextureMapper(layer)->setFixedToViewport(layerState.fixedToViewport);
+        if (fixedToViewportChanged) {
+            if (layerState.fixedToViewport)
+                m_fixedLayers.add(id, layer);
+            else
+                m_fixedLayers.remove(id);
+        }
+
         layer->setShowDebugBorder(layerState.showDebugBorders);
         layer->setShowRepaintCounter(layerState.showRepaintCounter);
-    }
 
-    if (layerState.isScrollableChanged)
         toGraphicsLayerTextureMapper(layer)->setIsScrollable(layerState.isScrollable);
+    }
 
     if (layerState.committedScrollOffsetChanged)
         toGraphicsLayerTextureMapper(layer)->didCommitScrollOffset(layerState.committedScrollOffset);
 
-    if (layerState.fixedToViewport)
-        m_fixedLayers.add(id, layer);
-    else
-        m_fixedLayers.remove(id);
-
     prepareContentBackingStore(layer);
 
     // Apply Operations.
index 29c8e45..4150f26 100644 (file)
@@ -124,6 +124,7 @@ struct CoordinatedGraphicsLayerState {
         , fixedToViewport(false)
         , showDebugBorders(false)
         , showRepaintCounter(false)
+        , isScrollable(false)
         , opacity(0)
         , debugBorderWidth(0)
         , replica(InvalidCoordinatedLayerID)