Title: [93333] trunk/Source/WebCore
Revision
93333
Author
[email protected]
Date
2011-08-18 12:23:22 -0700 (Thu, 18 Aug 2011)

Log Message

Switch Inline rendering classes to new layout types
https://bugs.webkit.org/show_bug.cgi?id=66239

Reviewed by Eric Seidel.

Converting inline rendering classes to use the LayoutUnit abstraction from ints.

No new tests as no change in functionality.

* rendering/InlineBox.h:
(WebCore::InlineBox::logicalFrameRect):
(WebCore::InlineBox::baselinePosition):
(WebCore::InlineBox::lineHeight):
* rendering/InlineFlowBox.h:
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::logicalOverflowRect):
(WebCore::InlineTextBox::setLogicalOverflowRect):
(WebCore::InlineTextBox::baselinePosition):
(WebCore::InlineTextBox::lineHeight):
* rendering/InlineTextBox.h:
(WebCore::InlineTextBox::logicalTopVisualOverflow):
(WebCore::InlineTextBox::logicalBottomVisualOverflow):
(WebCore::InlineTextBox::logicalLeftVisualOverflow):
(WebCore::InlineTextBox::logicalRightVisualOverflow):
* rendering/RenderInline.cpp:
(WebCore::RenderInline::culledInlineAbsoluteRects):
(WebCore::computeMargin):
(WebCore::RenderInline::culledInlineBoundingBox):
(WebCore::RenderInline::culledInlineVisualOverflowBoundingBox):
(WebCore::RenderInline::linesVisualOverflowBoundingBox):
(WebCore::RenderInline::clippedOverflowRectForRepaint):
(WebCore::RenderInline::rectWithOutlineForRepaint):
(WebCore::RenderInline::computeRectForRepaint):
(WebCore::RenderInline::mapLocalToContainer):
(WebCore::RenderInline::lineHeight):
(WebCore::RenderInline::baselinePosition):
(WebCore::RenderInline::addDashboardRegions):
* rendering/RenderInline.h:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (93332 => 93333)


--- trunk/Source/WebCore/ChangeLog	2011-08-18 19:19:40 UTC (rev 93332)
+++ trunk/Source/WebCore/ChangeLog	2011-08-18 19:23:22 UTC (rev 93333)
@@ -1,3 +1,44 @@
+2011-08-18  Levi Weintraub  <[email protected]>
+
+        Switch Inline rendering classes to new layout types
+        https://bugs.webkit.org/show_bug.cgi?id=66239
+
+        Reviewed by Eric Seidel.
+
+        Converting inline rendering classes to use the LayoutUnit abstraction from ints.
+
+        No new tests as no change in functionality.
+
+        * rendering/InlineBox.h:
+        (WebCore::InlineBox::logicalFrameRect):
+        (WebCore::InlineBox::baselinePosition):
+        (WebCore::InlineBox::lineHeight):
+        * rendering/InlineFlowBox.h:
+        * rendering/InlineTextBox.cpp:
+        (WebCore::InlineTextBox::logicalOverflowRect):
+        (WebCore::InlineTextBox::setLogicalOverflowRect):
+        (WebCore::InlineTextBox::baselinePosition):
+        (WebCore::InlineTextBox::lineHeight):
+        * rendering/InlineTextBox.h:
+        (WebCore::InlineTextBox::logicalTopVisualOverflow):
+        (WebCore::InlineTextBox::logicalBottomVisualOverflow):
+        (WebCore::InlineTextBox::logicalLeftVisualOverflow):
+        (WebCore::InlineTextBox::logicalRightVisualOverflow):
+        * rendering/RenderInline.cpp:
+        (WebCore::RenderInline::culledInlineAbsoluteRects):
+        (WebCore::computeMargin):
+        (WebCore::RenderInline::culledInlineBoundingBox):
+        (WebCore::RenderInline::culledInlineVisualOverflowBoundingBox):
+        (WebCore::RenderInline::linesVisualOverflowBoundingBox):
+        (WebCore::RenderInline::clippedOverflowRectForRepaint):
+        (WebCore::RenderInline::rectWithOutlineForRepaint):
+        (WebCore::RenderInline::computeRectForRepaint):
+        (WebCore::RenderInline::mapLocalToContainer):
+        (WebCore::RenderInline::lineHeight):
+        (WebCore::RenderInline::baselinePosition):
+        (WebCore::RenderInline::addDashboardRegions):
+        * rendering/RenderInline.h:
+
 2011-08-18  Jeffrey Pfau  <[email protected]>
 
         New XML parser: add doctype to DOM tree

