diff options
author | Patrick Scott <phanna@android.com> | 2011-01-25 11:39:43 -0800 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-01-25 11:39:43 -0800 |
commit | 910f5a48958d69024b9a6f390181b8b3643fc41b (patch) | |
tree | 2f2ab7e15c7a0c84131e4a5a6f1d639e562c6559 | |
parent | 53ad0914ad57acd3823e30830e5f7395cd8c32f9 (diff) | |
parent | 93e7b9922667becc4785bf0645d8ef4c8455e922 (diff) | |
download | external_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.cpp | 14 |
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() |