Chromium Code Reviews| Index: third_party/WebKit/Source/core/paint/ObjectPainter.cpp |
| diff --git a/third_party/WebKit/Source/core/paint/ObjectPainter.cpp b/third_party/WebKit/Source/core/paint/ObjectPainter.cpp |
| index 7de53eb78014465b96b3cf101223b4e8dad157e6..891c19cd8f325aa0fc1c364c2639b772898c69ff 100644 |
| --- a/third_party/WebKit/Source/core/paint/ObjectPainter.cpp |
| +++ b/third_party/WebKit/Source/core/paint/ObjectPainter.cpp |
| @@ -217,6 +217,16 @@ void fillQuad(GraphicsContext& context, |
| } // namespace |
| +float ObjectPainter::getOutlineStrokeWidth(const ComputedStyle& style) { |
| +#if OS(MACOSX) |
| + return style.outlineWidth(); |
|
chrishtr
2016/10/07 21:14:21
Why this special case?
Also, it apears there is t
Bret
2016/10/08 01:32:40
This is the same case, just moved around. See my o
|
| +#else |
| + // Draw an outline with thickness in proportion to the zoom level, but never |
| + // less than 1 pixel so that it remains visible. |
| + return std::max(style.effectiveZoom(), 1.f); |
| +#endif |
| +} |
| + |
| void ObjectPainter::paintOutline(const PaintInfo& paintInfo, |
| const LayoutPoint& paintOffset) { |
| ASSERT(shouldPaintSelfOutline(paintInfo.phase)); |
| @@ -270,7 +280,7 @@ void ObjectPainter::paintOutline(const PaintInfo& paintInfo, |
| m_layoutObject.resolveColor(styleToUse, CSSPropertyOutlineColor); |
| if (styleToUse.outlineStyleIsAuto()) { |
| paintInfo.context.drawFocusRing(pixelSnappedOutlineRects, |
| - styleToUse.outlineWidth(), |
| + getOutlineStrokeWidth(styleToUse), |
| styleToUse.outlineOffset(), color); |
| return; |
| } |