Title: [89983] trunk/Source/WebCore
Revision
89983
Author
[email protected]
Date
2011-06-28 18:06:00 -0700 (Tue, 28 Jun 2011)

Log Message

2011-06-28  Levi Weintraub  <[email protected]>

        Reviewed by Eric Seidel.

        Switch paintObject and paintReplaced to new layout types
        https://bugs.webkit.org/show_bug.cgi?id=63585

        Switching paintObject and paintReplaced to layout type abstractions from more integral types.

        No new tests as this is just moving to an abstraction.

        * rendering/RenderBlock.cpp:
        (WebCore::RenderBlock::paintObject):
        * rendering/RenderBlock.h:
        * rendering/RenderBox.h:
        (WebCore::RenderBox::paintObject):
        * rendering/RenderEmbeddedObject.cpp:
        (WebCore::RenderEmbeddedObject::paintReplaced):
        * rendering/RenderEmbeddedObject.h:
        * rendering/RenderFileUploadControl.cpp:
        (WebCore::RenderFileUploadControl::paintObject):
        * rendering/RenderFileUploadControl.h:
        * rendering/RenderHTMLCanvas.cpp:
        (WebCore::RenderHTMLCanvas::paintReplaced):
        * rendering/RenderHTMLCanvas.h:
        * rendering/RenderImage.cpp:
        (WebCore::RenderImage::paintReplaced):
        * rendering/RenderImage.h:
        * rendering/RenderListBox.cpp:
        (WebCore::RenderListBox::paintObject):
        * rendering/RenderListBox.h:
        * rendering/RenderReplaced.h:
        (WebCore::RenderReplaced::paintReplaced):
        * rendering/RenderTable.cpp:
        (WebCore::RenderTable::paintObject):
        * rendering/RenderTable.h:
        * rendering/RenderTableSection.cpp:
        (WebCore::RenderTableSection::paintObject):
        * rendering/RenderTableSection.h:
        * rendering/RenderTextControl.cpp:
        (WebCore::RenderTextControl::paintObject):
        * rendering/RenderTextControl.h:
        * rendering/RenderVideo.cpp:
        (WebCore::RenderVideo::paintReplaced):
        * rendering/RenderVideo.h:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (89982 => 89983)


--- trunk/Source/WebCore/ChangeLog	2011-06-29 01:03:18 UTC (rev 89982)
+++ trunk/Source/WebCore/ChangeLog	2011-06-29 01:06:00 UTC (rev 89983)
@@ -1,3 +1,49 @@
+2011-06-28  Levi Weintraub  <[email protected]>
+
+        Reviewed by Eric Seidel.
+
+        Switch paintObject and paintReplaced to new layout types
+        https://bugs.webkit.org/show_bug.cgi?id=63585
+
+        Switching paintObject and paintReplaced to layout type abstractions from more integral types.
+
+        No new tests as this is just moving to an abstraction.
+
+        * rendering/RenderBlock.cpp:
+        (WebCore::RenderBlock::paintObject):
+        * rendering/RenderBlock.h:
+        * rendering/RenderBox.h:
+        (WebCore::RenderBox::paintObject):
+        * rendering/RenderEmbeddedObject.cpp:
+        (WebCore::RenderEmbeddedObject::paintReplaced):
+        * rendering/RenderEmbeddedObject.h:
+        * rendering/RenderFileUploadControl.cpp:
+        (WebCore::RenderFileUploadControl::paintObject):
+        * rendering/RenderFileUploadControl.h:
+        * rendering/RenderHTMLCanvas.cpp:
+        (WebCore::RenderHTMLCanvas::paintReplaced):
+        * rendering/RenderHTMLCanvas.h:
+        * rendering/RenderImage.cpp:
+        (WebCore::RenderImage::paintReplaced):
+        * rendering/RenderImage.h:
+        * rendering/RenderListBox.cpp:
+        (WebCore::RenderListBox::paintObject):
+        * rendering/RenderListBox.h:
+        * rendering/RenderReplaced.h:
+        (WebCore::RenderReplaced::paintReplaced):
+        * rendering/RenderTable.cpp:
+        (WebCore::RenderTable::paintObject):
+        * rendering/RenderTable.h:
+        * rendering/RenderTableSection.cpp:
+        (WebCore::RenderTableSection::paintObject):
+        * rendering/RenderTableSection.h:
+        * rendering/RenderTextControl.cpp:
+        (WebCore::RenderTextControl::paintObject):
+        * rendering/RenderTextControl.h:
+        * rendering/RenderVideo.cpp:
+        (WebCore::RenderVideo::paintReplaced):
+        * rendering/RenderVideo.h:
+
 2011-06-28  Adam Langley  <[email protected]>
 
         Reviewed by Adam Barth.

