| 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..3ed6ebf823d68f052bc106bc4f9434b4b674dc1e 100644
|
| --- a/third_party/WebKit/Source/core/paint/ImagePainter.cpp
|
| +++ b/third_party/WebKit/Source/core/paint/ImagePainter.cpp
|
| @@ -16,6 +16,7 @@
|
| #include "core/page/Page.h"
|
| #include "core/paint/BoxPainter.h"
|
| #include "core/paint/LayoutObjectDrawingRecorder.h"
|
| +#include "core/paint/ObjectPainter.h"
|
| #include "core/paint/PaintInfo.h"
|
| #include "platform/geometry/LayoutPoint.h"
|
| #include "platform/graphics/Path.h"
|
| @@ -51,8 +52,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 +81,8 @@ void ImagePainter::paintAreaElementFocusRing(const PaintInfo& paintInfo,
|
| paintInfo.context.save();
|
| paintInfo.context.clip(pixelSnappedIntRect(focusRect));
|
| paintInfo.context.drawFocusRing(
|
| - path, outlineWidth, areaElementStyle.outlineOffset(),
|
| + path, ObjectPainter::getOutlineStrokeWidth(areaElementStyle),
|
| + areaElementStyle.outlineOffset(),
|
| m_layoutImage.resolveColor(areaElementStyle, CSSPropertyOutlineColor));
|
| paintInfo.context.restore();
|
| }
|
|
|