| Index: Source/core/html/canvas/CanvasRenderingContext2D.cpp
|
| diff --git a/Source/core/html/canvas/CanvasRenderingContext2D.cpp b/Source/core/html/canvas/CanvasRenderingContext2D.cpp
|
| index ef14b3f8911c4d39d749f93a67782f4f382cc767..8e53eb03e1390ca31294bec2c312f99af48e4e5c 100644
|
| --- a/Source/core/html/canvas/CanvasRenderingContext2D.cpp
|
| +++ b/Source/core/html/canvas/CanvasRenderingContext2D.cpp
|
| @@ -2283,21 +2283,24 @@ void CanvasRenderingContext2D::drawFocusRing(const Path& path)
|
| if (!c)
|
| return;
|
|
|
| + // These should match the style defined in html.css.
|
| + Color focusRingColor = RenderTheme::theme().focusRingColor();
|
| + const int focusRingWidth = 5;
|
| + const int focusRingOutline = 0;
|
| +
|
| + // We need to add focusRingWidth to dirtyRect.
|
| + StrokeData strokeData;
|
| + strokeData.setThickness(focusRingWidth);
|
| +
|
| FloatRect dirtyRect;
|
| - if (!computeDirtyRect(path.boundingRect(), &dirtyRect))
|
| + if (!computeDirtyRect(path.strokeBoundingRect(strokeData), &dirtyRect))
|
| return;
|
|
|
| c->save();
|
| c->setAlphaAsFloat(1.0);
|
| c->clearShadow();
|
| c->setCompositeOperation(CompositeSourceOver, blink::WebBlendModeNormal);
|
| -
|
| - // These should match the style defined in html.css.
|
| - Color focusRingColor = RenderTheme::theme().focusRingColor();
|
| - const int focusRingWidth = 5;
|
| - const int focusRingOutline = 0;
|
| c->drawFocusRing(path, focusRingWidth, focusRingOutline, focusRingColor);
|
| -
|
| c->restore();
|
|
|
| didDraw(dirtyRect);
|
|
|