Modified: trunk/Source/WebCore/rendering/RenderBlock.cpp (89982 => 89983)


--- trunk/Source/WebCore/rendering/RenderBlock.cpp	2011-06-29 01:03:18 UTC (rev 89982)
+++ trunk/Source/WebCore/rendering/RenderBlock.cpp	2011-06-29 01:06:00 UTC (rev 89983)
@@ -2479,7 +2479,7 @@
     }
 }
 
-void RenderBlock::paintObject(PaintInfo& paintInfo, const IntPoint& paintOffset)
+void RenderBlock::paintObject(PaintInfo& paintInfo, const LayoutPoint& paintOffset)
 {
     PaintPhase paintPhase = paintInfo.phase;
 
@@ -2501,7 +2501,7 @@
         return;
 
     // Adjust our painting position if we're inside a scrolled layer (e.g., an overflow:auto div).
-    IntPoint scrolledOffset = paintOffset;
+    LayoutPoint scrolledOffset = paintOffset;
     if (hasOverflowClip())
         scrolledOffset.move(-layer()->scrolledContentOffset());
 

Modified: trunk/Source/WebCore/rendering/RenderBlock.h (89982 => 89983)


--- trunk/Source/WebCore/rendering/RenderBlock.h	2011-06-29 01:03:18 UTC (rev 89982)
+++ trunk/Source/WebCore/rendering/RenderBlock.h	2011-06-29 01:06:00 UTC (rev 89983)
@@ -293,7 +293,7 @@
     void layoutPositionedObjects(bool relayoutChildren);
 
     virtual void paint(PaintInfo&, const IntPoint&);
-    virtual void paintObject(PaintInfo&, const IntPoint&);
+    virtual void paintObject(PaintInfo&, const LayoutPoint&);
 
     int logicalRightOffsetForLine(int position, int fixedOffset, bool applyTextIndent = true, int* logicalHeightRemaining = 0) const;
     int logicalLeftOffsetForLine(int position, int fixedOffset, bool applyTextIndent = true, int* logicalHeightRemaining = 0) const;

Modified: trunk/Source/WebCore/rendering/RenderBox.h (89982 => 89983)


--- trunk/Source/WebCore/rendering/RenderBox.h	2011-06-29 01:03:18 UTC (rev 89982)
+++ trunk/Source/WebCore/rendering/RenderBox.h	2011-06-29 01:06:00 UTC (rev 89983)
@@ -352,7 +352,7 @@
     bool pushContentsClip(PaintInfo&, const IntPoint& accumulatedOffset);
     void popContentsClip(PaintInfo&, PaintPhase originalPhase, const IntPoint& accumulatedOffset);
 
-    virtual void paintObject(PaintInfo&, const IntPoint&) { ASSERT_NOT_REACHED(); }
+    virtual void paintObject(PaintInfo&, const LayoutPoint&) { ASSERT_NOT_REACHED(); }
     virtual void paintBoxDecorations(PaintInfo&, const LayoutPoint&);
     virtual void paintMask(PaintInfo&, const LayoutPoint&);
     virtual void imageChanged(WrappedImagePtr, const IntRect* = 0);

Modified: trunk/Source/WebCore/rendering/RenderEmbeddedObject.cpp (89982 => 89983)


--- trunk/Source/WebCore/rendering/RenderEmbeddedObject.cpp	2011-06-29 01:03:18 UTC (rev 89982)
+++ trunk/Source/WebCore/rendering/RenderEmbeddedObject.cpp	2011-06-29 01:06:00 UTC (rev 89983)
@@ -145,7 +145,7 @@
     RenderPart::paint(paintInfo, paintOffset);
 }
 
