REGRESSION (r183820): webkit.org/blog/ background painting issue on reload, when...
authorsimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 28 May 2015 00:39:35 +0000 (00:39 +0000)
committersimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 28 May 2015 00:39:35 +0000 (00:39 +0000)
commit8c8f35b25eff2a81d4784d6e541cdaad274cbe27
tree8c3e3bc778e42d69e45b87ec04b1a9801607a66e
parentdd0784857f5095dec2442b7e464308443089d900
REGRESSION (r183820): webkit.org/blog/ background painting issue on reload, when the page contains videos
https://bugs.webkit.org/show_bug.cgi?id=145420

Reviewed by Dean Jackson.
Source/WebCore:

After r183820, the media controls no longer had a wrapper that created CSS stacking context.
The media controls on Mac use mix-blend-mode, which causes the compositing code to look for
a stacking context ancestor and make it composited. After this change, it would walk up
to a layer outside of the media element (e.g. the document element's layer), and make
that composited. This triggered bugs with root background painting.

Prevent mix-blend-mode affecting content outside the media elements by having the media element's
layer act as a stacking context.

Test: media/controls-layers.html

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::RenderLayer):
* rendering/RenderLayer.h:

LayoutTests:

Test that dumps compositing layers in a document with media controls.

* media/controls-layers.html: Added.
* platform/mac/media/controls-layers-expected.txt: Added.
* platform/mac-mavericks/media/controls-layers-expected.txt: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@184932 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/media/controls-layers.html [new file with mode: 0644]
LayoutTests/platform/mac-mavericks/media/controls-layers-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac/media/controls-layers-expected.txt [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderLayer.cpp
Source/WebCore/rendering/RenderLayer.h