Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1031)

Unified Diff: Source/core/rendering/RenderReplaced.cpp

Issue 16688004: Large canvas does not honor containing div's border radius (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Replaced explicit baselines with NeedsRebaseline Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/rendering/RenderLayerCompositor.cpp ('k') | Source/web/painting/ContinuousPainter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderReplaced.cpp
diff --git a/Source/core/rendering/RenderReplaced.cpp b/Source/core/rendering/RenderReplaced.cpp
index 900fa7d50acfd333c8436bdb3f51a0418793d2c9..709661194210f2c14871a2651b118d4ad26edd69 100644
--- a/Source/core/rendering/RenderReplaced.cpp
+++ b/Source/core/rendering/RenderReplaced.cpp
@@ -119,11 +119,14 @@ void RenderReplaced::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset)
return;
}
+ if (paintInfo.phase == PaintPhaseClippingMask && (!hasLayer() || !layer()->hasCompositedClippingMask()))
+ 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 != PaintPhaseClippingMask)
return;
if (!paintInfo.shouldPaintWithinRoot(this))
@@ -152,7 +155,11 @@ void RenderReplaced::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset)
}
if (!completelyClippedOut) {
- paintReplaced(paintInfo, adjustedPaintOffset);
+ if (paintInfo.phase == PaintPhaseClippingMask) {
+ paintClippingMask(paintInfo, adjustedPaintOffset);
+ } else {
+ paintReplaced(paintInfo, adjustedPaintOffset);
+ }
if (style()->hasBorderRadius())
paintInfo.context->restore();
@@ -170,7 +177,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 != PaintPhaseClippingMask)
return false;
if (!paintInfo.shouldPaintWithinRoot(this))
« no previous file with comments | « Source/core/rendering/RenderLayerCompositor.cpp ('k') | Source/web/painting/ContinuousPainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698