Use render box background over border draw strategy in cases with background-image
authorjunov@google.com <junov@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 12 Dec 2012 17:11:37 +0000 (17:11 +0000)
committerjunov@google.com <junov@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 12 Dec 2012 17:11:37 +0000 (17:11 +0000)
commit9040288284761c393ebbd609ab91533be9152c85
tree8edbb63f34c8790049b54cafb1cc709d55ed4a37
parentfe162231f398be0588af1ac78c483a318b485363
Use render box background over border draw strategy in cases with background-image
https://bugs.webkit.org/show_bug.cgi?id=103409

Reviewed by Simon Fraser.

Source/WebCore:

The BackgroundOverBorderBleedAvoidance mode was not being used in
cases where the background is an opaque image. It was also not
being used in cases with multiple layers. The multiple layer
case is now safe with respect to color bleeding if the top layer
is opaque, thank to the recent addition of layer occlusion culling
in r135629.

No new tests. Testing already covered by the following tests:
fast/backgrounds/background-opaque-images-over-color.html
fast/backgrounds/gradient-background-leakage-2.html

* rendering/RenderBox.cpp:
(WebCore::RenderBox::determineBackgroundBleedAvoidance):
(WebCore::RenderBox::backgroundHasOpaqueTopLayer):
* rendering/RenderBox.h:
(RenderBox):

LayoutTests:

Added image failure expectation for
fast/backgrounds/gradient-background-leakage-2.html which needs
new baselines.

* platform/chromium/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@137473 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/platform/chromium/TestExpectations
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderBox.cpp
Source/WebCore/rendering/RenderBox.h