Changeset 87738 in webkit


Ignore:
Timestamp:
May 31, 2011 10:12:39 AM (13 years ago)
Author:
leviw@chromium.org
Message:

2011-05-31 Levi Weintraub <leviw@chromium.org>

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:
Location:
trunk/Source/WebCore
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r87737 r87738  
     12011-05-31  Levi Weintraub  <leviw@chromium.org>
     2
     3        Reviewed by Eric Seidel.
     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-31  Abhishek Arya  <inferno@chromium.org>
    221
  • trunk/Source/WebCore/rendering/RenderInline.cpp

    r87467 r87738  
    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    }
  • trunk/Source/WebCore/rendering/RenderObject.cpp

    r87475 r87738  
    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));
     
    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    }
  • trunk/Source/WebCore/rendering/RenderObject.h

    r87432 r87738  
    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&);
Note: See TracChangeset for help on using the changeset viewer.