-void RenderEmbeddedObject::paintReplaced(PaintInfo& paintInfo, const IntPoint& paintOffset)
+void RenderEmbeddedObject::paintReplaced(PaintInfo& paintInfo, const LayoutPoint& paintOffset)
 {
     if (!pluginCrashedOrWasMissing())
         return;

Modified: trunk/Source/WebCore/rendering/RenderEmbeddedObject.h (89982 => 89983)


--- trunk/Source/WebCore/rendering/RenderEmbeddedObject.h	2011-06-29 01:03:18 UTC (rev 89982)
+++ trunk/Source/WebCore/rendering/RenderEmbeddedObject.h	2011-06-29 01:06:00 UTC (rev 89983)
@@ -56,7 +56,7 @@
     virtual const char* renderName() const { return "RenderEmbeddedObject"; }
     virtual bool isEmbeddedObject() const { return true; }
 
-    virtual void paintReplaced(PaintInfo&, const IntPoint&);
+    virtual void paintReplaced(PaintInfo&, const LayoutPoint&);
     virtual void paint(PaintInfo&, const IntPoint&);
 
 #if USE(ACCELERATED_COMPOSITING)

Modified: trunk/Source/WebCore/rendering/RenderFileUploadControl.cpp (89982 => 89983)


--- trunk/Source/WebCore/rendering/RenderFileUploadControl.cpp	2011-06-29 01:03:18 UTC (rev 89982)
+++ trunk/Source/WebCore/rendering/RenderFileUploadControl.cpp	2011-06-29 01:06:00 UTC (rev 89983)
@@ -76,7 +76,7 @@
         - (input->icon() ? iconWidth + iconFilenameSpacing : 0));
 }
 
