From b3bd98d469e54700d3ec2ab372dfab59bbb63204 Mon Sep 17 00:00:00 2001 From: Nicolas Roard Date: Tue, 13 Mar 2012 14:32:44 -0700 Subject: Fix layers ordering issue with Absolute positioned elements - Promote absolute positioned elements to be composited - Reorder the elements as needed in LayerAndroid - Simplify fixed elements composition culling (don't do it anymore, we just promote everything and let the Layers sort things out) Change-Id: If76cf76a92410dec7e305a1a70c660d8597e399a --- .../platform/graphics/android/GraphicsLayerAndroid.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'Source/WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp') diff --git a/Source/WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp b/Source/WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp index 0acdc3b..2f9b379 100644 --- a/Source/WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp +++ b/Source/WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp @@ -215,7 +215,7 @@ void GraphicsLayerAndroid::removeFromParent() } } -void GraphicsLayerAndroid::updateFixedPosition() +void GraphicsLayerAndroid::updatePositionedLayers() { RenderLayer* renderLayer = renderLayerFromClient(m_client); if (!renderLayer) @@ -234,6 +234,7 @@ void GraphicsLayerAndroid::updateFixedPosition() // If we are a fixed position layer, just set it if (view->isPositioned() && view->style()->position() == FixedPosition) { + m_contentLayer->setAbsolutePosition(false); // We need to get the passed CSS properties for the element SkLength left, top, right, bottom; left = convertLength(view->style()->left()); @@ -274,8 +275,12 @@ void GraphicsLayerAndroid::updateFixedPosition() marginRight, marginBottom, renderLayerPos, viewRect); - } else if (m_contentLayer->isFixed()) + } else if (view->isPositioned() && view->style()->position() == AbsolutePosition) { + m_contentLayer->setAbsolutePosition(true); + } else { m_contentLayer->setFixedPosition(0); + m_contentLayer->setAbsolutePosition(false); + } } void GraphicsLayerAndroid::setPosition(const FloatPoint& point) @@ -1036,7 +1041,7 @@ void GraphicsLayerAndroid::syncCompositingStateForThisLayerOnly() } updateScrollingLayers(); - updateFixedPosition(); + updatePositionedLayers(); syncChildren(); syncMask(); -- cgit v1.1