summaryrefslogtreecommitdiffstats
path: root/WebCore
diff options
context:
space:
mode:
authorPatrick Scott <phanna@android.com>2011-01-25 14:28:50 -0500
committerPatrick Scott <phanna@android.com>2011-01-25 14:28:50 -0500
commit93e7b9922667becc4785bf0645d8ef4c8455e922 (patch)
treedc512770666734688328b40b85f9f0d2aa2d1beb /WebCore
parent5cd48bb81a0acf1f841e9fd78cae14de7112e070 (diff)
downloadexternal_webkit-93e7b9922667becc4785bf0645d8ef4c8455e922.zip
external_webkit-93e7b9922667becc4785bf0645d8ef4c8455e922.tar.gz
external_webkit-93e7b9922667becc4785bf0645d8ef4c8455e922.tar.bz2
Sync the parent layer's children.
Since we are being removed from our parent, our children do not matter. Sync the parent's children to show the right content. Bug: 3353525 Change-Id: Id8ab4d0373d950362caa14d8fc558f753d5a7365
Diffstat (limited to 'WebCore')
-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()