-void RenderFileUploadControl::paintObject(PaintInfo& paintInfo, const IntPoint& paintOffset)
+void RenderFileUploadControl::paintObject(PaintInfo& paintInfo, const LayoutPoint& paintOffset)
 {
     if (style()->visibility() != VISIBLE)
         return;
@@ -84,7 +84,7 @@
     // Push a clip.
     GraphicsContextStateSaver stateSaver(*paintInfo.context, false);
     if (paintInfo.phase == PaintPhaseForeground || paintInfo.phase == PaintPhaseChildBlockBackgrounds) {
-        IntRect clipRect(paintOffset.x() + borderLeft(), paintOffset.y() + borderTop(),
+        LayoutRect clipRect(paintOffset.x() + borderLeft(), paintOffset.y() + borderTop(),
                          width() - borderLeft() - borderRight(), height() - borderBottom() - borderTop() + buttonShadowHeight);
         if (clipRect.isEmpty())
             return;
@@ -99,42 +99,42 @@
         textRun.disableRoundingHacks();
 
         // Determine where the filename should be placed
-        int contentLeft = paintOffset.x() + borderLeft() + paddingLeft();
+        LayoutUnit contentLeft = paintOffset.x() + borderLeft() + paddingLeft();
         HTMLInputElement* button = uploadButton();
         if (!button)
             return;
 
         HTMLInputElement* input = static_cast<HTMLInputElement*>(node());
-        int buttonWidth = nodeWidth(button);
-        int buttonAndIconWidth = buttonWidth + afterButtonSpacing
+        LayoutUnit buttonWidth = nodeWidth(button);
+        LayoutUnit buttonAndIconWidth = buttonWidth + afterButtonSpacing
             + (input->icon() ? iconWidth + iconFilenameSpacing : 0);
-        int textX;
+        LayoutUnit textX;
         if (style()->isLeftToRightDirection())
             textX = contentLeft + buttonAndIconWidth;
         else
             textX = contentLeft + contentWidth() - buttonAndIconWidth - font.width(textRun);
         // We want to match the button's baseline
         RenderButton* buttonRenderer = toRenderButton(button->renderer());
-        int textY = buttonRenderer->absoluteBoundingBoxRect().y()
+        LayoutUnit textY = buttonRenderer->absoluteBoundingBoxRect().y()
             + buttonRenderer->marginTop() + buttonRenderer->borderTop() + buttonRenderer->paddingTop()
             + buttonRenderer->baselinePosition(AlphabeticBaseline, true, HorizontalLine, PositionOnContainingLine);
 
         paintInfo.context->setFillColor(style()->visitedDependentColor(CSSPropertyColor), style()->colorSpace());
         
         // Draw the filename
-        paintInfo.context->drawBidiText(font, textRun, IntPoint(textX, textY));
+        paintInfo.context->drawBidiText(font, textRun, LayoutPoint(textX, textY));
         
         if (input->icon()) {
             // Determine where the icon should be placed
-            int iconY = paintOffset.y() + borderTop() + paddingTop() + (contentHeight() - iconHeight) / 2;
-            int iconX;
+            LayoutUnit iconY = paintOffset.y() + borderTop() + paddingTop() + (contentHeight() - iconHeight) / 2;
+            LayoutUnit iconX;
             if (style()->isLeftToRightDirection())
                 iconX = contentLeft + buttonWidth + afterButtonSpacing;
             else
                 iconX = contentLeft + contentWidth() - buttonWidth - afterButtonSpacing - iconWidth;
 
             // Draw the file icon
-            input->icon()->paint(paintInfo.context, IntRect(iconX, iconY, iconWidth, iconHeight));
+            input->icon()->paint(paintInfo.context, LayoutRect(iconX, iconY, iconWidth, iconHeight));
         }
     }
 

Modified: trunk/Source/WebCore/rendering/RenderFileUploadControl.h (89982 => 89983)


--- trunk/Source/WebCore/rendering/RenderFileUploadControl.h	2011-06-29 01:03:18 UTC (rev 89982)
+++ trunk/Source/WebCore/rendering/RenderFileUploadControl.h	2011-06-29 01:06:00 UTC (rev 89983)
@@ -46,7 +46,7 @@
 
     virtual void updateFromElement();
     virtual void computePreferredLogicalWidths();
-    virtual void paintObject(PaintInfo&, const IntPoint&);
+    virtual void paintObject(PaintInfo&, const LayoutPoint&);
 
     virtual bool requiresForcedStyleRecalcPropagation() const { return true; }
 

Modified: trunk/Source/WebCore/rendering/RenderHTMLCanvas.cpp (89982 => 89983)


--- trunk/Source/WebCore/rendering/RenderHTMLCanvas.cpp	2011-06-29 01:03:18 UTC (rev 89982)
+++ trunk/Source/WebCore/rendering/RenderHTMLCanvas.cpp	2011-06-29 01:06:00 UTC (rev 89983)
@@ -54,9 +54,9 @@
     return canvas && canvas->renderingContext() && canvas->renderingContext()->isAccelerated();
 }
 
-void RenderHTMLCanvas::paintReplaced(PaintInfo& paintInfo, const IntPoint& paintOffset)
+void RenderHTMLCanvas::paintReplaced(PaintInfo& paintInfo, const LayoutPoint& paintOffset)
 {
-    IntRect rect = contentBoxRect();
+    LayoutRect rect = contentBoxRect();
     rect.moveBy(paintOffset);
     bool useLowQualityScale = style()->imageRendering() == ImageRenderingOptimizeContrast;
     static_cast<HTMLCanvasElement*>(node())->paint(paintInfo.context, rect, useLowQualityScale);

Modified: trunk/Source/WebCore/rendering/RenderHTMLCanvas.h (89982 => 89983)


--- trunk/Source/WebCore/rendering/RenderHTMLCanvas.h	2011-06-29 01:03:18 UTC (rev 89982)
+++ trunk/Source/WebCore/rendering/RenderHTMLCanvas.h	2011-06-29 01:06:00 UTC (rev 89983)
@@ -43,7 +43,7 @@
     
 private:
     virtual const char* renderName() const { return "RenderHTMLCanvas"; }
-    virtual void paintReplaced(PaintInfo&, const IntPoint&);
+    virtual void paintReplaced(PaintInfo&, const LayoutPoint&);
     virtual void intrinsicSizeChanged() { canvasSizeChanged(); }
 };
 

Modified: trunk/Source/WebCore/rendering/RenderImage.cpp (89982 => 89983)


--- trunk/Source/WebCore/rendering/RenderImage.cpp	2011-06-29 01:03:18 UTC (rev 89982)
+++ trunk/Source/WebCore/rendering/RenderImage.cpp	2011-06-29 01:06:00 UTC (rev 89983)
@@ -231,14 +231,14 @@
 #endif
 }
 
