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

Unified Diff: Source/core/html/canvas/CanvasRenderingContext2D.cpp

Issue 21643002: Canvas focus outline should match style in html.css. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 5 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/canvas/CanvasRenderingContext2D.cpp
diff --git a/Source/core/html/canvas/CanvasRenderingContext2D.cpp b/Source/core/html/canvas/CanvasRenderingContext2D.cpp
index e29bce59605df5a9c0af1a0284f8a8e8c4a6d760..a857b20c8695df9922d63bd167454afa9a083494 100644
--- a/Source/core/html/canvas/CanvasRenderingContext2D.cpp
+++ b/Source/core/html/canvas/CanvasRenderingContext2D.cpp
@@ -2400,9 +2400,11 @@ void CanvasRenderingContext2D::drawFocusRing(const Path& path, Element* element)
c->clearShadow();
c->setCompositeOperation(CompositeSourceOver, BlendModeNormal);
- RefPtr<RenderStyle> style(RenderStyle::createDefaultStyle());
+ // These should match the style defined in html.css.
Color focusRingColor = RenderTheme::focusRingColor();
- c->drawFocusRing(path, style->outlineWidth(), style->outlineOffset(), focusRingColor);
+ const int focusRingWidth = 5;
+ const int focusRingOutline = 0;
+ c->drawFocusRing(path, focusRingWidth, focusRingOutline, focusRingColor);
didDraw(path.boundingRect());
c->restore();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698