Modified: trunk/Source/WebCore/rendering/InlineBox.h (93332 => 93333)


--- trunk/Source/WebCore/rendering/InlineBox.h	2011-08-18 19:19:40 UTC (rev 93332)
+++ trunk/Source/WebCore/rendering/InlineBox.h	2011-08-18 19:23:22 UTC (rev 93333)
@@ -271,10 +271,10 @@
     // The logical height is our extent in the block flow direction, i.e., height for horizontal text and width for vertical text.
     LayoutUnit logicalHeight() const;
 
-    FloatRect logicalFrameRect() const { return isHorizontal() ? IntRect(m_topLeft.x(), m_topLeft.y(), m_logicalWidth, logicalHeight()) : IntRect(m_topLeft.y(), m_topLeft.x(), m_logicalWidth, logicalHeight()); }
+    FloatRect logicalFrameRect() const { return isHorizontal() ? FloatRect(m_topLeft.x(), m_topLeft.y(), m_logicalWidth, logicalHeight()) : FloatRect(m_topLeft.y(), m_topLeft.x(), m_logicalWidth, logicalHeight()); }
 
-    virtual int baselinePosition(FontBaseline baselineType) const { return boxModelObject()->baselinePosition(baselineType, m_firstLine, isHorizontal() ? HorizontalLine : VerticalLine, PositionOnContainingLine); }
-    virtual int lineHeight() const { return boxModelObject()->lineHeight(m_firstLine, isHorizontal() ? HorizontalLine : VerticalLine, PositionOnContainingLine); }
+    virtual LayoutUnit baselinePosition(FontBaseline baselineType) const { return boxModelObject()->baselinePosition(baselineType, m_firstLine, isHorizontal() ? HorizontalLine : VerticalLine, PositionOnContainingLine); }
+    virtual LayoutUnit lineHeight() const { return boxModelObject()->lineHeight(m_firstLine, isHorizontal() ? HorizontalLine : VerticalLine, PositionOnContainingLine); }
     
     virtual int caretMinOffset() const;
     virtual int caretMaxOffset() const;

Modified: trunk/Source/WebCore/rendering/InlineFlowBox.h (93332 => 93333)


--- trunk/Source/WebCore/rendering/InlineFlowBox.h	2011-08-18 19:19:40 UTC (rev 93332)
+++ trunk/Source/WebCore/rendering/InlineFlowBox.h	2011-08-18 19:23:22 UTC (rev 93333)
@@ -248,7 +248,7 @@
         return result;
     }
 
-    void setOverflowFromLogicalRects(const LayoutRect& logicalLayoutOverflow, const IntRect& logicalVisualOverflow, LayoutUnit lineTop, LayoutUnit lineBottom);
+    void setOverflowFromLogicalRects(const LayoutRect& logicalLayoutOverflow, const LayoutRect& logicalVisualOverflow, LayoutUnit lineTop, LayoutUnit lineBottom);
     void setLayoutOverflow(const LayoutRect&, LayoutUnit lineTop, LayoutUnit lineBottom);
     void setVisualOverflow(const LayoutRect&, LayoutUnit lineTop, LayoutUnit lineBottom);
 

Modified: trunk/Source/WebCore/rendering/InlineTextBox.cpp (93332 => 93333)


--- trunk/Source/WebCore/rendering/InlineTextBox.cpp	2011-08-18 19:19:40 UTC (rev 93332)
+++ trunk/Source/WebCore/rendering/InlineTextBox.cpp	2011-08-18 19:23:22 UTC (rev 93333)
@@ -53,7 +53,7 @@
 
 namespace WebCore {
 
-typedef WTF::HashMap<const InlineTextBox*, IntRect> InlineTextBoxOverflowMap;
+typedef WTF::HashMap<const InlineTextBox*, LayoutRect> InlineTextBoxOverflowMap;
 static InlineTextBoxOverflowMap* gTextBoxesWithOverflow;
 
 void InlineTextBox::destroy(RenderArena* arena)
@@ -63,14 +63,14 @@
     InlineBox::destroy(arena);
 }
 