-void RenderImage::paintReplaced(PaintInfo& paintInfo, const IntPoint& paintOffset)
+void RenderImage::paintReplaced(PaintInfo& paintInfo, const LayoutPoint& paintOffset)
 {
-    int cWidth = contentWidth();
-    int cHeight = contentHeight();
-    int leftBorder = borderLeft();
-    int topBorder = borderTop();
-    int leftPad = paddingLeft();
-    int topPad = paddingTop();
+    LayoutUnit cWidth = contentWidth();
+    LayoutUnit cHeight = contentHeight();
+    LayoutUnit leftBorder = borderLeft();
+    LayoutUnit topBorder = borderTop();
+    LayoutUnit leftPad = paddingLeft();
+    LayoutUnit topPad = paddingTop();
 
     GraphicsContext* context = paintInfo.context;
 
@@ -251,26 +251,26 @@
             context->setStrokeStyle(SolidStroke);
             context->setStrokeColor(Color::lightGray, style()->colorSpace());
             context->setFillColor(Color::transparent, style()->colorSpace());
-            context->drawRect(IntRect(paintOffset.x() + leftBorder + leftPad, paintOffset.y() + topBorder + topPad, cWidth, cHeight));
+            context->drawRect(LayoutRect(paintOffset.x() + leftBorder + leftPad, paintOffset.y() + topBorder + topPad, cWidth, cHeight));
 
             bool errorPictureDrawn = false;
-            IntSize imageOffset;
+            LayoutSize imageOffset;
             // When calculating the usable dimensions, exclude the pixels of
             // the ouline rect so the error image/alt text doesn't draw on it.
-            int usableWidth = cWidth - 2;
-            int usableHeight = cHeight - 2;
+            LayoutUnit usableWidth = cWidth - 2;
+            LayoutUnit usableHeight = cHeight - 2;
 
             RefPtr<Image> image = m_imageResource->image();
 
             if (m_imageResource->errorOccurred() && !image->isNull() && usableWidth >= image->width() && usableHeight >= image->height()) {
                 // Center the error image, accounting for border and padding.
-                int centerX = (usableWidth - image->width()) / 2;
+                LayoutUnit centerX = (usableWidth - image->width()) / 2;
                 if (centerX < 0)
                     centerX = 0;
-                int centerY = (usableHeight - image->height()) / 2;
+                LayoutUnit centerY = (usableHeight - image->height()) / 2;
                 if (centerY < 0)
                     centerY = 0;
-                imageOffset = IntSize(leftBorder + leftPad + centerX + 1, topBorder + topPad + centerY + 1);
+                imageOffset = LayoutSize(leftBorder + leftPad + centerX + 1, topBorder + topPad + centerY + 1);
                 context->drawImage(image.get(), style()->colorSpace(), paintOffset + imageOffset);
                 errorPictureDrawn = true;
             }
@@ -280,14 +280,14 @@
                 context->setFillColor(style()->visitedDependentColor(CSSPropertyColor), style()->colorSpace());
                 const Font& font = style()->font();
                 const FontMetrics& fontMetrics = font.fontMetrics();
-                int ascent = fontMetrics.ascent();
-                IntPoint altTextOffset = paintOffset;
+                LayoutUnit ascent = fontMetrics.ascent();
+                LayoutPoint altTextOffset = paintOffset;
                 altTextOffset.move(leftBorder + leftPad, topBorder + topPad + ascent);
 
                 // Only draw the alt text if it'll fit within the content box,
                 // and only if it fits above the error image.
                 TextRun textRun = RenderBlock::constructTextRun(this, font, text, style());
-                int textWidth = font.width(textRun);
+                LayoutUnit textWidth = font.width(textRun);
                 if (errorPictureDrawn) {
                     if (usableWidth >= textWidth && fontMetrics.height() <= imageOffset.height())
                         context->drawText(font, textRun, altTextOffset);
@@ -305,10 +305,10 @@
             paintCustomHighlight(toPoint(paintOffset - location()), style()->highlight(), true);
 #endif
 
-        IntSize contentSize(cWidth, cHeight);
-        IntPoint contentLocation = paintOffset;
+        LayoutSize contentSize(cWidth, cHeight);
+        LayoutPoint contentLocation = paintOffset;
         contentLocation.move(leftBorder + leftPad, topBorder + topPad);
-        paintIntoRect(context, IntRect(contentLocation, contentSize));
+        paintIntoRect(context, LayoutRect(contentLocation, contentSize));
     }
 }
 

Modified: trunk/Source/WebCore/rendering/RenderImage.h (89982 => 89983)


--- trunk/Source/WebCore/rendering/RenderImage.h	2011-06-29 01:03:18 UTC (rev 89982)
+++ trunk/Source/WebCore/rendering/RenderImage.h	2011-06-29 01:06:00 UTC (rev 89983)
@@ -76,7 +76,7 @@
     virtual bool isImage() const { return true; }
     virtual bool isRenderImage() const { return true; }
 
-    virtual void paintReplaced(PaintInfo&, const IntPoint&);
+    virtual void paintReplaced(PaintInfo&, const LayoutPoint&);
 
     virtual int minimumReplacedHeight() const;
 

Modified: trunk/Source/WebCore/rendering/RenderListBox.cpp (89982 => 89983)


--- trunk/Source/WebCore/rendering/RenderListBox.cpp	2011-06-29 01:03:18 UTC (rev 89982)
+++ trunk/Source/WebCore/rendering/RenderListBox.cpp	2011-06-29 01:06:00 UTC (rev 89983)
@@ -261,7 +261,7 @@
                    contentWidth(), itemHeight());
 }
     
