Changeset 86385 in webkit


Ignore:
Timestamp:
May 12, 2011 3:15:26 PM (13 years ago)
Author:
leviw@chromium.org
Message:

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

Reviewed by Eric Seidel.

Switch paintBoxDecorationWithSize to IntRect
https://bugs.webkit.org/show_bug.cgi?id=60679

Switching paintBoxDecorationWithSize to take an IntRect instead of 4 ints.

No new tests as this is simple refactoring.

  • rendering/RenderBox.cpp: (WebCore::RenderBox::paintBoxDecorations): Cleaning up amazingly confusing logic. (WebCore::RenderBox::paintBoxDecorationsWithSize):
  • rendering/RenderBox.h:
  • rendering/RenderTextControlSingleLine.cpp: (WebCore::RenderTextControlSingleLine::paintBoxDecorations):
Location:
trunk/Source/WebCore
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r86384 r86385  
     12011-05-12  Levi Weintraub  <leviw@chromium.org>
     2
     3        Reviewed by Eric Seidel.
     4
     5        Switch paintBoxDecorationWithSize to IntRect
     6        https://bugs.webkit.org/show_bug.cgi?id=60679
     7
     8        Switching paintBoxDecorationWithSize to take an IntRect instead of 4 ints.
     9
     10        No new tests as this is simple refactoring.
     11
     12        * rendering/RenderBox.cpp:
     13        (WebCore::RenderBox::paintBoxDecorations): Cleaning up amazingly confusing logic.
     14        (WebCore::RenderBox::paintBoxDecorationsWithSize):
     15        * rendering/RenderBox.h:
     16        * rendering/RenderTextControlSingleLine.cpp:
     17        (WebCore::RenderTextControlSingleLine::paintBoxDecorations):
     18
    1192011-05-12  Levi Weintraub  <leviw@chromium.org>
    220
  • trunk/Source/WebCore/rendering/RenderBox.cpp

    r86384 r86385  
    805805void RenderBox::paintBoxDecorations(PaintInfo& paintInfo, int tx, int ty)
    806806{
    807     if (!paintInfo.shouldPaintWithinRoot(this))
    808         return;
    809     return paintBoxDecorationsWithSize(paintInfo, tx, ty, width(), height());
     807    if (paintInfo.shouldPaintWithinRoot(this))
     808        paintBoxDecorationsWithSize(paintInfo, IntRect(tx, ty, width(), height()));
    810809}
    811810
     
    833832}
    834833
    835 void RenderBox::paintBoxDecorationsWithSize(PaintInfo& paintInfo, int tx, int ty, int width, int height)
    836 {
    837     IntRect paintRect = IntRect(tx, ty, width, height);
     834void RenderBox::paintBoxDecorationsWithSize(PaintInfo& paintInfo, IntRect paintRect)
     835{
    838836    // border-fit can adjust where we paint our border and background.  If set, we snugly fit our line box descendants.  (The iChat
    839837    // balloon layout is an example of this).
  • trunk/Source/WebCore/rendering/RenderBox.h

    r86377 r86385  
    409409    void paintFillLayers(const PaintInfo&, const Color&, const FillLayer*, const IntRect&, BackgroundBleedAvoidance = BackgroundBleedNone, CompositeOperator = CompositeSourceOver, RenderObject* backgroundObject = 0);
    410410
    411     void paintBoxDecorationsWithSize(PaintInfo&, int tx, int ty, int width, int height);
     411    void paintBoxDecorationsWithSize(PaintInfo&, IntRect);
    412412    void paintMaskImages(const PaintInfo&, const IntRect&);
    413413
  • trunk/Source/WebCore/rendering/RenderTextControlSingleLine.cpp

    r86135 r86385  
    234234void RenderTextControlSingleLine::paintBoxDecorations(PaintInfo& paintInfo, int tx, int ty)
    235235{
    236     paintBoxDecorationsWithSize(paintInfo, tx, ty, width() - decorationWidthRight(), height());
     236    paintBoxDecorationsWithSize(paintInfo, IntRect(tx, ty, width() - decorationWidthRight(), height()));
    237237}
    238238
Note: See TracChangeset for help on using the changeset viewer.