Index: Source/core/rendering/RenderLayer.cpp |
diff --git a/Source/core/rendering/RenderLayer.cpp b/Source/core/rendering/RenderLayer.cpp |
index c56125a15a178687d2ac0e647d4773554b8e1124..987fcab82d49a38b7fc2df277a2182ce783c327d 100644 |
--- a/Source/core/rendering/RenderLayer.cpp |
+++ b/Source/core/rendering/RenderLayer.cpp |
@@ -3801,6 +3801,11 @@ void RenderLayer::paintLayerContents(GraphicsContext* context, const LayerPainti |
paintMaskForFragments(layerFragments, context, localPaintingInfo, paintingRootForRenderer); |
} |
+ if ((localPaintFlags & PaintLayerPaintingCompositingBorderRadiusMaskPhase) && renderer()->style()->hasBorderRadius() && shouldPaintContent && !selectionOnly) { |
+ // Paint the border radius mask for the fragments. |
+ paintMaskForFragments(layerFragments, context, localPaintingInfo, paintingRootForRenderer, PaintPhaseBorderRadiusMask); |
+ } |
+ |
// End our transparency layer |
if (haveTransparency && m_usedTransparency && !m_paintingInsideReflection) { |
context->endTransparencyLayer(); |
@@ -4080,7 +4085,7 @@ void RenderLayer::paintOutlineForFragments(const LayerFragments& layerFragments, |
} |
void RenderLayer::paintMaskForFragments(const LayerFragments& layerFragments, GraphicsContext* context, const LayerPaintingInfo& localPaintingInfo, |
- RenderObject* paintingRootForRenderer) |
+ RenderObject* paintingRootForRenderer, PaintPhase paintPhase) |
{ |
for (size_t i = 0; i < layerFragments.size(); ++i) { |
const LayerFragment& fragment = layerFragments.at(i); |
@@ -4092,7 +4097,7 @@ void RenderLayer::paintMaskForFragments(const LayerFragments& layerFragments, Gr |
// Paint the mask. |
// FIXME: Eventually we will collect the region from the fragment itself instead of just from the paint info. |
- PaintInfo paintInfo(context, pixelSnappedIntRect(fragment.backgroundRect.rect()), PaintPhaseMask, PaintBehaviorNormal, paintingRootForRenderer, localPaintingInfo.region, 0, 0, localPaintingInfo.rootLayer->renderer()); |
+ PaintInfo paintInfo(context, pixelSnappedIntRect(fragment.backgroundRect.rect()), paintPhase, PaintBehaviorNormal, paintingRootForRenderer, localPaintingInfo.region, 0, 0, localPaintingInfo.rootLayer->renderer()); |
renderer()->paint(paintInfo, toPoint(fragment.layerBounds.location() - renderBoxLocation() + localPaintingInfo.subPixelAccumulation)); |
if (localPaintingInfo.clipToDirtyRect) |
@@ -5419,6 +5424,11 @@ bool RenderLayer::hasCompositedMask() const |
return m_backing && m_backing->hasMaskLayer(); |
} |
+bool RenderLayer::hasCompositedBorderRadiusMask() const |
+{ |
+ return m_backing && m_backing->hasBorderRadiusLayer(); |
+} |
+ |
GraphicsLayer* RenderLayer::layerForScrolling() const |
{ |
return m_backing ? m_backing->scrollingContentsLayer() : 0; |