Changeset 87989 in webkit


Ignore:
Timestamp:
Jun 2, 2011 7:41:09 PM (13 years ago)
Author:
leviw@chromium.org
Message:

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

Reviewed by Eric Seidel.

Switch paintReplaced to use IntPoint
https://bugs.webkit.org/show_bug.cgi?id=61891

Switching paintReplaced to use IntPoint to represent the paint offset instead
of a pair of ints.

Also renaming the IntPoint flavor of IntRect::move to moveBy to clear up the
fact that the IntPoint is added as an offset as opposed to being relocated
to that point.

No tests because this is just a refactoring.

  • page/FrameView.cpp: (WebCore::FrameView::invalidateScrollbarRect): (WebCore::FrameView::convertFromRenderer): (WebCore::FrameView::convertToRenderer):
  • platform/ScrollView.cpp: (WebCore::ScrollView::wheelEvent):
  • platform/ScrollbarThemeComposite.cpp: (WebCore::ScrollbarThemeComposite::invalidatePart):
  • platform/graphics/gpu/Texture.cpp (WebCore::Texture::updateSubRect)
  • platform/graphics/IntRect.h: (WebCore::IntRect::moveBy):
  • platform/mac/WidgetMac.mm: (WebCore::Widget::paint):
  • rendering/InlineFlowBox.cpp: (WebCore::InlineFlowBox::paint):
  • rendering/RenderBlock.cpp: (WebCore::RenderBlock::logicalRectToPhysicalRect): (WebCore::RenderBlock::selectionGaps):
  • rendering/RenderBox.cpp: (WebCore::RenderBox::offsetFromContainer): (WebCore::RenderBox::computeRectForRepaint): (WebCore::RenderBox::localCaretRect):
  • rendering/RenderDetailsMarker.cpp: (WebCore::RenderDetailsMarker::paint):
  • rendering/RenderEmbeddedObject.cpp: (WebCore::RenderEmbeddedObject::paintReplaced):
  • rendering/RenderEmbeddedObject.h:
  • rendering/RenderHTMLCanvas.cpp: (WebCore::RenderHTMLCanvas::paintReplaced):
  • rendering/RenderHTMLCanvas.h:
  • rendering/RenderImage.cpp: (WebCore::RenderImage::paintReplaced):
  • rendering/RenderImage.h:
  • rendering/RenderInline.cpp: (WebCore::RenderInline::culledInlineVisualOverflowBoundingBox):
  • rendering/RenderLayer.cpp: (WebCore::expandClipRectForDescendantsAndReflection): (WebCore::RenderLayer::paintScrollCorner): (WebCore::RenderLayer::paintResizer): (WebCore::RenderLayer::paintChildLayerIntoColumns): (WebCore::RenderLayer::hitTestChildLayerColumns): (WebCore::RenderLayer::boundingBox): (WebCore::RenderLayer::setBackingNeedsRepaintInRect):
  • rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry): (WebCore::paintScrollbar): (WebCore::RenderLayerBacking::paintContents):
  • rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::calculateCompositedBounds): (WebCore::RenderLayerCompositor::layerWillBeRemoved): (WebCore::paintScrollbar): (WebCore::RenderLayerCompositor::paintContents):
  • rendering/RenderListBox.cpp: (WebCore::RenderListBox::controlClipRect):
  • rendering/RenderListItem.cpp: (WebCore::RenderListItem::positionListMarker):
  • rendering/RenderListMarker.cpp: (WebCore::RenderListMarker::paint):
  • rendering/RenderReplaced.cpp: (WebCore::RenderReplaced::paint):
  • rendering/RenderReplaced.h: (WebCore::RenderReplaced::paintReplaced):
  • rendering/RenderTableCell.cpp: (WebCore::RenderTableCell::computeRectForRepaint):
  • rendering/RenderTextControlSingleLine.cpp: (WebCore::RenderTextControlSingleLine::controlClipRect):
  • rendering/RenderVideo.cpp: (WebCore::RenderVideo::paintReplaced):
  • rendering/RenderVideo.h:
  • rendering/RenderView.cpp: (WebCore::RenderView::repaintViewRectangle):
