Index: Source/WebCore/rendering/RenderObject.cpp |
=================================================================== |
--- Source/WebCore/rendering/RenderObject.cpp (revision 145111) |
+++ Source/WebCore/rendering/RenderObject.cpp (working copy) |
@@ -1090,14 +1090,14 @@ |
} |
} |
-void RenderObject::paintFocusRing(PaintInfo& paintInfo, const LayoutPoint& paintOffset, RenderStyle* style) |
+void RenderObject::paintFocusRing(GraphicsContext* context, const LayoutPoint& paintOffset, RenderStyle* style) |
{ |
Vector<IntRect> focusRingRects; |
- addFocusRingRects(focusRingRects, paintOffset, paintInfo.paintContainer); |
+ addFocusRingRects(focusRingRects, paintOffset); |
if (style->outlineStyleIsAuto()) |
- paintInfo.context->drawFocusRing(focusRingRects, style->outlineWidth(), style->outlineOffset(), style->visitedDependentColor(CSSPropertyOutlineColor)); |
+ context->drawFocusRing(focusRingRects, style->outlineWidth(), style->outlineOffset(), style->visitedDependentColor(CSSPropertyOutlineColor)); |
else |
- addPDFURLRect(paintInfo.context, unionRect(focusRingRects)); |
+ addPDFURLRect(context, unionRect(focusRingRects)); |
} |
void RenderObject::addPDFURLRect(GraphicsContext* context, const LayoutRect& rect) |
@@ -1113,20 +1113,23 @@ |
context->setURLForRect(n->document()->completeURL(href), pixelSnappedIntRect(rect)); |
} |
-void RenderObject::paintOutline(PaintInfo& paintInfo, const LayoutRect& paintRect) |
+void RenderObject::paintOutline(GraphicsContext* graphicsContext, const LayoutRect& paintRect) |
{ |
if (!hasOutline()) |
return; |
RenderStyle* styleToUse = style(); |
LayoutUnit outlineWidth = styleToUse->outlineWidth(); |
+ EBorderStyle outlineStyle = styleToUse->outlineStyle(); |
+ Color outlineColor = styleToUse->visitedDependentColor(CSSPropertyOutlineColor); |
+ |
int outlineOffset = styleToUse->outlineOffset(); |
if (styleToUse->outlineStyleIsAuto() || hasOutlineAnnotation()) { |
if (!theme()->supportsFocusRing(styleToUse)) { |
// Only paint the focus ring by hand if the theme isn't able to draw the focus ring. |
- paintFocusRing(paintInfo, paintRect.location(), styleToUse); |
+ paintFocusRing(graphicsContext, paintRect.location(), styleToUse); |
} |
} |
@@ -1143,10 +1146,6 @@ |
if (outer.isEmpty()) |
return; |
- EBorderStyle outlineStyle = styleToUse->outlineStyle(); |
- Color outlineColor = styleToUse->visitedDependentColor(CSSPropertyOutlineColor); |
- |
- GraphicsContext* graphicsContext = paintInfo.context; |
bool useTransparencyLayer = outlineColor.hasAlpha(); |
if (useTransparencyLayer) { |
if (outlineStyle == SOLID) { |
@@ -1219,7 +1218,7 @@ |
// descendants. |
FloatPoint absolutePoint = localToAbsolute(); |
addFocusRingRects(rects, flooredLayoutPoint(absolutePoint)); |
- size_t count = rects.size(); |
+ size_t count = rects.size(); |
for (size_t i = 0; i < count; ++i) { |
IntRect rect = rects[i]; |
rect.move(-absolutePoint.x(), -absolutePoint.y()); |