Switch remaining SVG Rendering methods to LayoutUnits
authorleviw@chromium.org <leviw@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 15 Aug 2011 19:07:58 +0000 (19:07 +0000)
committerleviw@chromium.org <leviw@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 15 Aug 2011 19:07:58 +0000 (19:07 +0000)
https://bugs.webkit.org/show_bug.cgi?id=66169

Reviewed by Eric Seidel.

Changing remaining integer SVG methods to use the LayoutUnits abstraction.

No tests as no change in functionality.

* rendering/svg/RenderSVGBlock.cpp:
(WebCore::RenderSVGBlock::visualOverflowRect):
* rendering/svg/RenderSVGBlock.h:
* rendering/svg/RenderSVGContainer.cpp:
(WebCore::RenderSVGContainer::paint):
* rendering/svg/RenderSVGForeignObject.cpp:
(WebCore::RenderSVGForeignObject::paint):
(WebCore::RenderSVGForeignObject::clippedOverflowRectForRepaint):
(WebCore::RenderSVGForeignObject::computeRectForRepaint):
* rendering/svg/RenderSVGHiddenContainer.cpp:
(WebCore::RenderSVGHiddenContainer::paint):
* rendering/svg/RenderSVGImage.cpp:
(WebCore::RenderSVGImage::paint):
* rendering/svg/RenderSVGInlineText.cpp:
(WebCore::RenderSVGInlineText::linesBoundingBox):
* rendering/svg/RenderSVGInlineText.h:
* rendering/svg/RenderSVGModelObject.cpp:
(WebCore::RenderSVGModelObject::outlineBoundsForRepaint):
* rendering/svg/RenderSVGPath.cpp:
(WebCore::RenderSVGPath::paint):
* rendering/svg/RenderSVGRoot.cpp:
(WebCore::RenderSVGRoot::localToBorderBoxTransform):
(WebCore::RenderSVGRoot::parentOriginToBorderBox):
(WebCore::RenderSVGRoot::borderOriginToContentBox):
(WebCore::RenderSVGRoot::localToRepaintContainerTransform):
(WebCore::RenderSVGRoot::localToParentTransform):
(WebCore::RenderSVGRoot::clippedOverflowRectForRepaint):
(WebCore::RenderSVGRoot::computeRectForRepaint):
* rendering/svg/RenderSVGRoot.h:
* rendering/svg/RenderSVGText.cpp:
(WebCore::RenderSVGText::paint):
* rendering/svg/SVGInlineFlowBox.cpp:
(WebCore::SVGInlineFlowBox::paint):
* rendering/svg/SVGInlineTextBox.cpp:
(WebCore::SVGInlineTextBox::paint):
* rendering/svg/SVGRenderSupport.cpp:
(WebCore::SVGRenderSupport::clippedOverflowRectForRepaint):
(WebCore::SVGRenderSupport::computeRectForRepaint):
* rendering/svg/SVGRenderSupport.h:
* rendering/svg/SVGRootInlineBox.cpp:
(WebCore::SVGRootInlineBox::paint):
(WebCore::SVGRootInlineBox::computePerCharacterLayoutInformation):
(WebCore::SVGRootInlineBox::layoutChildBoxes):
(WebCore::SVGRootInlineBox::layoutRootBox):
(WebCore::SVGRootInlineBox::closestLeafChildForPosition):
* rendering/svg/SVGRootInlineBox.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@93050 268f45cc-cd09-0410-ab3c-d52691b4dbfc

20 files changed:
Source/WebCore/ChangeLog
Source/WebCore/rendering/svg/RenderSVGBlock.cpp
Source/WebCore/rendering/svg/RenderSVGBlock.h
Source/WebCore/rendering/svg/RenderSVGContainer.cpp
Source/WebCore/rendering/svg/RenderSVGForeignObject.cpp
Source/WebCore/rendering/svg/RenderSVGHiddenContainer.cpp
Source/WebCore/rendering/svg/RenderSVGImage.cpp
Source/WebCore/rendering/svg/RenderSVGInlineText.cpp
Source/WebCore/rendering/svg/RenderSVGInlineText.h
Source/WebCore/rendering/svg/RenderSVGModelObject.cpp
Source/WebCore/rendering/svg/RenderSVGPath.cpp
Source/WebCore/rendering/svg/RenderSVGRoot.cpp
Source/WebCore/rendering/svg/RenderSVGRoot.h
Source/WebCore/rendering/svg/RenderSVGText.cpp
Source/WebCore/rendering/svg/SVGInlineFlowBox.cpp
Source/WebCore/rendering/svg/SVGInlineTextBox.cpp
Source/WebCore/rendering/svg/SVGRenderSupport.cpp
Source/WebCore/rendering/svg/SVGRenderSupport.h
Source/WebCore/rendering/svg/SVGRootInlineBox.cpp
Source/WebCore/rendering/svg/SVGRootInlineBox.h

