OSDN Git Service

Fix crash with composited layers - DO NOT MERGE
authorNicolas Roard <nicolasroard@google.com>
Sat, 17 Dec 2011 04:05:07 +0000 (20:05 -0800)
committerNicolas Roard <nicolasroard@google.com>
Tue, 3 Jan 2012 18:48:53 +0000 (10:48 -0800)
commit61e0d189f2b74650bf72a6a2820f66a8b17c3d06
treee131cc1d57c9fc94c461bb36ffb132cb0235f2c4
parent599c05f3080acd1c99f4d925c333d8a2711c9bdf
Fix crash with composited layers - DO NOT MERGE

Cherry-pick from master

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.cpp
Source/WebCore/platform/graphics/android/GraphicsLayerAndroid.h
Source/WebKit/android/WebCoreSupport/ChromeClientAndroid.cpp