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

Unified Diff: third_party/WebKit/Source/core/paint/ImagePainter.cpp

Issue 2386033002: Scale focus outline thickness with zoom level. (Closed)
Patch Set: merge conflicts Created 4 years, 2 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: third_party/WebKit/Source/core/paint/ImagePainter.cpp
diff --git a/third_party/WebKit/Source/core/paint/ImagePainter.cpp b/third_party/WebKit/Source/core/paint/ImagePainter.cpp
index e802681814f31e2d851e2abf00a677e98541fbb2..dbc04d34428ed1d0b2e0603b56813855eec8d03a 100644
--- a/third_party/WebKit/Source/core/paint/ImagePainter.cpp
+++ b/third_party/WebKit/Source/core/paint/ImagePainter.cpp
@@ -51,8 +51,9 @@ void ImagePainter::paintAreaElementFocusRing(const PaintInfo& paintInfo,
// LayoutTheme::themeDrawsFocusRing here.
const ComputedStyle& areaElementStyle = *areaElement.ensureComputedStyle();
- int outlineWidth = areaElementStyle.outlineWidth();
- if (!outlineWidth)
+ // If the outline width is 0 we want to avoid drawing anything even if we
+ // don't use the value directly.
+ if (!areaElementStyle.outlineWidth())
return;
Path path = areaElement.getPath(&m_layoutImage);
@@ -79,7 +80,8 @@ void ImagePainter::paintAreaElementFocusRing(const PaintInfo& paintInfo,
paintInfo.context.save();
paintInfo.context.clip(pixelSnappedIntRect(focusRect));
paintInfo.context.drawFocusRing(
- path, outlineWidth, areaElementStyle.outlineOffset(),
+ path, areaElementStyle.getOutlineStrokeWidthForFocusRing(),
+ areaElementStyle.outlineOffset(),
m_layoutImage.resolveColor(areaElementStyle, CSSPropertyOutlineColor));
paintInfo.context.restore();
}
« no previous file with comments | « third_party/WebKit/LayoutTests/TestExpectations ('k') | third_party/WebKit/Source/core/paint/ObjectPainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698