Diff
Modified: trunk/Source/WebCore/ChangeLog (87737 => 87738)
--- trunk/Source/WebCore/ChangeLog 2011-05-31 16:51:09 UTC (rev 87737)
+++ trunk/Source/WebCore/ChangeLog 2011-05-31 17:12:39 UTC (rev 87738)
@@ -1,3 +1,22 @@
+2011-05-31 Levi Weintraub <[email protected]>
+
+ Reviewed by Eric Seidel.
+
+ Switch paintFocusRing to IntPoint
+ https://bugs.webkit.org/show_bug.cgi?id=61580
+
+ Switching paintFocusRing to take an IntPoint representing the paint offset
+ instead of a pair of ints.
+
+ No new tests as this is just refactoring.
+
+ * rendering/RenderInline.cpp:
+ (WebCore::RenderInline::paintOutline):
+ * rendering/RenderObject.cpp:
+ (WebCore::RenderObject::paintFocusRing):
+ (WebCore::RenderObject::paintOutline):
+ * rendering/RenderObject.h:
+
2011-05-31 Abhishek Arya <[email protected]>
Reviewed by Dimitri Glazkov.
Modified: trunk/Source/WebCore/rendering/RenderInline.cpp (87737 => 87738)
--- trunk/Source/WebCore/rendering/RenderInline.cpp 2011-05-31 16:51:09 UTC (rev 87737)
+++ trunk/Source/WebCore/rendering/RenderInline.cpp 2011-05-31 17:12:39 UTC (rev 87738)
@@ -1375,7 +1375,7 @@
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, tx, ty, styleToUse);
+ paintFocusRing(graphicsContext, IntPoint(tx, ty), styleToUse);
}
}
Modified: trunk/Source/WebCore/rendering/RenderObject.cpp (87737 => 87738)
--- trunk/Source/WebCore/rendering/RenderObject.cpp 2011-05-31 16:51:09 UTC (rev 87737)
+++ trunk/Source/WebCore/rendering/RenderObject.cpp 2011-05-31 17:12:39 UTC (rev 87738)
@@ -997,10 +997,10 @@
}
#endif
-void RenderObject::paintFocusRing(GraphicsContext* context, int tx, int ty, RenderStyle* style)
+void RenderObject::paintFocusRing(GraphicsContext* context, const IntPoint& paintOffset, RenderStyle* style)
{
Vector<IntRect> focusRingRects;
- addFocusRingRects(focusRingRects, IntPoint(tx, ty));
+ addFocusRingRects(focusRingRects, paintOffset);
if (style->outlineStyleIsAuto())
context->drawFocusRing(focusRingRects, style->outlineWidth(), style->outlineOffset(), style->visitedDependentColor(CSSPropertyOutlineColor));
else
@@ -1036,7 +1036,7 @@
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.x(), paintRect.y(), styleToUse);
+ paintFocusRing(graphicsContext, paintRect.location(), styleToUse);
}
}
Modified: trunk/Source/WebCore/rendering/RenderObject.h (87737 => 87738)
--- trunk/Source/WebCore/rendering/RenderObject.h 2011-05-31 16:51:09 UTC (rev 87737)
+++ trunk/Source/WebCore/rendering/RenderObject.h 2011-05-31 17:12:39 UTC (rev 87738)
@@ -791,7 +791,7 @@
void drawLineForBoxSide(GraphicsContext*, int x1, int y1, int x2, int y2, BoxSide,
Color, EBorderStyle, int adjbw1, int adjbw2, bool antialias = false);
- void paintFocusRing(GraphicsContext*, int tx, int ty, RenderStyle*);
+ void paintFocusRing(GraphicsContext*, const IntPoint&, RenderStyle*);
void paintOutline(GraphicsContext*, const IntRect&);
void addPDFURLRect(GraphicsContext*, const IntRect&);