-IntRect InlineTextBox::logicalOverflowRect() const
+LayoutRect InlineTextBox::logicalOverflowRect() const
 {
     if (m_knownToHaveNoOverflow || !gTextBoxesWithOverflow)
         return enclosingIntRect(logicalFrameRect());
     return gTextBoxesWithOverflow->get(this);
 }
 
-void InlineTextBox::setLogicalOverflowRect(const IntRect& rect)
+void InlineTextBox::setLogicalOverflowRect(const LayoutRect& rect)
 {
     ASSERT(!m_knownToHaveNoOverflow);
     if (!gTextBoxesWithOverflow)
@@ -78,7 +78,7 @@
     gTextBoxesWithOverflow->add(this, rect);
 }
 
-int InlineTextBox::baselinePosition(FontBaseline baselineType) const
+LayoutUnit InlineTextBox::baselinePosition(FontBaseline baselineType) const
 {
     if (!isText() || !parent())
         return 0;
@@ -86,8 +86,8 @@
         return parent()->baselinePosition(baselineType);
     return toRenderBoxModelObject(renderer()->parent())->baselinePosition(baselineType, m_firstLine, isHorizontal() ? HorizontalLine : VerticalLine, PositionOnContainingLine);
 }
-    
-int InlineTextBox::lineHeight() const
+
+LayoutUnit InlineTextBox::lineHeight() const
 {
     if (!isText() || !renderer()->parent())
         return 0;

Modified: trunk/Source/WebCore/rendering/InlineTextBox.h (93332 => 93333)


--- trunk/Source/WebCore/rendering/InlineTextBox.h	2011-08-18 19:19:40 UTC (rev 93332)
+++ trunk/Source/WebCore/rendering/InlineTextBox.h	2011-08-18 19:23:22 UTC (rev 93333)
@@ -78,17 +78,17 @@
 
     static inline bool compareByStart(const InlineTextBox* first, const InlineTextBox* second) { return first->start() < second->start(); }
 
-    virtual int baselinePosition(FontBaseline) const;
-    virtual int lineHeight() const;
+    virtual LayoutUnit baselinePosition(FontBaseline) const;
+    virtual LayoutUnit lineHeight() const;
 
     bool getEmphasisMarkPosition(RenderStyle*, TextEmphasisPosition&) const;
 
-    IntRect logicalOverflowRect() const;
-    void setLogicalOverflowRect(const IntRect&);
-    int logicalTopVisualOverflow() const { return logicalOverflowRect().y(); }
-    int logicalBottomVisualOverflow() const { return logicalOverflowRect().maxY(); }
-    int logicalLeftVisualOverflow() const { return logicalOverflowRect().x(); }
-    int logicalRightVisualOverflow() const { return logicalOverflowRect().maxX(); }
+    LayoutRect logicalOverflowRect() const;
+    void setLogicalOverflowRect(const LayoutRect&);
+    LayoutUnit logicalTopVisualOverflow() const { return logicalOverflowRect().y(); }
+    LayoutUnit logicalBottomVisualOverflow() const { return logicalOverflowRect().maxY(); }
+    LayoutUnit logicalLeftVisualOverflow() const { return logicalOverflowRect().x(); }
+    LayoutUnit logicalRightVisualOverflow() const { return logicalOverflowRect().maxX(); }
 
 #ifndef NDEBUG
     virtual void showBox(int = 0) const;

Modified: trunk/Source/WebCore/rendering/RenderInline.cpp (93332 => 93333)


--- trunk/Source/WebCore/rendering/RenderInline.cpp	2011-08-18 19:19:40 UTC (rev 93332)
+++ trunk/Source/WebCore/rendering/RenderInline.cpp	2011-08-18 19:23:22 UTC (rev 93333)
@@ -485,7 +485,7 @@
     }
 }
 
