Switch remaining paint functions to new layout types
authorleviw@chromium.org <leviw@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 7 Jul 2011 23:17:55 +0000 (23:17 +0000)
committerleviw@chromium.org <leviw@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 7 Jul 2011 23:17:55 +0000 (23:17 +0000)
https://bugs.webkit.org/show_bug.cgi?id=64116

Reviewed by Eric Seidel.

Switching all functions with IntPoint paintOffsets to the new Layout types.

No new tests, no functionality changes.

* rendering/EllipsisBox.cpp:
(WebCore::EllipsisBox::paint):
(WebCore::EllipsisBox::paintSelection):
* rendering/EllipsisBox.h:
* rendering/InlineBox.cpp:
(WebCore::InlineBox::paint):
* rendering/InlineBox.h:
* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::paint):
* rendering/InlineFlowBox.h:
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paint):
(WebCore::InlineTextBox::paintCustomHighlight):
* rendering/InlineTextBox.h:
* rendering/LayoutTypes.h:
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::paintColumnRules):
(WebCore::RenderBlock::paintColumnContents):
(WebCore::RenderBlock::paintContents):
(WebCore::RenderBlock::paintChildren):
(WebCore::RenderBlock::paintCaret):
(WebCore::RenderBlock::paintObject):
(WebCore::RenderBlock::paintFloats):
(WebCore::RenderBlock::paintEllipsisBoxes):
(WebCore::RenderBlock::paintContinuationOutlines):
(WebCore::RenderBlock::paintSelection):
* rendering/RenderBlock.h:
* rendering/RenderBox.cpp:
(WebCore::RenderBox::paintCustomHighlight):
* rendering/RenderBox.h:
* rendering/RenderInline.cpp:
(WebCore::RenderInline::paintOutline):
(WebCore::RenderInline::paintOutlineForLine):
* rendering/RenderInline.h:
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::paintOverflowControls):
(WebCore::RenderLayer::paintScrollCorner):
(WebCore::RenderLayer::paintResizer):
* rendering/RenderLayer.h:
* rendering/RenderLineBoxList.cpp:
(WebCore::RenderLineBoxList::paint):
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::paintScrollbar):
(WebCore::RenderListBox::paintItemForeground):
(WebCore::RenderListBox::paintItemBackground):
* rendering/RenderListBox.h:
* rendering/RenderObject.cpp:
(WebCore::RenderObject::paintFocusRing):
(WebCore::RenderObject::paintOutline):
* rendering/RenderObject.h:
* rendering/RenderReplaced.cpp:
(WebCore::RenderReplaced::shouldPaint):
* rendering/RenderReplaced.h:
* rendering/RenderScrollbarPart.cpp:
(WebCore::RenderScrollbarPart::paintIntoRect):
* rendering/RenderScrollbarPart.h:
* rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::paintBackgroundsBehindCell):
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::paintCell):
* rendering/RenderTableSection.h:
* rendering/RenderTextControl.cpp:
(WebCore::RenderTextControl::paintPlaceholder):
* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::paintEllipsisBox):
(WebCore::RootInlineBox::paintCustomHighlight):
(WebCore::RootInlineBox::paint):
* rendering/RootInlineBox.h:
* rendering/mathml/RenderMathMLBlock.cpp:
(WebCore::RenderMathMLBlock::paint):
* rendering/mathml/RenderMathMLFraction.cpp:
(WebCore::RenderMathMLFraction::paint):
* rendering/mathml/RenderMathMLRoot.cpp:
(WebCore::RenderMathMLRoot::paint):
* rendering/mathml/RenderMathMLSquareRoot.cpp:
(WebCore::RenderMathMLSquareRoot::paint):

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

37 files changed:
Source/WebCore/ChangeLog
Source/WebCore/rendering/EllipsisBox.cpp
Source/WebCore/rendering/EllipsisBox.h
Source/WebCore/rendering/InlineBox.cpp
Source/WebCore/rendering/InlineBox.h
Source/WebCore/rendering/InlineFlowBox.cpp
Source/WebCore/rendering/InlineFlowBox.h
Source/WebCore/rendering/InlineTextBox.cpp
Source/WebCore/rendering/InlineTextBox.h
Source/WebCore/rendering/LayoutTypes.h
Source/WebCore/rendering/RenderBlock.cpp
Source/WebCore/rendering/RenderBlock.h
Source/WebCore/rendering/RenderBox.cpp
Source/WebCore/rendering/RenderBox.h
Source/WebCore/rendering/RenderInline.cpp
Source/WebCore/rendering/RenderInline.h
Source/WebCore/rendering/RenderLayer.cpp
Source/WebCore/rendering/RenderLayer.h
Source/WebCore/rendering/RenderLineBoxList.cpp
Source/WebCore/rendering/RenderListBox.cpp
Source/WebCore/rendering/RenderListBox.h
Source/WebCore/rendering/RenderObject.cpp
Source/WebCore/rendering/RenderObject.h
Source/WebCore/rendering/RenderReplaced.cpp
Source/WebCore/rendering/RenderReplaced.h
Source/WebCore/rendering/RenderScrollbarPart.cpp
Source/WebCore/rendering/RenderScrollbarPart.h
Source/WebCore/rendering/RenderTableCell.cpp
Source/WebCore/rendering/RenderTableSection.cpp
Source/WebCore/rendering/RenderTableSection.h
Source/WebCore/rendering/RenderTextControl.cpp
Source/WebCore/rendering/RootInlineBox.cpp
Source/WebCore/rendering/RootInlineBox.h
Source/WebCore/rendering/mathml/RenderMathMLBlock.cpp
Source/WebCore/rendering/mathml/RenderMathMLFraction.cpp
Source/WebCore/rendering/mathml/RenderMathMLRoot.cpp
Source/WebCore/rendering/mathml/RenderMathMLSquareRoot.cpp

index 29d80ee..d85e8d7 100644 (file)
@@ -1,3 +1,91 @@
+2011-07-07  Levi Weintraub  <leviw@chromium.org>
+
+        Switch remaining paint functions to new layout types
+        https://bugs.webkit.org/show_bug.cgi?id=64116
+
+        Reviewed by Eric Seidel.
+
+        Switching all functions with IntPoint paintOffsets to the new Layout types.
+
+        No new tests, no functionality changes.
+
+        * rendering/EllipsisBox.cpp:
+        (WebCore::EllipsisBox::paint):
+        (WebCore::EllipsisBox::paintSelection):
+        * rendering/EllipsisBox.h:
+        * rendering/InlineBox.cpp:
+        (WebCore::InlineBox::paint):
+        * rendering/InlineBox.h:
+        * rendering/InlineFlowBox.cpp:
+        (WebCore::InlineFlowBox::paint):
+        * rendering/InlineFlowBox.h:
+        * rendering/InlineTextBox.cpp:
+        (WebCore::InlineTextBox::paint):
+        (WebCore::InlineTextBox::paintCustomHighlight):
+        * rendering/InlineTextBox.h:
+        * rendering/LayoutTypes.h:
+        * rendering/RenderBlock.cpp:
+        (WebCore::RenderBlock::paintColumnRules):
+        (WebCore::RenderBlock::paintColumnContents):
+        (WebCore::RenderBlock::paintContents):
+        (WebCore::RenderBlock::paintChildren):
+        (WebCore::RenderBlock::paintCaret):
+        (WebCore::RenderBlock::paintObject):
+        (WebCore::RenderBlock::paintFloats):
+        (WebCore::RenderBlock::paintEllipsisBoxes):
+        (WebCore::RenderBlock::paintContinuationOutlines):
+        (WebCore::RenderBlock::paintSelection):
+        * rendering/RenderBlock.h:
+        * rendering/RenderBox.cpp:
+        (WebCore::RenderBox::paintCustomHighlight):
+        * rendering/RenderBox.h:
+        * rendering/RenderInline.cpp:
+        (WebCore::RenderInline::paintOutline):
+        (WebCore::RenderInline::paintOutlineForLine):
+        * rendering/RenderInline.h:
+        * rendering/RenderLayer.cpp:
+        (WebCore::RenderLayer::paintOverflowControls):
+        (WebCore::RenderLayer::paintScrollCorner):
+        (WebCore::RenderLayer::paintResizer):
+        * rendering/RenderLayer.h:
+        * rendering/RenderLineBoxList.cpp:
+        (WebCore::RenderLineBoxList::paint):
+        * rendering/RenderListBox.cpp:
+        (WebCore::RenderListBox::paintScrollbar):
+        (WebCore::RenderListBox::paintItemForeground):
+        (WebCore::RenderListBox::paintItemBackground):
+        * rendering/RenderListBox.h:
+        * rendering/RenderObject.cpp:
+        (WebCore::RenderObject::paintFocusRing):
+        (WebCore::RenderObject::paintOutline):
+        * rendering/RenderObject.h:
+        * rendering/RenderReplaced.cpp:
+        (WebCore::RenderReplaced::shouldPaint):
+        * rendering/RenderReplaced.h:
+        * rendering/RenderScrollbarPart.cpp:
+        (WebCore::RenderScrollbarPart::paintIntoRect):
+        * rendering/RenderScrollbarPart.h:
+        * rendering/RenderTableCell.cpp:
+        (WebCore::RenderTableCell::paintBackgroundsBehindCell):
+        * rendering/RenderTableSection.cpp:
+        (WebCore::RenderTableSection::paintCell):
+        * rendering/RenderTableSection.h:
+        * rendering/RenderTextControl.cpp:
+        (WebCore::RenderTextControl::paintPlaceholder):
+        * rendering/RootInlineBox.cpp:
+        (WebCore::RootInlineBox::paintEllipsisBox):
+        (WebCore::RootInlineBox::paintCustomHighlight):
+        (WebCore::RootInlineBox::paint):
+        * rendering/RootInlineBox.h:
+        * rendering/mathml/RenderMathMLBlock.cpp:
+        (WebCore::RenderMathMLBlock::paint):
+        * rendering/mathml/RenderMathMLFraction.cpp:
+        (WebCore::RenderMathMLFraction::paint):
+        * rendering/mathml/RenderMathMLRoot.cpp:
+        (WebCore::RenderMathMLRoot::paint):
+        * rendering/mathml/RenderMathMLSquareRoot.cpp:
+        (WebCore::RenderMathMLSquareRoot::paint):
+
 2011-07-07  Steve VanDeBogart  <vandebo@chromium.org>
 
         Work around Skia PDF's lack of inverted path support.