index 23d0c88..4ad0afe 100644 (file)
@@ -1,3 +1,61 @@
+2011-08-15  Levi Weintraub  <leviw@chromium.org>
+
+        Switch remaining SVG Rendering methods to LayoutUnits
+        https://bugs.webkit.org/show_bug.cgi?id=66169
+
+        Reviewed by Eric Seidel.
+
+        Changing remaining integer SVG methods to use the LayoutUnits abstraction.
+
+        No tests as no change in functionality.
+
+        * rendering/svg/RenderSVGBlock.cpp:
+        (WebCore::RenderSVGBlock::visualOverflowRect):
+        * rendering/svg/RenderSVGBlock.h:
+        * rendering/svg/RenderSVGContainer.cpp:
+        (WebCore::RenderSVGContainer::paint):
+        * rendering/svg/RenderSVGForeignObject.cpp:
+        (WebCore::RenderSVGForeignObject::paint):
+        (WebCore::RenderSVGForeignObject::clippedOverflowRectForRepaint):
+        (WebCore::RenderSVGForeignObject::computeRectForRepaint):
+        * rendering/svg/RenderSVGHiddenContainer.cpp:
+        (WebCore::RenderSVGHiddenContainer::paint):
+        * rendering/svg/RenderSVGImage.cpp:
+        (WebCore::RenderSVGImage::paint):
+        * rendering/svg/RenderSVGInlineText.cpp:
+        (WebCore::RenderSVGInlineText::linesBoundingBox):
+        * rendering/svg/RenderSVGInlineText.h:
+        * rendering/svg/RenderSVGModelObject.cpp:
+        (WebCore::RenderSVGModelObject::outlineBoundsForRepaint):
+        * rendering/svg/RenderSVGPath.cpp:
+        (WebCore::RenderSVGPath::paint):
+        * rendering/svg/RenderSVGRoot.cpp:
+        (WebCore::RenderSVGRoot::localToBorderBoxTransform):
+        (WebCore::RenderSVGRoot::parentOriginToBorderBox):
+        (WebCore::RenderSVGRoot::borderOriginToContentBox):
+        (WebCore::RenderSVGRoot::localToRepaintContainerTransform):
+        (WebCore::RenderSVGRoot::localToParentTransform):
+        (WebCore::RenderSVGRoot::clippedOverflowRectForRepaint):
+        (WebCore::RenderSVGRoot::computeRectForRepaint):
+        * rendering/svg/RenderSVGRoot.h:
+        * rendering/svg/RenderSVGText.cpp:
+        (WebCore::RenderSVGText::paint):
+        * rendering/svg/SVGInlineFlowBox.cpp:
+        (WebCore::SVGInlineFlowBox::paint):
+        * rendering/svg/SVGInlineTextBox.cpp:
+        (WebCore::SVGInlineTextBox::paint):
+        * rendering/svg/SVGRenderSupport.cpp:
+        (WebCore::SVGRenderSupport::clippedOverflowRectForRepaint):
+        (WebCore::SVGRenderSupport::computeRectForRepaint):
+        * rendering/svg/SVGRenderSupport.h:
+        * rendering/svg/SVGRootInlineBox.cpp:
+        (WebCore::SVGRootInlineBox::paint):
+        (WebCore::SVGRootInlineBox::computePerCharacterLayoutInformation):
+        (WebCore::SVGRootInlineBox::layoutChildBoxes):
+        (WebCore::SVGRootInlineBox::layoutRootBox):
+        (WebCore::SVGRootInlineBox::closestLeafChildForPosition):
+        * rendering/svg/SVGRootInlineBox.h:
+
 2011-08-12  Jeff Miller  <jeffm@apple.com>
 
         MediaPlayerPrivateAVFoundationCF::playerItemStatus() should return MediaPlayerAVPlayerItemStatusDoesNotExist if there is no AVPlayerItem
