summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp
diff options
context:
space:
mode:
authorNicolas Roard <nicolasroard@google.com>2012-03-13 14:32:44 -0700
committerNicolas Roard <nicolasroard@google.com>2012-03-13 17:53:45 -0700
commitb3bd98d469e54700d3ec2ab372dfab59bbb63204 (patch)
treeea39dcbc9e39b52464a2da5264817fa8bf888287 /Source/WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp
parent5df0c86c85cb70113118a1d77ea868e3691ea926 (diff)
downloadexternal_webkit-b3bd98d469e54700d3ec2ab372dfab59bbb63204.zip
external_webkit-b3bd98d469e54700d3ec2ab372dfab59bbb63204.tar.gz
external_webkit-b3bd98d469e54700d3ec2ab372dfab59bbb63204.tar.bz2
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
Diffstat (limited to 'Source/WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp')
-rw-r--r--Source/WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp11
1 files changed, 8 insertions, 3 deletions
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();