index ab958db..20e5997 100644 (file)
@@ -30,7 +30,7 @@
 
 namespace WebCore {
 
-void EllipsisBox::paint(PaintInfo& paintInfo, const IntPoint& paintOffset, int lineTop, int lineBottom)
+void EllipsisBox::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset, LayoutUnit lineTop, LayoutUnit lineBottom)
 {
     GraphicsContext* context = paintInfo.context;
     RenderStyle* style = m_renderer->style(m_firstLine);
@@ -39,7 +39,7 @@ void EllipsisBox::paint(PaintInfo& paintInfo, const IntPoint& paintOffset, int l
         context->setFillColor(textColor, style->colorSpace());
     bool setShadow = false;
     if (style->textShadow()) {
-        context->setShadow(IntSize(style->textShadow()->x(), style->textShadow()->y()),
+        context->setShadow(LayoutSize(style->textShadow()->x(), style->textShadow()->y()),
                            style->textShadow()->blur(), style->textShadow()->color(), style->colorSpace());
         setShadow = true;
     }
@@ -55,7 +55,7 @@ void EllipsisBox::paint(PaintInfo& paintInfo, const IntPoint& paintOffset, int l
     }
 
     // FIXME: Why is this always LTR? Fix by passing correct text run flags below.
-    context->drawText(font, RenderBlock::constructTextRun(renderer(), font, m_str, style, TextRun::AllowTrailingExpansion), IntPoint(x() + paintOffset.x(), y() + paintOffset.y() + style->fontMetrics().ascent()));
+    context->drawText(font, RenderBlock::constructTextRun(renderer(), font, m_str, style, TextRun::AllowTrailingExpansion), LayoutPoint(x() + paintOffset.x(), y() + paintOffset.y() + style->fontMetrics().ascent()));
 
     // Restore the regular fill color.
     if (textColor != context->fillColor())
@@ -66,7 +66,7 @@ void EllipsisBox::paint(PaintInfo& paintInfo, const IntPoint& paintOffset, int l
 
     if (m_markupBox) {
         // Paint the markup box
-        IntPoint adjustedPaintOffset = paintOffset;
+        LayoutPoint adjustedPaintOffset = paintOffset;
         adjustedPaintOffset.move(x() + m_logicalWidth - m_markupBox->x(),
             y() + style->fontMetrics().ascent() - (m_markupBox->y() + m_markupBox->renderer()->style(m_firstLine)->fontMetrics().ascent()));
         m_markupBox->paint(paintInfo, adjustedPaintOffset, lineTop, lineBottom);
@@ -81,7 +81,7 @@ IntRect EllipsisBox::selectionRect()
     return enclosingIntRect(font.selectionRectForText(RenderBlock::constructTextRun(renderer(), font, m_str, style, TextRun::AllowTrailingExpansion), IntPoint(x(), y() + root()->selectionTop()), root()->selectionHeight()));
 }
 
-void EllipsisBox::paintSelection(GraphicsContext* context, const IntPoint& paintOffset, RenderStyle* style, const Font& font)
+void EllipsisBox::paintSelection(GraphicsContext* context, const LayoutPoint& paintOffset, RenderStyle* style, const Font& font)
 {
     Color textColor = style->visitedDependentColor(CSSPropertyColor);
     Color c = m_renderer->selectionBackgroundColor();
@@ -94,8 +94,9 @@ void EllipsisBox::paintSelection(GraphicsContext* context, const IntPoint& paint
         c = Color(0xff - c.red(), 0xff - c.green(), 0xff - c.blue());
 
     GraphicsContextStateSaver stateSaver(*context);
-    int top = root()->selectionTop();
-    int h = root()->selectionHeight();
+    LayoutUnit top = root()->selectionTop();
+    LayoutUnit h = root()->selectionHeight();
+    // FIXME: We'll need to apply the correct clip rounding here: https://bugs.webkit.org/show_bug.cgi?id=63656
     context->clip(IntRect(x() + paintOffset.x(), top + paintOffset.y(), m_logicalWidth, h));
     // FIXME: Why is this always LTR? Fix by passing correct text run flags below.
     context->drawHighlightForText(font, RenderBlock::constructTextRun(renderer(), font, m_str, style, TextRun::AllowTrailingExpansion), IntPoint(x() + paintOffset.x(), y() + paintOffset.y() + top), h, c, style->colorSpace());
index d7ec374..4442718 100644 (file)
@@ -39,7 +39,7 @@ public:
     {
     }
 
-    virtual void paint(PaintInfo&, const IntPoint&, int lineTop, int lineBottom);
+    virtual void paint(PaintInfo&, const LayoutPoint&, LayoutUnit lineTop, LayoutUnit lineBottom);
     virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const LayoutPoint& pointInContainer, const LayoutPoint& accumulatedOffset, int lineTop, int lineBottom);
     void setSelectionState(RenderObject::SelectionState s) { m_selectionState = s; }
     IntRect selectionRect();
@@ -47,7 +47,7 @@ public:
 private:
     virtual int height() const { return m_height; }
     virtual RenderObject::SelectionState selectionState() { return m_selectionState; }
-    void paintSelection(GraphicsContext*, const IntPoint&, RenderStyle*, const Font&);
+    void paintSelection(GraphicsContext*, const LayoutPoint&, RenderStyle*, const Font&);
 
     int m_height;
     AtomicString m_str;
index 518845e..3c335f2 100644 (file)
@@ -196,12 +196,12 @@ void InlineBox::adjustPosition(float dx, float dy)
         toRenderBox(m_renderer)->move(dx, dy); 
 }
 
-void InlineBox::paint(PaintInfo& paintInfo, const IntPoint& paintOffset, int /* lineTop */, int /*lineBottom*/)
+void InlineBox::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset, LayoutUnit /* lineTop */, LayoutUnit /*lineBottom*/)
 {
     if (!paintInfo.shouldPaintWithinRoot(renderer()) || (paintInfo.phase != PaintPhaseForeground && paintInfo.phase != PaintPhaseSelection))
         return;
 
-    IntPoint childPoint = paintOffset;
+    LayoutPoint childPoint = paintOffset;
     if (parent()->renderer()->style()->isFlippedBlocksWritingMode()) // Faster than calling containingBlock().
         childPoint = renderer()->containingBlock()->flipForWritingMode(toRenderBox(renderer()), childPoint, RenderBox::ParentToChildFlippingAdjustment);
     
index 8767e87..25d3c3b 100644 (file)
@@ -126,7 +126,7 @@ public:
             adjustPosition(delta, 0);
     }
 
-    virtual void paint(PaintInfo&, const IntPoint&, int lineTop, int lineBottom);
+    virtual void paint(PaintInfo&, const LayoutPoint&, LayoutUnit lineTop, LayoutUnit lineBottom);
     virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const LayoutPoint& pointInContainer, const LayoutPoint& accumulatedOffset, int lineTop, int lineBottom);
 
     InlineBox* next() const { return m_next; }
index 82d61c7..a2c0625 100644 (file)
@@ -946,9 +946,9 @@ bool InlineFlowBox::nodeAtPoint(const HitTestRequest& request, HitTestResult& re
     return false;
 }
 
-void InlineFlowBox::paint(PaintInfo& paintInfo, const IntPoint& paintOffset, int lineTop, int lineBottom)
+void InlineFlowBox::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset, LayoutUnit lineTop, LayoutUnit lineBottom)
 {
-    IntRect overflowRect(visualOverflowRect(lineTop, lineBottom));
+    LayoutRect overflowRect(visualOverflowRect(lineTop, lineBottom));
     overflowRect.inflate(renderer()->maximalOutlineSize(paintInfo.phase));
     flipForWritingMode(overflowRect);
     overflowRect.moveBy(paintOffset);
index 2b4e18d..d225fe0 100644 (file)
@@ -108,7 +108,7 @@ public:
     void paintFillLayers(const PaintInfo&, const Color&, const FillLayer*, const LayoutRect&, CompositeOperator = CompositeSourceOver);
     void paintFillLayer(const PaintInfo&, const Color&, const FillLayer*, const LayoutRect&, CompositeOperator = CompositeSourceOver);
     void paintBoxShadow(GraphicsContext*, RenderStyle*, ShadowStyle, const LayoutRect&);
-    virtual void paint(PaintInfo&, const IntPoint&, int lineTop, int lineBottom);
+    virtual void paint(PaintInfo&, const LayoutPoint&, LayoutUnit lineTop, LayoutUnit lineBottom);
     virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const LayoutPoint& pointInContainer, const LayoutPoint& accumulatedOffset, int lineTop, int lineBottom);
 
     virtual RenderLineBoxList* rendererLineBoxes() const;
index 52b61b5..39ec8c0 100644 (file)
@@ -466,7 +466,7 @@ static inline AffineTransform rotation(const FloatRect& boxRect, RotationDirecti
         : AffineTransform(0, -1, 1, 0, boxRect.x() - boxRect.maxY(), boxRect.x() + boxRect.maxY());
 }
 
-void InlineTextBox::paint(PaintInfo& paintInfo, const IntPoint& paintOffset, int /*lineTop*/, int /*lineBottom*/)
+void InlineTextBox::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset, LayoutUnit /*lineTop*/, LayoutUnit /*lineBottom*/)
 {
     if (isLineBreak() || !paintInfo.shouldPaintWithinRoot(renderer()) || renderer()->style()->visibility() != VISIBLE ||
         m_truncation == cFullTruncation || paintInfo.phase == PaintPhaseOutline || !m_len)
@@ -474,15 +474,15 @@ void InlineTextBox::paint(PaintInfo& paintInfo, const IntPoint& paintOffset, int
 
     ASSERT(paintInfo.phase != PaintPhaseSelfOutline && paintInfo.phase != PaintPhaseChildOutlines);
 
-    int logicalLeftSide = logicalLeftVisualOverflow();
-    int logicalRightSide = logicalRightVisualOverflow();
-    int logicalStart = logicalLeftSide + (isHorizontal() ? paintOffset.x() : paintOffset.y());
-    int logicalExtent = logicalRightSide - logicalLeftSide;
+    LayoutUnit logicalLeftSide = logicalLeftVisualOverflow();
+    LayoutUnit logicalRightSide = logicalRightVisualOverflow();
+    LayoutUnit logicalStart = logicalLeftSide + (isHorizontal() ? paintOffset.x() : paintOffset.y());
+    LayoutUnit logicalExtent = logicalRightSide - logicalLeftSide;
     
-    int paintEnd = isHorizontal() ? paintInfo.rect.maxX() : paintInfo.rect.maxY();
-    int paintStart = isHorizontal() ? paintInfo.rect.x() : paintInfo.rect.y();
+    LayoutUnit paintEnd = isHorizontal() ? paintInfo.rect.maxX() : paintInfo.rect.maxY();
+    LayoutUnit paintStart = isHorizontal() ? paintInfo.rect.x() : paintInfo.rect.y();
     
-    IntPoint adjustedPaintOffset = paintOffset;
+    LayoutPoint adjustedPaintOffset = paintOffset;
     
     if (logicalStart >= paintEnd || logicalStart + logicalExtent <= paintStart)
         return;
@@ -505,10 +505,10 @@ void InlineTextBox::paint(PaintInfo& paintInfo, const IntPoint& paintOffset, int
             // farther to the right.
             // NOTE: WebKit's behavior differs from that of IE which appears to just overlay the ellipsis on top of the
             // truncated string i.e.  |Hello|CBA| -> |...lo|CBA|
-            int widthOfVisibleText = toRenderText(renderer())->width(m_start, m_truncation, textPos(), m_firstLine);
-            int widthOfHiddenText = m_logicalWidth - widthOfVisibleText;
-            // FIXME: The hit testing logic also needs to take this translation int account.
-            IntSize truncationOffset(isLeftToRightDirection() ? widthOfHiddenText : -widthOfHiddenText, 0);
+            LayoutUnit widthOfVisibleText = toRenderText(renderer())->width(m_start, m_truncation, textPos(), m_firstLine);
+            LayoutUnit widthOfHiddenText = m_logicalWidth - widthOfVisibleText;
+            // FIXME: The hit testing logic also needs to take this translation into account.
+            LayoutSize truncationOffset(isLeftToRightDirection() ? widthOfHiddenText : -widthOfHiddenText, 0);
             adjustedPaintOffset.move(isHorizontal() ? truncationOffset : truncationOffset.transposedSize());
         }
     }
@@ -521,7 +521,7 @@ void InlineTextBox::paint(PaintInfo& paintInfo, const IntPoint& paintOffset, int
 
     FloatPoint boxOrigin = locationIncludingFlipping();
     boxOrigin.move(adjustedPaintOffset.x(), adjustedPaintOffset.y());
-    FloatRect boxRect(boxOrigin, IntSize(logicalWidth(), logicalHeight()));
+    FloatRect boxRect(boxOrigin, LayoutSize(logicalWidth(), logicalHeight()));
 
     RenderCombineText* combinedText = styleToUse->hasTextCombine() && textRenderer()->isCombineText() && toRenderCombineText(textRenderer())->isCombined() ? toRenderCombineText(textRenderer()) : 0;
 
@@ -853,7 +853,7 @@ void InlineTextBox::paintCompositionBackground(GraphicsContext* context, const F
 
 #if PLATFORM(MAC)
 
-void InlineTextBox::paintCustomHighlight(const IntPoint& paintOffset, const AtomicString& type)
+void InlineTextBox::paintCustomHighlight(const LayoutPoint& paintOffset, const AtomicString& type)
 {
     Frame* frame = renderer()->frame();
     if (!frame)
index 04206fd..33ce2d9 100644 (file)
@@ -110,8 +110,8 @@ public:
     void selectionStartEnd(int& sPos, int& ePos);
 
 protected:
-    virtual void paint(PaintInfo&, const IntPoint&, int lineTop, int lineBottom);
-    virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const LayoutPoint& pointInContainer, const LayoutPoint& accumulatedOffset, int lineTop, int lineBottom);
+    virtual void paint(PaintInfo&, const LayoutPoint&, LayoutUnit lineTop, LayoutUnit lineBottom);
+    virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const LayoutPoint& pointInContainer, const LayoutPoint& accumulatedOffset, LayoutUnit lineTop, LayoutUnit lineBottom);
 
 public:
     RenderText* textRenderer() const;
@@ -169,7 +169,7 @@ protected:
     void paintDocumentMarkers(GraphicsContext*, const FloatPoint& boxOrigin, RenderStyle*, const Font&, bool background);
     void paintCompositionUnderline(GraphicsContext*, const FloatPoint& boxOrigin, const CompositionUnderline&);
 #if PLATFORM(MAC)
-    void paintCustomHighlight(const IntPoint&, const AtomicString& type);
+    void paintCustomHighlight(const LayoutPoint&, const AtomicString& type);
 #endif
 
 private:
index 1fe0abf..98f6542 100644 (file)
@@ -36,7 +36,6 @@
 #ifndef LayoutTypes_h
 #define LayoutTypes_h
 
-#include "FloatPoint.h"
 #include "FloatRect.h"
 #include "IntRect.h"
 
index 0600914..27fd6ee 100644 (file)
@@ -2293,7 +2293,7 @@ void RenderBlock::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset)
         layer()->paintOverflowControls(paintInfo.context, adjustedPaintOffset, paintInfo.rect);
 }
 