index fe5a4f1..2c81590 100644 (file)
@@ -34,7 +34,7 @@ RenderSVGBlock::RenderSVGBlock(SVGElement* node)
 {
 }
 
-IntRect RenderSVGBlock::visualOverflowRect() const
+LayoutRect RenderSVGBlock::visualOverflowRect() const
 {
     LayoutRect borderRect = borderBoxRect();
 
index 3fb9042..22c1f18 100644 (file)
@@ -32,7 +32,7 @@ class RenderSVGBlock : public RenderBlock {
 public:
     explicit RenderSVGBlock(SVGElement*);
 
-    virtual IntRect visualOverflowRect() const;
+    virtual LayoutRect visualOverflowRect() const;
 
 private:
     virtual void setStyle(PassRefPtr<RenderStyle>);
index 7ed0089..3b8caaa 100644 (file)
@@ -91,7 +91,7 @@ bool RenderSVGContainer::selfWillPaint()
 #endif
 }
 
-void RenderSVGContainer::paint(PaintInfo& paintInfo, const IntPoint&)
+void RenderSVGContainer::paint(PaintInfo& paintInfo, const LayoutPoint&)
 {
     if (paintInfo.context->paintingDisabled())
         return;
index 0210463..d7ac397 100644 (file)
@@ -44,7 +44,7 @@ RenderSVGForeignObject::~RenderSVGForeignObject()
 {
 }
 
-void RenderSVGForeignObject::paint(PaintInfo& paintInfo, const IntPoint&)
+void RenderSVGForeignObject::paint(PaintInfo& paintInfo, const LayoutPoint&)
 {
     if (paintInfo.context->paintingDisabled())
         return;
@@ -66,12 +66,12 @@ void RenderSVGForeignObject::paint(PaintInfo& paintInfo, const IntPoint&)
         childPaintInfo.context->endTransparencyLayer();
 }
 
-IntRect RenderSVGForeignObject::clippedOverflowRectForRepaint(RenderBoxModelObject* repaintContainer) const
+LayoutRect RenderSVGForeignObject::clippedOverflowRectForRepaint(RenderBoxModelObject* repaintContainer) const
 {
     return SVGRenderSupport::clippedOverflowRectForRepaint(this, repaintContainer);
 }
 
-void RenderSVGForeignObject::computeRectForRepaint(RenderBoxModelObject* repaintContainer, IntRect& repaintRect, bool fixed) const
+void RenderSVGForeignObject::computeRectForRepaint(RenderBoxModelObject* repaintContainer, LayoutRect& repaintRect, bool fixed) const
 {
     SVGRenderSupport::computeRectForRepaint(this, repaintContainer, repaintRect, fixed);
 }
index 09f7fc3..d29d85e 100644 (file)
@@ -39,7 +39,7 @@ void RenderSVGHiddenContainer::layout()
     setNeedsLayout(false);    
 }
 
-void RenderSVGHiddenContainer::paint(PaintInfo&, const IntPoint&)
+void RenderSVGHiddenContainer::paint(PaintInfo&, const LayoutPoint&)
 {
     // This subtree does not paint.
 }
index 30eea64..51e4bf2 100644 (file)
@@ -103,7 +103,7 @@ void RenderSVGImage::updateFromElement()
     RenderSVGModelObject::updateFromElement();
 }
 
