OSDN Git Service

Update fixed layer at sync time.
authorTeng-Hui Zhu <ztenghui@google.com>
Thu, 24 Feb 2011 21:40:37 +0000 (13:40 -0800)
committerTeng-Hui Zhu <ztenghui@google.com>
Thu, 24 Feb 2011 22:20:09 +0000 (14:20 -0800)
For the example of google news, one of the fixed position layer is under
another fixed layer, and it is not updated for scrolling.
The CSS value did change, but we don't have a updated fixed position call.
Moving the update to sync time fix this issue.

bug:3486524

Change-Id: Iecb65b37d06e65902511e569238546b49b1dcd47

WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp

index 8ea274e..48badf8 100644 (file)
@@ -291,7 +291,6 @@ void GraphicsLayerAndroid::setPosition(const FloatPoint& point)
         this, point.x(), point.y(), m_position.x(), m_position.y(),
         m_anchorPoint.x(), m_anchorPoint.y(), m_size.width(), m_size.height());
 #endif
-    updateFixedPosition();
     m_contentLayer->setPosition(pos.x(), pos.y());
     askForSync();
 }
@@ -323,7 +322,6 @@ void GraphicsLayerAndroid::setSize(const FloatSize& size)
     MLOG("(%x) setSize (%.2f,%.2f)", this, size.width(), size.height());
     GraphicsLayer::setSize(size);
     m_contentLayer->setSize(size.width(), size.height());
-    updateFixedPosition();
     askForSync();
 }
 
@@ -928,6 +926,7 @@ void GraphicsLayerAndroid::syncCompositingState()
         m_children[i]->syncCompositingState();
 
     updateScrollingLayers();
+    updateFixedPosition();
     syncChildren();
     syncMask();