-void RenderBlock::paintColumnRules(PaintInfo& paintInfo, const IntPoint& paintOffset)
+void RenderBlock::paintColumnRules(PaintInfo& paintInfo, const LayoutPoint& paintOffset)
 {
     if (paintInfo.context->paintingDisabled())
         return;
@@ -2301,8 +2301,8 @@ void RenderBlock::paintColumnRules(PaintInfo& paintInfo, const IntPoint& paintOf
     const Color& ruleColor = style()->visitedDependentColor(CSSPropertyWebkitColumnRuleColor);
     bool ruleTransparent = style()->columnRuleIsTransparent();
     EBorderStyle ruleStyle = style()->columnRuleStyle();
-    int ruleWidth = style()->columnRuleWidth();
-    int colGap = columnGap();
+    LayoutUnit ruleWidth = style()->columnRuleWidth();
+    LayoutUnit colGap = columnGap();
     bool renderRule = ruleStyle > BHIDDEN && !ruleTransparent && ruleWidth <= colGap;
     if (!renderRule)
         return;
@@ -2310,9 +2310,9 @@ void RenderBlock::paintColumnRules(PaintInfo& paintInfo, const IntPoint& paintOf
     // We need to do multiple passes, breaking up our child painting into strips.
     ColumnInfo* colInfo = columnInfo();
     unsigned colCount = columnCount(colInfo);
-    int currLogicalLeftOffset = style()->isLeftToRightDirection() ? 0 : contentLogicalWidth();
-    int ruleAdd = logicalLeftOffsetForContent();
-    int ruleLogicalLeft = style()->isLeftToRightDirection() ? 0 : contentLogicalWidth();
+    LayoutUnit currLogicalLeftOffset = style()->isLeftToRightDirection() ? 0 : contentLogicalWidth();
+    LayoutUnit ruleAdd = logicalLeftOffsetForContent();
+    LayoutUnit ruleLogicalLeft = style()->isLeftToRightDirection() ? 0 : contentLogicalWidth();
 
     const AffineTransform& currentCTM = paintInfo.context->getCTM();
     bool antialias = !currentCTM.isIdentityOrTranslationOrFlipped();
@@ -2320,7 +2320,7 @@ void RenderBlock::paintColumnRules(PaintInfo& paintInfo, const IntPoint& paintOf
     for (unsigned i = 0; i < colCount; i++) {
         LayoutRect colRect = columnRectAt(colInfo, i);
 
-        int inlineDirectionSize = isHorizontalWritingMode() ? colRect.width() : colRect.height();
+        LayoutUnit inlineDirectionSize = isHorizontalWritingMode() ? colRect.width() : colRect.height();
         
         // Move to the next position.
         if (style()->isLeftToRightDirection()) {
@@ -2333,10 +2333,10 @@ void RenderBlock::paintColumnRules(PaintInfo& paintInfo, const IntPoint& paintOf
        
         // Now paint the column rule.
         if (i < colCount - 1) {
-            int ruleLeft = isHorizontalWritingMode() ? paintOffset.x() + ruleLogicalLeft - ruleWidth / 2 + ruleAdd : paintOffset.x() + borderBefore() + paddingBefore();
-            int ruleRight = isHorizontalWritingMode() ? ruleLeft + ruleWidth : ruleLeft + contentWidth();
-            int ruleTop = isHorizontalWritingMode() ? paintOffset.y() + borderTop() + paddingTop() : paintOffset.y() + ruleLogicalLeft - ruleWidth / 2 + ruleAdd;
-            int ruleBottom = isHorizontalWritingMode() ? ruleTop + contentHeight() : ruleTop + ruleWidth;
+            LayoutUnit ruleLeft = isHorizontalWritingMode() ? paintOffset.x() + ruleLogicalLeft - ruleWidth / 2 + ruleAdd : paintOffset.x() + borderBefore() + paddingBefore();
+            LayoutUnit ruleRight = isHorizontalWritingMode() ? ruleLeft + ruleWidth : ruleLeft + contentWidth();
+            LayoutUnit ruleTop = isHorizontalWritingMode() ? paintOffset.y() + borderTop() + paddingTop() : paintOffset.y() + ruleLogicalLeft - ruleWidth / 2 + ruleAdd;
+            LayoutUnit ruleBottom = isHorizontalWritingMode() ? ruleTop + contentHeight() : ruleTop + ruleWidth;
             drawLineForBoxSide(paintInfo.context, ruleLeft, ruleTop, ruleRight, ruleBottom,
                                style()->isLeftToRightDirection() ? BSLeft : BSRight, ruleColor, ruleStyle, 0, 0, antialias);
         }
@@ -2345,7 +2345,7 @@ void RenderBlock::paintColumnRules(PaintInfo& paintInfo, const IntPoint& paintOf
     }
 }
 
-void RenderBlock::paintColumnContents(PaintInfo& paintInfo, const IntPoint& paintOffset, bool paintingFloats)
+void RenderBlock::paintColumnContents(PaintInfo& paintInfo, const LayoutPoint& paintOffset, bool paintingFloats)
 {
     // We need to do multiple passes, breaking up our child painting into strips.
     GraphicsContext* context = paintInfo.context;
@@ -2353,13 +2353,13 @@ void RenderBlock::paintColumnContents(PaintInfo& paintInfo, const IntPoint& pain
     unsigned colCount = columnCount(colInfo);
     if (!colCount)
         return;
-    int currLogicalTopOffset = 0;
+    LayoutUnit currLogicalTopOffset = 0;
     for (unsigned i = 0; i < colCount; i++) {
         // For each rect, we clip to the rect, and then we adjust our coords.
         LayoutRect colRect = columnRectAt(colInfo, i);
         flipForWritingMode(colRect);
-        int logicalLeftOffset = (isHorizontalWritingMode() ? colRect.x() : colRect.y()) - logicalLeftOffsetForContent();
-        IntSize offset = isHorizontalWritingMode() ? IntSize(logicalLeftOffset, currLogicalTopOffset) : IntSize(currLogicalTopOffset, logicalLeftOffset);
+        LayoutUnit logicalLeftOffset = (isHorizontalWritingMode() ? colRect.x() : colRect.y()) - logicalLeftOffsetForContent();
+        LayoutSize offset = isHorizontalWritingMode() ? LayoutSize(logicalLeftOffset, currLogicalTopOffset) : LayoutSize(currLogicalTopOffset, logicalLeftOffset);
         colRect.moveBy(paintOffset);
         PaintInfo info(paintInfo);
         info.rect.intersect(colRect);
@@ -2372,14 +2372,14 @@ void RenderBlock::paintColumnContents(PaintInfo& paintInfo, const IntPoint& pain
             context->clip(colRect);
 
             // Adjust our x and y when painting.
-            IntPoint adjustedPaintOffset = paintOffset + offset;
+            LayoutPoint adjustedPaintOffset = paintOffset + offset;
             if (paintingFloats)
                 paintFloats(info, adjustedPaintOffset, paintInfo.phase == PaintPhaseSelection || paintInfo.phase == PaintPhaseTextClip);
             else
                 paintContents(info, adjustedPaintOffset);
         }
 
-        int blockDelta = (isHorizontalWritingMode() ? colRect.height() : colRect.width());
+        LayoutUnit blockDelta = (isHorizontalWritingMode() ? colRect.height() : colRect.width());
         if (style()->isFlippedBlocksWritingMode())
             currLogicalTopOffset += blockDelta;
         else
@@ -2387,7 +2387,7 @@ void RenderBlock::paintColumnContents(PaintInfo& paintInfo, const IntPoint& pain
     }
 }
 
-void RenderBlock::paintContents(PaintInfo& paintInfo, const IntPoint& paintOffset)
+void RenderBlock::paintContents(PaintInfo& paintInfo, const LayoutPoint& paintOffset)
 {
     // Avoid painting descendants of the root element when stylesheets haven't loaded.  This eliminates FOUC.
     // It's ok not to draw, because later on, when all the stylesheets do load, updateStyleSelector on the Document
@@ -2401,7 +2401,7 @@ void RenderBlock::paintContents(PaintInfo& paintInfo, const IntPoint& paintOffse
         paintChildren(paintInfo, paintOffset);
 }
 
-void RenderBlock::paintChildren(PaintInfo& paintInfo, const IntPoint& paintOffset)
+void RenderBlock::paintChildren(PaintInfo& paintInfo, const LayoutPoint& paintOffset)
 {
     PaintPhase newPhase = (paintInfo.phase == PaintPhaseChildOutlines) ? PaintPhaseOutline : paintInfo.phase;
     newPhase = (newPhase == PaintPhaseChildBlockBackgrounds) ? PaintPhaseChildBlockBackground : newPhase;
@@ -2419,7 +2419,7 @@ void RenderBlock::paintChildren(PaintInfo& paintInfo, const IntPoint& paintOffse
     for (RenderBox* child = firstChildBox(); child; child = child->nextSiblingBox()) {        
         // Check for page-break-before: always, and if it's set, break and bail.
         bool checkBeforeAlways = !childrenInline() && (usePrintRect && child->style()->pageBreakBefore() == PBALWAYS);
-        int absoluteChildY = paintOffset.y() + child->y();
+        LayoutUnit absoluteChildY = paintOffset.y() + child->y();
         if (checkBeforeAlways
             && absoluteChildY > paintInfo.rect.y()
             && absoluteChildY < paintInfo.rect.maxY()) {
@@ -2438,7 +2438,7 @@ void RenderBlock::paintChildren(PaintInfo& paintInfo, const IntPoint& paintOffse
             }
         }
 
-        IntPoint childPoint = flipForWritingMode(child, paintOffset, ParentToChildFlippingAdjustment);
+        LayoutPoint childPoint = flipForWritingMode(child, paintOffset, ParentToChildFlippingAdjustment);
         if (!child->hasSelfPaintingLayer() && !child->isFloating())
             child->paint(info, childPoint);
 
@@ -2453,7 +2453,7 @@ void RenderBlock::paintChildren(PaintInfo& paintInfo, const IntPoint& paintOffse
     }
 }
 
-void RenderBlock::paintCaret(PaintInfo& paintInfo, const IntPoint& paintOffset, CaretType type)
+void RenderBlock::paintCaret(PaintInfo& paintInfo, const LayoutPoint& paintOffset, CaretType type)
 {
     // Paint the caret if the FrameSelection says so or if caret browsing is enabled
     bool caretBrowsing = frame()->settings() && frame()->settings()->caretBrowsingEnabled();
@@ -2470,7 +2470,7 @@ void RenderBlock::paintCaret(PaintInfo& paintInfo, const IntPoint& paintOffset,
     if (caretPainter == this && (isContentEditable || caretBrowsing)) {
         // Convert the painting offset into the local coordinate system of this renderer,
         // to match the localCaretRect computed by the FrameSelection
-        IntPoint adjustedPaintOffset = paintOffset;
+        LayoutPoint adjustedPaintOffset = paintOffset;
         offsetForContents(adjustedPaintOffset);
 
         if (type == CursorCaret)
@@ -2530,7 +2530,7 @@ void RenderBlock::paintObject(PaintInfo& paintInfo, const LayoutPoint& paintOffs
 
     // 5. paint outline.
     if ((paintPhase == PaintPhaseOutline || paintPhase == PaintPhaseSelfOutline) && hasOutline() && style()->visibility() == VISIBLE)
-        paintOutline(paintInfo.context, IntRect(paintOffset, size()));
+        paintOutline(paintInfo.context, LayoutRect(paintOffset, size()));
 
     // 6. paint continuation outlines.
     if ((paintPhase == PaintPhaseOutline || paintPhase == PaintPhaseChildOutlines)) {
@@ -2577,7 +2577,7 @@ IntPoint RenderBlock::flipFloatForWritingMode(const FloatingObject* child, const
     return IntPoint(point.x() + width() - child->width() - 2 * xPositionForFloatIncludingMargin(child), point.y());
 }
 
-void RenderBlock::paintFloats(PaintInfo& paintInfo, const IntPoint& paintOffset, bool preservePhase)
+void RenderBlock::paintFloats(PaintInfo& paintInfo, const LayoutPoint& paintOffset, bool preservePhase)
 {
     if (!m_floatingObjects)
         return;
@@ -2590,7 +2590,7 @@ void RenderBlock::paintFloats(PaintInfo& paintInfo, const IntPoint& paintOffset,
         if (r->m_shouldPaint && !r->m_renderer->hasSelfPaintingLayer()) {
             PaintInfo currentPaintInfo(paintInfo);
             currentPaintInfo.phase = preservePhase ? paintInfo.phase : PaintPhaseBlockBackground;
-            IntPoint childPoint = flipFloatForWritingMode(r, IntPoint(paintOffset.x() + xPositionForFloatIncludingMargin(r) - r->m_renderer->x(), paintOffset.y() + yPositionForFloatIncludingMargin(r) - r->m_renderer->y()));
+            LayoutPoint childPoint = flipFloatForWritingMode(r, LayoutPoint(paintOffset.x() + xPositionForFloatIncludingMargin(r) - r->m_renderer->x(), paintOffset.y() + yPositionForFloatIncludingMargin(r) - r->m_renderer->y()));
             r->m_renderer->paint(currentPaintInfo, childPoint);
             if (!preservePhase) {
                 currentPaintInfo.phase = PaintPhaseChildBlockBackgrounds;
@@ -2606,7 +2606,7 @@ void RenderBlock::paintFloats(PaintInfo& paintInfo, const IntPoint& paintOffset,
     }
 }
 
-void RenderBlock::paintEllipsisBoxes(PaintInfo& paintInfo, const IntPoint& paintOffset)
+void RenderBlock::paintEllipsisBoxes(PaintInfo& paintInfo, const LayoutPoint& paintOffset)
 {
     if (!paintInfo.shouldPaintWithinRoot(this) || !firstLineBox())
         return;
@@ -2614,8 +2614,8 @@ void RenderBlock::paintEllipsisBoxes(PaintInfo& paintInfo, const IntPoint& paint
     if (style()->visibility() == VISIBLE && paintInfo.phase == PaintPhaseForeground) {
         // We can check the first box and last box and avoid painting if we don't
         // intersect.
-        int yPos = paintOffset.y() + firstLineBox()->y();
-        int h = lastLineBox()->y() + lastLineBox()->logicalHeight() - firstLineBox()->y();
+        LayoutUnit yPos = paintOffset.y() + firstLineBox()->y();
+        LayoutUnit h = lastLineBox()->y() + lastLineBox()->logicalHeight() - firstLineBox()->y();
         if (yPos >= paintInfo.rect.maxY() || yPos + h <= paintInfo.rect.y())
             return;
 
@@ -2683,7 +2683,7 @@ bool RenderBlock::paintsContinuationOutline(RenderInline* flow)
     return continuations->contains(flow);
 }
 
-void RenderBlock::paintContinuationOutlines(PaintInfo& info, const IntPoint& paintOffset)
+void RenderBlock::paintContinuationOutlines(PaintInfo& info, const LayoutPoint& paintOffset)
 {
     ContinuationOutlineTableMap* table = continuationOutlineTable();
     if (table->isEmpty())
@@ -2693,7 +2693,7 @@ void RenderBlock::paintContinuationOutlines(PaintInfo& info, const IntPoint& pai
     if (!continuations)
         return;
 
-    IntPoint accumulatedPaintOffset = paintOffset;
+    LayoutPoint accumulatedPaintOffset = paintOffset;
     // Paint each continuation outline.
     ListHashSet<RenderInline*>::iterator end = continuations->end();
     for (ListHashSet<RenderInline*>::iterator it = continuations->begin(); it != end; ++it) {
@@ -2761,20 +2761,20 @@ GapRects RenderBlock::selectionGapRectsForRepaint(RenderBoxModelObject* repaintC
     return selectionGaps(this, offsetFromRepaintContainer, IntSize(), lastTop, lastLeft, lastRight);
 }
 
-void RenderBlock::paintSelection(PaintInfo& paintInfo, const IntPoint& paintOffset)
+void RenderBlock::paintSelection(PaintInfo& paintInfo, const LayoutPoint& paintOffset)
 {
     if (shouldPaintSelectionGaps() && paintInfo.phase == PaintPhaseForeground) {
-        int lastTop = 0;
-        int lastLeft = logicalLeftSelectionOffset(this, lastTop);
-        int lastRight = logicalRightSelectionOffset(this, lastTop);
+        LayoutUnit lastTop = 0;
+        LayoutUnit lastLeft = logicalLeftSelectionOffset(this, lastTop);
+        LayoutUnit lastRight = logicalRightSelectionOffset(this, lastTop);
         GraphicsContextStateSaver stateSaver(*paintInfo.context);
 
-        IntRect gapRectsBounds = selectionGaps(this, paintOffset, IntSize(), lastTop, lastLeft, lastRight, &paintInfo);
+        LayoutRect gapRectsBounds = selectionGaps(this, paintOffset, LayoutSize(), lastTop, lastLeft, lastRight, &paintInfo);
         if (!gapRectsBounds.isEmpty()) {
             if (RenderLayer* layer = enclosingLayer()) {
                 gapRectsBounds.moveBy(-paintOffset);
                 if (!hasLayer()) {
-                    IntRect localBounds(gapRectsBounds);
+                    LayoutRect localBounds(gapRectsBounds);
                     flipForWritingMode(localBounds);
                     gapRectsBounds = localToContainerQuad(FloatRect(localBounds), layer->renderer()).enclosingBoundingBox();
                     gapRectsBounds.move(layer->scrolledContentOffset());
index 291bf8d..cad7324 100644 (file)
@@ -562,14 +562,14 @@ private:
 
     // End of functions defined in RenderBlockLineLayout.cpp.
 
-    void paintFloats(PaintInfo&, const IntPoint&, bool preservePhase = false);
-    void paintContents(PaintInfo&, const IntPoint&);
-    void paintColumnContents(PaintInfo&, const IntPoint&, bool paintFloats = false);
-    void paintColumnRules(PaintInfo&, const IntPoint&);
-    void paintChildren(PaintInfo&, const IntPoint&);
-    void paintEllipsisBoxes(PaintInfo&, const IntPoint&);
-    void paintSelection(PaintInfo&, const IntPoint&);
-    void paintCaret(PaintInfo&, const IntPoint&, CaretType);
+    void paintFloats(PaintInfo&, const LayoutPoint&, bool preservePhase = false);
+    void paintContents(PaintInfo&, const LayoutPoint&);
+    void paintColumnContents(PaintInfo&, const LayoutPoint&, bool paintFloats = false);
+    void paintColumnRules(PaintInfo&, const LayoutPoint&);
+    void paintChildren(PaintInfo&, const LayoutPoint&);
+    void paintEllipsisBoxes(PaintInfo&, const LayoutPoint&);
+    void paintSelection(PaintInfo&, const LayoutPoint&);
+    void paintCaret(PaintInfo&, const LayoutPoint&, CaretType);
 
     FloatingObject* insertFloatingObject(RenderBox*);
     void removeFloatingObject(RenderBox*);
index 2c82afc..93cc848 100644 (file)
@@ -1079,7 +1079,7 @@ bool RenderBox::repaintLayerRectsForImage(WrappedImagePtr image, const FillLayer
 
 #if PLATFORM(MAC)
 
-void RenderBox::paintCustomHighlight(const IntPoint& paintOffset, const AtomicString& type, bool behindText)
+void RenderBox::paintCustomHighlight(const LayoutPoint& paintOffset, const AtomicString& type, bool behindText)
 {
     Frame* frame = this->frame();
     if (!frame)
index b55a690..efaec7d 100644 (file)
@@ -420,7 +420,7 @@ protected:
     void paintMaskImages(const PaintInfo&, const LayoutRect&);
 
 #if PLATFORM(MAC)
-    void paintCustomHighlight(const IntPoint&, const AtomicString& type, bool behindText);
+    void paintCustomHighlight(const LayoutPoint&, const AtomicString& type, bool behindText);
 #endif
 
     void computePositionedLogicalWidth();
index f29e30e..c9a4eb2 100644 (file)
@@ -1363,7 +1363,7 @@ void RenderInline::addFocusRingRects(Vector<LayoutRect>& rects, const LayoutPoin
     }
 }
 
-void RenderInline::paintOutline(GraphicsContext* graphicsContext, const IntPoint& paintOffset)
+void RenderInline::paintOutline(GraphicsContext* graphicsContext, const LayoutPoint& paintOffset)
 {
     if (!hasOutline())
         return;
@@ -1382,16 +1382,16 @@ void RenderInline::paintOutline(GraphicsContext* graphicsContext, const IntPoint
     if (styleToUse->outlineStyleIsAuto() || styleToUse->outlineStyle() == BNONE)
         return;
 
-    Vector<IntRect> rects;
+    Vector<LayoutRect> rects;
 
-    rects.append(IntRect());
+    rects.append(LayoutRect());
     for (InlineFlowBox* curr = firstLineBox(); curr; curr = curr->nextLineBox()) {
         RootInlineBox* root = curr->root();
-        int top = max(root->lineTop(), curr->logicalTop());
-        int bottom = min(root->lineBottom(), curr->logicalBottom());
-        rects.append(IntRect(curr->x(), top, curr->logicalWidth(), bottom - top));
+        LayoutUnit top = max(root->lineTop(), curr->logicalTop());
+        LayoutUnit bottom = min(root->lineBottom(), curr->logicalBottom());
+        rects.append(LayoutRect(curr->x(), top, curr->logicalWidth(), bottom - top));
     }
-    rects.append(IntRect());
+    rects.append(LayoutRect());
 
     Color outlineColor = styleToUse->visitedDependentColor(CSSPropertyOutlineColor);
 // FIXME: Using a transparency layer for rgba outlines exacerbates an existing SKIA bug. The #if
@@ -1415,90 +1415,90 @@ void RenderInline::paintOutline(GraphicsContext* graphicsContext, const IntPoint
 #endif
 }
 
-void RenderInline::paintOutlineForLine(GraphicsContext* graphicsContext, const IntPoint& paintOffset,
-                                       const IntRect& lastline, const IntRect& thisline, const IntRect& nextline,
+void RenderInline::paintOutlineForLine(GraphicsContext* graphicsContext, const LayoutPoint& paintOffset,
+                                       const LayoutRect& lastline, const LayoutRect& thisline, const LayoutRect& nextline,
                                        const Color outlineColor)
 {
     RenderStyle* styleToUse = style();
-    int ow = styleToUse->outlineWidth();
-    EBorderStyle os = styleToUse->outlineStyle();
+    LayoutUnit outlineWidth = styleToUse->outlineWidth();
+    EBorderStyle outlineStyle = styleToUse->outlineStyle();
 
     const AffineTransform& currentCTM = graphicsContext->getCTM();
     bool antialias = !currentCTM.isIdentityOrTranslationOrFlipped();
 
-    int offset = style()->outlineOffset();
+    LayoutUnit offset = style()->outlineOffset();
 
-    int t = paintOffset.y() + thisline.y() - offset;
-    int l = paintOffset.x() + thisline.x() - offset;
-    int b = paintOffset.y() + thisline.maxY() + offset;
-    int r = paintOffset.x() + thisline.maxX() + offset;
+    LayoutUnit top = paintOffset.y() + thisline.y() - offset;
+    LayoutUnit left = paintOffset.x() + thisline.x() - offset;
+    LayoutUnit bottom = paintOffset.y() + thisline.maxY() + offset;
+    LayoutUnit right = paintOffset.x() + thisline.maxX() + offset;
     
     // left edge
     drawLineForBoxSide(graphicsContext,
-               l - ow,
-               t - (lastline.isEmpty() || thisline.x() < lastline.x() || (lastline.maxX() - 1) <= thisline.x() ? ow : 0),
-               l,
-               b + (nextline.isEmpty() || thisline.x() <= nextline.x() || (nextline.maxX() - 1) <= thisline.x() ? ow : 0),
-               BSLeft,
-               outlineColor, os,
-               (lastline.isEmpty() || thisline.x() < lastline.x() || (lastline.maxX() - 1) <= thisline.x() ? ow : -ow),
-               (nextline.isEmpty() || thisline.x() <= nextline.x() || (nextline.maxX() - 1) <= thisline.x() ? ow : -ow),
-               antialias);
+        left - outlineWidth,
+        top - (lastline.isEmpty() || thisline.x() < lastline.x() || (lastline.maxX() - 1) <= thisline.x() ? outlineWidth : 0),
+        left,
+        bottom + (nextline.isEmpty() || thisline.x() <= nextline.x() || (nextline.maxX() - 1) <= thisline.x() ? outlineWidth : 0),
+        BSLeft,
+        outlineColor, outlineStyle,
+        (lastline.isEmpty() || thisline.x() < lastline.x() || (lastline.maxX() - 1) <= thisline.x() ? outlineWidth : -outlineWidth),
+        (nextline.isEmpty() || thisline.x() <= nextline.x() || (nextline.maxX() - 1) <= thisline.x() ? outlineWidth : -outlineWidth),
+        antialias);
     
     // right edge
     drawLineForBoxSide(graphicsContext,
-               r,
-               t - (lastline.isEmpty() || lastline.maxX() < thisline.maxX() || (thisline.maxX() - 1) <= lastline.x() ? ow : 0),
-               r + ow,
-               b + (nextline.isEmpty() || nextline.maxX() <= thisline.maxX() || (thisline.maxX() - 1) <= nextline.x() ? ow : 0),
-               BSRight,
-               outlineColor, os,
-               (lastline.isEmpty() || lastline.maxX() < thisline.maxX() || (thisline.maxX() - 1) <= lastline.x() ? ow : -ow),
-               (nextline.isEmpty() || nextline.maxX() <= thisline.maxX() || (thisline.maxX() - 1) <= nextline.x() ? ow : -ow),
-               antialias);
+        right,
+        top - (lastline.isEmpty() || lastline.maxX() < thisline.maxX() || (thisline.maxX() - 1) <= lastline.x() ? outlineWidth : 0),
+        right + outlineWidth,
+        bottom + (nextline.isEmpty() || nextline.maxX() <= thisline.maxX() || (thisline.maxX() - 1) <= nextline.x() ? outlineWidth : 0),
+        BSRight,
+        outlineColor, outlineStyle,
+        (lastline.isEmpty() || lastline.maxX() < thisline.maxX() || (thisline.maxX() - 1) <= lastline.x() ? outlineWidth : -outlineWidth),
+        (nextline.isEmpty() || nextline.maxX() <= thisline.maxX() || (thisline.maxX() - 1) <= nextline.x() ? outlineWidth : -outlineWidth),
+        antialias);
     // upper edge
     if (thisline.x() < lastline.x())
         drawLineForBoxSide(graphicsContext,
-                   l - ow,
-                   t - ow,
-                   min(r+ow, (lastline.isEmpty() ? 1000000 : paintOffset.x() + lastline.x())),
-                   t,
-                   BSTop, outlineColor, os,
-                   ow,
-                   (!lastline.isEmpty() && paintOffset.x() + lastline.x() + 1 < r + ow) ? -ow : ow,
-                   antialias);
+            left - outlineWidth,
+            top - outlineWidth,
+            min(right + outlineWidth, (lastline.isEmpty() ? 1000000 : paintOffset.x() + lastline.x())),
+            top,
+            BSTop, outlineColor, outlineStyle,
+            outlineWidth,
+            (!lastline.isEmpty() && paintOffset.x() + lastline.x() + 1 < right + outlineWidth) ? -outlineWidth : outlineWidth,
+            antialias);
     
     if (lastline.maxX() < thisline.maxX())
         drawLineForBoxSide(graphicsContext,
-                   max(lastline.isEmpty() ? -1000000 : paintOffset.x() + lastline.maxX(), l - ow),
-                   t - ow,
-                   r + ow,
-                   t,
-                   BSTop, outlineColor, os,
-                   (!lastline.isEmpty() && l - ow < paintOffset.x() + lastline.maxX()) ? -ow : ow,
-                   ow, antialias);
+            max(lastline.isEmpty() ? -1000000 : paintOffset.x() + lastline.maxX(), left - outlineWidth),
+            top - outlineWidth,
+            right + outlineWidth,
+            top,
+            BSTop, outlineColor, outlineStyle,
+            (!lastline.isEmpty() && left - outlineWidth < paintOffset.x() + lastline.maxX()) ? -outlineWidth : outlineWidth,
+            outlineWidth, antialias);
     
     // lower edge
     if (thisline.x() < nextline.x())
         drawLineForBoxSide(graphicsContext,
-                   l - ow,
-                   b,
-                   min(r + ow, !nextline.isEmpty() ? paintOffset.x() + nextline.x() + 1 : 1000000),
-                   b + ow,
-                   BSBottom, outlineColor, os,
-                   ow,
-                   (!nextline.isEmpty() && paintOffset.x() + nextline.x() + 1 < r + ow) ? -ow : ow,
-                   antialias);
+            left - outlineWidth,
+            bottom,
+            min(right + outlineWidth, !nextline.isEmpty() ? paintOffset.x() + nextline.x() + 1 : 1000000),
+            bottom + outlineWidth,
+            BSBottom, outlineColor, outlineStyle,
+            outlineWidth,
+            (!nextline.isEmpty() && paintOffset.x() + nextline.x() + 1 < right + outlineWidth) ? -outlineWidth : outlineWidth,
+            antialias);
     
     if (nextline.maxX() < thisline.maxX())
         drawLineForBoxSide(graphicsContext,
-                   max(!nextline.isEmpty() ? paintOffset.x() + nextline.maxX() : -1000000, l - ow),
-                   b,
-                   r + ow,
-                   b + ow,
-                   BSBottom, outlineColor, os,
-                   (!nextline.isEmpty() && l - ow < paintOffset.x() + nextline.maxX()) ? -ow : ow,
-                   ow, antialias);
+            max(!nextline.isEmpty() ? paintOffset.x() + nextline.maxX() : -1000000, left - outlineWidth),
+            bottom,
+            right + outlineWidth,
+            bottom + outlineWidth,
+            BSBottom, outlineColor, outlineStyle,
+            (!nextline.isEmpty() && left - outlineWidth < paintOffset.x() + nextline.maxX()) ? -outlineWidth : outlineWidth,
+            outlineWidth, antialias);
 }
 
 #if ENABLE(DASHBOARD_SUPPORT)
index 57206b1..f28461f 100644 (file)
@@ -76,7 +76,7 @@ public:
     LayoutSize relativePositionedInlineOffset(const RenderBox* child) const;
 
     virtual void addFocusRingRects(Vector<LayoutRect>&, const LayoutPoint&);
-    void paintOutline(GraphicsContext*, const IntPoint&);
+    void paintOutline(GraphicsContext*, const LayoutPoint&);
 
     using RenderBoxModelObject::continuation;
     using RenderBoxModelObject::setContinuation;
@@ -162,8 +162,8 @@ private:
     
     static RenderInline* cloneInline(RenderInline* src);
 
-    void paintOutlineForLine(GraphicsContext*, const IntPoint&, const IntRect& prevLine, const IntRect& thisLine,
-                             const IntRect& nextLine, const Color);
+    void paintOutlineForLine(GraphicsContext*, const LayoutPoint&, const LayoutRect& prevLine, const LayoutRect& thisLine,
+                             const LayoutRect& nextLine, const Color);
     RenderBoxModelObject* continuationBefore(RenderObject* beforeChild);
 
     RenderObjectChildList m_children;
index a068cfa..bf1d059 100644 (file)
@@ -2279,7 +2279,7 @@ void RenderLayer::updateScrollInfoAfterLayout()
         updateOverflowStatus(horizontalOverflow, verticalOverflow);
 }
 
-void RenderLayer::paintOverflowControls(GraphicsContext* context, const IntPoint& paintOffset, const IntRect& damageRect, bool paintingOverlayControls)
+void RenderLayer::paintOverflowControls(GraphicsContext* context, const LayoutPoint& paintOffset, const IntRect& damageRect, bool paintingOverlayControls)
 {
     // Don't do anything if we have no overflow.
     if (!renderer()->hasOverflowClip())
@@ -2303,7 +2303,7 @@ void RenderLayer::paintOverflowControls(GraphicsContext* context, const IntPoint
     if (paintingOverlayControls && !hasOverlayScrollbars())
         return;
 
-    IntPoint adjustedPaintOffset = paintOffset;
+    LayoutPoint adjustedPaintOffset = paintOffset;
     if (paintingOverlayControls)
         adjustedPaintOffset = m_cachedOverlayScrollbarOffset;
 
@@ -2339,12 +2339,12 @@ void RenderLayer::paintOverflowControls(GraphicsContext* context, const IntPoint
     paintResizer(context, adjustedPaintOffset, damageRect);
 }
 
-void RenderLayer::paintScrollCorner(GraphicsContext* context, const IntPoint& paintOffset, const IntRect& damageRect)
+void RenderLayer::paintScrollCorner(GraphicsContext* context, const LayoutPoint& paintOffset, const LayoutRect& damageRect)
 {
     RenderBox* box = renderBox();
     ASSERT(box);
 
-    IntRect absRect = scrollCornerRect();
+    LayoutRect absRect = scrollCornerRect();
     absRect.moveBy(paintOffset);
     if (!absRect.intersects(damageRect))
         return;
@@ -2365,7 +2365,7 @@ void RenderLayer::paintScrollCorner(GraphicsContext* context, const IntPoint& pa
         context->fillRect(absRect, Color::white, box->style()->colorSpace());
 }
 
-void RenderLayer::paintResizer(GraphicsContext* context, const IntPoint& paintOffset, const IntRect& damageRect)
+void RenderLayer::paintResizer(GraphicsContext* context, const LayoutPoint& paintOffset, const LayoutRect& damageRect)
 {
     if (renderer()->style()->resize() == RESIZE_NONE)
         return;
@@ -2373,7 +2373,7 @@ void RenderLayer::paintResizer(GraphicsContext* context, const IntPoint& paintOf
     RenderBox* box = renderBox();
     ASSERT(box);
 
-    IntRect absRect = resizerCornerRect(this, box->borderBoxRect());
+    LayoutRect absRect = resizerCornerRect(this, box->borderBoxRect());
     absRect.moveBy(paintOffset);
     if (!absRect.intersects(damageRect))
         return;
@@ -2390,7 +2390,7 @@ void RenderLayer::paintResizer(GraphicsContext* context, const IntPoint& paintOf
 
     // Paint the resizer control.
     DEFINE_STATIC_LOCAL(RefPtr<Image>, resizeCornerImage, (Image::loadPlatformResource("textAreaResizeCorner")));
-    IntPoint imagePoint(absRect.maxX() - resizeCornerImage->width(), absRect.maxY() - resizeCornerImage->height());
+    LayoutPoint imagePoint(absRect.maxX() - resizeCornerImage->width(), absRect.maxY() - resizeCornerImage->height());
     context->drawImage(resizeCornerImage.get(), box->style()->colorSpace(), imagePoint);
 
     // Draw a frame around the resizer (1px grey line) if there are any scrollbars present.
@@ -2398,8 +2398,8 @@ void RenderLayer::paintResizer(GraphicsContext* context, const IntPoint& paintOf
     if (!hasOverlayScrollbars() && (m_vBar || m_hBar)) {
         GraphicsContextStateSaver stateSaver(*context);
         context->clip(absRect);
-        IntRect largerCorner = absRect;
-        largerCorner.setSize(IntSize(largerCorner.width() + 1, largerCorner.height() + 1));
+        LayoutRect largerCorner = absRect;
+        largerCorner.setSize(LayoutSize(largerCorner.width() + 1, largerCorner.height() + 1));
         context->setStrokeColor(Color(makeRGB(217, 217, 217)), ColorSpaceDeviceRGB);
         context->setStrokeThickness(1.0f);
         context->setFillColor(Color::transparent, ColorSpaceDeviceRGB);
index 4a5098b..dcf463b 100644 (file)
@@ -269,9 +269,9 @@ public:
     bool hitTestOverflowControls(HitTestResult&, const IntPoint& localPoint);
     LayoutSize offsetFromResizeCorner(const LayoutPoint& absolutePoint) const;
 
-    void paintOverflowControls(GraphicsContext*, const IntPoint&, const IntRect& damageRect, bool paintingOverlayControls = false);
-    void paintScrollCorner(GraphicsContext*, const IntPoint&, const IntRect& damageRect);
-    void paintResizer(GraphicsContext*, const IntPoint&, const IntRect& damageRect);
+    void paintOverflowControls(GraphicsContext*, const LayoutPoint&, const LayoutRect& damageRect, bool paintingOverlayControls = false);
+    void paintScrollCorner(GraphicsContext*, const LayoutPoint&, const LayoutRect& damageRect);
+    void paintResizer(GraphicsContext*, const LayoutPoint&, const LayoutRect& damageRect);
 
     void updateScrollInfoAfterLayout();
 
index e63d7d3..f47788b 100644 (file)
@@ -200,7 +200,7 @@ bool RenderLineBoxList::lineIntersectsDirtyRect(RenderBoxModelObject* renderer,
     return rangeIntersectsRect(renderer, logicalTop, logicalBottom, paintInfo.rect, offset);
 }
 
-void RenderLineBoxList::paint(RenderBoxModelObject* renderer, PaintInfo& paintInfo, const IntPoint& paintOffset) const
+void RenderLineBoxList::paint(RenderBoxModelObject* renderer, PaintInfo& paintInfo, const LayoutPoint& paintOffset) const
 {
     // Only paint during the foreground/selection phases.
     if (paintInfo.phase != PaintPhaseForeground && paintInfo.phase != PaintPhaseSelection && paintInfo.phase != PaintPhaseOutline 
@@ -218,7 +218,7 @@ void RenderLineBoxList::paint(RenderBoxModelObject* renderer, PaintInfo& paintIn
     // NSViews.  Do not add any more code for this.
     RenderView* v = renderer->view();
     bool usePrintRect = !v->printRect().isEmpty();
-    int outlineSize = renderer->maximalOutlineSize(paintInfo.phase);
+    LayoutUnit outlineSize = renderer->maximalOutlineSize(paintInfo.phase);
     if (!anyLineIntersectsRect(renderer, paintInfo.rect, paintOffset, usePrintRect, outlineSize))
         return;
 
@@ -235,8 +235,8 @@ void RenderLineBoxList::paint(RenderBoxModelObject* renderer, PaintInfo& paintIn
             // for embedded views inside AppKit.  AppKit is incapable of paginating vertical
             // text pages, so we don't have to deal with vertical lines at all here.
             RootInlineBox* root = curr->root();
-            int topForPaginationCheck = curr->logicalTopVisualOverflow(root->lineTop());
-            int bottomForPaginationCheck = curr->logicalLeftVisualOverflow();
+            LayoutUnit topForPaginationCheck = curr->logicalTopVisualOverflow(root->lineTop());
+            LayoutUnit bottomForPaginationCheck = curr->logicalLeftVisualOverflow();
             if (!curr->parent()) {
                 // We're a root box.  Use lineTop and lineBottom as well here.
                 topForPaginationCheck = min(topForPaginationCheck, root->lineTop());
index cba283e..1d66f83 100644 (file)
@@ -330,13 +330,13 @@ void RenderListBox::addFocusRingRects(Vector<LayoutRect>& rects, const LayoutPoi
     }
 }
 
-void RenderListBox::paintScrollbar(PaintInfo& paintInfo, const IntPoint& paintOffset)
+void RenderListBox::paintScrollbar(PaintInfo& paintInfo, const LayoutPoint& paintOffset)
 {
     if (m_vBar) {
-        IntRect scrollRect(paintOffset.x() + width() - borderRight() - m_vBar->width(),
-                           paintOffset.y() + borderTop(),
-                           m_vBar->width(),
-                           height() - (borderTop() + borderBottom()));
+        LayoutRect scrollRect(paintOffset.x() + width() - borderRight() - m_vBar->width(),
+            paintOffset.y() + borderTop(),
+            m_vBar->width(),
+            height() - (borderTop() + borderBottom()));
         m_vBar->setFrameRect(scrollRect);
         m_vBar->paint(paintInfo.context, paintInfo.rect);
     }
@@ -361,7 +361,7 @@ static IntSize itemOffsetForAlignment(TextRun textRun, RenderStyle* itemStyle, F
     return offset;
 }
 
-void RenderListBox::paintItemForeground(PaintInfo& paintInfo, const IntPoint& paintOffset, int listIndex)
+void RenderListBox::paintItemForeground(PaintInfo& paintInfo, const LayoutPoint& paintOffset, int listIndex)
 {
     FontCachePurgePreventer fontCachePurgePreventer;
 
@@ -399,7 +399,7 @@ void RenderListBox::paintItemForeground(PaintInfo& paintInfo, const IntPoint& pa
     const UChar* string = itemText.characters();
     TextRun textRun(string, length, false, 0, 0, TextRun::AllowTrailingExpansion, itemStyle->direction(), itemStyle->unicodeBidi() == Override, TextRun::NoRounding);
     Font itemFont = style()->font();
-    IntRect r = itemBoundingBoxRect(paintOffset, listIndex);
+    LayoutRect r = itemBoundingBoxRect(paintOffset, listIndex);
     r.move(itemOffsetForAlignment(textRun, itemStyle, itemFont, r));
 
     if (isOptionGroupElement(element)) {
@@ -414,7 +414,7 @@ void RenderListBox::paintItemForeground(PaintInfo& paintInfo, const IntPoint& pa
         paintInfo.context->drawBidiText(itemFont, textRun, r.location());
 }
 
-void RenderListBox::paintItemBackground(PaintInfo& paintInfo, const IntPoint& paintOffset, int listIndex)
+void RenderListBox::paintItemBackground(PaintInfo& paintInfo, const LayoutPoint& paintOffset, int listIndex)
 {
     SelectElement* select = toSelectElement(static_cast<Element*>(node()));
     const Vector<Element*>& listItems = select->listItems();
@@ -433,7 +433,7 @@ void RenderListBox::paintItemBackground(PaintInfo& paintInfo, const IntPoint& pa
     // Draw the background for this list box item
     if (!element->renderStyle() || element->renderStyle()->visibility() != HIDDEN) {
         ColorSpace colorSpace = element->renderStyle() ? element->renderStyle()->colorSpace() : style()->colorSpace();
-        IntRect itemRect = itemBoundingBoxRect(paintOffset, listIndex);
+        LayoutRect itemRect = itemBoundingBoxRect(paintOffset, listIndex);
         itemRect.intersect(controlClipRect(paintOffset));
         paintInfo.context->fillRect(itemRect, backColor, colorSpace);
     }
index 7f571ff..fca2bd7 100644 (file)
@@ -135,9 +135,9 @@ private:
     int numVisibleItems() const;
     int numItems() const;
     int listHeight() const;
-    void paintScrollbar(PaintInfo&, const IntPoint&);
-    void paintItemForeground(PaintInfo&, const IntPoint&, int listIndex);
-    void paintItemBackground(PaintInfo&, const IntPoint&, int listIndex);
+    void paintScrollbar(PaintInfo&, const LayoutPoint&);
+    void paintItemForeground(PaintInfo&, const LayoutPoint&, int listIndex);
+    void paintItemBackground(PaintInfo&, const LayoutPoint&, int listIndex);
     void scrollToRevealSelection();
 
     bool m_optionsChanged;
index 6763556..069b428 100644 (file)
@@ -1005,9 +1005,9 @@ void RenderObject::drawArcForBoxSide(GraphicsContext* graphicsContext, int x, in
 }
 #endif
     
-void RenderObject::paintFocusRing(GraphicsContext* context, const IntPoint& paintOffset, RenderStyle* style)
+void RenderObject::paintFocusRing(GraphicsContext* context, const LayoutPoint& paintOffset, RenderStyle* style)
 {
-    Vector<IntRect> focusRingRects;
+    Vector<LayoutRect> focusRingRects;
     addFocusRingRects(focusRingRects, paintOffset);
     if (style->outlineStyleIsAuto())
         context->drawFocusRing(focusRingRects, style->outlineWidth(), style->outlineOffset(), style->visitedDependentColor(CSSPropertyOutlineColor));
@@ -1028,18 +1028,18 @@ void RenderObject::addPDFURLRect(GraphicsContext* context, const IntRect& rect)
     context->setURLForRect(n->document()->completeURL(href), rect);
 }
 
-void RenderObject::paintOutline(GraphicsContext* graphicsContext, const IntRect& paintRect)
+void RenderObject::paintOutline(GraphicsContext* graphicsContext, const LayoutRect& paintRect)
 {
     if (!hasOutline())
         return;
 
     RenderStyle* styleToUse = style();
-    int outlineWidth = styleToUse->outlineWidth();
+    LayoutUnit outlineWidth = styleToUse->outlineWidth();
     EBorderStyle outlineStyle = styleToUse->outlineStyle();
 
     Color outlineColor = styleToUse->visitedDependentColor(CSSPropertyOutlineColor);
 
-    int offset = styleToUse->outlineOffset();
+    LayoutUnit offset = styleToUse->outlineOffset();
 
     if (styleToUse->outlineStyleIsAuto() || hasOutlineAnnotation()) {
         if (!theme()->supportsFocusRing(styleToUse)) {
@@ -1051,7 +1051,7 @@ void RenderObject::paintOutline(GraphicsContext* graphicsContext, const IntRect&
     if (styleToUse->outlineStyleIsAuto() || styleToUse->outlineStyle() == BNONE)
         return;
 
-    IntRect adjustedPaintRec = paintRect;
+    LayoutRect adjustedPaintRec = paintRect;
     adjustedPaintRec.inflate(offset);
 
     if (adjustedPaintRec.isEmpty())
@@ -1067,14 +1067,14 @@ void RenderObject::paintOutline(GraphicsContext* graphicsContext, const IntRect&
     }
 #endif
 
-    int leftOuter = adjustedPaintRec.x() - outlineWidth;
-    int leftInner = adjustedPaintRec.x();
-    int rightOuter = adjustedPaintRec.maxX() + outlineWidth;
-    int rightInner = adjustedPaintRec.maxX();
-    int topOuter = adjustedPaintRec.y() - outlineWidth;
-    int topInner = adjustedPaintRec.y();
-    int bottomOuter = adjustedPaintRec.maxY() + outlineWidth;
-    int bottomInner = adjustedPaintRec.maxY();
+    LayoutUnit leftOuter = adjustedPaintRec.x() - outlineWidth;
+    LayoutUnit leftInner = adjustedPaintRec.x();
+    LayoutUnit rightOuter = adjustedPaintRec.maxX() + outlineWidth;
+    LayoutUnit rightInner = adjustedPaintRec.maxX();
+    LayoutUnit topOuter = adjustedPaintRec.y() - outlineWidth;
+    LayoutUnit topInner = adjustedPaintRec.y();
+    LayoutUnit bottomOuter = adjustedPaintRec.maxY() + outlineWidth;
+    LayoutUnit bottomInner = adjustedPaintRec.maxY();
     
     drawLineForBoxSide(graphicsContext, leftOuter, topOuter, leftInner, bottomOuter, BSLeft, outlineColor, outlineStyle, outlineWidth, outlineWidth);
     drawLineForBoxSide(graphicsContext, leftOuter, topOuter, rightOuter, topInner, BSTop, outlineColor, outlineStyle, outlineWidth, outlineWidth);
index d63849f..85cd349 100644 (file)
@@ -793,8 +793,8 @@ protected:
     void drawLineForBoxSide(GraphicsContext*, int x1, int y1, int x2, int y2, BoxSide,
                             Color, EBorderStyle, int adjbw1, int adjbw2, bool antialias = false);
 
-    void paintFocusRing(GraphicsContext*, const IntPoint&, RenderStyle*);
-    void paintOutline(GraphicsContext*, const IntRect&);
+    void paintFocusRing(GraphicsContext*, const LayoutPoint&, RenderStyle*);
+    void paintOutline(GraphicsContext*, const LayoutRect&);
     void addPDFURLRect(GraphicsContext*, const IntRect&);
 
     virtual IntRect viewRect() const;
index ebedbf0..cab23ee 100644 (file)
@@ -163,7 +163,7 @@ void RenderReplaced::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset)
     }
 }
 
-bool RenderReplaced::shouldPaint(PaintInfo& paintInfo, const IntPoint& paintOffset)
+bool RenderReplaced::shouldPaint(PaintInfo& paintInfo, const LayoutPoint& paintOffset)
 {
     if (paintInfo.phase != PaintPhaseForeground && paintInfo.phase != PaintPhaseOutline && paintInfo.phase != PaintPhaseSelfOutline 
             && paintInfo.phase != PaintPhaseSelection && paintInfo.phase != PaintPhaseMask)
@@ -176,19 +176,19 @@ bool RenderReplaced::shouldPaint(PaintInfo& paintInfo, const IntPoint& paintOffs
     if (style()->visibility() != VISIBLE)
         return false;
 
-    IntPoint adjustedPaintOffset = paintOffset + location();
+    LayoutPoint adjustedPaintOffset = paintOffset + location();
 
     // Early exit if the element touches the edges.
-    int top = adjustedPaintOffset.y() + minYVisualOverflow();
-    int bottom = adjustedPaintOffset.y() + maxYVisualOverflow();
+    LayoutUnit top = adjustedPaintOffset.y() + minYVisualOverflow();
+    LayoutUnit bottom = adjustedPaintOffset.y() + maxYVisualOverflow();
     if (isSelected() && m_inlineBoxWrapper) {
-        int selTop = paintOffset.y() + m_inlineBoxWrapper->root()->selectionTop();
-        int selBottom = paintOffset.y() + selTop + m_inlineBoxWrapper->root()->selectionHeight();
+        LayoutUnit selTop = paintOffset.y() + m_inlineBoxWrapper->root()->selectionTop();
+        LayoutUnit selBottom = paintOffset.y() + selTop + m_inlineBoxWrapper->root()->selectionHeight();
         top = min(selTop, top);
         bottom = max(selBottom, bottom);
     }
     
-    int os = 2 * maximalOutlineSize(paintInfo.phase);
+    LayoutUnit os = 2 * maximalOutlineSize(paintInfo.phase);
     if (adjustedPaintOffset.x() + minXVisualOverflow() >= paintInfo.rect.maxX() + os || adjustedPaintOffset.x() + maxXVisualOverflow() <= paintInfo.rect.x() - os)
         return false;
     if (top >= paintInfo.rect.maxY() + os || bottom <= paintInfo.rect.y() - os)
index 4a08fe5..4971895 100644 (file)
@@ -55,7 +55,7 @@ protected:
     void setHasIntrinsicSize() { m_hasIntrinsicSize = true; }
 
     virtual void paint(PaintInfo&, const LayoutPoint&);
-    bool shouldPaint(PaintInfo&, const IntPoint&);
+    bool shouldPaint(PaintInfo&, const LayoutPoint&);
     IntRect localSelectionRect(bool checkWhetherSelected = true) const; // This is in local coordinates, but it's a physical rect (so the top left corner is physical top left).
 
 private:
index cda30ed..5a54de1 100644 (file)
@@ -159,7 +159,7 @@ void RenderScrollbarPart::imageChanged(WrappedImagePtr image, const IntRect* rec
     }
 }
 
-void RenderScrollbarPart::paintIntoRect(GraphicsContext* graphicsContext, const IntPoint& paintOffset, const IntRect& rect)
+void RenderScrollbarPart::paintIntoRect(GraphicsContext* graphicsContext, const LayoutPoint& paintOffset, const LayoutRect& rect)
 {
     // Make sure our dimensions match the rect.
     setLocation(rect.location() - toSize(paintOffset));
index eeffd71..e0b9dbe 100644 (file)
@@ -45,7 +45,7 @@ public:
     virtual void layout();
     virtual void computePreferredLogicalWidths();
     
-    void paintIntoRect(GraphicsContext*, const IntPoint&, const IntRect&);
+    void paintIntoRect(GraphicsContext*, const LayoutPoint&, const LayoutRect&);
     
 protected:
     virtual void styleWillChange(StyleDifference diff, const RenderStyle* newStyle);
index 13983b8..743eae8 100644 (file)
@@ -960,7 +960,7 @@ void RenderTableCell::paintCollapsedBorder(GraphicsContext* graphicsContext, con
     }
 }
 
-void RenderTableCell::paintBackgroundsBehindCell(PaintInfo& paintInfo, const IntPoint& paintOffset, RenderObject* backgroundObject)
+void RenderTableCell::paintBackgroundsBehindCell(PaintInfo& paintInfo, const LayoutPoint& paintOffset, RenderObject* backgroundObject)
 {
     if (!paintInfo.shouldPaintWithinRoot(this))
         return;
@@ -975,7 +975,7 @@ void RenderTableCell::paintBackgroundsBehindCell(PaintInfo& paintInfo, const Int
     if (!tableElt->collapseBorders() && style()->emptyCells() == HIDE && !firstChild())
         return;
 
-    IntPoint adjustedPaintOffset = paintOffset;
+    LayoutPoint adjustedPaintOffset = paintOffset;
     if (backgroundObject != this)
         adjustedPaintOffset.move(location());
 
@@ -988,11 +988,11 @@ void RenderTableCell::paintBackgroundsBehindCell(PaintInfo& paintInfo, const Int
         bool shouldClip = backgroundObject->hasLayer() && (backgroundObject == this || backgroundObject == parent()) && tableElt->collapseBorders();
         GraphicsContextStateSaver stateSaver(*paintInfo.context, shouldClip);
         if (shouldClip) {
-            IntRect clipRect(adjustedPaintOffset.x() + borderLeft(), adjustedPaintOffset.y() + borderTop(),
+            LayoutRect clipRect(adjustedPaintOffset.x() + borderLeft(), adjustedPaintOffset.y() + borderTop(),
                 width() - borderLeft() - borderRight(), height() - borderTop() - borderBottom());
             paintInfo.context->clip(clipRect);
         }
-        paintFillLayers(paintInfo, c, bgLayer, IntRect(adjustedPaintOffset, size()), BackgroundBleedNone, CompositeSourceOver, backgroundObject);
+        paintFillLayers(paintInfo, c, bgLayer, LayoutRect(adjustedPaintOffset, size()), BackgroundBleedNone, CompositeSourceOver, backgroundObject);
     }
 }
 
index e569da3..3490d15 100644 (file)
@@ -913,9 +913,9 @@ static inline bool compareCellPositions(RenderTableCell* elem1, RenderTableCell*
     return elem1->row() < elem2->row();
 }
 
-void RenderTableSection::paintCell(RenderTableCell* cell, PaintInfo& paintInfo, const IntPoint& paintOffset)
+void RenderTableSection::paintCell(RenderTableCell* cell, PaintInfo& paintInfo, const LayoutPoint& paintOffset)
 {
-    IntPoint cellPoint = flipForWritingMode(cell, paintOffset, ParentToChildFlippingAdjustment);
+    LayoutPoint cellPoint = flipForWritingMode(cell, paintOffset, ParentToChildFlippingAdjustment);
     PaintPhase paintPhase = paintInfo.phase;
     RenderTableRow* row = toRenderTableRow(cell->parent());
 
index bc044bd..b9ad61e 100644 (file)
@@ -133,7 +133,7 @@ private:
     virtual void removeChild(RenderObject* oldChild);
 
     virtual void paint(PaintInfo&, const LayoutPoint&);
-    virtual void paintCell(RenderTableCell*, PaintInfo&, const IntPoint&);
+    virtual void paintCell(RenderTableCell*, PaintInfo&, const LayoutPoint&);
     virtual void paintObject(PaintInfo&, const LayoutPoint&);
 
     virtual void imageChanged(WrappedImagePtr, const IntRect* = 0);
index 262e863..d650d89 100644 (file)
@@ -587,12 +587,12 @@ void RenderTextControl::updatePlaceholderVisibility(bool placeholderShouldBeVisi
         repaint();
 }
 
-void RenderTextControl::paintPlaceholder(PaintInfo& paintInfo, const IntPoint& paintOffset)
+void RenderTextControl::paintPlaceholder(PaintInfo& paintInfo, const LayoutPoint& paintOffset)
 {
     if (style()->visibility() != VISIBLE)
         return;
     
-    IntRect clipRect(paintOffset.x() + borderLeft(), paintOffset.y() + borderTop(), width() - borderLeft() - borderRight(), height() - borderBottom() - borderTop());
+    LayoutRect clipRect(paintOffset.x() + borderLeft(), paintOffset.y() + borderTop(), width() - borderLeft() - borderRight(), height() - borderBottom() - borderTop());
     if (clipRect.isEmpty())
         return;
     
@@ -610,9 +610,9 @@ void RenderTextControl::paintPlaceholder(PaintInfo& paintInfo, const IntPoint& p
     
     RenderBox* textRenderer = innerTextElement() ? innerTextElement()->renderBox() : 0;
     if (textRenderer) {
-        IntPoint textPoint;
+        LayoutPoint textPoint;
         textPoint.setY(paintOffset.y() + textBlockInsetTop() + placeholderStyle->fontMetrics().ascent());
-        int styleTextIndent = placeholderStyle->textIndent().isFixed() ? placeholderStyle->textIndent().calcMinValue(0) : 0;
+        LayoutUnit styleTextIndent = placeholderStyle->textIndent().isFixed() ? placeholderStyle->textIndent().calcMinValue(0) : 0;
         if (placeholderStyle->isLeftToRightDirection())
             textPoint.setX(paintOffset.x() + styleTextIndent + textBlockInsetLeft());
         else
index 67ae683..70794dd 100644 (file)
@@ -133,7 +133,7 @@ float RootInlineBox::placeEllipsisBox(bool ltr, float blockLeftEdge, float block
     return result;
 }
 
-void RootInlineBox::paintEllipsisBox(PaintInfo& paintInfo, const IntPoint& paintOffset, int lineTop, int lineBottom) const
+void RootInlineBox::paintEllipsisBox(PaintInfo& paintInfo, const LayoutPoint& paintOffset, LayoutUnit lineTop, LayoutUnit lineBottom) const
 {
     if (hasEllipsisBox() && paintInfo.shouldPaintWithinRoot(renderer()) && renderer()->style()->visibility() == VISIBLE
             && paintInfo.phase == PaintPhaseForeground)
@@ -157,7 +157,7 @@ void RootInlineBox::addHighlightOverflow()
     setOverflowFromLogicalRects(inflatedRect, inflatedRect, lineTop(), lineBottom());
 }
 
-void RootInlineBox::paintCustomHighlight(PaintInfo& paintInfo, const IntPoint& paintOffset, const AtomicString& highlightType)
+void RootInlineBox::paintCustomHighlight(PaintInfo& paintInfo, const LayoutPoint& paintOffset, const AtomicString& highlightType)
 {
     if (!paintInfo.shouldPaintWithinRoot(renderer()) || renderer()->style()->visibility() != VISIBLE || paintInfo.phase != PaintPhaseForeground)
         return;
@@ -178,7 +178,7 @@ void RootInlineBox::paintCustomHighlight(PaintInfo& paintInfo, const IntPoint& p
 
 #endif
 
-void RootInlineBox::paint(PaintInfo& paintInfo, const IntPoint& paintOffset, int lineTop, int lineBottom)
+void RootInlineBox::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset, LayoutUnit lineTop, LayoutUnit lineBottom)
 {
     InlineFlowBox::paint(paintInfo, paintOffset, lineTop, lineBottom);
     paintEllipsisBox(paintInfo, paintOffset, lineTop, lineBottom);
index 0c94654..6317735 100644 (file)
@@ -85,7 +85,7 @@ public:
 
     EllipsisBox* ellipsisBox() const;
 
-    void paintEllipsisBox(PaintInfo&, const IntPoint&, int lineTop, int lineBottom) const;
+    void paintEllipsisBox(PaintInfo&, const LayoutPoint&, LayoutUnit lineTop, LayoutUnit lineBottom) const;
 
     virtual void clearTruncation();
 
@@ -94,10 +94,10 @@ public:
 
 #if PLATFORM(MAC)
     void addHighlightOverflow();
-    void paintCustomHighlight(PaintInfo&, const IntPoint&, const AtomicString& highlightType);
+    void paintCustomHighlight(PaintInfo&, const LayoutPoint&, const AtomicString& highlightType);
 #endif
 
-    virtual void paint(PaintInfo&, const IntPoint&, int lineTop, int lineBottom);
+    virtual void paint(PaintInfo&, const LayoutPoint&, LayoutUnit lineTop, LayoutUnit lineBottom);
     virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const LayoutPoint& pointInContainer, const LayoutPoint& accumulatedOffset, int lineTop, int lineBottom);
 
     bool hasSelectedChildren() const { return m_hasSelectedChildrenOrCanHaveLeadingExpansion; }
index ba9fd93..e2491f0 100644 (file)
@@ -75,14 +75,14 @@ void RenderMathMLBlock::stretchToHeight(int height)
 }
 
 #if ENABLE(DEBUG_MATH_LAYOUT)
-void RenderMathMLBlock::paint(PaintInfo& info, const IntPoint& paintOffset)
+void RenderMathMLBlock::paint(PaintInfo& info, const LayoutPoint& paintOffset)
 {
     RenderBlock::paint(info, paintOffset);
     
     if (info.context->paintingDisabled() || info.phase != PaintPhaseForeground)
         return;
 
-    IntPoint adjustedPaintOffset = paintOffset + location();
+    LayoutPoint adjustedPaintOffset = paintOffset + location();
 
     GraphicsContextStateSaver stateSaver(*info.context);
     
@@ -90,22 +90,22 @@ void RenderMathMLBlock::paint(PaintInfo& info, const IntPoint& paintOffset)
     info.context->setStrokeStyle(SolidStroke);
     info.context->setStrokeColor(Color(0, 0, 255), ColorSpaceSRGB);
     
-    info.context->drawLine(adjustedPaintOffset, IntPoint(adjustedPaintOffset.x() + offsetWidth(), adjustedPaintOffset.y()));
-    info.context->drawLine(IntPoint(adjustedPaintOffset.x() + offsetWidth(), adjustedPaintOffset.y()), IntPoint(adjustedPaintOffset.x() + offsetWidth(), adjustedPaintOffset.y() + offsetHeight()));
-    info.context->drawLine(IntPoint(adjustedPaintOffset.x(), adjustedPaintOffset.y() + offsetHeight()), IntPoint(adjustedPaintOffset.x() + offsetWidth(), adjustedPaintOffset.y() + offsetHeight()));
-    info.context->drawLine(adjustedPaintOffset, IntPoint(adjustedPaintOffset.x(), adjustedPaintOffset.y() + offsetHeight()));
+    info.context->drawLine(adjustedPaintOffset, LayoutPoint(adjustedPaintOffset.x() + offsetWidth(), adjustedPaintOffset.y()));
+    info.context->drawLine(LayoutPoint(adjustedPaintOffset.x() + offsetWidth(), adjustedPaintOffset.y()), LayoutPoint(adjustedPaintOffset.x() + offsetWidth(), adjustedPaintOffset.y() + offsetHeight()));
+    info.context->drawLine(LayoutPoint(adjustedPaintOffset.x(), adjustedPaintOffset.y() + offsetHeight()), LayoutPoint(adjustedPaintOffset.x() + offsetWidth(), adjustedPaintOffset.y() + offsetHeight()));
+    info.context->drawLine(adjustedPaintOffset, LayoutPoint(adjustedPaintOffset.x(), adjustedPaintOffset.y() + offsetHeight()));
     
     int topStart = paddingTop();
     
     info.context->setStrokeColor(Color(0, 255, 0), ColorSpaceSRGB);
     
-    info.context->drawLine(IntPoint(adjustedPaintOffset.x(), adjustedPaintOffset.y() + topStart), IntPoint(adjustedPaintOffset.x() + offsetWidth(), adjustedPaintOffset.y() + topStart));
+    info.context->drawLine(LayoutPoint(adjustedPaintOffset.x(), adjustedPaintOffset.y() + topStart), LayoutPoint(adjustedPaintOffset.x() + offsetWidth(), adjustedPaintOffset.y() + topStart));
     
     int baseline = baselinePosition(AlphabeticBaseline, true, HorizontalLine);
     
     info.context->setStrokeColor(Color(255, 0, 0), ColorSpaceSRGB);
     
-    info.context->drawLine(IntPoint(adjustedPaintOffset.x(), adjustedPaintOffset.y() + baseline), IntPoint(adjustedPaintOffset.x() + offsetWidth(), adjustedPaintOffset.y() + baseline));
+    info.context->drawLine(LayoutPoint(adjustedPaintOffset.x(), adjustedPaintOffset.y() + baseline), LayoutPoint(adjustedPaintOffset.x() + offsetWidth(), adjustedPaintOffset.y() + baseline));
 }
 #endif // ENABLE(DEBUG_MATH_LAYOUT)
 
index 7a3437c..e2eddcb 100644 (file)
@@ -131,7 +131,7 @@ void RenderMathMLFraction::layout()
 
 }
 
-void RenderMathMLFraction::paint(PaintInfo& info, const IntPoint& paintOffset)
+void RenderMathMLFraction::paint(PaintInfo& info, const LayoutPoint& paintOffset)
 {
     RenderMathMLBlock::paint(info, paintOffset);
     if (info.context->paintingDisabled() || info.phase != PaintPhaseForeground)
@@ -140,7 +140,7 @@ void RenderMathMLFraction::paint(PaintInfo& info, const IntPoint& paintOffset)
     if (!firstChild() ||!m_lineThickness)
         return;
 
-    int verticalOffset = 0;
+    LayoutUnit verticalOffset = 0;
     // The children are always RenderMathMLBlock instances
     if (firstChild()->isRenderMathMLBlock()) {
         int adjustForThickness = m_lineThickness > 1 ? int(m_lineThickness / 2) : 1;
@@ -153,7 +153,7 @@ void RenderMathMLFraction::paint(PaintInfo& info, const IntPoint& paintOffset)
             verticalOffset = numerator->offsetHeight();        
     }
     
-    IntPoint adjustedPaintOffset = paintOffset + location();
+    LayoutPoint adjustedPaintOffset = paintOffset + location();
     adjustedPaintOffset.setY(adjustedPaintOffset.y() + verticalOffset);
     
     GraphicsContextStateSaver stateSaver(*info.context);
index 355718a..2d38a20 100644 (file)
@@ -94,7 +94,7 @@ void RenderMathMLRoot::addChild(RenderObject* child, RenderObject* )
     }
 }
     
-void RenderMathMLRoot::paint(PaintInfo& info, const IntPoint& paintOffset)
+void RenderMathMLRoot::paint(PaintInfo& info, const LayoutPoint& paintOffset)
 {
     RenderMathMLBlock::paint(info, paintOffset);
     
@@ -104,17 +104,17 @@ void RenderMathMLRoot::paint(PaintInfo& info, const IntPoint& paintOffset)
     if (!firstChild() || !lastChild())
         return;
 
-    IntPoint adjustedPaintOffset = paintOffset + location();
+    LayoutPoint adjustedPaintOffset = paintOffset + location();
     
     RenderBoxModelObject* indexBox = toRenderBoxModelObject(lastChild());
     
-    int maxHeight = indexBox->offsetHeight();
+    LayoutUnit maxHeight = indexBox->offsetHeight();
     // default to the font size in pixels if we're empty
     if (!maxHeight)
         maxHeight = style()->fontSize();
-    int width = indexBox->offsetWidth();
+    LayoutUnit width = indexBox->offsetWidth();
     
-    int indexWidth = 0;
+    LayoutUnit indexWidth = 0;
     RenderObject* current = firstChild();
     while (current != lastChild()) {
         if (current->isBoxModelObject()) {
@@ -139,7 +139,7 @@ void RenderMathMLRoot::paint(PaintInfo& info, const IntPoint& paintOffset)
     width += topStartShift;
     
     int rootPad = static_cast<int>(gRootPadding * style()->fontSize());
-    int start = adjustedPaintOffset.x() + indexWidth + gRadicalLeftMargin + style()->paddingLeft().value() - rootPad;
+    LayoutUnit start = adjustedPaintOffset.x() + indexWidth + gRadicalLeftMargin + style()->paddingLeft().value() - rootPad;
     adjustedPaintOffset.setY(adjustedPaintOffset.y() + style()->paddingTop().value() - rootPad);
     
     FloatPoint topStart(start - topStartShift, paintOffset.y());
index ca3b5c3..736c6d9 100644 (file)
@@ -66,17 +66,17 @@ RenderMathMLSquareRoot::RenderMathMLSquareRoot(Node *expression)
 {
 }
 
-void RenderMathMLSquareRoot::paint(PaintInfo& info, const IntPoint& paintOffset)
+void RenderMathMLSquareRoot::paint(PaintInfo& info, const LayoutPoint& paintOffset)
 {
     RenderMathMLBlock::paint(info, paintOffset);
    
     if (info.context->paintingDisabled())
         return;
     
-    IntPoint adjustedPaintOffset = paintOffset + location();
+    LayoutPoint adjustedPaintOffset = paintOffset + location();
 
-    int maxHeight = 0;
-    int width = 0;
+    LayoutUnit maxHeight = 0;
+    LayoutUnit width = 0;
     RenderObject* current = firstChild();
     while (current) {
         if (current->isBoxModelObject()) {