-void RenderListBox::paintObject(PaintInfo& paintInfo, const IntPoint& paintOffset)
+void RenderListBox::paintObject(PaintInfo& paintInfo, const LayoutPoint& paintOffset)
 {
     if (style()->visibility() != VISIBLE)
         return;

Modified: trunk/Source/WebCore/rendering/RenderListBox.h (89982 => 89983)


--- trunk/Source/WebCore/rendering/RenderListBox.h	2011-06-29 01:03:18 UTC (rev 89982)
+++ trunk/Source/WebCore/rendering/RenderListBox.h	2011-06-29 01:06:00 UTC (rev 89983)
@@ -65,7 +65,7 @@
     virtual bool canHaveChildren() const { return false; }
 
     virtual bool hasControlClip() const { return true; }
-    virtual void paintObject(PaintInfo&, const IntPoint&);
+    virtual void paintObject(PaintInfo&, const LayoutPoint&);
     virtual IntRect controlClipRect(const IntPoint&) const;
 
     virtual bool isPointInOverflowControl(HitTestResult&, const IntPoint& pointInContainer, const IntPoint& accumulatedOffset);

Modified: trunk/Source/WebCore/rendering/RenderReplaced.h (89982 => 89983)


--- trunk/Source/WebCore/rendering/RenderReplaced.h	2011-06-29 01:03:18 UTC (rev 89982)
+++ trunk/Source/WebCore/rendering/RenderReplaced.h	2011-06-29 01:06:00 UTC (rev 89983)
@@ -70,7 +70,7 @@
     int calcAspectRatioLogicalWidth() const;
     int calcAspectRatioLogicalHeight() const;
 
-    virtual void paintReplaced(PaintInfo&, const IntPoint&) { }
+    virtual void paintReplaced(PaintInfo&, const LayoutPoint&) { }
 
     virtual IntRect clippedOverflowRectForRepaint(RenderBoxModelObject* repaintContainer);
 

Modified: trunk/Source/WebCore/rendering/RenderTable.cpp (89982 => 89983)


--- trunk/Source/WebCore/rendering/RenderTable.cpp	2011-06-29 01:03:18 UTC (rev 89982)
+++ trunk/Source/WebCore/rendering/RenderTable.cpp	2011-06-29 01:06:00 UTC (rev 89983)
@@ -472,7 +472,7 @@
         popContentsClip(paintInfo, paintPhase, adjustedPaintOffset);
 }
 
-void RenderTable::paintObject(PaintInfo& paintInfo, const IntPoint& paintOffset)
+void RenderTable::paintObject(PaintInfo& paintInfo, const LayoutPoint& paintOffset)
 {
     PaintPhase paintPhase = paintInfo.phase;
     if ((paintPhase == PaintPhaseBlockBackground || paintPhase == PaintPhaseChildBlockBackground) && hasBoxDecorations() && style()->visibility() == VISIBLE)
@@ -497,7 +497,7 @@
 
     for (RenderObject* child = firstChild(); child; child = child->nextSibling()) {
         if (child->isBox() && !toRenderBox(child)->hasSelfPaintingLayer() && (child->isTableSection() || child == m_caption)) {
-            IntPoint childPoint = flipForWritingMode(toRenderBox(child), paintOffset, ParentToChildFlippingAdjustment);
+            LayoutPoint childPoint = flipForWritingMode(toRenderBox(child), paintOffset, ParentToChildFlippingAdjustment);
             child->paint(info, childPoint);
         }
     }
@@ -519,7 +519,7 @@
             m_currentBorder = &borderStyles[i];
             for (RenderObject* child = firstChild(); child; child = child->nextSibling())
                 if (child->isTableSection()) {
-                    IntPoint childPoint = flipForWritingMode(toRenderTableSection(child), paintOffset, ParentToChildFlippingAdjustment);
+                    LayoutPoint childPoint = flipForWritingMode(toRenderTableSection(child), paintOffset, ParentToChildFlippingAdjustment);
                     child->paint(info, childPoint);
                 }
         }
@@ -528,7 +528,7 @@
 
     // Paint outline.
     if ((paintPhase == PaintPhaseOutline || paintPhase == PaintPhaseSelfOutline) && hasOutline() && style()->visibility() == VISIBLE)
