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

Unified Diff: third_party/WebKit/Source/platform/graphics/skia/SkiaUtils.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
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/skia/SkiaUtils.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/graphics/skia/SkiaUtils.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/skia/SkiaUtils.cpp b/third_party/WebKit/Source/platform/graphics/skia/SkiaUtils.cpp
index b183a4e69aabfb10c1fc60586062231e0b54db4c..278a10e32dbb9e6414691e5d884806d675a524d2 100644
--- a/third_party/WebKit/Source/platform/graphics/skia/SkiaUtils.cpp
+++ b/third_party/WebKit/Source/platform/graphics/skia/SkiaUtils.cpp
@@ -338,18 +338,18 @@ template <typename PrimitiveType>
void drawPlatformFocusRing(const PrimitiveType& primitive,
SkCanvas* canvas,
SkColor color,
- int width) {
+ float width) {
SkPaint paint;
paint.setAntiAlias(true);
paint.setStyle(SkPaint::kStroke_Style);
paint.setColor(color);
- paint.setStrokeWidth(GraphicsContext::focusRingWidth(width));
+ paint.setStrokeWidth(width);
#if OS(MACOSX)
paint.setAlpha(64);
const float cornerRadius = (width - 1) * 0.5f;
#else
- const float cornerRadius = 1;
+ const float cornerRadius = width;
#endif
drawFocusRingPrimitive(primitive, canvas, paint, cornerRadius);
@@ -365,10 +365,10 @@ void drawPlatformFocusRing(const PrimitiveType& primitive,
template void PLATFORM_EXPORT drawPlatformFocusRing<SkRect>(const SkRect&,
SkCanvas*,
SkColor,
- int width);
+ float width);
template void PLATFORM_EXPORT drawPlatformFocusRing<SkPath>(const SkPath&,
SkCanvas*,
SkColor,
- int width);
+ float width);
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/skia/SkiaUtils.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698