-void RenderSVGImage::paint(PaintInfo& paintInfo, const IntPoint&)
+void RenderSVGImage::paint(PaintInfo& paintInfo, const LayoutPoint&)
 {
     if (paintInfo.context->paintingDisabled() || style()->visibility() == HIDDEN || !m_imageResource->hasImage())
         return;
index 5e26296..0d435cf 100644 (file)
@@ -127,9 +127,9 @@ IntRect RenderSVGInlineText::localCaretRect(InlineBox* box, int caretOffset, int
     return IntRect(x, rect.y(), caretWidth, rect.height());
 }
 
-IntRect RenderSVGInlineText::linesBoundingBox() const
+LayoutRect RenderSVGInlineText::linesBoundingBox() const
 {
-    IntRect boundingBox;
+    LayoutRect boundingBox;
     for (InlineTextBox* box = firstTextBox(); box; box = box->nextTextBox())
         boundingBox.unite(box->calculateBoundaries());
     return boundingBox;
index 18be859..8caa127 100644 (file)
@@ -60,7 +60,7 @@ private:
 
     virtual VisiblePosition positionForPoint(const LayoutPoint&);
     virtual IntRect localCaretRect(InlineBox*, int caretOffset, int* extraWidthToEndOfLine = 0);
-    virtual IntRect linesBoundingBox() const;
+    virtual LayoutRect linesBoundingBox() const;
     virtual InlineTextBox* createTextBox();
 
     float m_scalingFactor;
index 073d0b8..f32fe1e 100644 (file)
@@ -61,9 +61,9 @@ void RenderSVGModelObject::mapLocalToContainer(RenderBoxModelObject* repaintCont
 // Copied from RenderBox, this method likely requires further refactoring to work easily for both SVG and CSS Box Model content.
 // FIXME: This may also need to move into SVGRenderSupport as the RenderBox version depends
 // on borderBoundingBox() which SVG RenderBox subclases (like SVGRenderBlock) do not implement.
-IntRect RenderSVGModelObject::outlineBoundsForRepaint(RenderBoxModelObject* repaintContainer, IntPoint*) const
+LayoutRect RenderSVGModelObject::outlineBoundsForRepaint(RenderBoxModelObject* repaintContainer, LayoutPoint*) const
 {
-    IntRect box = enclosingIntRect(repaintRectInLocalCoordinates());
+    LayoutRect box = enclosingLayoutRect(repaintRectInLocalCoordinates());
     adjustRectForOutlineAndShadow(box);
 
     FloatQuad containerRelativeQuad = localToContainerQuad(FloatRect(box), repaintContainer);
index debab77..a0391f7 100644 (file)
@@ -246,7 +246,7 @@ void RenderSVGPath::fillAndStrokePath(GraphicsContext* context)
     }
 }
 
-void RenderSVGPath::paint(PaintInfo& paintInfo, const IntPoint&)
+void RenderSVGPath::paint(PaintInfo& paintInfo, const LayoutPoint&)
 {
     if (paintInfo.context->paintingDisabled() || style()->visibility() == HIDDEN || m_path.isEmpty())
         return;
index 3fe03c0..c8642ab 100644 (file)
@@ -346,7 +346,7 @@ void RenderSVGRoot::calcViewport()
 // relative to our borderBox origin.  This method gives us exactly that.
 AffineTransform RenderSVGRoot::localToBorderBoxTransform() const
 {
-    IntSize borderAndPadding = borderOriginToContentBox();
+    LayoutSize borderAndPadding = borderOriginToContentBox();
     SVGSVGElement* svg = static_cast<SVGSVGElement*>(node());
     float scale = style()->effectiveZoom();
     FloatPoint translate = svg->currentTranslate();
@@ -354,43 +354,43 @@ AffineTransform RenderSVGRoot::localToBorderBoxTransform() const
     return ctm * svg->viewBoxToViewTransform(width() / scale, height() / scale);
 }
 
-IntSize RenderSVGRoot::parentOriginToBorderBox() const
+LayoutSize RenderSVGRoot::parentOriginToBorderBox() const
 {
-    return IntSize(x(), y());
+    return locationOffset();
 }
 
-IntSize RenderSVGRoot::borderOriginToContentBox() const
+LayoutSize RenderSVGRoot::borderOriginToContentBox() const
 {
-    return IntSize(borderLeft() + paddingLeft(), borderTop() + paddingTop());
+    return LayoutSize(borderLeft() + paddingLeft(), borderTop() + paddingTop());
 }
 
-AffineTransform RenderSVGRoot::localToRepaintContainerTransform(const IntPoint& parentOriginInContainer) const
+AffineTransform RenderSVGRoot::localToRepaintContainerTransform(const LayoutPoint& parentOriginInContainer) const
 {
     return AffineTransform::translation(parentOriginInContainer.x(), parentOriginInContainer.y()) * localToParentTransform();
 }
 
 const AffineTransform& RenderSVGRoot::localToParentTransform() const
 {
-    IntSize parentToBorderBoxOffset = parentOriginToBorderBox();
+    LayoutSize parentToBorderBoxOffset = parentOriginToBorderBox();
 
     m_localToParentTransform = AffineTransform::translation(parentToBorderBoxOffset.width(), parentToBorderBoxOffset.height()) * localToBorderBoxTransform();
 
     return m_localToParentTransform;
 }
 
-IntRect RenderSVGRoot::clippedOverflowRectForRepaint(RenderBoxModelObject* repaintContainer) const
+LayoutRect RenderSVGRoot::clippedOverflowRectForRepaint(RenderBoxModelObject* repaintContainer) const
 {
     return SVGRenderSupport::clippedOverflowRectForRepaint(this, repaintContainer);
 }
 
-void RenderSVGRoot::computeRectForRepaint(RenderBoxModelObject* repaintContainer, IntRect& repaintRect, bool fixed) const
+void RenderSVGRoot::computeRectForRepaint(RenderBoxModelObject* repaintContainer, LayoutRect& repaintRect, bool fixed) const
 {
     // Apply our local transforms (except for x/y translation), then our shadow, 
     // and then call RenderBox's method to handle all the normal CSS Box model bits
     repaintRect = localToBorderBoxTransform().mapRect(repaintRect);
 
     // Apply initial viewport clip - not affected by overflow settings    
-    repaintRect.intersect(enclosingIntRect(FloatRect(FloatPoint(), m_viewportSize)));
+    repaintRect.intersect(enclosingLayoutRect(FloatRect(FloatPoint(), m_viewportSize)));
 
     const SVGRenderStyle* svgStyle = style()->svgStyle();
     if (const ShadowData* shadow = svgStyle->shadow())
index b33daa2..77ffc76 100644 (file)
@@ -87,8 +87,8 @@ private:
 
     virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const LayoutPoint& pointInContainer, const LayoutPoint& accumulatedOffset, HitTestAction);
 
-    virtual IntRect clippedOverflowRectForRepaint(RenderBoxModelObject* repaintContainer) const;
-    virtual void computeRectForRepaint(RenderBoxModelObject* repaintContainer, IntRect& repaintRect, bool fixed) const;
+    virtual LayoutRect clippedOverflowRectForRepaint(RenderBoxModelObject* repaintContainer) const;
+    virtual void computeRectForRepaint(RenderBoxModelObject* repaintContainer, LayoutRect& repaintRect, bool fixed) const;
 
     virtual void mapLocalToContainer(RenderBoxModelObject* repaintContainer, bool useTransforms, bool fixed, TransformState&, bool* wasFixed = 0) const;
 
@@ -97,9 +97,9 @@ private:
     bool selfWillPaint();
     void updateCachedBoundaries();
 
-    IntSize parentOriginToBorderBox() const;
-    IntSize borderOriginToContentBox() const;
-    AffineTransform localToRepaintContainerTransform(const IntPoint& parentOriginInContainer) const;
+    LayoutSize parentOriginToBorderBox() const;
+    LayoutSize borderOriginToContentBox() const;
+    AffineTransform localToRepaintContainerTransform(const LayoutPoint& parentOriginInContainer) const;
     AffineTransform localToBorderBoxTransform() const;
 
     RenderObjectChildList m_children;
index c130b3f..ca80863 100644 (file)
@@ -229,7 +229,7 @@ void RenderSVGText::absoluteQuads(Vector<FloatQuad>& quads, bool* wasFixed)
     quads.append(localToAbsoluteQuad(strokeBoundingBox(), false, wasFixed));
 }
 
-void RenderSVGText::paint(PaintInfo& paintInfo, const IntPoint&)
+void RenderSVGText::paint(PaintInfo& paintInfo, const LayoutPoint&)
 {
     if (paintInfo.context->paintingDisabled())
         return;
index 2a01710..b879dea 100644 (file)
@@ -49,7 +49,7 @@ void SVGInlineFlowBox::paintSelectionBackground(PaintInfo& paintInfo)
     }
 }
 
-void SVGInlineFlowBox::paint(PaintInfo& paintInfo, const IntPoint&, int, int)
+void SVGInlineFlowBox::paint(PaintInfo& paintInfo, const LayoutPoint&, LayoutUnit, LayoutUnit)
 {
     ASSERT(paintInfo.phase == PaintPhaseForeground || paintInfo.phase == PaintPhaseSelection);
     ASSERT(!paintInfo.context->paintingDisabled());
@@ -65,7 +65,7 @@ void SVGInlineFlowBox::paint(PaintInfo& paintInfo, const IntPoint&, int, int)
             if (child->isSVGInlineTextBox())
                 computeTextMatchMarkerRectForRenderer(toRenderSVGInlineText(static_cast<SVGInlineTextBox*>(child)->textRenderer()));
 
-            child->paint(childPaintInfo, IntPoint(), 0, 0);
+            child->paint(childPaintInfo, LayoutPoint(), 0, 0);
         }
     }
 
