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

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

Issue 1160643004: Fix cull rect computation for SVG{Container,Image,Shape}Painter outlines (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 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/ObjectPainter.h ('k') | Source/core/paint/SVGContainerPainter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/paint/ObjectPainter.cpp
diff --git a/Source/core/paint/ObjectPainter.cpp b/Source/core/paint/ObjectPainter.cpp
index 37886757c15136eb1bebe76af7fa091ca88faa3d..f19c01892d199ee8763ab54e5adafa280c1f9f1f 100644
--- a/Source/core/paint/ObjectPainter.cpp
+++ b/Source/core/paint/ObjectPainter.cpp
@@ -15,6 +15,18 @@
namespace blink {
+LayoutRect ObjectPainter::outlineBounds(const LayoutRect& objectBounds, const ComputedStyle& style)
+{
+ int outlineOutset;
+ if (style.outlineStyleIsAuto())
+ outlineOutset = GraphicsContext::focusRingOutsetExtent(style.outlineOffset(), style.outlineWidth());
+ else
+ outlineOutset = style.outlineSize();
fs 2015/06/08 16:30:51 This pattern appears to pop up here and there... M
chrishtr 2015/06/08 22:59:41 Sure...do as a followup maybe?
+ LayoutRect outlineBounds(objectBounds);
+ outlineBounds.inflate(outlineOutset);
+ return outlineBounds;
+}
+
void ObjectPainter::paintFocusRing(const PaintInfo& paintInfo, const ComputedStyle& style, const Vector<LayoutRect>& focusRingRects)
{
ASSERT(style.outlineStyleIsAuto());
« no previous file with comments | « Source/core/paint/ObjectPainter.h ('k') | Source/core/paint/SVGContainerPainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698