Index: Source/core/rendering/RenderReplaced.cpp |
diff --git a/Source/core/rendering/RenderReplaced.cpp b/Source/core/rendering/RenderReplaced.cpp |
index 93db7ed2d3e54c4cebd894321c8c13bad8d20a4a..bdfa1e82a8e69533c2405fecace4c1c3b06113ab 100644 |
--- a/Source/core/rendering/RenderReplaced.cpp |
+++ b/Source/core/rendering/RenderReplaced.cpp |
@@ -120,11 +120,14 @@ void RenderReplaced::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset) |
return; |
} |
+ if (paintInfo.phase == PaintPhaseBorderRadiusMask && (!hasLayer() || !layer()->hasCompositedBorderRadiusMask())) |
+ return; |
+ |
LayoutRect paintRect = LayoutRect(adjustedPaintOffset, size()); |
if ((paintInfo.phase == PaintPhaseOutline || paintInfo.phase == PaintPhaseSelfOutline) && style()->outlineWidth()) |
paintOutline(paintInfo, paintRect); |
- if (paintInfo.phase != PaintPhaseForeground && paintInfo.phase != PaintPhaseSelection && !canHaveChildren()) |
+ if (paintInfo.phase != PaintPhaseForeground && paintInfo.phase != PaintPhaseSelection && !canHaveChildren() && paintInfo.phase != PaintPhaseBorderRadiusMask) |
return; |
if (!paintInfo.shouldPaintWithinRoot(this)) |
@@ -153,7 +156,11 @@ void RenderReplaced::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset) |
} |
if (!completelyClippedOut) { |
- paintReplaced(paintInfo, adjustedPaintOffset); |
+ if (paintInfo.phase == PaintPhaseBorderRadiusMask) { |
+ paintInfo.context->fillRect(pixelSnappedIntRect(paintRect), Color::black); |
+ } else { |
+ paintReplaced(paintInfo, adjustedPaintOffset); |
+ } |
if (style()->hasBorderRadius()) |
paintInfo.context->restore(); |
@@ -171,7 +178,7 @@ void RenderReplaced::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset) |
bool RenderReplaced::shouldPaint(PaintInfo& paintInfo, const LayoutPoint& paintOffset) |
{ |
if (paintInfo.phase != PaintPhaseForeground && paintInfo.phase != PaintPhaseOutline && paintInfo.phase != PaintPhaseSelfOutline |
- && paintInfo.phase != PaintPhaseSelection && paintInfo.phase != PaintPhaseMask) |
+ && paintInfo.phase != PaintPhaseSelection && paintInfo.phase != PaintPhaseMask && paintInfo.phase != PaintPhaseBorderRadiusMask) |
return false; |
if (!paintInfo.shouldPaintWithinRoot(this)) |