index eb57de8..c1c5afa 100644 (file)
@@ -245,7 +245,7 @@ void SVGInlineTextBox::paintSelectionBackground(PaintInfo& paintInfo)
     ASSERT(!m_paintingResource);
 }
 
-void SVGInlineTextBox::paint(PaintInfo& paintInfo, const IntPoint&, int, int)
+void SVGInlineTextBox::paint(PaintInfo& paintInfo, const LayoutPoint&, LayoutUnit, LayoutUnit)
 {
     ASSERT(paintInfo.shouldPaintWithinRoot(renderer()));
     ASSERT(paintInfo.phase == PaintPhaseForeground || paintInfo.phase == PaintPhaseSelection);
index 68e18ee..0079219 100644 (file)
 
 namespace WebCore {
 
-IntRect SVGRenderSupport::clippedOverflowRectForRepaint(const RenderObject* object, RenderBoxModelObject* repaintContainer)
+LayoutRect SVGRenderSupport::clippedOverflowRectForRepaint(const RenderObject* object, RenderBoxModelObject* repaintContainer)
 {
     // Return early for any cases where we don't actually paint
     if (object->style()->visibility() != VISIBLE && !object->enclosingLayer()->hasVisibleContent())
-        return IntRect();
+        return LayoutRect();
 
     // Pass our local paint rect to computeRectForRepaint() which will
     // map to parent coords and recurse up the parent chain.
-    IntRect repaintRect = enclosingIntRect(object->repaintRectInLocalCoordinates());
+    LayoutRect repaintRect = enclosingLayoutRect(object->repaintRectInLocalCoordinates());
     object->computeRectForRepaint(repaintContainer, repaintRect);
     return repaintRect;
 }
 
-void SVGRenderSupport::computeRectForRepaint(const RenderObject* object, RenderBoxModelObject* repaintContainer, IntRect& repaintRect, bool fixed)
+void SVGRenderSupport::computeRectForRepaint(const RenderObject* object, RenderBoxModelObject* repaintContainer, LayoutRect& repaintRect, bool fixed)
 {
     const SVGRenderStyle* svgStyle = object->style()->svgStyle();
     if (const ShadowData* shadow = svgStyle->shadow())
index 806d3cf..8bd7959 100644 (file)
@@ -61,8 +61,8 @@ public:
     static bool paintInfoIntersectsRepaintRect(const FloatRect& localRepaintRect, const AffineTransform& localTransform, const PaintInfo&);
 
     // Important functions used by nearly all SVG renderers centralizing coordinate transformations / repaint rect calculations
-    static IntRect clippedOverflowRectForRepaint(const RenderObject*, RenderBoxModelObject* repaintContainer);
-    static void computeRectForRepaint(const RenderObject*, RenderBoxModelObject* repaintContainer, IntRect&, bool fixed);
+    static LayoutRect clippedOverflowRectForRepaint(const RenderObject*, RenderBoxModelObject* repaintContainer);
+    static void computeRectForRepaint(const RenderObject*, RenderBoxModelObject* repaintContainer, LayoutRect&, bool fixed);
     static void mapLocalToContainer(const RenderObject*, RenderBoxModelObject* repaintContainer, bool useTransforms, bool fixed, TransformState&, bool* wasFixed = 0);
 
     // Shared between SVG renderers and resources.
index 025cb90..fd107aa 100644 (file)
@@ -36,7 +36,7 @@
 
 namespace WebCore {
 
-void SVGRootInlineBox::paint(PaintInfo& paintInfo, const IntPoint&, int, int)
+void SVGRootInlineBox::paint(PaintInfo& paintInfo, const LayoutPoint&, LayoutUnit, LayoutUnit)
 {
     ASSERT(paintInfo.phase == PaintPhaseForeground || paintInfo.phase == PaintPhaseSelection);
     ASSERT(!paintInfo.context->paintingDisabled());
@@ -64,7 +64,7 @@ void SVGRootInlineBox::paint(PaintInfo& paintInfo, const IntPoint&, int, int)
             if (child->isSVGInlineTextBox())
                 SVGInlineFlowBox::computeTextMatchMarkerRectForRenderer(toRenderSVGInlineText(static_cast<SVGInlineTextBox*>(child)->textRenderer()));
 
-            child->paint(childPaintInfo, IntPoint(), 0, 0);
+            child->paint(childPaintInfo, LayoutPoint(), 0, 0);
         }
     }
 
@@ -92,7 +92,7 @@ void SVGRootInlineBox::computePerCharacterLayoutInformation()
 
     // Perform SVG text layout phase four
     // Position & resize all SVGInlineText/FlowBoxes in the inline box tree, resize the root box as well as the RenderSVGText parent block.
-    IntRect childRect;
+    LayoutRect childRect;
     layoutChildBoxes(this, &childRect);
     layoutRootBox(childRect);
 }
@@ -136,10 +136,10 @@ void SVGRootInlineBox::layoutCharactersInTextBoxes(InlineFlowBox* start, SVGText
     }
 }
 
-void SVGRootInlineBox::layoutChildBoxes(InlineFlowBox* start, IntRect* childRect)
+void SVGRootInlineBox::layoutChildBoxes(InlineFlowBox* start, LayoutRect* childRect)
 {
     for (InlineBox* child = start->firstChild(); child; child = child->nextOnLine()) {
-        IntRect boxRect;
+        LayoutRect boxRect;
         if (child->isSVGInlineTextBox()) {
             ASSERT(child->renderer());
             ASSERT(child->renderer()->isSVGInlineText());
@@ -171,13 +171,13 @@ void SVGRootInlineBox::layoutChildBoxes(InlineFlowBox* start, IntRect* childRect
     }
 }
 
-void SVGRootInlineBox::layoutRootBox(const IntRect& childRect)
+void SVGRootInlineBox::layoutRootBox(const LayoutRect& childRect)
 {
     RenderBlock* parentBlock = block();
     ASSERT(parentBlock);
 
-    int widthBlock = childRect.width();
-    int heightBlock = childRect.height();
+    LayoutUnit widthBlock = childRect.width();
+    LayoutUnit heightBlock = childRect.height();
 
     // Finally, assign the root block position, now that all content is laid out.
     parentBlock->setLocation(childRect.location());
@@ -200,7 +200,7 @@ void SVGRootInlineBox::layoutRootBox(const IntRect& childRect)
     setLineTopBottomPositions(0, heightBlock);
 }
 
-InlineBox* SVGRootInlineBox::closestLeafChildForPosition(const IntPoint& point)
+InlineBox* SVGRootInlineBox::closestLeafChildForPosition(const LayoutPoint& point)
 {
     InlineBox* firstLeaf = firstLeafChild();
     InlineBox* lastLeaf = lastLeafChild();
index 3ffd3aa..e9640a8 100644 (file)
@@ -52,13 +52,13 @@ public:
     virtual FloatRect objectBoundingBox() const { return FloatRect(); }
     virtual FloatRect repaintRectInLocalCoordinates() const { return FloatRect(); }
 
-    InlineBox* closestLeafChildForPosition(const IntPoint&);
+    InlineBox* closestLeafChildForPosition(const LayoutPoint&);
 
 private:
     void reorderValueLists(Vector<SVGTextLayoutAttributes>&);
     void layoutCharactersInTextBoxes(InlineFlowBox*, SVGTextLayoutEngine&);
-    void layoutChildBoxes(InlineFlowBox*, IntRect* = 0);
-    void layoutRootBox(const IntRect&);
+    void layoutChildBoxes(InlineFlowBox*, LayoutRect* = 0);
+    void layoutRootBox(const LayoutRect&);
 
 private:
     int m_logicalHeight;