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

Unified Diff: Source/core/paint/BoxPainter.cpp

Issue 1137513003: Apply bleed-avoidance insets _after_ constraining the border (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 7 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
Index: Source/core/paint/BoxPainter.cpp
diff --git a/Source/core/paint/BoxPainter.cpp b/Source/core/paint/BoxPainter.cpp
index e0acf8f6fa76770d308ece366c9d46db48c7cc00..abf5736704ce7229ef005189806f2f7162e52043 100644
--- a/Source/core/paint/BoxPainter.cpp
+++ b/Source/core/paint/BoxPainter.cpp
@@ -264,16 +264,14 @@ void BoxPainter::applyBoxShadowForBackground(GraphicsContext* context, LayoutObj
FloatRoundedRect BoxPainter::getBackgroundRoundedRect(LayoutObject& obj, const LayoutRect& borderRect,
InlineFlowBox* box, LayoutUnit inlineBoxWidth, LayoutUnit inlineBoxHeight,
- bool includeLogicalLeftEdge, bool includeLogicalRightEdge, const FloatRectOutsets* insets)
+ bool includeLogicalLeftEdge, bool includeLogicalRightEdge)
{
- FloatRoundedRect border = obj.style()->getRoundedBorderFor(borderRect, includeLogicalLeftEdge,
- includeLogicalRightEdge, insets);
+ FloatRoundedRect border = obj.style()->getRoundedBorderFor(borderRect, includeLogicalLeftEdge, includeLogicalRightEdge);
if (box && (box->nextLineBox() || box->prevLineBox())) {
FloatRoundedRect segmentBorder = obj.style()->getRoundedBorderFor(LayoutRect(0, 0, inlineBoxWidth, inlineBoxHeight),
- includeLogicalLeftEdge, includeLogicalRightEdge, insets);
+ includeLogicalLeftEdge, includeLogicalRightEdge);
border.setRadii(segmentBorder.radii());
}
-
return border;
}
@@ -305,8 +303,10 @@ FloatRoundedRect BoxPainter::backgroundRoundedRectAdjustedForBleedAvoidance(Layo
-fractionalInset * edges[BSBottom].width,
-fractionalInset * edges[BSLeft].width);
- return getBackgroundRoundedRect(obj, borderRect, box, boxSize.width(), boxSize.height(),
- includeLogicalLeftEdge, includeLogicalRightEdge, &insets);
+ FloatRoundedRect backgroundRoundedRect = getBackgroundRoundedRect(obj, borderRect, box, boxSize.width(), boxSize.height(),
+ includeLogicalLeftEdge, includeLogicalRightEdge);
+ backgroundRoundedRect.shrink(insets);
+ return backgroundRoundedRect;
}
if (bleedAvoidance == BackgroundBleedBackgroundOverBorder)
return obj.style()->getRoundedInnerBorderFor(borderRect, includeLogicalLeftEdge, includeLogicalRightEdge);

Powered by Google App Engine
This is Rietveld 408576698