summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Scott <phanna@android.com>2011-01-25 11:39:43 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-01-25 11:39:43 -0800
commit910f5a48958d69024b9a6f390181b8b3643fc41b (patch)
tree2f2ab7e15c7a0c84131e4a5a6f1d639e562c6559
parent53ad0914ad57acd3823e30830e5f7395cd8c32f9 (diff)
parent93e7b9922667becc4785bf0645d8ef4c8455e922 (diff)
downloadexternal_webkit-910f5a48958d69024b9a6f390181b8b3643fc41b.zip
external_webkit-910f5a48958d69024b9a6f390181b8b3643fc41b.tar.gz
external_webkit-910f5a48958d69024b9a6f390181b8b3643fc41b.tar.bz2
Merge "Sync the parent layer's children." into honeycomb
-rw-r--r--WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp b/WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp
index 46be9bb..d370f33 100644
--- a/WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp
+++ b/WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp
@@ -200,17 +200,23 @@ bool GraphicsLayerAndroid::replaceChild(GraphicsLayer* oldChild, GraphicsLayer*
{
LOG("(%x) replaceChild %x by %x", this, oldChild, newChild);
bool ret = GraphicsLayer::replaceChild(oldChild, newChild);
- m_needsSyncChildren = true;
- askForSync();
+ if (ret) {
+ m_needsSyncChildren = true;
+ askForSync();
+ }
return ret;
}
void GraphicsLayerAndroid::removeFromParent()
{
LOG("(%x) removeFromParent()", this);
+ GraphicsLayerAndroid* parent = static_cast<GraphicsLayerAndroid*>(m_parent);
GraphicsLayer::removeFromParent();
- m_needsSyncChildren = true;
- askForSync();
+ // Update the parent's children.
+ if (parent) {
+ parent->m_needsSyncChildren = true;
+ askForSync();
+ }
}
void GraphicsLayerAndroid::updateFixedPosition()