Location:
trunk/Source/WebCore
Files:
32 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r87988 r87989  
     12011-06-02  Levi Weintraub  <leviw@chromium.org>
     2
     3        Reviewed by Eric Seidel.
     4
     5        Switch paintReplaced to use IntPoint
     6        https://bugs.webkit.org/show_bug.cgi?id=61891
     7
     8        Switching paintReplaced to use IntPoint to represent the paint offset instead
     9        of a pair of ints.
     10
     11        Also renaming the IntPoint flavor of IntRect::move to moveBy to clear up the
     12        fact that the IntPoint is added as an offset as opposed to being relocated
     13        to that point.
     14
     15        No tests because this is just a refactoring.
     16
     17        * page/FrameView.cpp:
     18        (WebCore::FrameView::invalidateScrollbarRect):
     19        (WebCore::FrameView::convertFromRenderer):
     20        (WebCore::FrameView::convertToRenderer):
     21        * platform/ScrollView.cpp:
     22        (WebCore::ScrollView::wheelEvent):
     23        * platform/ScrollbarThemeComposite.cpp:
     24        (WebCore::ScrollbarThemeComposite::invalidatePart):
     25        * platform/graphics/gpu/Texture.cpp
     26        (WebCore::Texture::updateSubRect)
     27        * platform/graphics/IntRect.h:
     28        (WebCore::IntRect::moveBy):
     29        * platform/mac/WidgetMac.mm:
     30        (WebCore::Widget::paint):
     31        * rendering/InlineFlowBox.cpp:
     32        (WebCore::InlineFlowBox::paint):
     33        * rendering/RenderBlock.cpp:
     34        (WebCore::RenderBlock::logicalRectToPhysicalRect):
     35        (WebCore::RenderBlock::selectionGaps):
     36        * rendering/RenderBox.cpp:
     37        (WebCore::RenderBox::offsetFromContainer):
     38        (WebCore::RenderBox::computeRectForRepaint):
     39        (WebCore::RenderBox::localCaretRect):
     40        * rendering/RenderDetailsMarker.cpp:
     41        (WebCore::RenderDetailsMarker::paint):
     42        * rendering/RenderEmbeddedObject.cpp:
     43        (WebCore::RenderEmbeddedObject::paintReplaced):
     44        * rendering/RenderEmbeddedObject.h:
     45        * rendering/RenderHTMLCanvas.cpp:
     46        (WebCore::RenderHTMLCanvas::paintReplaced):
     47        * rendering/RenderHTMLCanvas.h:
     48        * rendering/RenderImage.cpp:
     49        (WebCore::RenderImage::paintReplaced):
     50        * rendering/RenderImage.h:
     51        * rendering/RenderInline.cpp:
     52        (WebCore::RenderInline::culledInlineVisualOverflowBoundingBox):
     53        * rendering/RenderLayer.cpp:
     54        (WebCore::expandClipRectForDescendantsAndReflection):
     55        (WebCore::RenderLayer::paintScrollCorner):
     56        (WebCore::RenderLayer::paintResizer):
     57        (WebCore::RenderLayer::paintChildLayerIntoColumns):
     58        (WebCore::RenderLayer::hitTestChildLayerColumns):
     59        (WebCore::RenderLayer::boundingBox):
     60        (WebCore::RenderLayer::setBackingNeedsRepaintInRect):
     61        * rendering/RenderLayerBacking.cpp:
     62        (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
     63        (WebCore::paintScrollbar):
     64        (WebCore::RenderLayerBacking::paintContents):
     65        * rendering/RenderLayerCompositor.cpp:
     66        (WebCore::RenderLayerCompositor::calculateCompositedBounds):
     67        (WebCore::RenderLayerCompositor::layerWillBeRemoved):
     68        (WebCore::paintScrollbar):
     69        (WebCore::RenderLayerCompositor::paintContents):
     70        * rendering/RenderListBox.cpp:
     71        (WebCore::RenderListBox::controlClipRect):
     72        * rendering/RenderListItem.cpp:
     73        (WebCore::RenderListItem::positionListMarker):
     74        * rendering/RenderListMarker.cpp:
     75        (WebCore::RenderListMarker::paint):
     76        * rendering/RenderReplaced.cpp:
     77        (WebCore::RenderReplaced::paint):
     78        * rendering/RenderReplaced.h:
     79        (WebCore::RenderReplaced::paintReplaced):
     80        * rendering/RenderTableCell.cpp:
     81        (WebCore::RenderTableCell::computeRectForRepaint):
     82        * rendering/RenderTextControlSingleLine.cpp:
     83        (WebCore::RenderTextControlSingleLine::controlClipRect):
     84        * rendering/RenderVideo.cpp:
     85        (WebCore::RenderVideo::paintReplaced):
     86        * rendering/RenderVideo.h:
     87        * rendering/RenderView.cpp:
     88        (WebCore::RenderView::repaintViewRectangle):
     89
    1902011-06-02  James Robinson  <jamesr@chromium.org>
    291
  • trunk/Source/WebCore/page/FrameView.cpp

    r87726 r87989  
    21642164    // Add in our offset within the FrameView.
    21652165    IntRect dirtyRect = rect;
    2166     dirtyRect.move(scrollbar->location());
     2166    dirtyRect.moveBy(scrollbar->location());
    21672167    invalidateRect(dirtyRect);
    21682168}
     
    26282628
    26292629    // Convert from page ("absolute") to FrameView coordinates.
    2630     rect.move(-scrollPosition());
     2630    rect.moveBy(-scrollPosition());
    26312631
    26322632    return rect;
     
    26382638   
    26392639    // Convert from FrameView coords into page ("absolute") coordinates.
    2640     rect.move(scrollPosition());
     2640    rect.moveBy(scrollPosition());
    26412641
    26422642    // FIXME: we don't have a way to map an absolute rect down to a local quad, so just
  • trunk/Source/WebCore/platform/ScrollView.cpp

    r87303 r87989  
    10091009
    10101010        context->translate(x(), y());
    1011         documentDirtyRect.move(-location());
     1011        documentDirtyRect.moveBy(-location());
    10121012
    10131013        if (!paintsEntireContents()) {
    10141014            context->translate(-scrollX(), -scrollY());
    1015             documentDirtyRect.move(scrollPosition());
     1015            documentDirtyRect.moveBy(scrollPosition());
    10161016
    10171017            context->clip(visibleContentRect());
     
    10341034        scrollViewDirtyRect.intersect(frameRect());
    10351035        context->translate(x(), y());
    1036         scrollViewDirtyRect.move(-location());
     1036        scrollViewDirtyRect.moveBy(-location());
    10371037
    10381038        paintScrollbars(context, scrollViewDirtyRect);
     
    11281128    // Scrollbars won't be transformed within us
    11291129    IntRect newRect = localRect;
    1130     newRect.move(scrollbar->location());
     1130    newRect.moveBy(scrollbar->location());
    11311131    return newRect;
    11321132}
     
    11361136    IntRect newRect = parentRect;
    11371137    // Scrollbars won't be transformed within us
    1138     newRect.move(-scrollbar->location());
     1138    newRect.moveBy(-scrollbar->location());
    11391139    return newRect;
    11401140}
  • trunk/Source/WebCore/platform/ScrollbarThemeComposite.cpp

    r87303 r87989  
    235235        }
    236236    }
    237     result.move(-scrollbar->location());
     237    result.moveBy(-scrollbar->location());
    238238    scrollbar->invalidateRect(result);
    239239}
  • trunk/Source/WebCore/platform/graphics/IntRect.h

    r87312 r87989  
    109109
    110110    void move(const IntSize& size) { m_location += size; }
    111     void move(const IntPoint& offset) { m_location.move(offset.x(), offset.y()); }
     111    void moveBy(const IntPoint& offset) { m_location.move(offset.x(), offset.y()); }
    112112    void move(int dx, int dy) { m_location.move(dx, dy); }
    113113
  • trunk/Source/WebCore/platform/graphics/gpu/Texture.cpp

    r87303 r87989  
    177177
    178178        IntRect dstRect = updateRectIntersected;
    179         dstRect.move(-tileBoundsWithBorder.location());
     179        dstRect.moveBy(-tileBoundsWithBorder.location());
    180180
    181181        if (updateRectIntersected.isEmpty())
  • trunk/Source/WebCore/platform/mac/WidgetMac.mm

    r87303 r87989  
    249249
    250250        IntRect dirtyRect = r;
    251         dirtyRect.move(-transformOrigin);
     251        dirtyRect.moveBy(-transformOrigin);
    252252        if (![view isFlipped])
    253253            dirtyRect.setY([view bounds].size.height - dirtyRect.maxY());
     
    293293
    294294        IntRect dirtyRect = r;
    295         dirtyRect.move(-transformOrigin);
     295        dirtyRect.moveBy(-transformOrigin);
    296296        if (![view isFlipped])
    297297            dirtyRect.setY([view bounds].size.height - dirtyRect.maxY());
  • trunk/Source/WebCore/rendering/InlineFlowBox.cpp

    r87753 r87989  
    952952    overflowRect.inflate(renderer()->maximalOutlineSize(paintInfo.phase));
    953953    flipForWritingMode(overflowRect);
    954     overflowRect.move(paintOffset);
     954    overflowRect.moveBy(paintOffset);
    955955   
    956956    if (!paintInfo.rect.intersects(overflowRect))
  • trunk/Source/WebCore/rendering/RenderBlock.cpp

    r87936 r87989  
    27992799        result = IntRect(logicalRect.y(), logicalRect.x(), logicalRect.height(), logicalRect.width());
    28002800    flipForWritingMode(result);
    2801     result.move(rootBlockPhysicalPosition);
     2801    result.moveBy(rootBlockPhysicalPosition);
    28022802    return result;
    28032803}
     
    28122812        IntRect flippedBlockRect = IntRect(offsetFromRootBlock.width(), offsetFromRootBlock.height(), width(), height());
    28132813        rootBlock->flipForWritingMode(flippedBlockRect);
    2814         flippedBlockRect.move(rootBlockPhysicalPosition);
     2814        flippedBlockRect.moveBy(rootBlockPhysicalPosition);
    28152815        clipOutPositionedObjects(paintInfo, flippedBlockRect.location(), m_positionedObjects.get());
    28162816        if (isBody() || isRoot()) // The <body> must make sure to examine its containingBlock's positioned objects.
  • trunk/Source/WebCore/rendering/RenderBox.cpp

    r87881 r87989  
    13091309                toRenderBlock(o)->flipForWritingModeIncludingColumns(columnRect);
    13101310                offset += IntSize(columnRect.location().x(), columnRect.location().y());
    1311                 columnRect.move(point);
     1311                columnRect.moveBy(point);
    13121312                o->adjustForColumns(offset, columnRect.location());
    13131313            } else
     
    14351435                rect.move(layer()->relativePositionOffset());
    14361436
    1437             rect.move(location());
     1437            rect.moveBy(location());
    14381438            rect.move(layoutState->m_paintOffset);
    14391439            if (layoutState->m_clipped)
     
    31003100
    31013101    // Move to local coords
    3102     rect.move(-location());
     3102    rect.moveBy(-location());
    31033103    return rect;
    31043104}
  • trunk/Source/WebCore/rendering/RenderDetailsMarker.cpp

    r87303 r87989  
    130130    IntPoint boxOrigin(tx + x(), ty + y());
    131131    IntRect overflowRect(visualOverflowRect());
    132     overflowRect.move(boxOrigin);
     132    overflowRect.moveBy(boxOrigin);
    133133    overflowRect.inflate(maximalOutlineSize(paintInfo.phase));
    134134
  • trunk/Source/WebCore/rendering/RenderEmbeddedObject.cpp

    r86739 r87989  
    146146}
    147147
    148 void RenderEmbeddedObject::paintReplaced(PaintInfo& paintInfo, int tx, int ty)
     148void RenderEmbeddedObject::paintReplaced(PaintInfo& paintInfo, const IntPoint& paintOffset)
    149149{
    150150    if (!pluginCrashedOrWasMissing())
     
    164164    TextRun run("");
    165165    float textWidth;
    166     if (!getReplacementTextGeometry(tx, ty, contentRect, path, replacementTextRect, font, run, textWidth))
     166    if (!getReplacementTextGeometry(paintOffset.x(), paintOffset.y(), contentRect, path, replacementTextRect, font, run, textWidth))
    167167        return;
    168168   
  • trunk/Source/WebCore/rendering/RenderEmbeddedObject.h

    r66711 r87989  
    5757    virtual bool isEmbeddedObject() const { return true; }
    5858
    59     virtual void paintReplaced(PaintInfo&, int, int);
     59    virtual void paintReplaced(PaintInfo&, const IntPoint&);
    6060    virtual void paint(PaintInfo& paintInfo, int, int);
    6161
  • trunk/Source/WebCore/rendering/RenderHTMLCanvas.cpp

    r87121 r87989  
    5555}
    5656
    57 void RenderHTMLCanvas::paintReplaced(PaintInfo& paintInfo, int tx, int ty)
     57void RenderHTMLCanvas::paintReplaced(PaintInfo& paintInfo, const IntPoint& paintOffset)
    5858{
    5959    IntRect rect = contentBoxRect();
    60     rect.move(tx, ty);
     60    rect.moveBy(paintOffset);
    6161    bool useLowQualityScale = style()->imageRendering() == ImageRenderingOptimizeContrast;
    6262    static_cast<HTMLCanvasElement*>(node())->paint(paintInfo.context, rect, useLowQualityScale);
  • trunk/Source/WebCore/rendering/RenderHTMLCanvas.h

    r79920 r87989  
    4444private:
    4545    virtual const char* renderName() const { return "RenderHTMLCanvas"; }
    46     virtual void paintReplaced(PaintInfo&, int tx, int ty);
     46    virtual void paintReplaced(PaintInfo&, const IntPoint&);
    4747    virtual void intrinsicSizeChanged() { canvasSizeChanged(); }
    4848};
  • trunk/Source/WebCore/rendering/RenderImage.cpp

    r87866 r87989  
    229229}
    230230
    231 void RenderImage::paintReplaced(PaintInfo& paintInfo, int tx, int ty)
     231void RenderImage::paintReplaced(PaintInfo& paintInfo, const IntPoint& paintOffset)
    232232{
    233233    int cWidth = contentWidth();
     
    249249            context->setStrokeColor(Color::lightGray, style()->colorSpace());
    250250            context->setFillColor(Color::transparent, style()->colorSpace());
    251             context->drawRect(IntRect(tx + leftBorder + leftPad, ty + topBorder + topPad, cWidth, cHeight));
     251            context->drawRect(IntRect(paintOffset.x() + leftBorder + leftPad, paintOffset.y() + topBorder + topPad, cWidth, cHeight));
    252252
    253253            bool errorPictureDrawn = false;
    254             int imageX = 0;
    255             int imageY = 0;
     254            IntSize imageOffset;
    256255            // When calculating the usable dimensions, exclude the pixels of
    257256            // the ouline rect so the error image/alt text doesn't draw on it.
     
    269268                if (centerY < 0)
    270269                    centerY = 0;
    271                 imageX = leftBorder + leftPad + centerX + 1;
    272                 imageY = topBorder + topPad + centerY + 1;
    273                 context->drawImage(image.get(), style()->colorSpace(), IntPoint(tx + imageX, ty + imageY));
     270                imageOffset = IntSize(leftBorder + leftPad + centerX + 1, topBorder + topPad + centerY + 1);
     271                context->drawImage(image.get(), style()->colorSpace(), paintOffset + imageOffset);
    274272                errorPictureDrawn = true;
    275273            }
     
    278276                String text = document()->displayStringModifiedByEncoding(m_altText);
    279277                context->setFillColor(style()->visitedDependentColor(CSSPropertyColor), style()->colorSpace());
    280                 int ax = tx + leftBorder + leftPad;
    281                 int ay = ty + topBorder + topPad;
    282278                const Font& font = style()->font();
    283279                const FontMetrics& fontMetrics = font.fontMetrics();
    284280                int ascent = fontMetrics.ascent();
     281                IntPoint altTextOffset = paintOffset;
     282                altTextOffset.move(leftBorder + leftPad, topBorder + topPad + ascent);
    285283
    286284                // Only draw the alt text if it'll fit within the content box,
     
    289287                int textWidth = font.width(textRun);
    290288                if (errorPictureDrawn) {
    291                     if (usableWidth >= textWidth && fontMetrics.height() <= imageY)
    292                         context->drawText(font, textRun, IntPoint(ax, ay + ascent));
     289                    if (usableWidth >= textWidth && fontMetrics.height() <= imageOffset.height())
     290                        context->drawText(font, textRun, altTextOffset);
    293291                } else if (usableWidth >= textWidth && cHeight >= fontMetrics.height())
    294                     context->drawText(font, textRun, IntPoint(ax, ay + ascent));
     292                    context->drawText(font, textRun, altTextOffset);
    295293            }
    296294        }
     
    302300#if PLATFORM(MAC)
    303301        if (style()->highlight() != nullAtom && !paintInfo.context->paintingDisabled())
    304             paintCustomHighlight(IntPoint(tx - x(), ty - y()), style()->highlight(), true);
     302            paintCustomHighlight(toPoint(paintOffset - location()), style()->highlight(), true);
    305303#endif
    306304
    307305        IntSize contentSize(cWidth, cHeight);
    308         IntRect rect(IntPoint(tx + leftBorder + leftPad, ty + topBorder + topPad), contentSize);
    309         paintIntoRect(context, rect);
     306        IntPoint contentLocation = paintOffset;
     307        contentLocation.move(leftBorder + leftPad, topBorder + topPad);
     308        paintIntoRect(context, IntRect(contentLocation, contentSize));
    310309    }
    311310}
  • trunk/Source/WebCore/rendering/RenderImage.h

    r86705 r87989  
    7777    virtual bool isRenderImage() const { return true; }
    7878
    79     virtual void paintReplaced(PaintInfo&, int tx, int ty);
     79    virtual void paintReplaced(PaintInfo&, const IntPoint&);
    8080
    8181    virtual int minimumReplacedHeight() const;
  • trunk/Source/WebCore/rendering/RenderInline.cpp

    r87738 r87989  
    900900                IntRect logicalRect = currBox->logicalVisualOverflowRectForPropagation(style());
    901901                if (isHorizontal) {
    902                     logicalRect.move(currBox->location());
     902                    logicalRect.moveBy(currBox->location());
    903903                    result.uniteIfNonZero(logicalRect);
    904904                } else {
    905                     logicalRect.move(currBox->location());
     905                    logicalRect.moveBy(currBox->location());
    906906                    result.uniteIfNonZero(logicalRect.transposedRect());
    907907                }
  • trunk/Source/WebCore/rendering/RenderInputSpeech.cpp

    r87303 r87989  
    8383    buttonRect.move(offsetFromInputRenderer);
    8484    // Account for the local drawing offset.
    85     buttonRect.move(rect.location());
     85    buttonRect.moveBy(rect.location());
    8686
    8787    DEFINE_STATIC_LOCAL(RefPtr<Image>, imageStateNormal, (Image::loadPlatformResource("inputSpeech")));
  • trunk/Source/WebCore/rendering/RenderLayer.cpp

    r87880 r87989  
    901901        clipRect.move(-delta.x(), -delta.y());
    902902        clipRect.unite(l->renderBox()->reflectedRect(clipRect));
    903         clipRect.move(delta);
     903        clipRect.moveBy(delta);
    904904    }
    905905}
     
    23262326
    23272327    IntRect absRect = scrollCornerRect();
    2328     absRect.move(paintOffset);
     2328    absRect.moveBy(paintOffset);
    23292329    if (!absRect.intersects(damageRect))
    23302330        return;
     
    23552355
    23562356    IntRect absRect = resizerCornerRect(this, box->borderBoxRect());
    2357     absRect.move(paintOffset);
     2357    absRect.moveBy(paintOffset);
    23582358    if (!absRect.intersects(damageRect))
    23592359        return;
     
    27732773        IntSize offset = isHorizontal ? IntSize(logicalLeftOffset, currLogicalTopOffset) : IntSize(currLogicalTopOffset, logicalLeftOffset);
    27742774
    2775         colRect.move(layerOffset);
     2775        colRect.moveBy(layerOffset);
    27762776
    27772777        IntRect localDirtyRect(paintDirtyRect);
     
    32573257        else
    32583258            currLogicalTopOffset += blockDelta;
    3259         colRect.move(layerOffset);
     3259        colRect.moveBy(layerOffset);
    32603260
    32613261        IntRect localClipRect(hitTestRect);
     
    35983598    IntPoint delta;
    35993599    convertToLayerCoords(ancestorLayer, delta);
    3600     result.move(delta);
     3600    result.moveBy(delta);
    36013601    return result;
    36023602}
     
    39353935        IntPoint delta;
    39363936        convertToLayerCoords(root(), delta);
    3937         absRect.move(delta);
     3937        absRect.moveBy(delta);
    39383938
    39393939        RenderView* view = renderer()->view();
  • trunk/Source/WebCore/rendering/RenderLayerBacking.cpp

    r87880 r87989  
    358358    IntPoint delta;
    359359    m_owningLayer->convertToLayerCoords(compAncestor, delta);
    360     relativeCompositingBounds.move(delta);
     360    relativeCompositingBounds.moveBy(delta);
    361361
    362362    IntPoint graphicsLayerParentLocation;
     
    11981198    context.translate(-scrollbarRect.x(), -scrollbarRect.y());
    11991199    IntRect transformedClip = clip;
    1200     transformedClip.move(scrollbarRect.location());
     1200    transformedClip.moveBy(scrollbarRect.location());
    12011201    scrollbar->paint(&context, transformedClip);
    12021202    context.restore();
     
    12321232        context.translate(-scrollCornerAndResizer.x(), -scrollCornerAndResizer.y());
    12331233        IntRect transformedClip = clip;
    1234         transformedClip.move(scrollCornerAndResizer.location());
     1234        transformedClip.moveBy(scrollCornerAndResizer.location());
    12351235        m_owningLayer->paintScrollCorner(&context, IntPoint(), transformedClip);
    12361236        m_owningLayer->paintResizer(&context, IntPoint(), transformedClip);
  • trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp

    r87880 r87989  
    452452        IntPoint ancestorRelOffset;
    453453        layer->convertToLayerCoords(ancestorLayer, ancestorRelOffset);
    454         boundingBoxRect.move(ancestorRelOffset);
     454        boundingBoxRect.moveBy(ancestorRelOffset);
    455455        return boundingBoxRect;
    456456    }
     
    506506    IntPoint ancestorRelOffset;
    507507    layer->convertToLayerCoords(ancestorLayer, ancestorRelOffset);
    508     unionBounds.move(ancestorRelOffset);
     508    unionBounds.moveBy(ancestorRelOffset);
    509509
    510510    return unionBounds;
     
    530530        IntPoint offset;
    531531        child->convertToLayerCoords(compLayer, offset);
    532         compBounds.move(offset);
     532        compBounds.moveBy(offset);
    533533
    534534        compLayer->setBackingNeedsRepaintInRect(compBounds);
     
    14371437    context.translate(-scrollbarRect.x(), -scrollbarRect.y());
    14381438    IntRect transformedClip = clip;
    1439     transformedClip.move(scrollbarRect.location());
     1439    transformedClip.moveBy(scrollbarRect.location());
    14401440    scrollbar->paint(&context, transformedClip);
    14411441    context.restore();
     
    14531453        context.translate(-scrollCorner.x(), -scrollCorner.y());
    14541454        IntRect transformedClip = clip;
    1455         transformedClip.move(scrollCorner.location());
     1455        transformedClip.moveBy(scrollCorner.location());
    14561456        m_renderView->frameView()->paintScrollCorner(&context, transformedClip);
    14571457        context.restore();
  • trunk/Source/WebCore/rendering/RenderListBox.cpp

    r87773 r87989  
    691691{
    692692    IntRect clipRect = contentBoxRect();
    693     clipRect.move(additionalOffset);
     693    clipRect.moveBy(additionalOffset);
    694694    return clipRect;
    695695}
  • trunk/Source/WebCore/rendering/RenderListItem.cpp

    r87303 r87989  
    339339                if (o->hasSelfPaintingLayer())
    340340                    propagateVisualOverflow = false;
    341                 markerRect.move(-o->location());
     341                markerRect.moveBy(-o->location());
    342342            } while (o != this && propagateVisualOverflow && propagateLayoutOverflow);
    343343        }
  • trunk/Source/WebCore/rendering/RenderListMarker.cpp

    r87866 r87989  
    11121112    IntPoint boxOrigin(tx + x(), ty + y());
    11131113    IntRect overflowRect(visualOverflowRect());
    1114     overflowRect.move(boxOrigin);
     1114    overflowRect.moveBy(boxOrigin);
    11151115    overflowRect.inflate(maximalOutlineSize(paintInfo.phase));
    11161116
     
    11211121   
    11221122    IntRect marker = getRelativeMarkerRect();
    1123     marker.move(boxOrigin);
     1123    marker.moveBy(boxOrigin);
    11241124
    11251125    GraphicsContext* context = paintInfo.context;
     
    11331133        if (selectionState() != SelectionNone) {
    11341134            IntRect selRect = localSelectionRect();
    1135             selRect.move(boxOrigin);
     1135            selRect.moveBy(boxOrigin);
    11361136            context->fillRect(selRect, selectionBackgroundColor(), style()->colorSpace());
    11371137        }
     
    11471147    if (selectionState() != SelectionNone) {
    11481148        IntRect selRect = localSelectionRect();
    1149         selRect.move(boxOrigin);
     1149        selRect.moveBy(boxOrigin);
    11501150        context->fillRect(selRect, selectionBackgroundColor(), style()->colorSpace());
    11511151    }
     
    12581258    GraphicsContextStateSaver stateSaver(*context, false);
    12591259    if (!style()->isHorizontalWritingMode()) {
    1260         marker.move(-boxOrigin);
     1260        marker.moveBy(-boxOrigin);
    12611261        marker = marker.transposedRect();
    12621262        marker.move(box.x(), box.y() - logicalHeight());
  • trunk/Source/WebCore/rendering/RenderReplaced.cpp

    r87801 r87989  
    142142
    143143    if (!completelyClippedOut) {
    144         paintReplaced(paintInfo, tx, ty);
     144        paintReplaced(paintInfo, IntPoint(tx, ty));
    145145
    146146        if (style()->hasBorderRadius())
  • trunk/Source/WebCore/rendering/RenderReplaced.h

    r71563 r87989  
    6666    int calcAspectRatioLogicalHeight() const;
    6767
    68     virtual void paintReplaced(PaintInfo&, int /*tx*/, int /*ty*/) { }
     68    virtual void paintReplaced(PaintInfo&, const IntPoint&) { }
    6969
    7070    virtual IntRect clippedOverflowRectForRepaint(RenderBoxModelObject* repaintContainer);
  • trunk/Source/WebCore/rendering/RenderTableCell.cpp

    r87387 r87989  
    295295    RenderView* v = view();
    296296    if ((!v || !v->layoutStateEnabled() || repaintContainer) && parent())
    297         r.move(-parentBox()->location()); // Rows are in the same coordinate space, so don't add their offset in.
     297        r.moveBy(-parentBox()->location()); // Rows are in the same coordinate space, so don't add their offset in.
    298298    RenderBlock::computeRectForRepaint(repaintContainer, r, fixed);
    299299}
  • trunk/Source/WebCore/rendering/RenderTextControlSingleLine.cpp

    r87881 r87989  
    489489
    490490    IntRect clipRect = IntRect(innerBlockElement()->renderBox()->frameRect());
    491     clipRect.move(additionalOffset);
     491    clipRect.moveBy(additionalOffset);
    492492    return clipRect;
    493493}
  • trunk/Source/WebCore/rendering/RenderVideo.cpp

    r82051 r87989  
    185185}
    186186
    187 void RenderVideo::paintReplaced(PaintInfo& paintInfo, int tx, int ty)
     187void RenderVideo::paintReplaced(PaintInfo& paintInfo, const IntPoint& paintOffset)
    188188{
    189189    MediaPlayer* mediaPlayer = mediaElement()->player();
     
    199199    if (rect.isEmpty())
    200200        return;
    201     rect.move(tx, ty);
     201    rect.moveBy(paintOffset);
    202202
    203203    if (displayingPoster)
  • trunk/Source/WebCore/rendering/RenderVideo.h

    r68917 r87989  
    6767    virtual bool isVideo() const { return true; }
    6868
    69     virtual void paintReplaced(PaintInfo&, int tx, int ty);
     69    virtual void paintReplaced(PaintInfo&, const IntPoint&);
    7070
    7171    virtual void layout();
  • trunk/Source/WebCore/rendering/RenderView.cpp

    r87467 r87989  
    274274        // Subtract out the contentsX and contentsY offsets to get our coords within the viewing
    275275        // rectangle.
    276         r.move(-vr.location());
     276        r.moveBy(-vr.location());
    277277       
    278278        // FIXME: Hardcoded offsets here are not good.
Note: See TracChangeset for help on using the changeset viewer.