summaryrefslogtreecommitdiffstats
path: root/WebCore/platform/graphics/mac/GraphicsContextMac.mm
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/platform/graphics/mac/GraphicsContextMac.mm')
-rw-r--r--WebCore/platform/graphics/mac/GraphicsContextMac.mm18
1 files changed, 7 insertions, 11 deletions
diff --git a/WebCore/platform/graphics/mac/GraphicsContextMac.mm b/WebCore/platform/graphics/mac/GraphicsContextMac.mm
index 15cae20..c149d70 100644
--- a/WebCore/platform/graphics/mac/GraphicsContextMac.mm
+++ b/WebCore/platform/graphics/mac/GraphicsContextMac.mm
@@ -57,23 +57,19 @@ static void drawFocusRingToContext(CGContextRef context, CGPathRef focusRingPath
#endif
}
-void GraphicsContext::drawFocusRing(const Vector<Path>& paths, int width, int offset, const Color& color)
+void GraphicsContext::drawFocusRing(const Path& path, int width, int /*offset*/, const Color& color)
{
+ // FIXME: Use 'offset' for something? http://webkit.org/b/49909
+
if (paintingDisabled())
return;
-
+
int radius = (width - 1) / 2;
- offset += radius;
CGColorRef colorRef = color.isValid() ? cachedCGColor(color, ColorSpaceDeviceRGB) : 0;
- RetainPtr<CGMutablePathRef> focusRingPath(AdoptCF, CGPathCreateMutable());
- unsigned pathCount = paths.size();
- for (unsigned i = 0; i < pathCount; i++)
- CGPathAddPath(focusRingPath.get(), 0, paths[i].platformPath());
-
- drawFocusRingToContext(platformContext(), focusRingPath.get(), colorRef, radius);
-}
-
+ drawFocusRingToContext(platformContext(), path.platformPath(), colorRef, radius);
+}
+
void GraphicsContext::drawFocusRing(const Vector<IntRect>& rects, int width, int offset, const Color& color)
{
if (paintingDisabled())