Source/WebCore/ChangeLog

 12011-05-26 Levi Weintraub <leviw@chromium.org>
 2
 3 Reviewed by NOBODY (OOPS!).
 4
 5 Switch paintFocusRing to IntPoint
 6 https://bugs.webkit.org/show_bug.cgi?id=61580
 7
 8 Switching paintFocusRing to take an IntPoint representing the paint offset
 9 instead of a pair of ints.
 10
 11 No new tests as this is just refactoring.
 12
 13 * rendering/RenderInline.cpp:
 14 (WebCore::RenderInline::paintOutline):
 15 * rendering/RenderObject.cpp:
 16 (WebCore::RenderObject::paintFocusRing):
 17 (WebCore::RenderObject::paintOutline):
 18 * rendering/RenderObject.h:
 19
1202011-05-26 David Levin <levin@chromium.org>
221
322 Reviewed by Darin Fisher.
87447

Source/WebCore/rendering/RenderInline.cpp

@@void RenderInline::paintOutline(Graphics
13751375 if (styleToUse->outlineStyleIsAuto() || hasOutlineAnnotation()) {
13761376 if (!theme()->supportsFocusRing(styleToUse)) {
13771377 // Only paint the focus ring by hand if the theme isn't able to draw the focus ring.
1378  paintFocusRing(graphicsContext, tx, ty, styleToUse);
 1378 paintFocusRing(graphicsContext, IntPoint(tx, ty), styleToUse);
13791379 }
13801380 }
13811381
87447

Source/WebCore/rendering/RenderObject.cpp

@@void RenderObject::drawArcForBoxSide(Gra
997997}
998998#endif
999999
1000 void RenderObject::paintFocusRing(GraphicsContext* context, int tx, int ty, RenderStyle* style)
 1000void RenderObject::paintFocusRing(GraphicsContext* context, const IntPoint& paintOffset, RenderStyle* style)
10011001{
10021002 Vector<IntRect> focusRingRects;
1003  addFocusRingRects(focusRingRects, IntPoint(tx, ty));
 1003 addFocusRingRects(focusRingRects, paintOffset);
10041004 if (style->outlineStyleIsAuto())
10051005 context->drawFocusRing(focusRingRects, style->outlineWidth(), style->outlineOffset(), style->visitedDependentColor(CSSPropertyOutlineColor));
10061006 else

@@void RenderObject::paintOutline(Graphics
10361036 if (styleToUse->outlineStyleIsAuto() || hasOutlineAnnotation()) {
10371037 if (!theme()->supportsFocusRing(styleToUse)) {
10381038 // Only paint the focus ring by hand if the theme isn't able to draw the focus ring.
1039  paintFocusRing(graphicsContext, paintRect.x(), paintRect.y(), styleToUse);
 1039 paintFocusRing(graphicsContext, paintRect.location(), styleToUse);
10401040 }
10411041 }
10421042
87447

Source/WebCore/rendering/RenderObject.h

@@protected:
791791 void drawLineForBoxSide(GraphicsContext*, int x1, int y1, int x2, int y2, BoxSide,
792792 Color, EBorderStyle, int adjbw1, int adjbw2, bool antialias = false);
793793
794  void paintFocusRing(GraphicsContext*, int tx, int ty, RenderStyle*);
 794 void paintFocusRing(GraphicsContext*, const IntPoint&, RenderStyle*);
795795 void paintOutline(GraphicsContext*, const IntRect&);
796796 void addPDFURLRect(GraphicsContext*, const IntRect&);
797797
87447