Chromium Code Reviews| Index: third_party/WebKit/Source/core/paint/BoxPainter.cpp |
| diff --git a/third_party/WebKit/Source/core/paint/BoxPainter.cpp b/third_party/WebKit/Source/core/paint/BoxPainter.cpp |
| index 0eca8fd2c22a06c57d874abc0147cbd48ba66aec..b7e005a61ba2af7da17a4dfb21571ceabfc4df5e 100644 |
| --- a/third_party/WebKit/Source/core/paint/BoxPainter.cpp |
| +++ b/third_party/WebKit/Source/core/paint/BoxPainter.cpp |
| @@ -421,9 +421,14 @@ inline bool paintFastBottomLayer(const LayoutBoxModelObject& obj, const PaintInf |
| FloatRoundedRect border = info.isRoundedFill |
| ? backgroundRoundedRectAdjustedForBleedAvoidance(obj, rect, bleedAvoidance, box, boxSize, info.includeLeftEdge, info.includeRightEdge) |
| : FloatRoundedRect(pixelSnappedIntRect(rect)); |
| - // We only take this path for BorderFillBox. https://www.w3.org/TR/css3-background/#corner-overlap |
| - // should ensure that the border rrect is renderable. |
| - DCHECK(border.isRenderable()); |
| + |
| + Optional<RoundedInnerRectClipper> clipper; |
| + if (info.isRoundedFill && !border.isRenderable()) { |
|
chrishtr
2016/06/30 00:48:14
Why not ensure the border is renderable at the tim
f(malita)
2016/06/30 13:53:38
Yeah, that was my first thought also, but it turns
|
| + // When the rrect is not renderable, we resort to clipping. |
| + // RoundedInnerRectClipper handles this case via discrete, corner-wise clipping. |
| + clipper.emplace(obj, paintInfo, rect, border, ApplyToContext); |
| + border.setRadii(FloatRoundedRect::Radii()); |
| + } |
| // Paint the color + shadow if needed. |
| if (info.shouldPaintColor) { |