| Index: Source/WebCore/rendering/RenderObject.cpp
|
| ===================================================================
|
| --- Source/WebCore/rendering/RenderObject.cpp (revision 145084)
|
| +++ Source/WebCore/rendering/RenderObject.cpp (working copy)
|
| @@ -1090,14 +1090,14 @@
|
| }
|
| }
|
|
|
| -void RenderObject::paintFocusRing(GraphicsContext* context, const LayoutPoint& paintOffset, RenderStyle* style)
|
| +void RenderObject::paintFocusRing(PaintInfo& paintInfo, const LayoutPoint& paintOffset, RenderStyle* style)
|
| {
|
| Vector<IntRect> focusRingRects;
|
| - addFocusRingRects(focusRingRects, paintOffset);
|
| + addFocusRingRects(focusRingRects, paintOffset, paintInfo.paintContainer);
|
| if (style->outlineStyleIsAuto())
|
| - context->drawFocusRing(focusRingRects, style->outlineWidth(), style->outlineOffset(), style->visitedDependentColor(CSSPropertyOutlineColor));
|
| + paintInfo.context->drawFocusRing(focusRingRects, style->outlineWidth(), style->outlineOffset(), style->visitedDependentColor(CSSPropertyOutlineColor));
|
| else
|
| - addPDFURLRect(context, unionRect(focusRingRects));
|
| + addPDFURLRect(paintInfo.context, unionRect(focusRingRects));
|
| }
|
|
|
| void RenderObject::addPDFURLRect(GraphicsContext* context, const LayoutRect& rect)
|
| @@ -1113,23 +1113,20 @@
|
| context->setURLForRect(n->document()->completeURL(href), pixelSnappedIntRect(rect));
|
| }
|
|
|
| -void RenderObject::paintOutline(GraphicsContext* graphicsContext, const LayoutRect& paintRect)
|
| +void RenderObject::paintOutline(PaintInfo& paintInfo, 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(graphicsContext, paintRect.location(), styleToUse);
|
| + paintFocusRing(paintInfo, paintRect.location(), styleToUse);
|
| }
|
| }
|
|
|
| @@ -1146,6 +1143,10 @@
|
| 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) {
|
| @@ -1218,7 +1219,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());
|
|
|