REGRESSION (r135628-135632): Double box shadow failure to render
authorjunov@google.com <junov@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 29 Jan 2013 21:32:07 +0000 (21:32 +0000)
committerjunov@google.com <junov@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 29 Jan 2013 21:32:07 +0000 (21:32 +0000)
commit8f09d2f2274f63506544ea8baec589657d77954a
tree26a9725cf045c86df8902dfe7b2986c5aa79b406
parent0bef8cf36e40693c37ec7728a1b0b198bff1e7ab
REGRESSION (r135628-135632): Double box shadow failure to render
https://bugs.webkit.org/show_bug.cgi?id=107833

Reviewed by Simon Fraser.

Source/WebCore:

Regression caused by http://trac.webkit.org/changeset/135629
The regression was due to faulty occlusion logic that was assuming
that drawing the background color of a render box background layer
could be skipped when the same layer also has an opaque image attached.
In the case where the background color is drawn for the purpose of
rendering a box shadow, the shadow is typically not
completely occluded by the background image because of the shadow
blur and/or offset.  This patch fixes the problem by not culling a
background draw if it is used to draw a box shadow.

Test: fast/backgrounds/gradient-background-shadow.html

* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::paintFillLayerExtended):
Changing occlusion culling test to never cull background color
draw if it is used to draw a box shadow. This is because box shadows
can draw outside the border fill region.

LayoutTests:

New ref test verifies that box shadow is drawn when
background is an opaque image. Test uses an blue gradient
as background image. Reference uses blue background color.

* fast/backgrounds/gradient-background-shadow-expected.html: Added.
* fast/backgrounds/gradient-background-shadow.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@141160 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/backgrounds/gradient-background-shadow-expected.html [new file with mode: 0644]
LayoutTests/fast/backgrounds/gradient-background-shadow.html [new file with mode: 0644]
LayoutTests/platform/chromium/TestExpectations
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderBoxModelObject.cpp