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

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

Issue 1154213013: Stateful BoxBorderPainter (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: minor optimization 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
« no previous file with comments | « Source/core/paint/BoxBorderPainter.cpp ('k') | Source/platform/geometry/FloatRoundedRect.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/paint/BoxPainter.cpp
diff --git a/Source/core/paint/BoxPainter.cpp b/Source/core/paint/BoxPainter.cpp
index 4ccd991b64153a65a34747e058f3c7ecd4fe0694..114e48926124ed671e08d1db0d7316e2a6066e67 100644
--- a/Source/core/paint/BoxPainter.cpp
+++ b/Source/core/paint/BoxPainter.cpp
@@ -1172,9 +1172,17 @@ bool BoxPainter::allCornersClippedOut(const FloatRoundedRect& border, const IntR
return true;
}
-void BoxPainter::paintBorder(LayoutBoxModelObject& obj, const PaintInfo& info, const LayoutRect& rect, const ComputedStyle& style, BackgroundBleedAvoidance bleedAvoidance, bool includeLogicalLeftEdge, bool includeLogicalRightEdge)
+void BoxPainter::paintBorder(LayoutBoxModelObject& obj, const PaintInfo& info,
+ const LayoutRect& rect, const ComputedStyle& style, BackgroundBleedAvoidance bleedAvoidance,
+ bool includeLogicalLeftEdge, bool includeLogicalRightEdge)
{
- BoxBorderPainter().paintBorder(obj, info, rect, style, bleedAvoidance, includeLogicalLeftEdge, includeLogicalRightEdge);
+ // border-image is not affected by border-radius.
+ if (paintNinePieceImage(obj, info.context, rect, style, style.borderImage()))
+ return;
+
+ const BoxBorderPainter borderPainter(rect, style, info.rect, bleedAvoidance,
+ includeLogicalLeftEdge, includeLogicalRightEdge);
+ borderPainter.paintBorder(info, rect);
}
void BoxPainter::paintBoxShadow(const PaintInfo& info, const LayoutRect& paintRect, const ComputedStyle& style, ShadowStyle shadowStyle, bool includeLogicalLeftEdge, bool includeLogicalRightEdge)
« no previous file with comments | « Source/core/paint/BoxBorderPainter.cpp ('k') | Source/platform/geometry/FloatRoundedRect.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698