From adf365552d1a6b55782fa3b3c722f5ea914deb40 Mon Sep 17 00:00:00 2001 From: Nicolas Roard Date: Fri, 16 Dec 2011 20:05:07 -0800 Subject: Fix crash with composited layers When we have composited layers inside iframes/frames, the layers hierarchy is not always up to date at the time of the layerSync() call. If some of those layers are scheduled to be repainted, the repaint operation will triggers the update of the composited layers tree -- possibly resulting in the deallocation of the very same GraphicsLayer we were painting from, and thus leading to a crash. The fix consist in gathering all the root RenderLayer (for each frame containing composited layers) and explicitely asking RenderLayerCompositor to check if the composited tree needs to be updated, before we traverse the tree to paint the elements. bug:5695185 Change-Id: I33a00b847eb19c9aa4b68f0ac3adbe36709ed00b --- Source/WebCore/platform/graphics/android/GraphicsLayerAndroid.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Source/WebCore/platform/graphics/android/GraphicsLayerAndroid.h') diff --git a/Source/WebCore/platform/graphics/android/GraphicsLayerAndroid.h b/Source/WebCore/platform/graphics/android/GraphicsLayerAndroid.h index e872c91..c34aed8 100644 --- a/Source/WebCore/platform/graphics/android/GraphicsLayerAndroid.h +++ b/Source/WebCore/platform/graphics/android/GraphicsLayerAndroid.h @@ -116,7 +116,9 @@ public: virtual void setZPosition(float); + void gatherRootLayers(Vector&); virtual void syncCompositingState(); + virtual void syncCompositingStateForThisLayerOnly(); void notifyClientAnimationStarted(); LayerAndroid* contentLayer() { return m_contentLayer; } -- cgit v1.1