Chromium Code Reviews| Index: third_party/WebKit/Source/core/paint/BoxDecorationData.cpp |
| diff --git a/third_party/WebKit/Source/core/paint/BoxDecorationData.cpp b/third_party/WebKit/Source/core/paint/BoxDecorationData.cpp |
| index ef35fb1fffab783a39ddaa21d7c09b690541270b..822c00c4e36587792236dfdb3046ae8bac918419 100644 |
| --- a/third_party/WebKit/Source/core/paint/BoxDecorationData.cpp |
| +++ b/third_party/WebKit/Source/core/paint/BoxDecorationData.cpp |
| @@ -47,13 +47,19 @@ BackgroundBleedAvoidance BoxDecorationData::determineBackgroundBleedAvoidance(co |
| if (!hasBackground) |
| return BackgroundBleedNone; |
| - if (!hasBorderDecoration || !layoutBox.style()->hasBorderRadius() || layoutBox.canRenderBorderImage()) { |
| + const ComputedStyle& boxStyle = *layoutBox.style(); |
|
jbroman
2016/02/09 22:06:21
nit: *layoutBox.style() equivalent to layoutBox.st
|
| + const bool hasBorderRadius = boxStyle.hasBorderRadius(); |
| + if (!hasBorderDecoration || !hasBorderRadius || layoutBox.canRenderBorderImage()) { |
| if (layoutBox.backgroundShouldAlwaysBeClipped()) |
| return BackgroundBleedClipOnly; |
| + if (backgroundColor.alpha() && boxStyle.hasBackgroundImage() && hasBorderRadius) { |
|
f(malita)
2016/02/09 22:07:39
I think one can stack background layers arbitraril
|
| + // Prevent bleeding of background color behind the background image when we clip for the border radius |
| + return BackgroundBleedClipLayer; |
| + } |
| return BackgroundBleedNone; |
| } |
| - if (borderObscuresBackgroundEdge(*layoutBox.style())) |
| + if (borderObscuresBackgroundEdge(boxStyle)) |
| return BackgroundBleedShrinkBackground; |
| return BackgroundBleedClipLayer; |