-void RenderInline::culledInlineAbsoluteRects(const RenderInline* container, Vector<IntRect>& rects, const IntSize& offset)
+void RenderInline::culledInlineAbsoluteRects(const RenderInline* container, Vector<LayoutRect>& rects, const LayoutSize& offset)
 {
     if (!culledInlineFirstLineBox()) {
         rects.append(IntRect(offset.width(), offset.height(), 0, 0));
@@ -660,7 +660,7 @@
     if (margin.isFixed())
         return margin.value();
     if (margin.isPercent())
-        return margin.calcMinValue(max(0, renderer->containingBlock()->availableLogicalWidth()));
+        return margin.calcMinValue(max<LayoutUnit>(0, renderer->containingBlock()->availableLogicalWidth()));
     return 0;
 }
 
@@ -837,7 +837,7 @@
             }
         }
     }
-    return enclosingIntRect(result);
+    return enclosingLayoutRect(result);
 }
 
 InlineBox* RenderInline::culledInlineFirstLineBox() const
@@ -888,9 +888,9 @@
     return 0;
 }
 
-IntRect RenderInline::culledInlineVisualOverflowBoundingBox() const
+LayoutRect RenderInline::culledInlineVisualOverflowBoundingBox() const
 {
-    IntRect result(culledInlineBoundingBox(this));
+    LayoutRect result(culledInlineBoundingBox(this));
     bool isHorizontal = style()->isHorizontalWritingMode();
     for (RenderObject* curr = firstChild(); curr; curr = curr->nextSibling()) {
         if (curr->isFloatingOrPositioned())
@@ -900,7 +900,7 @@
         if (curr->isBox()) {
             RenderBox* currBox = toRenderBox(curr);
             if (!currBox->hasSelfPaintingLayer() && currBox->inlineBoxWrapper()) {
-                IntRect logicalRect = currBox->logicalVisualOverflowRectForPropagation(style());
+                LayoutRect logicalRect = currBox->logicalVisualOverflowRectForPropagation(style());
                 if (isHorizontal) {
                     logicalRect.moveBy(currBox->location());
                     result.uniteIfNonZero(logicalRect);
@@ -926,17 +926,17 @@
     return result;
 }
 
-IntRect RenderInline::linesVisualOverflowBoundingBox() const
+LayoutRect RenderInline::linesVisualOverflowBoundingBox() const
 {
     if (!alwaysCreateLineBoxes())
         return culledInlineVisualOverflowBoundingBox();
 
     if (!firstLineBox() || !lastLineBox())
-        return IntRect();
+        return LayoutRect();
 
     // Return the width of the minimal left side and the maximal right side.
-    int logicalLeftSide = numeric_limits<int>::max();
-    int logicalRightSide = numeric_limits<int>::min();
+    LayoutUnit logicalLeftSide = numeric_limits<LayoutUnit>::max();
+    LayoutUnit logicalRightSide = numeric_limits<LayoutUnit>::min();
     for (InlineFlowBox* curr = firstLineBox(); curr; curr = curr->nextLineBox()) {
         logicalLeftSide = min(logicalLeftSide, curr->logicalLeftVisualOverflow());
         logicalRightSide = max(logicalRightSide, curr->logicalRightVisualOverflow());
@@ -945,31 +945,31 @@
     RootInlineBox* firstRootBox = firstLineBox()->root();
     RootInlineBox* lastRootBox = lastLineBox()->root();
     
-    int logicalTop = firstLineBox()->logicalTopVisualOverflow(firstRootBox->lineTop());
-    int logicalWidth = logicalRightSide - logicalLeftSide;
-    int logicalHeight = lastLineBox()->logicalBottomVisualOverflow(lastRootBox->lineBottom()) - logicalTop;
+    LayoutUnit logicalTop = firstLineBox()->logicalTopVisualOverflow(firstRootBox->lineTop());
+    LayoutUnit logicalWidth = logicalRightSide - logicalLeftSide;
+    LayoutUnit logicalHeight = lastLineBox()->logicalBottomVisualOverflow(lastRootBox->lineBottom()) - logicalTop;
     
-    IntRect rect(logicalLeftSide, logicalTop, logicalWidth, logicalHeight);
+    LayoutRect rect(logicalLeftSide, logicalTop, logicalWidth, logicalHeight);
     if (!style()->isHorizontalWritingMode())
         rect = rect.transposedRect();
     return rect;
 }
 
-IntRect RenderInline::clippedOverflowRectForRepaint(RenderBoxModelObject* repaintContainer) const
+LayoutRect RenderInline::clippedOverflowRectForRepaint(RenderBoxModelObject* repaintContainer) const
 {
     // Only run-ins are allowed in here during layout.
     ASSERT(!view() || !view()->layoutStateEnabled() || isRunIn());
 
     if (!firstLineBoxIncludingCulling() && !continuation())
-        return IntRect();
+        return LayoutRect();
 
     // Find our leftmost position.
-    IntRect boundingBox(linesVisualOverflowBoundingBox());
-    int left = boundingBox.x();
-    int top = boundingBox.y();
+    LayoutRect boundingBox(linesVisualOverflowBoundingBox());
+    LayoutUnit left = boundingBox.x();
+    LayoutUnit top = boundingBox.y();
 
     // Now invalidate a rectangle.
-    int ow = style() ? style()->outlineSize() : 0;
+    LayoutUnit ow = style() ? style()->outlineSize() : 0;
     
     // We need to add in the relative position offsets of any inlines (including us) up to our
     // containing block.
@@ -980,7 +980,7 @@
             toRenderInline(inlineFlow)->layer()->relativePositionOffset(left, top);
     }
 
-    IntRect r(-ow + left, -ow + top, boundingBox.width() + ow * 2, boundingBox.height() + ow * 2);
+    LayoutRect r(-ow + left, -ow + top, boundingBox.width() + ow * 2, boundingBox.height() + ow * 2);
 
     if (cb->hasColumns())
         cb->adjustRectForColumns(r);
@@ -989,10 +989,10 @@
         // cb->height() is inaccurate if we're in the middle of a layout of |cb|, so use the
         // layer's size instead.  Even if the layer's size is wrong, the layer itself will repaint
         // anyway if its size does change.
-        IntRect repaintRect(r);
+        LayoutRect repaintRect(r);
         repaintRect.move(-cb->layer()->scrolledContentOffset()); // For overflow:auto/scroll/hidden.
 
-        IntRect boxRect(IntPoint(), cb->layer()->size());
+        LayoutRect boxRect(LayoutPoint(), cb->layer()->size());
         r = intersection(repaintRect, boxRect);
     }
     
@@ -1004,13 +1004,13 @@
     if (ow) {
         for (RenderObject* curr = firstChild(); curr; curr = curr->nextSibling()) {
             if (!curr->isText()) {
-                IntRect childRect = curr->rectWithOutlineForRepaint(repaintContainer, ow);
+                LayoutRect childRect = curr->rectWithOutlineForRepaint(repaintContainer, ow);
                 r.unite(childRect);
             }
         }
 
         if (continuation() && !continuation()->isInline()) {
-            IntRect contRect = continuation()->rectWithOutlineForRepaint(repaintContainer, ow);
+            LayoutRect contRect = continuation()->rectWithOutlineForRepaint(repaintContainer, ow);
             r.unite(contRect);
         }
     }
@@ -1018,9 +1018,9 @@
     return r;
 }
 
-IntRect RenderInline::rectWithOutlineForRepaint(RenderBoxModelObject* repaintContainer, int outlineWidth) const
+LayoutRect RenderInline::rectWithOutlineForRepaint(RenderBoxModelObject* repaintContainer, LayoutUnit outlineWidth) const
 {
-    IntRect r(RenderBoxModelObject::rectWithOutlineForRepaint(repaintContainer, outlineWidth));
+    LayoutRect r(RenderBoxModelObject::rectWithOutlineForRepaint(repaintContainer, outlineWidth));
     for (RenderObject* curr = firstChild(); curr; curr = curr->nextSibling()) {
         if (!curr->isText())
             r.unite(curr->rectWithOutlineForRepaint(repaintContainer, outlineWidth));
@@ -1028,7 +1028,7 @@
     return r;
 }
 
-void RenderInline::computeRectForRepaint(RenderBoxModelObject* repaintContainer, IntRect& rect, bool fixed) const
+void RenderInline::computeRectForRepaint(RenderBoxModelObject* repaintContainer, LayoutRect& rect, bool fixed) const
 {
     if (RenderView* v = view()) {
         // LayoutState is only valid for root-relative repainting
@@ -1051,12 +1051,12 @@
     if (!o)
         return;
 
-    IntPoint topLeft = rect.location();
+    LayoutPoint topLeft = rect.location();
 
     if (o->isBlockFlow() && style()->position() != AbsolutePosition && style()->position() != FixedPosition) {
         RenderBlock* cb = toRenderBlock(o);
         if (cb->hasColumns()) {
-            IntRect repaintRect(topLeft, rect.size());
+            LayoutRect repaintRect(topLeft, rect.size());
             cb->adjustRectForColumns(repaintRect);
             topLeft = repaintRect.location();
             rect = repaintRect;
@@ -1081,8 +1081,8 @@
         // anyway if its size does change.
         topLeft -= containerBox->layer()->scrolledContentOffset(); // For overflow:auto/scroll/hidden.
 
-        IntRect repaintRect(topLeft, rect.size());
-        IntRect boxRect(IntPoint(), containerBox->layer()->size());
+        LayoutRect repaintRect(topLeft, rect.size());
+        LayoutRect boxRect(LayoutPoint(), containerBox->layer()->size());
         rect = intersection(repaintRect, boxRect);
         if (rect.isEmpty())
             return;
@@ -1091,7 +1091,7 @@
 
     if (containerSkipped) {
         // If the repaintContainer is below o, then we need to map the rect into repaintContainer's coordinates.
-        IntSize containerOffset = repaintContainer->offsetFromAncestorContainer(o);
+        LayoutSize containerOffset = repaintContainer->offsetFromAncestorContainer(o);
         rect.move(-containerOffset);
         return;
     }
@@ -1153,7 +1153,7 @@
     if (containerSkipped) {
         // There can't be a transform between repaintContainer and o, because transforms create containers, so it should be safe
         // to just subtract the delta between the repaintContainer and o.
-        IntSize containerOffset = repaintContainer->offsetFromAncestorContainer(o);
+        LayoutSize containerOffset = repaintContainer->offsetFromAncestorContainer(o);
         transformState.move(-containerOffset.width(), -containerOffset.height(), preserve3D ? TransformState::AccumulateTransform : TransformState::FlattenTransform);
         return;
     }
@@ -1271,7 +1271,7 @@
     return flowBox;
 }
 
-int RenderInline::lineHeight(bool firstLine, LineDirectionMode /*direction*/, LinePositionMode /*linePositionMode*/) const
+LayoutUnit RenderInline::lineHeight(bool firstLine, LineDirectionMode /*direction*/, LinePositionMode /*linePositionMode*/) const
 {
     if (firstLine && document()->usesFirstLineRules()) {
         RenderStyle* s = style(firstLine);
@@ -1285,7 +1285,7 @@
     return m_lineHeight;
 }
 
-int RenderInline::baselinePosition(FontBaseline baselineType, bool firstLine, LineDirectionMode direction, LinePositionMode linePositionMode) const
+LayoutUnit RenderInline::baselinePosition(FontBaseline baselineType, bool firstLine, LineDirectionMode direction, LinePositionMode linePositionMode) const
 {
     const FontMetrics& fontMetrics = style(firstLine)->fontMetrics();
     return fontMetrics.ascent(baselineType) + (lineHeight(firstLine, direction, linePositionMode) - fontMetrics.height()) / 2;
@@ -1511,13 +1511,13 @@
     for (i = 0; i < count; i++) {
         StyleDashboardRegion styleRegion = styleRegions[i];
 
-        IntRect linesBoundingBox = this->linesBoundingBox();
-        int w = linesBoundingBox.width();
-        int h = linesBoundingBox.height();
+        LayoutRect linesBoundingBox = this->linesBoundingBox();
+        LayoutUnit w = linesBoundingBox.width();
+        LayoutUnit h = linesBoundingBox.height();
 
         DashboardRegionValue region;
         region.label = styleRegion.label;
-        region.bounds = IntRect(linesBoundingBox.x() + styleRegion.offset.left().value(),
+        region.bounds = LayoutRect(linesBoundingBox.x() + styleRegion.offset.left().value(),
                                 linesBoundingBox.y() + styleRegion.offset.top().value(),
                                 w - styleRegion.offset.left().value() - styleRegion.offset.right().value(),
                                 h - styleRegion.offset.top().value() - styleRegion.offset.bottom().value());

Modified: trunk/Source/WebCore/rendering/RenderInline.h (93332 => 93333)


--- trunk/Source/WebCore/rendering/RenderInline.h	2011-08-18 19:19:40 UTC (rev 93332)
+++ trunk/Source/WebCore/rendering/RenderInline.h	2011-08-18 19:23:22 UTC (rev 93333)
@@ -52,7 +52,7 @@
     virtual LayoutSize offsetFromContainer(RenderObject*, const LayoutPoint&) const;
 
     LayoutRect linesBoundingBox() const;
-    IntRect linesVisualOverflowBoundingBox() const;
+    LayoutRect linesVisualOverflowBoundingBox() const;
 
     InlineFlowBox* createAndAppendInlineFlowBox();
 
@@ -99,10 +99,10 @@
     virtual bool isRenderInline() const { return true; }
 
     FloatRect culledInlineBoundingBox(const RenderInline* container) const;
-    IntRect culledInlineVisualOverflowBoundingBox() const;
+    LayoutRect culledInlineVisualOverflowBoundingBox() const;
     InlineBox* culledInlineFirstLineBox() const;
     InlineBox* culledInlineLastLineBox() const;
-    void culledInlineAbsoluteRects(const RenderInline* container, Vector<IntRect>&, const IntSize&);
+    void culledInlineAbsoluteRects(const RenderInline* container, Vector<LayoutRect>&, const LayoutSize&);
     void culledInlineAbsoluteQuads(const RenderInline* container, Vector<FloatQuad>&);
 
     void addChildToContinuation(RenderObject* newChild, RenderObject* beforeChild);
@@ -126,9 +126,9 @@
     virtual LayoutUnit offsetWidth() const { return linesBoundingBox().width(); }
     virtual LayoutUnit offsetHeight() const { return linesBoundingBox().height(); }
 
-    virtual IntRect clippedOverflowRectForRepaint(RenderBoxModelObject* repaintContainer) const;
-    virtual IntRect rectWithOutlineForRepaint(RenderBoxModelObject* repaintContainer, int outlineWidth) const;
-    virtual void computeRectForRepaint(RenderBoxModelObject* repaintContainer, IntRect&, bool fixed) const;
+    virtual LayoutRect clippedOverflowRectForRepaint(RenderBoxModelObject* repaintContainer) const;
+    virtual LayoutRect rectWithOutlineForRepaint(RenderBoxModelObject* repaintContainer, LayoutUnit outlineWidth) const;
+    virtual void computeRectForRepaint(RenderBoxModelObject* repaintContainer, LayoutRect&, bool fixed) const;
 
     virtual void mapLocalToContainer(RenderBoxModelObject* repaintContainer, bool fixed, bool useTransforms, TransformState&, bool* wasFixed = 0) const;
     virtual void mapAbsoluteToLocalPoint(bool fixed, bool useTransforms, TransformState&) const;
@@ -145,8 +145,8 @@
 
     virtual void dirtyLinesFromChangedChild(RenderObject* child) { m_lineBoxes.dirtyLinesFromChangedChild(this, child); }
 
-    virtual int lineHeight(bool firstLine, LineDirectionMode, LinePositionMode = PositionOnContainingLine) const;
-    virtual int baselinePosition(FontBaseline, bool firstLine, LineDirectionMode, LinePositionMode = PositionOnContainingLine) const;
+    virtual LayoutUnit lineHeight(bool firstLine, LineDirectionMode, LinePositionMode = PositionOnContainingLine) const;
+    virtual LayoutUnit baselinePosition(FontBaseline, bool firstLine, LineDirectionMode, LinePositionMode = PositionOnContainingLine) const;
     
     virtual void childBecameNonInline(RenderObject* child);
 
@@ -169,7 +169,7 @@
     RenderObjectChildList m_children;
     RenderLineBoxList m_lineBoxes;   // All of the line boxes created for this inline flow.  For example, <i>Hello<br>world.</i> will have two <i> line boxes.
 
-    mutable int m_lineHeight : 31;
+    mutable LayoutUnit m_lineHeight;
     bool m_alwaysCreateLineBoxes : 1;
 };
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to