summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/platform
diff options
context:
space:
mode:
authorNicolas Roard <nicolasroard@google.com>2012-05-15 20:20:26 -0700
committerNicolas Roard <nicolasroard@google.com>2012-05-15 20:20:26 -0700
commitd26ada95f7be3d78d3e718118c591fe110675b78 (patch)
tree2d9ddc14985801f3347d8c9aabe546ea2d48a229 /Source/WebCore/platform
parent43f04bcaf26c079f966beab2ffac7bbeace76da5 (diff)
downloadexternal_webkit-d26ada95f7be3d78d3e718118c591fe110675b78.zip
external_webkit-d26ada95f7be3d78d3e718118c591fe110675b78.tar.gz
external_webkit-d26ada95f7be3d78d3e718118c591fe110675b78.tar.bz2
Fix layer ordering
bug:6331876 bug:6366440 bug:6182286 Change-Id: I8390f734ef5894219ea50a7b3e36a029e0e7931d
Diffstat (limited to 'Source/WebCore/platform')
-rw-r--r--Source/WebCore/platform/graphics/android/layers/LayerAndroid.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/WebCore/platform/graphics/android/layers/LayerAndroid.cpp b/Source/WebCore/platform/graphics/android/layers/LayerAndroid.cpp
index 49f273d..2703cfd 100644
--- a/Source/WebCore/platform/graphics/android/layers/LayerAndroid.cpp
+++ b/Source/WebCore/platform/graphics/android/layers/LayerAndroid.cpp
@@ -133,11 +133,13 @@ LayerAndroid::LayerAndroid(const LayerAndroid& layer) : Layer(layer),
m_replicatedLayerPosition = layer.m_replicatedLayerPosition;
+#ifdef ABSOLUTE_POSITION
// If we have absolute elements, we may need to reorder them if they
// are followed by another layer that is not also absolutely positioned.
// (as absolutely positioned elements are out of the normal flow)
bool hasAbsoluteChildren = false;
bool hasOnlyAbsoluteFollowers = true;
+
for (int i = 0; i < layer.countChildren(); i++) {
if (layer.getChild(i)->isPositionAbsolute()) {
hasAbsoluteChildren = true;
@@ -169,6 +171,10 @@ LayerAndroid::LayerAndroid(const LayerAndroid& layer) : Layer(layer),
for (int i = 0; i < layer.countChildren(); i++)
addChild(layer.getChild(i)->copy())->unref();
}
+#else
+ for (int i = 0; i < layer.countChildren(); i++)
+ addChild(layer.getChild(i)->copy())->unref();
+#endif
KeyframesMap::const_iterator end = layer.m_animations.end();
for (KeyframesMap::const_iterator it = layer.m_animations.begin(); it != end; ++it) {