Add a mechanism to test for the compositing tree mutated during painting
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 27 Sep 2011 21:47:30 +0000 (21:47 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 27 Sep 2011 21:47:30 +0000 (21:47 +0000)
commit337174f23f1feb767b4201b8a9fc95105967ba7e
treeac33bc57c4b43c6b301e28a21d5184c1bc44f7da
parentdc783b1546318ba476d8ab5abb172a950f1ee70b
Add a mechanism to test for the compositing tree mutated during painting
https://bugs.webkit.org/show_bug.cgi?id=68738

Patch by James Robinson <jamesr@chromium.org> on 2011-09-27
Reviewed by Adam Barth.

Source/WebCore:

Sets a static bool during GraphicsLayer::paintGraphicsLayerContents and ASSERT()s that we never create or
destroy a GraphicsLayer inside this function. Painting should never mutate the GraphicsLayer tree.

Test: compositing/video/video-with-invalid-source.html

* platform/graphics/GraphicsLayer.cpp:
(WebCore::GraphicsLayer::GraphicsLayer):
(WebCore::GraphicsLayer::~GraphicsLayer):
(WebCore::GraphicsLayer::paintGraphicsLayerContents):

LayoutTests:

Adds a test that caused compositing to be disabled during painting before r95863 due to a video load failing.

* compositing/video/video-with-invalid-source-expected.txt: Added.
* compositing/video/video-with-invalid-source.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@96160 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/compositing/video/video-with-invalid-source-expected.txt [new file with mode: 0644]
LayoutTests/compositing/video/video-with-invalid-source.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/GraphicsLayer.cpp