-        paintOutline(paintInfo.context, IntRect(paintOffset, size()));
+        paintOutline(paintInfo.context, LayoutRect(paintOffset, size()));
 }
 
 void RenderTable::subtractCaptionRect(IntRect& rect) const

Modified: trunk/Source/WebCore/rendering/RenderTable.h (89982 => 89983)


--- trunk/Source/WebCore/rendering/RenderTable.h	2011-06-29 01:03:18 UTC (rev 89982)
+++ trunk/Source/WebCore/rendering/RenderTable.h	2011-06-29 01:06:00 UTC (rev 89983)
@@ -215,7 +215,7 @@
     virtual void removeChild(RenderObject* oldChild);
 
     virtual void paint(PaintInfo&, const IntPoint&);
-    virtual void paintObject(PaintInfo&, const IntPoint&);
+    virtual void paintObject(PaintInfo&, const LayoutPoint&);
     virtual void paintBoxDecorations(PaintInfo&, const IntPoint&);
     virtual void paintMask(PaintInfo&, const LayoutPoint&);
     virtual void layout();

Modified: trunk/Source/WebCore/rendering/RenderTableSection.cpp (89982 => 89983)


--- trunk/Source/WebCore/rendering/RenderTableSection.cpp	2011-06-29 01:03:18 UTC (rev 89982)
+++ trunk/Source/WebCore/rendering/RenderTableSection.cpp	2011-06-29 01:06:00 UTC (rev 89983)
@@ -947,7 +947,7 @@
         cell->paint(paintInfo, cellPoint);
 }
 
