Changeset 88087 in webkit


Ignore:
Timestamp:
Jun 3, 2011 7:25:54 PM (13 years ago)
Author:
leviw@chromium.org
Message:

2011-06-03 Levi Weintraub <leviw@chromium.org>

Reviewed by Eric Seidel.

Switch paintMask and paintObject to use IntPoint
https://bugs.webkit.org/show_bug.cgi?id=62077

Switching paintMask and paintObject to use IntPoint for their paint offset instead of
a pair of ints. paintObject is still on tx/ty, but paintMask was converted to IntSize
passed by value -- bringing it in-line with the agreed-upon convention of a const IntPoint&.

No new tests since this is simple refactoring.

  • rendering/RenderBlock.cpp: (WebCore::RenderBlock::paint): (WebCore::RenderBlock::paintObject):
  • rendering/RenderBlock.h:
  • rendering/RenderBox.cpp: (WebCore::RenderBox::paintMask): (WebCore::RenderBox::pushContentsClip): (WebCore::RenderBox::popContentsClip):
  • rendering/RenderBox.h: (WebCore::RenderBox::paintObject):
  • rendering/RenderFieldset.cpp: (WebCore::RenderFieldset::paintMask):
  • rendering/RenderFieldset.h:
  • rendering/RenderFileUploadControl.cpp: (WebCore::RenderFileUploadControl::paintObject):
  • rendering/RenderFileUploadControl.h:
  • rendering/RenderListBox.cpp: (WebCore::RenderListBox::paintObject):
  • rendering/RenderListBox.h:
  • rendering/RenderReplaced.cpp: (WebCore::RenderReplaced::paint):
  • rendering/RenderReplica.cpp: (WebCore::RenderReplica::paint):
  • rendering/RenderTable.cpp: (WebCore::RenderTable::paint): (WebCore::RenderTable::paintObject): (WebCore::RenderTable::paintMask):
  • rendering/RenderTable.h:
  • rendering/RenderTableSection.cpp: (WebCore::RenderTableSection::paint): (WebCore::RenderTableSection::paintObject):
  • rendering/RenderTableSection.h:
  • rendering/RenderTextControl.cpp: (WebCore::RenderTextControl::paintPlaceholder): (WebCore::RenderTextControl::paintObject):
  • rendering/RenderTextControl.h:
  • rendering/RenderView.cpp: (WebCore::RenderView::paint):
  • rendering/RenderWidget.cpp: (WebCore::RenderWidget::paint):