-void RenderTableSection::paintObject(PaintInfo& paintInfo, const IntPoint& paintOffset)
+void RenderTableSection::paintObject(PaintInfo& paintInfo, const LayoutPoint& paintOffset)
 {
     // Check which rows and cols are visible and only paint these.
     // FIXME: Could use a binary search here.
@@ -956,11 +956,11 @@
 
     PaintPhase paintPhase = paintInfo.phase;
 
-    int os = 2 * maximalOutlineSize(paintPhase);
+    LayoutUnit os = 2 * maximalOutlineSize(paintPhase);
     unsigned startrow = 0;
     unsigned endrow = totalRows;
 
-    IntRect localRepaintRect = paintInfo.rect;
+    LayoutRect localRepaintRect = paintInfo.rect;
     localRepaintRect.moveBy(-paintOffset);
     if (style()->isFlippedBlocksWritingMode()) {
         if (style()->isHorizontalWritingMode())
@@ -971,7 +971,7 @@
 
     // If some cell overflows, just paint all of them.
     if (!m_hasOverflowingCell) {
-        int before = (style()->isHorizontalWritingMode() ? localRepaintRect.y() : localRepaintRect.x()) - os;
+        LayoutUnit before = (style()->isHorizontalWritingMode() ? localRepaintRect.y() : localRepaintRect.x()) - os;
         // binary search to find a row
         startrow = std::lower_bound(m_rowPos.begin(), m_rowPos.end(), before) - m_rowPos.begin();
 
@@ -981,7 +981,7 @@
         if (startrow == m_rowPos.size() || (startrow > 0 && (m_rowPos[startrow] >  before)))
           --startrow;
 
-        int after = (style()->isHorizontalWritingMode() ? localRepaintRect.maxY() : localRepaintRect.maxX()) + os;
+        LayoutUnit after = (style()->isHorizontalWritingMode() ? localRepaintRect.maxY() : localRepaintRect.maxX()) + os;
         endrow = std::lower_bound(m_rowPos.begin(), m_rowPos.end(), after) - m_rowPos.begin();
         if (endrow == m_rowPos.size())
           --endrow;
@@ -994,13 +994,13 @@
     unsigned endcol = totalCols;
     // FIXME: Implement RTL.
     if (!m_hasOverflowingCell && style()->isLeftToRightDirection()) {
-        int start = (style()->isHorizontalWritingMode() ? localRepaintRect.x() : localRepaintRect.y()) - os;
+        LayoutUnit start = (style()->isHorizontalWritingMode() ? localRepaintRect.x() : localRepaintRect.y()) - os;
         Vector<int>& columnPos = table()->columnPositions();
         startcol = std::lower_bound(columnPos.begin(), columnPos.end(), start) - columnPos.begin();
         if ((startcol == columnPos.size()) || (startcol > 0 && (columnPos[startcol] > start)))
             --startcol;
 
-        int end = (style()->isHorizontalWritingMode() ? localRepaintRect.maxX() : localRepaintRect.maxY()) + os;
+        LayoutUnit end = (style()->isHorizontalWritingMode() ? localRepaintRect.maxX() : localRepaintRect.maxY()) + os;
         endcol = std::lower_bound(columnPos.begin(), columnPos.end(), end) - columnPos.begin();
         if (endcol == columnPos.size())
             --endcol;

Modified: trunk/Source/WebCore/rendering/RenderTableSection.h (89982 => 89983)


--- trunk/Source/WebCore/rendering/RenderTableSection.h	2011-06-29 01:03:18 UTC (rev 89982)
+++ trunk/Source/WebCore/rendering/RenderTableSection.h	2011-06-29 01:06:00 UTC (rev 89983)
@@ -134,7 +134,7 @@
 
     virtual void paint(PaintInfo&, const IntPoint&);
     virtual void paintCell(RenderTableCell*, PaintInfo&, const IntPoint&);
-    virtual void paintObject(PaintInfo&, const IntPoint&);
+    virtual void paintObject(PaintInfo&, const LayoutPoint&);
 
     virtual void imageChanged(WrappedImagePtr, const IntRect* = 0);
 

Modified: trunk/Source/WebCore/rendering/RenderTextControl.cpp (89982 => 89983)


--- trunk/Source/WebCore/rendering/RenderTextControl.cpp	2011-06-29 01:03:18 UTC (rev 89982)
+++ trunk/Source/WebCore/rendering/RenderTextControl.cpp	2011-06-29 01:06:00 UTC (rev 89983)
@@ -632,7 +632,7 @@
     }
 }
 
-void RenderTextControl::paintObject(PaintInfo& paintInfo, const IntPoint& paintOffset)
+void RenderTextControl::paintObject(PaintInfo& paintInfo, const LayoutPoint& paintOffset)
 {    
     if (m_placeholderVisible && paintInfo.phase == PaintPhaseForeground)
         paintPlaceholder(paintInfo, paintOffset);

Modified: trunk/Source/WebCore/rendering/RenderTextControl.h (89982 => 89983)


--- trunk/Source/WebCore/rendering/RenderTextControl.h	2011-06-29 01:03:18 UTC (rev 89982)
+++ trunk/Source/WebCore/rendering/RenderTextControl.h	2011-06-29 01:06:00 UTC (rev 89983)
@@ -90,7 +90,7 @@
     virtual void removeLeftoverAnonymousBlock(RenderBlock*) { }
     virtual bool canHaveChildren() const { return false; }
     virtual bool avoidsFloats() const { return true; }
-    virtual void paintObject(PaintInfo&, const IntPoint&);
+    virtual void paintObject(PaintInfo&, const LayoutPoint&);
     
     virtual void addFocusRingRects(Vector<IntRect>&, const IntPoint&);
 

Modified: trunk/Source/WebCore/rendering/RenderVideo.cpp (89982 => 89983)


--- trunk/Source/WebCore/rendering/RenderVideo.cpp	2011-06-29 01:03:18 UTC (rev 89982)
+++ trunk/Source/WebCore/rendering/RenderVideo.cpp	2011-06-29 01:06:00 UTC (rev 89983)
@@ -188,7 +188,7 @@
     return !videoElement()->shouldDisplayPosterImage();
 }
 
-void RenderVideo::paintReplaced(PaintInfo& paintInfo, const IntPoint& paintOffset)
+void RenderVideo::paintReplaced(PaintInfo& paintInfo, const LayoutPoint& paintOffset)
 {
     MediaPlayer* mediaPlayer = mediaElement()->player();
     bool displayingPoster = videoElement()->shouldDisplayPosterImage();
@@ -199,7 +199,7 @@
         updatePlayer();
     }
 
-    IntRect rect = videoBox();
+    LayoutRect rect = videoBox();
     if (rect.isEmpty())
         return;
     rect.moveBy(paintOffset);

Modified: trunk/Source/WebCore/rendering/RenderVideo.h (89982 => 89983)


--- trunk/Source/WebCore/rendering/RenderVideo.h	2011-06-29 01:03:18 UTC (rev 89982)
+++ trunk/Source/WebCore/rendering/RenderVideo.h	2011-06-29 01:06:00 UTC (rev 89983)
@@ -66,7 +66,7 @@
     virtual bool requiresLayer() const { return true; }
     virtual bool isVideo() const { return true; }
 
-    virtual void paintReplaced(PaintInfo&, const IntPoint&);
+    virtual void paintReplaced(PaintInfo&, const LayoutPoint&);
 
     virtual void layout();
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to