Location:
trunk/Source/WebCore
Files:
21 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r88081 r88087  
     12011-06-03  Levi Weintraub  <leviw@chromium.org>
     2
     3        Reviewed by Eric Seidel.
     4
     5        Switch paintMask and paintObject to use IntPoint
     6        https://bugs.webkit.org/show_bug.cgi?id=62077
     7
     8        Switching paintMask and paintObject to use IntPoint for their paint offset instead of
     9        a pair of ints. paintObject is still on tx/ty, but paintMask was converted to IntSize
     10        passed by value -- bringing it in-line with the agreed-upon convention of a const IntPoint&.
     11
     12        No new tests since this is simple refactoring.
     13
     14        * rendering/RenderBlock.cpp:
     15        (WebCore::RenderBlock::paint):
     16        (WebCore::RenderBlock::paintObject):
     17        * rendering/RenderBlock.h:
     18        * rendering/RenderBox.cpp:
     19        (WebCore::RenderBox::paintMask):
     20        (WebCore::RenderBox::pushContentsClip):
     21        (WebCore::RenderBox::popContentsClip):
     22        * rendering/RenderBox.h:
     23        (WebCore::RenderBox::paintObject):
     24        * rendering/RenderFieldset.cpp:
     25        (WebCore::RenderFieldset::paintMask):
     26        * rendering/RenderFieldset.h:
     27        * rendering/RenderFileUploadControl.cpp:
     28        (WebCore::RenderFileUploadControl::paintObject):
     29        * rendering/RenderFileUploadControl.h:
     30        * rendering/RenderListBox.cpp:
     31        (WebCore::RenderListBox::paintObject):
     32        * rendering/RenderListBox.h:
     33        * rendering/RenderReplaced.cpp:
     34        (WebCore::RenderReplaced::paint):
     35        * rendering/RenderReplica.cpp:
     36        (WebCore::RenderReplica::paint):
     37        * rendering/RenderTable.cpp:
     38        (WebCore::RenderTable::paint):
     39        (WebCore::RenderTable::paintObject):
     40        (WebCore::RenderTable::paintMask):
     41        * rendering/RenderTable.h:
     42        * rendering/RenderTableSection.cpp:
     43        (WebCore::RenderTableSection::paint):
     44        (WebCore::RenderTableSection::paintObject):
     45        * rendering/RenderTableSection.h:
     46        * rendering/RenderTextControl.cpp:
     47        (WebCore::RenderTextControl::paintPlaceholder):
     48        (WebCore::RenderTextControl::paintObject):
     49        * rendering/RenderTextControl.h:
     50        * rendering/RenderView.cpp:
     51        (WebCore::RenderView::paint):
     52        * rendering/RenderWidget.cpp:
     53        (WebCore::RenderWidget::paint):
     54
    1552011-06-03  Cary Clark  <caryclark@google.com>
    256
  • trunk/Source/WebCore/rendering/RenderBlock.cpp

    r88050 r88087  
    22612261
    22622262    bool pushedClip = pushContentsClip(paintInfo, tx, ty);
    2263     paintObject(paintInfo, tx, ty);
     2263    paintObject(paintInfo, IntPoint(tx, ty));
    22642264    if (pushedClip)
    22652265        popContentsClip(paintInfo, phase, tx, ty);
     
    24592459}
    24602460
    2461 void RenderBlock::paintObject(PaintInfo& paintInfo, int tx, int ty)
     2461void RenderBlock::paintObject(PaintInfo& paintInfo, const IntPoint& paintOffset)
    24622462{
    24632463    PaintPhase paintPhase = paintInfo.phase;
     
    24662466    if ((paintPhase == PaintPhaseBlockBackground || paintPhase == PaintPhaseChildBlockBackground) && style()->visibility() == VISIBLE) {
    24672467        if (hasBoxDecorations())
    2468             paintBoxDecorations(paintInfo, IntPoint(tx, ty));
     2468            paintBoxDecorations(paintInfo, paintOffset);
    24692469        if (hasColumns())
    2470             paintColumnRules(paintInfo, tx, ty);
     2470            paintColumnRules(paintInfo, paintOffset.x(), paintOffset.y());
    24712471    }
    24722472
    24732473    if (paintPhase == PaintPhaseMask && style()->visibility() == VISIBLE) {
    2474         paintMask(paintInfo, IntSize(tx, ty));
     2474        paintMask(paintInfo, paintOffset);
    24752475        return;
    24762476    }
     
    24812481
    24822482    // Adjust our painting position if we're inside a scrolled layer (e.g., an overflow:auto div).
    2483     int scrolledX = tx;
    2484     int scrolledY = ty;
    2485     if (hasOverflowClip()) {
    2486         IntSize offset = layer()->scrolledContentOffset();
    2487         scrolledX -= offset.width();
    2488         scrolledY -= offset.height();
    2489     }
     2483    IntPoint scrolledOffset = paintOffset;
     2484    if (hasOverflowClip())
     2485        scrolledOffset.move(-layer()->scrolledContentOffset());
    24902486
    24912487    // 2. paint contents
    24922488    if (paintPhase != PaintPhaseSelfOutline) {
    24932489        if (hasColumns())
    2494             paintColumnContents(paintInfo, scrolledX, scrolledY);
     2490            paintColumnContents(paintInfo, scrolledOffset.x(), scrolledOffset.y());
    24952491        else
    2496             paintContents(paintInfo, scrolledX, scrolledY);
     2492            paintContents(paintInfo, scrolledOffset.x(), scrolledOffset.y());
    24972493    }
    24982494
     
    25012497    bool isPrinting = document()->printing();
    25022498    if (!isPrinting && !hasColumns())
    2503         paintSelection(paintInfo, scrolledX, scrolledY); // Fill in gaps in selection on lines and between blocks.
     2499        paintSelection(paintInfo, scrolledOffset.x(), scrolledOffset.y()); // Fill in gaps in selection on lines and between blocks.
    25042500
    25052501    // 4. paint floats.
    25062502    if (paintPhase == PaintPhaseFloat || paintPhase == PaintPhaseSelection || paintPhase == PaintPhaseTextClip) {
    25072503        if (hasColumns())
    2508             paintColumnContents(paintInfo, scrolledX, scrolledY, true);
     2504            paintColumnContents(paintInfo, scrolledOffset.x(), scrolledOffset.y(), true);
    25092505        else
    2510             paintFloats(paintInfo, scrolledX, scrolledY, paintPhase == PaintPhaseSelection || paintPhase == PaintPhaseTextClip);
     2506            paintFloats(paintInfo, scrolledOffset.x(), scrolledOffset.y(), paintPhase == PaintPhaseSelection || paintPhase == PaintPhaseTextClip);
    25112507    }
    25122508
    25132509    // 5. paint outline.
    25142510    if ((paintPhase == PaintPhaseOutline || paintPhase == PaintPhaseSelfOutline) && hasOutline() && style()->visibility() == VISIBLE)
    2515         paintOutline(paintInfo.context, IntRect(tx, ty, width(), height()));
     2511        paintOutline(paintInfo.context, IntRect(paintOffset, size()));
    25162512
    25172513    // 6. paint continuation outlines.
     
    25332529                cb->addContinuationWithOutline(inlineRenderer);
    25342530            else if (!inlineRenderer->firstLineBox())
    2535                 inlineRenderer->paintOutline(paintInfo.context, tx - x() + inlineRenderer->containingBlock()->x(),
    2536                                              ty - y() + inlineRenderer->containingBlock()->y());
    2537         }
    2538         paintContinuationOutlines(paintInfo, tx, ty);
     2531                inlineRenderer->paintOutline(paintInfo.context, paintOffset.x() - x() + inlineRenderer->containingBlock()->x(),
     2532                                             paintOffset.y() - y() + inlineRenderer->containingBlock()->y());
     2533        }
     2534        paintContinuationOutlines(paintInfo, paintOffset.x(), paintOffset.y());
    25392535    }
    25402536
     
    25432539    // then paint the caret.
    25442540    if (paintPhase == PaintPhaseForeground) {       
    2545         paintCaret(paintInfo, IntPoint(scrolledX, scrolledY), CursorCaret);
    2546         paintCaret(paintInfo, IntPoint(scrolledX, scrolledY), DragCaret);
     2541        paintCaret(paintInfo, scrolledOffset, CursorCaret);
     2542        paintCaret(paintInfo, scrolledOffset, DragCaret);
    25472543    }
    25482544}
  • trunk/Source/WebCore/rendering/RenderBlock.h

    r88050 r88087  
    294294
    295295    virtual void paint(PaintInfo&, int tx, int ty);
    296     virtual void paintObject(PaintInfo&, int tx, int ty);
     296    virtual void paintObject(PaintInfo&, const IntPoint&);
    297297
    298298    int logicalRightOffsetForLine(int position, int fixedOffset, bool applyTextIndent = true, int* logicalHeightRemaining = 0) const;
  • trunk/Source/WebCore/rendering/RenderBox.cpp

    r88033 r88087  
    877877}
    878878
    879 void RenderBox::paintMask(PaintInfo& paintInfo, IntSize paintOffset)
     879void RenderBox::paintMask(PaintInfo& paintInfo, const IntPoint& paintOffset)
    880880{
    881881    if (!paintInfo.shouldPaintWithinRoot(this) || style()->visibility() != VISIBLE || paintInfo.phase != PaintPhaseMask || paintInfo.context->paintingDisabled())
    882882        return;
    883883
    884     IntRect paintRect = IntRect(toPoint(paintOffset), size());
     884    IntRect paintRect = IntRect(paintOffset, size());
    885885
    886886    // border-fit can adjust where we paint our border and background.  If set, we snugly fit our line box descendants.  (The iChat
     
    11121112    else if (paintInfo.phase == PaintPhaseChildBlockBackground) {
    11131113        paintInfo.phase = PaintPhaseBlockBackground;
    1114         paintObject(paintInfo, tx, ty);
     1114        paintObject(paintInfo, IntPoint(tx, ty));
    11151115        paintInfo.phase = PaintPhaseChildBlockBackgrounds;
    11161116    }
     
    11301130    if (originalPhase == PaintPhaseOutline) {
    11311131        paintInfo.phase = PaintPhaseSelfOutline;
    1132         paintObject(paintInfo, tx, ty);
     1132        paintObject(paintInfo, IntPoint(tx, ty));
    11331133        paintInfo.phase = originalPhase;
    11341134    } else if (originalPhase == PaintPhaseChildBlockBackground)
  • trunk/Source/WebCore/rendering/RenderBox.h

    r88033 r88087  
    353353    void popContentsClip(PaintInfo&, PaintPhase originalPhase, int tx, int ty);
    354354
    355     virtual void paintObject(PaintInfo&, int /*tx*/, int /*ty*/) { ASSERT_NOT_REACHED(); }
     355    virtual void paintObject(PaintInfo&, const IntPoint&) { ASSERT_NOT_REACHED(); }
    356356    virtual void paintBoxDecorations(PaintInfo&, const IntPoint&);
    357     virtual void paintMask(PaintInfo&, IntSize);
     357    virtual void paintMask(PaintInfo&, const IntPoint&);
    358358    virtual void imageChanged(WrappedImagePtr, const IntRect* = 0);
    359359
  • trunk/Source/WebCore/rendering/RenderFieldset.cpp

    r88033 r88087  
    169169}
    170170
    171 void RenderFieldset::paintMask(PaintInfo& paintInfo, IntSize paintOffset)
     171void RenderFieldset::paintMask(PaintInfo& paintInfo, const IntPoint& paintOffset)
    172172{
    173173    if (style()->visibility() != VISIBLE || paintInfo.phase != PaintPhaseMask)
    174174        return;
    175175
    176     IntRect paintRect = IntRect(toPoint(paintOffset), size());
     176    IntRect paintRect = IntRect(paintOffset, size());
    177177    RenderBox* legend = findLegend();
    178178    if (!legend)
  • trunk/Source/WebCore/rendering/RenderFieldset.h

    r88033 r88087  
    4646
    4747    virtual void paintBoxDecorations(PaintInfo&, const IntPoint&);
    48     virtual void paintMask(PaintInfo&, IntSize);
     48    virtual void paintMask(PaintInfo&, const IntPoint&);
    4949};
    5050
  • trunk/Source/WebCore/rendering/RenderFileUploadControl.cpp

    r87780 r88087  
    228228}
    229229
    230 void RenderFileUploadControl::paintObject(PaintInfo& paintInfo, int tx, int ty)
     230void RenderFileUploadControl::paintObject(PaintInfo& paintInfo, const IntPoint& paintOffset)
    231231{
    232232    if (style()->visibility() != VISIBLE)
     
    237237    GraphicsContextStateSaver stateSaver(*paintInfo.context, false);
    238238    if (paintInfo.phase == PaintPhaseForeground || paintInfo.phase == PaintPhaseChildBlockBackgrounds) {
    239         IntRect clipRect(tx + borderLeft(), ty + borderTop(),
     239        IntRect clipRect(paintOffset.x() + borderLeft(), paintOffset.y() + borderTop(),
    240240                         width() - borderLeft() - borderRight(), height() - borderBottom() - borderTop() + buttonShadowHeight);
    241241        if (clipRect.isEmpty())
     
    251251
    252252        // Determine where the filename should be placed
    253         int contentLeft = tx + borderLeft() + paddingLeft();
     253        int contentLeft = paintOffset.x() + borderLeft() + paddingLeft();
    254254        int buttonAndIconWidth = m_button->renderBox()->width() + afterButtonSpacing
    255255            + (m_fileChooser->icon() ? iconWidth + iconFilenameSpacing : 0);
     
    272272        if (m_fileChooser->icon()) {
    273273            // Determine where the icon should be placed
    274             int iconY = ty + borderTop() + paddingTop() + (contentHeight() - iconHeight) / 2;
     274            int iconY = paintOffset.y() + borderTop() + paddingTop() + (contentHeight() - iconHeight) / 2;
    275275            int iconX;
    276276            if (style()->isLeftToRightDirection())
     
    285285
    286286    // Paint the children.
    287     RenderBlock::paintObject(paintInfo, tx, ty);
     287    RenderBlock::paintObject(paintInfo, paintOffset);
    288288}
    289289
  • trunk/Source/WebCore/rendering/RenderFileUploadControl.h

    r84238 r88087  
    5353    virtual void updateFromElement();
    5454    virtual void computePreferredLogicalWidths();
    55     virtual void paintObject(PaintInfo&, int tx, int ty);
     55    virtual void paintObject(PaintInfo&, const IntPoint&);
    5656
    5757    virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle);
  • trunk/Source/WebCore/rendering/RenderListBox.cpp

    r88049 r88087  
    257257}
    258258   
    259 void RenderListBox::paintObject(PaintInfo& paintInfo, int tx, int ty)
     259void RenderListBox::paintObject(PaintInfo& paintInfo, const IntPoint& paintOffset)
    260260{
    261261    if (style()->visibility() != VISIBLE)
     
    267267        int index = m_indexOffset;
    268268        while (index < listItemsSize && index <= m_indexOffset + numVisibleItems()) {
    269             paintItemForeground(paintInfo, IntPoint(tx, ty), index);
     269            paintItemForeground(paintInfo, paintOffset, index);
    270270            index++;
    271271        }
     
    273273
    274274    // Paint the children.
    275     RenderBlock::paintObject(paintInfo, tx, ty);
     275    RenderBlock::paintObject(paintInfo, paintOffset);
    276276
    277277    switch (paintInfo.phase) {
     
    280280    case PaintPhaseForeground:
    281281        if (m_vBar->isOverlayScrollbar())
    282             paintScrollbar(paintInfo, tx, ty);
     282            paintScrollbar(paintInfo, paintOffset.x(), paintOffset.y());
    283283        break;
    284284    case PaintPhaseBlockBackground:
    285285        if (!m_vBar->isOverlayScrollbar())
    286             paintScrollbar(paintInfo, tx, ty);
     286            paintScrollbar(paintInfo, paintOffset.x(), paintOffset.y());
    287287        break;
    288288    case PaintPhaseChildBlockBackground:
     
    290290        int index = m_indexOffset;
    291291        while (index < listItemsSize && index <= m_indexOffset + numVisibleItems()) {
    292             paintItemBackground(paintInfo, IntPoint(tx, ty), index);
     292            paintItemBackground(paintInfo, paintOffset, index);
    293293            index++;
    294294        }
  • trunk/Source/WebCore/rendering/RenderListBox.h

    r88049 r88087  
    6666
    6767    virtual bool hasControlClip() const { return true; }
    68     virtual void paintObject(PaintInfo&, int tx, int ty);
     68    virtual void paintObject(PaintInfo&, const IntPoint&);
    6969    virtual IntRect controlClipRect(const IntPoint&) const;
    7070
  • trunk/Source/WebCore/rendering/RenderReplaced.cpp

    r88033 r88087  
    107107   
    108108    if (paintInfo.phase == PaintPhaseMask) {
    109         paintMask(paintInfo, IntSize(tx, ty));
     109        paintMask(paintInfo, IntPoint(tx, ty));
    110110        return;
    111111    }
  • trunk/Source/WebCore/rendering/RenderReplica.cpp

    r86377 r88087  
    7777                                      RenderLayer::PaintLayerHaveTransparency | RenderLayer::PaintLayerAppliedTransform | RenderLayer::PaintLayerTemporaryClipRects | RenderLayer::PaintLayerPaintingReflection);
    7878    else if (paintInfo.phase == PaintPhaseMask)
    79         paintMask(paintInfo, IntSize(tx, ty));
     79        paintMask(paintInfo, IntPoint(tx, ty));
    8080}
    8181
  • trunk/Source/WebCore/rendering/RenderTable.cpp

    r88033 r88087  
    469469
    470470    bool pushedClip = pushContentsClip(paintInfo, tx, ty);   
    471     paintObject(paintInfo, tx, ty);
     471    paintObject(paintInfo, IntPoint(tx, ty));
    472472    if (pushedClip)
    473473        popContentsClip(paintInfo, paintPhase, tx, ty);
    474474}
    475475
    476 void RenderTable::paintObject(PaintInfo& paintInfo, int tx, int ty)
     476void RenderTable::paintObject(PaintInfo& paintInfo, const IntPoint& paintOffset)
    477477{
    478478    PaintPhase paintPhase = paintInfo.phase;
    479479    if ((paintPhase == PaintPhaseBlockBackground || paintPhase == PaintPhaseChildBlockBackground) && hasBoxDecorations() && style()->visibility() == VISIBLE)
    480         paintBoxDecorations(paintInfo, IntPoint(tx, ty));
     480        paintBoxDecorations(paintInfo, paintOffset);
    481481
    482482    if (paintPhase == PaintPhaseMask) {
    483         paintMask(paintInfo, IntSize(tx, ty));
     483        paintMask(paintInfo, paintOffset);
    484484        return;
    485485    }
     
    499499    for (RenderObject* child = firstChild(); child; child = child->nextSibling()) {
    500500        if (child->isBox() && !toRenderBox(child)->hasSelfPaintingLayer() && (child->isTableSection() || child == m_caption)) {
    501             IntPoint childPoint = flipForWritingMode(toRenderBox(child), IntPoint(tx, ty), ParentToChildFlippingAdjustment);
     501            IntPoint childPoint = flipForWritingMode(toRenderBox(child), paintOffset, ParentToChildFlippingAdjustment);
    502502            child->paint(info, childPoint.x(), childPoint.y());
    503503        }
     
    521521            for (RenderObject* child = firstChild(); child; child = child->nextSibling())
    522522                if (child->isTableSection()) {
    523                     IntPoint childPoint = flipForWritingMode(toRenderTableSection(child), IntPoint(tx, ty), ParentToChildFlippingAdjustment);
     523                    IntPoint childPoint = flipForWritingMode(toRenderTableSection(child), paintOffset, ParentToChildFlippingAdjustment);
    524524                    child->paint(info, childPoint.x(), childPoint.y());
    525525                }
     
    530530    // Paint outline.
    531531    if ((paintPhase == PaintPhaseOutline || paintPhase == PaintPhaseSelfOutline) && hasOutline() && style()->visibility() == VISIBLE)
    532         paintOutline(paintInfo.context, IntRect(IntPoint(tx, ty), size()));
     532        paintOutline(paintInfo.context, IntRect(paintOffset, size()));
    533533}
    534534
     
    574574}
    575575
    576 void RenderTable::paintMask(PaintInfo& paintInfo, IntSize paintOffset)
     576void RenderTable::paintMask(PaintInfo& paintInfo, const IntPoint& paintOffset)
    577577{
    578578    if (style()->visibility() != VISIBLE || paintInfo.phase != PaintPhaseMask)
    579579        return;
    580580
    581     IntRect rect(toPoint(paintOffset), size());
     581    IntRect rect(paintOffset, size());
    582582    subtractCaptionRect(rect);
    583583
  • trunk/Source/WebCore/rendering/RenderTable.h

    r88033 r88087  
    216216
    217217    virtual void paint(PaintInfo&, int tx, int ty);
    218     virtual void paintObject(PaintInfo&, int tx, int ty);
     218    virtual void paintObject(PaintInfo&, const IntPoint&);
    219219    virtual void paintBoxDecorations(PaintInfo&, const IntPoint&);
    220     virtual void paintMask(PaintInfo&, IntSize);
     220    virtual void paintMask(PaintInfo&, const IntPoint&);
    221221    virtual void layout();
    222222    virtual void computePreferredLogicalWidths();
  • trunk/Source/WebCore/rendering/RenderTableSection.cpp

    r88063 r88087  
    905905    PaintPhase phase = paintInfo.phase;
    906906    bool pushedClip = pushContentsClip(paintInfo, tx, ty);
    907     paintObject(paintInfo, tx, ty);
     907    paintObject(paintInfo, IntPoint(tx, ty));
    908908    if (pushedClip)
    909909        popContentsClip(paintInfo, phase, tx, ty);
     
    949949}
    950950
    951 void RenderTableSection::paintObject(PaintInfo& paintInfo, int tx, int ty)
     951void RenderTableSection::paintObject(PaintInfo& paintInfo, const IntPoint& paintOffset)
    952952{
    953953    // Check which rows and cols are visible and only paint these.
     
    963963
    964964    IntRect localRepaintRect = paintInfo.rect;
    965     localRepaintRect.move(-tx, -ty);
     965    localRepaintRect.moveBy(-paintOffset);
    966966    if (style()->isFlippedBlocksWritingMode()) {
    967967        if (style()->isHorizontalWritingMode())
     
    10191019                    if (!cell || (r > startrow && primaryCellAt(r - 1, c) == cell) || (c > startcol && primaryCellAt(r, c - 1) == cell))
    10201020                        continue;
    1021                     paintCell(cell, paintInfo, IntPoint(tx, ty));
     1021                    paintCell(cell, paintInfo, paintOffset);
    10221022                }
    10231023            }
     
    10461046            // Paint the cells.
    10471047            for (int i = 0; i < size; ++i)
    1048                 paintCell(cells[i], paintInfo, IntPoint(tx, ty));
     1048                paintCell(cells[i], paintInfo, paintOffset);
    10491049        }
    10501050    }
  • trunk/Source/WebCore/rendering/RenderTableSection.h

    r88063 r88087  
    135135    virtual void paint(PaintInfo&, int tx, int ty);
    136136    virtual void paintCell(RenderTableCell*, PaintInfo&, const IntPoint&);
    137     virtual void paintObject(PaintInfo&, int tx, int ty);
     137    virtual void paintObject(PaintInfo&, const IntPoint&);
    138138
    139139    virtual void imageChanged(WrappedImagePtr, const IntRect* = 0);
  • trunk/Source/WebCore/rendering/RenderTextControl.cpp

    r87302 r88087  
    600600}
    601601
    602 void RenderTextControl::paintPlaceholder(PaintInfo& paintInfo, int tx, int ty)
     602void RenderTextControl::paintPlaceholder(PaintInfo& paintInfo, const IntPoint& paintOffset)
    603603{
    604604    if (style()->visibility() != VISIBLE)
    605605        return;
    606606   
    607     IntRect clipRect(tx + borderLeft(), ty + borderTop(), width() - borderLeft() - borderRight(), height() - borderBottom() - borderTop());
     607    IntRect clipRect(paintOffset.x() + borderLeft(), paintOffset.y() + borderTop(), width() - borderLeft() - borderRight(), height() - borderBottom() - borderTop());
    608608    if (clipRect.isEmpty())
    609609        return;
     
    624624    if (textRenderer) {
    625625        IntPoint textPoint;
    626         textPoint.setY(ty + textBlockInsetTop() + placeholderStyle->fontMetrics().ascent());
     626        textPoint.setY(paintOffset.y() + textBlockInsetTop() + placeholderStyle->fontMetrics().ascent());
    627627        int styleTextIndent = placeholderStyle->textIndent().isFixed() ? placeholderStyle->textIndent().calcMinValue(0) : 0;
    628628        if (placeholderStyle->isLeftToRightDirection())
    629             textPoint.setX(tx + styleTextIndent + textBlockInsetLeft());
     629            textPoint.setX(paintOffset.x() + styleTextIndent + textBlockInsetLeft());
    630630        else
    631             textPoint.setX(tx + width() - textBlockInsetRight() - styleTextIndent - style()->font().width(textRun));
     631            textPoint.setX(paintOffset.x() + width() - textBlockInsetRight() - styleTextIndent - style()->font().width(textRun));
    632632       
    633633        paintInfo.context->drawBidiText(placeholderStyle->font(), textRun, textPoint);
     
    635635}
    636636
    637 void RenderTextControl::paintObject(PaintInfo& paintInfo, int tx, int ty)
     637void RenderTextControl::paintObject(PaintInfo& paintInfo, const IntPoint& paintOffset)
    638638{   
    639639    if (m_placeholderVisible && paintInfo.phase == PaintPhaseForeground)
    640         paintPlaceholder(paintInfo, tx, ty);
    641    
    642     RenderBlock::paintObject(paintInfo, tx, ty);
     640        paintPlaceholder(paintInfo, paintOffset);
     641   
     642    RenderBlock::paintObject(paintInfo, paintOffset);
    643643}
    644644
  • trunk/Source/WebCore/rendering/RenderTextControl.h

    r87302 r88087  
    9191    virtual bool canHaveChildren() const { return false; }
    9292    virtual bool avoidsFloats() const { return true; }
    93     virtual void paintObject(PaintInfo&, int tx, int ty);
     93    virtual void paintObject(PaintInfo&, const IntPoint&);
    9494   
    9595    virtual void addFocusRingRects(Vector<IntRect>&, const IntPoint&);
     
    109109    virtual int textBlockInsetTop() const = 0;
    110110
    111     void paintPlaceholder(PaintInfo&, int tx, int ty);
     111    void paintPlaceholder(PaintInfo&, const IntPoint&);
    112112
    113113    bool m_lastChangeWasUserEdit;
  • trunk/Source/WebCore/rendering/RenderView.cpp

    r88033 r88087  
    169169    // If we ever require layout but receive a paint anyway, something has gone horribly wrong.
    170170    ASSERT(!needsLayout());
    171     paintObject(paintInfo, tx, ty);
     171    paintObject(paintInfo, IntPoint(tx, ty));
    172172}
    173173
  • trunk/Source/WebCore/rendering/RenderWidget.cpp

    r88033 r88087  
    260260
    261261    if (paintInfo.phase == PaintPhaseMask) {
    262         paintMask(paintInfo, IntSize(tx, ty));
     262        paintMask(paintInfo, IntPoint(tx, ty));
    263263        return;
    264264    }
Note: See TracChangeset for help on using the changeset viewer.