2011-07-01 Levi Weintraub <leviw@chromium.org>
authorleviw@chromium.org <leviw@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 2 Jul 2011 00:16:52 +0000 (00:16 +0000)
committerleviw@chromium.org <leviw@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 2 Jul 2011 00:16:52 +0000 (00:16 +0000)
        Switch primary virtual layout functions to new layout types
        https://bugs.webkit.org/show_bug.cgi?id=63852

        Reviewed by Eric Seidel.

        Switching the primary overloaded layout functions over to the new layout unit abstraction.

        No new tests, no functionality changes.

        * html/shadow/MediaControlElements.cpp:
        (WebCore::RenderMediaVolumeSliderContainer::layout):
        * page/FrameView.cpp:
        (WebCore::FrameView::layout):
        * rendering/AutoTableLayout.cpp:
        (WebCore::AutoTableLayout::layout):
        * rendering/FixedTableLayout.cpp:
        (WebCore::FixedTableLayout::layout):
        * rendering/RenderBox.cpp:
        (WebCore::RenderBox::layout):
        * rendering/RenderFrameSet.cpp:
        (WebCore::RenderFrameSet::layout):
        * rendering/RenderMedia.cpp:
        (WebCore::RenderMedia::layout):
        * rendering/RenderRubyRun.cpp:
        (WebCore::RenderRubyRun::layout):
        * rendering/RenderScrollbarPart.cpp:
        (WebCore::RenderScrollbarPart::layout):
        * rendering/RenderSlider.cpp:
        (WebCore::RenderSlider::layout):
        * rendering/RenderTable.cpp:
        (WebCore::RenderTable::layout):
        * rendering/RenderTableRow.cpp:
        (WebCore::RenderTableRow::layout):
        * rendering/RenderTableSection.cpp:
        (WebCore::RenderTableSection::layout):
        * rendering/RenderTextControlSingleLine.cpp:
        (WebCore::RenderTextControlSingleLine::layout):
        * rendering/RenderView.cpp:
        (WebCore::RenderView::layout):
        * rendering/RenderView.h:
        (WebCore::RenderView::layoutDelta):
        (WebCore::RenderView::addLayoutDelta):
        * rendering/mathml/RenderMathMLRoot.cpp:
        (WebCore::RenderMathMLRoot::layout):
        * rendering/mathml/RenderMathMLRow.cpp:
        (WebCore::RenderMathMLRow::layout):
        * rendering/mathml/RenderMathMLSquareRoot.cpp:
        (WebCore::RenderMathMLSquareRoot::layout):
        * rendering/mathml/RenderMathMLSubSup.cpp:
        (WebCore::RenderMathMLSubSup::layout):
        * rendering/mathml/RenderMathMLUnderOver.cpp:
        (WebCore::RenderMathMLUnderOver::layout):

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

22 files changed:
Source/WebCore/ChangeLog
Source/WebCore/html/shadow/MediaControlElements.cpp
Source/WebCore/page/FrameView.cpp
Source/WebCore/rendering/AutoTableLayout.cpp
Source/WebCore/rendering/FixedTableLayout.cpp
Source/WebCore/rendering/RenderBox.cpp
Source/WebCore/rendering/RenderFrameSet.cpp
Source/WebCore/rendering/RenderMedia.cpp
Source/WebCore/rendering/RenderRubyRun.cpp
Source/WebCore/rendering/RenderScrollbarPart.cpp
Source/WebCore/rendering/RenderSlider.cpp
Source/WebCore/rendering/RenderTable.cpp
Source/WebCore/rendering/RenderTableRow.cpp
Source/WebCore/rendering/RenderTableSection.cpp
Source/WebCore/rendering/RenderTextControlSingleLine.cpp
Source/WebCore/rendering/RenderView.cpp
Source/WebCore/rendering/RenderView.h
Source/WebCore/rendering/mathml/RenderMathMLRoot.cpp
Source/WebCore/rendering/mathml/RenderMathMLRow.cpp
Source/WebCore/rendering/mathml/RenderMathMLSquareRoot.cpp
Source/WebCore/rendering/mathml/RenderMathMLSubSup.cpp
Source/WebCore/rendering/mathml/RenderMathMLUnderOver.cpp

index cd56db4..d2b07b5 100644 (file)
@@ -1,3 +1,58 @@
+2011-07-01  Levi Weintraub  <leviw@chromium.org>
+
+        Switch primary virtual layout functions to new layout types
+        https://bugs.webkit.org/show_bug.cgi?id=63852
+
+        Reviewed by Eric Seidel.
+
+        Switching the primary overloaded layout functions over to the new layout unit abstraction.
+
+        No new tests, no functionality changes.
+
+        * html/shadow/MediaControlElements.cpp:
+        (WebCore::RenderMediaVolumeSliderContainer::layout):
+        * page/FrameView.cpp:
+        (WebCore::FrameView::layout):
+        * rendering/AutoTableLayout.cpp:
+        (WebCore::AutoTableLayout::layout):
+        * rendering/FixedTableLayout.cpp:
+        (WebCore::FixedTableLayout::layout):
+        * rendering/RenderBox.cpp:
+        (WebCore::RenderBox::layout):
+        * rendering/RenderFrameSet.cpp:
+        (WebCore::RenderFrameSet::layout):
+        * rendering/RenderMedia.cpp:
+        (WebCore::RenderMedia::layout):
+        * rendering/RenderRubyRun.cpp:
+        (WebCore::RenderRubyRun::layout):
+        * rendering/RenderScrollbarPart.cpp:
+        (WebCore::RenderScrollbarPart::layout):
+        * rendering/RenderSlider.cpp:
+        (WebCore::RenderSlider::layout):
+        * rendering/RenderTable.cpp:
+        (WebCore::RenderTable::layout):
+        * rendering/RenderTableRow.cpp:
+        (WebCore::RenderTableRow::layout):
+        * rendering/RenderTableSection.cpp:
+        (WebCore::RenderTableSection::layout):
+        * rendering/RenderTextControlSingleLine.cpp:
+        (WebCore::RenderTextControlSingleLine::layout):
+        * rendering/RenderView.cpp:
+        (WebCore::RenderView::layout):
+        * rendering/RenderView.h:
+        (WebCore::RenderView::layoutDelta):
+        (WebCore::RenderView::addLayoutDelta):
+        * rendering/mathml/RenderMathMLRoot.cpp:
+        (WebCore::RenderMathMLRoot::layout):
+        * rendering/mathml/RenderMathMLRow.cpp:
+        (WebCore::RenderMathMLRow::layout):
+        * rendering/mathml/RenderMathMLSquareRoot.cpp:
+        (WebCore::RenderMathMLSquareRoot::layout):
+        * rendering/mathml/RenderMathMLSubSup.cpp:
+        (WebCore::RenderMathMLSubSup::layout):
+        * rendering/mathml/RenderMathMLUnderOver.cpp:
+        (WebCore::RenderMathMLUnderOver::layout):
+
 2011-07-01  Sam Weinig  <sam@webkit.org>
 
         Reduce parser nesting cap to 512
index 41c1d7f..2c03db5 100644 (file)
@@ -274,7 +274,7 @@ void RenderMediaVolumeSliderContainer::layout()
 
     LayoutStateDisabler layoutStateDisabler(view());
 
-    IntPoint offset = theme()->volumeSliderOffsetFromMuteButton(buttonBox, IntSize(width(), height()));
+    LayoutPoint offset = theme()->volumeSliderOffsetFromMuteButton(buttonBox, size());
     setX(offset.x() + buttonBox->offsetLeft());
     setY(offset.y() + buttonBox->offsetTop());
 }
index 79264b4..567473e 100644 (file)
@@ -968,7 +968,7 @@ void FrameView::layout(bool allowSubtree)
 
                 m_firstLayout = false;
                 m_firstLayoutCallbackPending = true;
-                m_lastLayoutSize = IntSize(width(), height());
+                m_lastLayoutSize = LayoutSize(width(), height());
                 m_lastZoomFactor = root->style()->zoom();
 
                 // Set the initial vMode to AlwaysOn if we're auto.
@@ -984,9 +984,9 @@ void FrameView::layout(bool allowSubtree)
                 setScrollbarModes(hMode, vMode);
         }
 
-        IntSize oldSize = m_size;
+        LayoutSize oldSize = m_size;
 
-        m_size = IntSize(layoutWidth(), layoutHeight());
+        m_size = LayoutSize(layoutWidth(), layoutHeight());
 
         if (oldSize != m_size) {
             m_doFullRepaint = true;
@@ -1032,7 +1032,7 @@ void FrameView::layout(bool allowSubtree)
 
     // Now update the positions of all layers.
     beginDeferredRepaints();
-    IntPoint cachedOffset;
+    LayoutPoint cachedOffset;
     if (m_doFullRepaint)
         root->view()->repaint(); // FIXME: This isn't really right, since the RenderView doesn't fully encompass the visibleContentRect(). It just happens
                                  // to work out most of the time, since first layouts and printing don't have you scrolled anywhere.
index c5618ed..286d5bc 100644 (file)
@@ -477,8 +477,8 @@ void AutoTableLayout::insertSpanCell(RenderTableCell *cell)
 void AutoTableLayout::layout()
 {
     // table layout based on the values collected in the layout structure.
-    int tableLogicalWidth = m_table->logicalWidth() - m_table->bordersPaddingAndSpacingInRowDirection();
-    int available = tableLogicalWidth;
+    LayoutUnit tableLogicalWidth = m_table->logicalWidth() - m_table->bordersPaddingAndSpacingInRowDirection();
+    LayoutUnit available = tableLogicalWidth;
     size_t nEffCols = m_table->numEffCols();
 
     if (nEffCols != m_layoutStruct.size()) {
@@ -501,7 +501,7 @@ void AutoTableLayout::layout()
 
     // fill up every cell with its minWidth
     for (size_t i = 0; i < nEffCols; ++i) {
-        int cellLogicalWidth = m_layoutStruct[i].effectiveMinLogicalWidth;
+        LayoutUnit cellLogicalWidth = m_layoutStruct[i].effectiveMinLogicalWidth;
         m_layoutStruct[i].computedLogicalWidth = cellLogicalWidth;
         available -= cellLogicalWidth;
         Length& logicalWidth = m_layoutStruct[i].effectiveLogicalWidth;
@@ -537,21 +537,21 @@ void AutoTableLayout::layout()
         for (size_t i = 0; i < nEffCols; ++i) {
             Length& logicalWidth = m_layoutStruct[i].effectiveLogicalWidth;
             if (logicalWidth.isPercent()) {
-                int cellLogicalWidth = max(m_layoutStruct[i].effectiveMinLogicalWidth, logicalWidth.calcMinValue(tableLogicalWidth));
+                LayoutUnit cellLogicalWidth = max(m_layoutStruct[i].effectiveMinLogicalWidth, logicalWidth.calcMinValue(tableLogicalWidth));
                 available += m_layoutStruct[i].computedLogicalWidth - cellLogicalWidth;
                 m_layoutStruct[i].computedLogicalWidth = cellLogicalWidth;
             }
         }
         if (totalPercent > 100) {
             // remove overallocated space from the last columns
-            int excess = tableLogicalWidth * (totalPercent - 100) / 100;
+            LayoutUnit excess = tableLogicalWidth * (totalPercent - 100) / 100;
             for (int i = nEffCols - 1; i >= 0; --i) {
                 if (m_layoutStruct[i].effectiveLogicalWidth.isPercent()) {
-                    int cellLogicalWidth = m_layoutStruct[i].computedLogicalWidth;
-                    int reduction = min(cellLogicalWidth,  excess);
+                    LayoutUnit cellLogicalWidth = m_layoutStruct[i].computedLogicalWidth;
+                    LayoutUnit reduction = min(cellLogicalWidth,  excess);
                     // the lines below might look inconsistent, but that's the way it's handled in mozilla
                     excess -= reduction;
-                    int newLogicalWidth = max(m_layoutStruct[i].effectiveMinLogicalWidth, cellLogicalWidth - reduction);
+                    LayoutUnit newLogicalWidth = max(m_layoutStruct[i].effectiveMinLogicalWidth, cellLogicalWidth - reduction);
                     available += cellLogicalWidth - newLogicalWidth;
                     m_layoutStruct[i].computedLogicalWidth = newLogicalWidth;
                 }
@@ -576,7 +576,7 @@ void AutoTableLayout::layout()
             Length& logicalWidth = m_layoutStruct[i].effectiveLogicalWidth;
             if (logicalWidth.isRelative() && logicalWidth.value() != 0) {
                 // width=0* gets effMinWidth.
-                int cellLogicalWidth = logicalWidth.value() * tableLogicalWidth / totalRelative;
+                LayoutUnit cellLogicalWidth = logicalWidth.value() * tableLogicalWidth / totalRelative;
                 available += m_layoutStruct[i].computedLogicalWidth - cellLogicalWidth;
                 m_layoutStruct[i].computedLogicalWidth = cellLogicalWidth;
             }
@@ -589,7 +589,7 @@ void AutoTableLayout::layout()
         for (size_t i = 0; i < nEffCols; ++i) {
             Length& logicalWidth = m_layoutStruct[i].effectiveLogicalWidth;
             if (logicalWidth.isAuto() && totalAuto && !m_layoutStruct[i].emptyCellsOnly) {
-                int cellLogicalWidth = max(m_layoutStruct[i].computedLogicalWidth, static_cast<int>(available * static_cast<float>(m_layoutStruct[i].effectiveMaxLogicalWidth) / totalAuto));
+                LayoutUnit cellLogicalWidth = max(m_layoutStruct[i].computedLogicalWidth, static_cast<LayoutUnit>(available * static_cast<float>(m_layoutStruct[i].effectiveMaxLogicalWidth) / totalAuto));
                 available -= cellLogicalWidth;
                 totalAuto -= m_layoutStruct[i].effectiveMaxLogicalWidth;
                 m_layoutStruct[i].computedLogicalWidth = cellLogicalWidth;
@@ -602,7 +602,7 @@ void AutoTableLayout::layout()
         for (size_t i = 0; i < nEffCols; ++i) {
             Length& logicalWidth = m_layoutStruct[i].effectiveLogicalWidth;
             if (logicalWidth.isFixed()) {
-                int cellLogicalWidth = static_cast<int>(available * static_cast<float>(m_layoutStruct[i].effectiveMaxLogicalWidth) / totalFixed);
+                LayoutUnit cellLogicalWidth = static_cast<LayoutUnit>(available * static_cast<float>(m_layoutStruct[i].effectiveMaxLogicalWidth) / totalFixed);
                 available -= cellLogicalWidth;
                 totalFixed -= m_layoutStruct[i].effectiveMaxLogicalWidth;
                 m_layoutStruct[i].computedLogicalWidth += cellLogicalWidth;
@@ -615,7 +615,7 @@ void AutoTableLayout::layout()
         for (size_t i = 0; i < nEffCols; ++i) {
             Length& logicalWidth = m_layoutStruct[i].effectiveLogicalWidth;
             if (logicalWidth.isPercent()) {
-                int cellLogicalWidth = available * logicalWidth.percent() / totalPercent;
+                LayoutUnit cellLogicalWidth = available * logicalWidth.percent() / totalPercent;
                 available -= cellLogicalWidth;
                 totalPercent -= logicalWidth.percent();
                 m_layoutStruct[i].computedLogicalWidth += cellLogicalWidth;
@@ -633,7 +633,7 @@ void AutoTableLayout::layout()
             // variable columns with empty cells only don't get any width
             if (m_layoutStruct[i].effectiveLogicalWidth.isAuto() && m_layoutStruct[i].emptyCellsOnly)
                 continue;
-            int cellLogicalWidth = available / total;
+            LayoutUnit cellLogicalWidth = available / total;
             available -= cellLogicalWidth;
             total--;
             m_layoutStruct[i].computedLogicalWidth += cellLogicalWidth;
@@ -650,7 +650,7 @@ void AutoTableLayout::layout()
         // (4) Percent
         // This is basically the reverse of how we grew the cells.
         if (available < 0) {
-            int logicalWidthBeyondMin = 0;
+            LayoutUnit logicalWidthBeyondMin = 0;
             for (int i = nEffCols - 1; i >= 0; --i) {
                 Length& logicalWidth = m_layoutStruct[i].effectiveLogicalWidth;
                 if (logicalWidth.isAuto())
@@ -660,8 +660,8 @@ void AutoTableLayout::layout()
             for (int i = nEffCols - 1; i >= 0 && logicalWidthBeyondMin > 0; --i) {
                 Length& logicalWidth = m_layoutStruct[i].effectiveLogicalWidth;
                 if (logicalWidth.isAuto()) {
-                    int minMaxDiff = m_layoutStruct[i].computedLogicalWidth - m_layoutStruct[i].effectiveMinLogicalWidth;
-                    int reduce = available * minMaxDiff / logicalWidthBeyondMin;
+                    LayoutUnit minMaxDiff = m_layoutStruct[i].computedLogicalWidth - m_layoutStruct[i].effectiveMinLogicalWidth;
+                    LayoutUnit reduce = available * minMaxDiff / logicalWidthBeyondMin;
                     m_layoutStruct[i].computedLogicalWidth += reduce;
                     available -= reduce;
                     logicalWidthBeyondMin -= minMaxDiff;
@@ -672,7 +672,7 @@ void AutoTableLayout::layout()
         }
 
         if (available < 0) {
-            int logicalWidthBeyondMin = 0;
+            LayoutUnit logicalWidthBeyondMin = 0;
             for (int i = nEffCols - 1; i >= 0; --i) {
                 Length& logicalWidth = m_layoutStruct[i].effectiveLogicalWidth;
                 if (logicalWidth.isRelative())
@@ -682,8 +682,8 @@ void AutoTableLayout::layout()
             for (int i = nEffCols - 1; i >= 0 && logicalWidthBeyondMin > 0; --i) {
                 Length& logicalWidth = m_layoutStruct[i].effectiveLogicalWidth;
                 if (logicalWidth.isRelative()) {
-                    int minMaxDiff = m_layoutStruct[i].computedLogicalWidth - m_layoutStruct[i].effectiveMinLogicalWidth;
-                    int reduce = available * minMaxDiff / logicalWidthBeyondMin;
+                    LayoutUnit minMaxDiff = m_layoutStruct[i].computedLogicalWidth - m_layoutStruct[i].effectiveMinLogicalWidth;
+                    LayoutUnit reduce = available * minMaxDiff / logicalWidthBeyondMin;
                     m_layoutStruct[i].computedLogicalWidth += reduce;
                     available -= reduce;
                     logicalWidthBeyondMin -= minMaxDiff;
@@ -694,7 +694,7 @@ void AutoTableLayout::layout()
         }
 
         if (available < 0) {
-            int logicalWidthBeyondMin = 0;
+            LayoutUnit logicalWidthBeyondMin = 0;
             for (int i = nEffCols - 1; i >= 0; --i) {
                 Length& logicalWidth = m_layoutStruct[i].effectiveLogicalWidth;
                 if (logicalWidth.isFixed())
@@ -704,8 +704,8 @@ void AutoTableLayout::layout()
             for (int i = nEffCols - 1; i >= 0 && logicalWidthBeyondMin > 0; --i) {
                 Length& logicalWidth = m_layoutStruct[i].effectiveLogicalWidth;
                 if (logicalWidth.isFixed()) {
-                    int minMaxDiff = m_layoutStruct[i].computedLogicalWidth - m_layoutStruct[i].effectiveMinLogicalWidth;
-                    int reduce = available * minMaxDiff / logicalWidthBeyondMin;
+                    LayoutUnit minMaxDiff = m_layoutStruct[i].computedLogicalWidth - m_layoutStruct[i].effectiveMinLogicalWidth;
+                    LayoutUnit reduce = available * minMaxDiff / logicalWidthBeyondMin;
                     m_layoutStruct[i].computedLogicalWidth += reduce;
                     available -= reduce;
                     logicalWidthBeyondMin -= minMaxDiff;
@@ -716,7 +716,7 @@ void AutoTableLayout::layout()
         }
 
         if (available < 0) {
-            int logicalWidthBeyondMin = 0;
+            LayoutUnit logicalWidthBeyondMin = 0;
             for (int i = nEffCols - 1; i >= 0; --i) {
                 Length& logicalWidth = m_layoutStruct[i].effectiveLogicalWidth;
                 if (logicalWidth.isPercent())
@@ -726,8 +726,8 @@ void AutoTableLayout::layout()
             for (int i = nEffCols-1; i >= 0 && logicalWidthBeyondMin > 0; i--) {
                 Length& logicalWidth = m_layoutStruct[i].effectiveLogicalWidth;
                 if (logicalWidth.isPercent()) {
-                    int minMaxDiff = m_layoutStruct[i].computedLogicalWidth - m_layoutStruct[i].effectiveMinLogicalWidth;
-                    int reduce = available * minMaxDiff / logicalWidthBeyondMin;
+                    LayoutUnit minMaxDiff = m_layoutStruct[i].computedLogicalWidth - m_layoutStruct[i].effectiveMinLogicalWidth;
+                    LayoutUnit reduce = available * minMaxDiff / logicalWidthBeyondMin;
                     m_layoutStruct[i].computedLogicalWidth += reduce;
                     available -= reduce;
                     logicalWidthBeyondMin -= minMaxDiff;
@@ -738,7 +738,7 @@ void AutoTableLayout::layout()
         }
     }
 
-    int pos = 0;
+    LayoutUnit pos = 0;
     for (size_t i = 0; i < nEffCols; ++i) {
         m_table->columnPositions()[i] = pos;
         pos += m_layoutStruct[i].computedLogicalWidth + m_table->hBorderSpacing();
index 3bf8f5d..de0796e 100644 (file)
@@ -228,14 +228,14 @@ void FixedTableLayout::computePreferredLogicalWidths(LayoutUnit& minWidth, Layou
 
 void FixedTableLayout::layout()
 {
-    int tableLogicalWidth = m_table->logicalWidth() - m_table->bordersPaddingAndSpacingInRowDirection();
+    LayoutUnit tableLogicalWidth = m_table->logicalWidth() - m_table->bordersPaddingAndSpacingInRowDirection();
     int nEffCols = m_table->numEffCols();
     Vector<int> calcWidth(nEffCols, 0);
 
     int numAuto = 0;
-    int autoSpan = 0;
-    int totalFixedWidth = 0;
-    int totalPercentWidth = 0;
+    LayoutUnit autoSpan = 0;
+    LayoutUnit totalFixedWidth = 0;
+    LayoutUnit totalPercentWidth = 0;
     float totalPercent = 0;
 
     // Compute requirements and try to satisfy fixed and percent widths.
@@ -256,8 +256,8 @@ void FixedTableLayout::layout()
         }
     }
 
-    int hspacing = m_table->hBorderSpacing();
-    int totalWidth = totalFixedWidth + totalPercentWidth;
+    LayoutUnit hspacing = m_table->hBorderSpacing();
+    LayoutUnit totalWidth = totalFixedWidth + totalPercentWidth;
     if (!numAuto || totalWidth > tableLogicalWidth) {
         // If there are no auto columns, or if the total is too wide, take
         // what we have and scale it to fit as necessary.
@@ -285,12 +285,12 @@ void FixedTableLayout::layout()
         }
     } else {
         // Divide the remaining width among the auto columns.
-        int remainingWidth = tableLogicalWidth - totalFixedWidth - totalPercentWidth - hspacing * (autoSpan - numAuto);
+        LayoutUnit remainingWidth = tableLogicalWidth - totalFixedWidth - totalPercentWidth - hspacing * (autoSpan - numAuto);
         int lastAuto = 0;
         for (int i = 0; i < nEffCols; i++) {
             if (m_width[i].isAuto()) {
-                int span = m_table->spanOfEffCol(i);
-                int w = remainingWidth * span / autoSpan;
+                LayoutUnit span = m_table->spanOfEffCol(i);
+                LayoutUnit w = remainingWidth * span / autoSpan;
                 calcWidth[i] = w + hspacing * (span - 1);
                 remainingWidth -= w;
                 if (!remainingWidth)
@@ -308,10 +308,10 @@ void FixedTableLayout::layout()
 
     if (totalWidth < tableLogicalWidth) {
         // Spread extra space over columns.
-        int remainingWidth = tableLogicalWidth - totalWidth;
+        LayoutUnit remainingWidth = tableLogicalWidth - totalWidth;
         int total = nEffCols;
         while (total) {
-            int w = remainingWidth / total;
+            LayoutUnit w = remainingWidth / total;
             remainingWidth -= w;
             calcWidth[--total] += w;
         }
@@ -319,12 +319,12 @@ void FixedTableLayout::layout()
             calcWidth[nEffCols - 1] += remainingWidth;
     }
     
-    int pos = 0;
+    LayoutUnit pos = 0;
     for (int i = 0; i < nEffCols; i++) {
         m_table->columnPositions()[i] = pos;
         pos += calcWidth[i] + hspacing;
     }
-    int colPositionsSize = m_table->columnPositions().size();
+    LayoutUnit colPositionsSize = m_table->columnPositions().size();
     if (colPositionsSize > 0)
         m_table->columnPositions()[colPositionsSize - 1] = pos;
 }
index 83e623e..3ae5f97 100644 (file)
@@ -391,7 +391,7 @@ void RenderBox::layout()
         return;
     }
 
-    LayoutStateMaintainer statePusher(view(), this, IntSize(x(), y()), style()->isFlippedBlocksWritingMode());
+    LayoutStateMaintainer statePusher(view(), this, locationOffset(), style()->isFlippedBlocksWritingMode());
     while (child) {
         child->layoutIfNeeded();
         ASSERT(!child->needsLayout());
index 7076ccc..18cab2f 100644 (file)
@@ -461,7 +461,7 @@ void RenderFrameSet::layout()
     ASSERT(needsLayout());
 
     bool doFullRepaint = selfNeedsLayout() && checkForRepaintDuringLayout();
-    IntRect oldBounds;
+    LayoutRect oldBounds;
     if (doFullRepaint)
         oldBounds = absoluteClippedOverflowRect();
 
@@ -478,7 +478,7 @@ void RenderFrameSet::layout()
         m_cols.resize(cols);
     }
 
-    int borderThickness = frameSet()->border();
+    LayoutUnit borderThickness = frameSet()->border();
     layOutAxis(m_rows, frameSet()->rowLengths(), height() - (rows - 1) * borderThickness);
     layOutAxis(m_cols, frameSet()->colLengths(), width() - (cols - 1) * borderThickness);
 
@@ -493,7 +493,7 @@ void RenderFrameSet::layout()
 
     if (doFullRepaint) {
         view()->repaintViewRectangle(oldBounds);
-        IntRect newBounds = absoluteClippedOverflowRect();
+        LayoutRect newBounds = absoluteClippedOverflowRect();
         if (newBounds != oldBounds)
             view()->repaintViewRectangle(newBounds);
     }
index dc8d2dd..be4adde 100644 (file)
@@ -57,7 +57,7 @@ HTMLMediaElement* RenderMedia::mediaElement() const
 
 void RenderMedia::layout()
 {
-    IntSize oldSize = contentBoxRect().size();
+    LayoutSize oldSize = contentBoxRect().size();
 
     RenderImage::layout();
 
@@ -65,16 +65,16 @@ void RenderMedia::layout()
     if (!controlsRenderer)
         return;
 
-    IntSize newSize = contentBoxRect().size();
+    LayoutSize newSize = contentBoxRect().size();
     if (newSize == oldSize && !controlsRenderer->needsLayout())
         return;
 
     // When calling layout() on a child node, a parent must either push a LayoutStateMaintainter, or 
     // instantiate LayoutStateDisabler. Since using a LayoutStateMaintainer is slightly more efficient,
     // and this method will be called many times per second during playback, use a LayoutStateMaintainer:
-    LayoutStateMaintainer statePusher(view(), this, IntSize(x(), y()), hasTransform() || hasReflection() || style()->isFlippedBlocksWritingMode());
+    LayoutStateMaintainer statePusher(view(), this, locationOffset(), hasTransform() || hasReflection() || style()->isFlippedBlocksWritingMode());
 
-    controlsRenderer->setLocation(IntPoint(borderLeft(), borderTop()) + IntSize(paddingLeft(), paddingTop()));
+    controlsRenderer->setLocation(LayoutPoint(borderLeft(), borderTop()) + LayoutSize(paddingLeft(), paddingTop()));
     controlsRenderer->style()->setHeight(Length(newSize.height(), Fixed));
     controlsRenderer->style()->setWidth(Length(newSize.width(), Fixed));
     controlsRenderer->setNeedsLayout(true, false);
index 63d2bd4..bd5fdb7 100644 (file)
@@ -232,8 +232,8 @@ void RenderRubyRun::layout()
     if (!rt)
         return;
     
-    int lastLineRubyTextBottom = rt->logicalHeight();
-    int firstLineRubyTextTop = 0;
+    LayoutUnit lastLineRubyTextBottom = rt->logicalHeight();
+    LayoutUnit firstLineRubyTextTop = 0;
     RootInlineBox* rootBox = rt->lastRootBox();
     if (rootBox) {
         // In order to align, we have to ignore negative leading.
@@ -242,7 +242,7 @@ void RenderRubyRun::layout()
     }
 
     if (!style()->isFlippedLinesWritingMode()) {
-        int firstLineTop = 0;
+        LayoutUnit firstLineTop = 0;
         if (RenderRubyBase* rb = rubyBase()) {
             RootInlineBox* rootBox = rb->firstRootBox();
             if (rootBox)
@@ -252,7 +252,7 @@ void RenderRubyRun::layout()
         
         rt->setLogicalTop(-lastLineRubyTextBottom + firstLineTop);
     } else {
-        int lastLineBottom = logicalHeight();
+        LayoutUnit lastLineBottom = logicalHeight();
         if (RenderRubyBase* rb = rubyBase()) {
             RootInlineBox* rootBox = rb->lastRootBox();
             if (rootBox)
index 0169bad..cda30ed 100644 (file)
@@ -48,7 +48,7 @@ RenderScrollbarPart::~RenderScrollbarPart()
 
 void RenderScrollbarPart::layout()
 {
-    setLocation(IntPoint()); // We don't worry about positioning ourselves.  We're just determining our minimum width/height.
+    setLocation(LayoutPoint()); // We don't worry about positioning ourselves. We're just determining our minimum width/height.
     if (m_scrollbar->orientation() == HorizontalScrollbar)
         layoutHorizontalPart();
     else
index cce2a67..215246f 100644 (file)
@@ -101,7 +101,7 @@ void RenderSlider::layout()
     RenderBox* thumbBox = sliderThumbElementOf(node())->renderBox();
     if (!thumbBox)
         return;
-    int heightDiff = thumbBox->height() - contentHeight();
+    LayoutUnit heightDiff = thumbBox->height() - contentHeight();
     if (heightDiff > 0)
         thumbBox->setY(thumbBox->y() - (heightDiff / 2));
 }
index d447a5d..846403f 100644 (file)
@@ -274,14 +274,14 @@ void RenderTable::layout()
     recalcSectionsIfNeeded();
         
     LayoutRepainter repainter(*this, checkForRepaintDuringLayout());
-    LayoutStateMaintainer statePusher(view(), this, IntSize(x(), y()), style()->isFlippedBlocksWritingMode());
+    LayoutStateMaintainer statePusher(view(), this, locationOffset(), style()->isFlippedBlocksWritingMode());
 
     setLogicalHeight(0);
     m_overflow.clear();
 
     initMaxMarginValues();
     
-    int oldLogicalWidth = logicalWidth();
+    LayoutUnit oldLogicalWidth = logicalWidth();
     computeLogicalWidth();
 
     if (m_caption && logicalWidth() != oldLogicalWidth)
@@ -296,8 +296,8 @@ void RenderTable::layout()
 
     setCellLogicalWidths();
 
-    int totalSectionLogicalHeight = 0;
-    int oldTableLogicalTop = m_caption ? m_caption->logicalHeight() + m_caption->marginBefore() + m_caption->marginAfter() : 0;
+    LayoutUnit totalSectionLogicalHeight = 0;
+    LayoutUnit oldTableLogicalTop = m_caption ? m_caption->logicalHeight() + m_caption->marginBefore() + m_caption->marginAfter() : 0;
 
     bool collapsing = collapseBorders();
 
@@ -323,7 +323,7 @@ void RenderTable::layout()
     // section down (it is quite unlikely that any of the following sections
     // did not shift).
     bool sectionMoved = false;
-    int movedSectionLogicalTop = 0;
+    LayoutUnit movedSectionLogicalTop = 0;
 
     // FIXME: Collapse caption margin.
     if (m_caption && m_caption->style()->captionSide() != CAPBOTTOM) {
@@ -334,8 +334,8 @@ void RenderTable::layout()
         }
     }
 
-    int borderAndPaddingBefore = borderBefore() + (collapsing ? 0 : paddingBefore());
-    int borderAndPaddingAfter = borderAfter() + (collapsing ? 0 : paddingAfter());
+    LayoutUnit borderAndPaddingBefore = borderBefore() + (collapsing ? 0 : paddingBefore());
+    LayoutUnit borderAndPaddingAfter = borderAfter() + (collapsing ? 0 : paddingAfter());
 
     setLogicalHeight(logicalHeight() + borderAndPaddingBefore);
 
@@ -343,7 +343,7 @@ void RenderTable::layout()
         computeLogicalHeight();
 
     Length logicalHeightLength = style()->logicalHeight();
-    int computedLogicalHeight = 0;
+    LayoutUnit computedLogicalHeight = 0;
     if (logicalHeightLength.isFixed()) {
         // Tables size as though CSS height includes border/padding.
         computedLogicalHeight = logicalHeightLength.value() - (borderAndPaddingBefore + borderAndPaddingAfter);
@@ -363,7 +363,7 @@ void RenderTable::layout()
         setLogicalHeight(logicalHeight() + computedLogicalHeight);
     }
 
-    int sectionLogicalLeft = style()->isLeftToRightDirection() ? borderStart() : borderEnd();
+    LayoutUnit sectionLogicalLeft = style()->isLeftToRightDirection() ? borderStart() : borderEnd();
     if (!collapsing)
         sectionLogicalLeft += style()->isLeftToRightDirection() ? paddingStart() : paddingEnd();
 
@@ -374,7 +374,7 @@ void RenderTable::layout()
             sectionMoved = true;
             movedSectionLogicalTop = min(logicalHeight(), section->logicalTop()) + (style()->isHorizontalWritingMode() ? section->minYVisualOverflow() : section->minXVisualOverflow());
         }
-        section->setLogicalLocation(IntPoint(sectionLogicalLeft, logicalHeight()));
+        section->setLogicalLocation(LayoutPoint(sectionLogicalLeft, logicalHeight()));
 
         setLogicalHeight(logicalHeight() + section->logicalHeight());
         section = sectionBelow(section);
@@ -405,9 +405,9 @@ void RenderTable::layout()
     // Repaint with our new bounds if they are different from our old bounds.
     if (!didFullRepaint && sectionMoved) {
         if (style()->isHorizontalWritingMode())
-            repaintRectangle(IntRect(minXVisualOverflow(), movedSectionLogicalTop, maxXVisualOverflow() - minXVisualOverflow(), maxYVisualOverflow() - movedSectionLogicalTop));
+            repaintRectangle(LayoutRect(minXVisualOverflow(), movedSectionLogicalTop, maxXVisualOverflow() - minXVisualOverflow(), maxYVisualOverflow() - movedSectionLogicalTop));
         else
-            repaintRectangle(IntRect(movedSectionLogicalTop, minYVisualOverflow(), maxXVisualOverflow() - movedSectionLogicalTop, maxYVisualOverflow() - minYVisualOverflow()));
+            repaintRectangle(LayoutRect(movedSectionLogicalTop, minYVisualOverflow(), maxXVisualOverflow() - movedSectionLogicalTop, maxYVisualOverflow() - minYVisualOverflow()));
     }
 
     setNeedsLayout(false);
index 9ec477b..54701f1 100644 (file)
@@ -135,7 +135,7 @@ void RenderTableRow::layout()
     ASSERT(needsLayout());
 
     // Table rows do not add translation.
-    LayoutStateMaintainer statePusher(view(), this, IntSize(), style()->isFlippedBlocksWritingMode());
+    LayoutStateMaintainer statePusher(view(), this, LayoutSize(), style()->isFlippedBlocksWritingMode());
 
     bool paginated = view()->layoutState()->isPaginated();
                 
index aa9c125..6fed41f 100644 (file)
@@ -397,7 +397,7 @@ void RenderTableSection::layout()
 {
     ASSERT(needsLayout());
 
-    LayoutStateMaintainer statePusher(view(), this, IntSize(x(), y()), style()->isFlippedBlocksWritingMode());
+    LayoutStateMaintainer statePusher(view(), this, locationOffset(), style()->isFlippedBlocksWritingMode());
     for (RenderObject* child = children()->firstChild(); child; child = child->nextSibling()) {
         if (child->isTableRow()) {
             child->layoutIfNeeded();
index 93ebddf..5afd8f1 100644 (file)
@@ -269,10 +269,10 @@ void RenderTextControlSingleLine::layout()
     // and type=search if the text height is taller than the contentHeight()
     // because of compability.
 
-    int oldHeight = height();
+    LayoutUnit oldHeight = height();
     computeLogicalHeight();
 
-    int oldWidth = width();
+    LayoutUnit oldWidth = width();
     computeLogicalWidth();
 
     bool relayoutChildren = oldHeight != height() || oldWidth != width();
@@ -284,10 +284,10 @@ void RenderTextControlSingleLine::layout()
     RenderBox* containerRenderer = container ? container->renderBox() : 0;
 
     // Set the text block height
-    int desiredHeight = textBlockHeight();
-    int currentHeight = innerTextRenderer->height();
+    LayoutUnit desiredHeight = textBlockHeight();
+    LayoutUnit currentHeight = innerTextRenderer->height();
 
-    int heightLimit = (inputElement()->isSearchField() || !container) ? height() : contentHeight();
+    LayoutUnit heightLimit = (inputElement()->isSearchField() || !container) ? height() : contentHeight();
     if (currentHeight > heightLimit) {
         if (desiredHeight != currentHeight)
             relayoutChildren = true;
@@ -298,7 +298,7 @@ void RenderTextControlSingleLine::layout()
     // The container might be taller because of decoration elements.
     if (containerRenderer) {
         containerRenderer->layoutIfNeeded();
-        int containerHeight = containerRenderer->height();
+        LayoutUnit containerHeight = containerRenderer->height();
         if (containerHeight > heightLimit) {
             containerRenderer->style()->setHeight(Length(heightLimit, Fixed));
             relayoutChildren = true;
@@ -313,19 +313,19 @@ void RenderTextControlSingleLine::layout()
     // Center the child block vertically
     currentHeight = innerTextRenderer->height();
     if (!container && currentHeight != contentHeight()) {
-        int heightDiff = currentHeight - contentHeight();
+        LayoutUnit heightDiff = currentHeight - contentHeight();
         innerTextRenderer->setY(innerTextRenderer->y() - (heightDiff / 2 + heightDiff % 2));
     } else if (inputElement()->isSearchField() && containerRenderer && containerRenderer->height() > contentHeight()) {
         // A quirk for find-in-page box on Safari Windows.
         // http://webkit.org/b/63157
-        int heightDiff = containerRenderer->height() - contentHeight();
+        LayoutUnit heightDiff = containerRenderer->height() - contentHeight();
         containerRenderer->setY(containerRenderer->y() - (heightDiff / 2 + heightDiff % 2));
     }
 
     // Ignores the paddings for the inner spin button.
     if (RenderBox* innerSpinBox = innerSpinButtonElement() ? innerSpinButtonElement()->renderBox() : 0) {
         RenderBox* parentBox = innerSpinBox->parentBox();
-        innerSpinBox->setLocation(IntPoint(parentBox->width() - innerSpinBox->width() + paddingRight(), -paddingTop()));
+        innerSpinBox->setLocation(LayoutPoint(parentBox->width() - innerSpinBox->width() + paddingRight(), -paddingTop()));
         innerSpinBox->setHeight(height() - borderTop() - borderBottom());
     }
 }
index ab6227c..fa2899b 100644 (file)
@@ -129,7 +129,7 @@ void RenderView::layout()
     if (needsLayout())
         RenderBlock::layout();
 
-    ASSERT(layoutDelta() == IntSize());
+    ASSERT(layoutDelta() == LayoutSize());
     ASSERT(m_layoutStateDisableCount == 0);
     ASSERT(m_layoutState == &state);
     m_layoutState = 0;
index 15114d2..6658a50 100644 (file)
@@ -103,11 +103,11 @@ public:
     // layoutDelta is used transiently during layout to store how far an object has moved from its
     // last layout location, in order to repaint correctly.
     // If we're doing a full repaint m_layoutState will be 0, but in that case layoutDelta doesn't matter.
-    IntSize layoutDelta() const
+    LayoutSize layoutDelta() const
     {
-        return m_layoutState ? m_layoutState->m_layoutDelta : IntSize();
+        return m_layoutState ? m_layoutState->m_layoutDelta : LayoutSize();
     }
-    void addLayoutDelta(const IntSize& delta) 
+    void addLayoutDelta(const LayoutSize& delta) 
     {
         if (m_layoutState)
             m_layoutState->m_layoutDelta += delta;
index 23a001a..355718a 100644 (file)
@@ -199,7 +199,7 @@ void RenderMathMLRoot::layout()
     if (!firstChild() || !lastChild())
         return;
 
-    int maxHeight = toRenderBoxModelObject(lastChild())->offsetHeight();
+    LayoutUnit maxHeight = toRenderBoxModelObject(lastChild())->offsetHeight();
     
     RenderObject* current = lastChild()->firstChild();
     if (current)
@@ -209,17 +209,17 @@ void RenderMathMLRoot::layout()
         maxHeight = style()->fontSize();
     
     // Base height above which the shape of the root changes
-    int thresholdHeight = static_cast<int>(gThresholdBaseHeight * style()->fontSize());
-    int topStartShift = 0;
+    LayoutUnit thresholdHeight = static_cast<LayoutUnit>(gThresholdBaseHeight * style()->fontSize());
+    LayoutUnit topStartShift = 0;
     
     if (maxHeight > thresholdHeight && thresholdHeight) {
         float shift = (maxHeight - thresholdHeight) / static_cast<float>(thresholdHeight);
         if (shift > 1.)
             shift = 1.0f;
-        int frontWidth = static_cast<int>(style()->fontSize() * gRadicalWidth);
-        topStartShift = static_cast<int>(gRadicalBottomPointXPos * frontWidth * shift);
+        LayoutUnit frontWidth = static_cast<LayoutUnit>(style()->fontSize() * gRadicalWidth);
+        topStartShift = static_cast<LayoutUnit>(gRadicalBottomPointXPos * frontWidth * shift);
         
-        style()->setPaddingBottom(Length(static_cast<int>(gRootBottomPadding * style()->fontSize()), Fixed));
+        style()->setPaddingBottom(Length(static_cast<LayoutUnit>(gRootBottomPadding * style()->fontSize()), Fixed));
     }
     
     // Positioning of the index
@@ -230,13 +230,13 @@ void RenderMathMLRoot::layout()
     if (!indexBox)
         return;
     
-    int indexShift = indexBox->offsetWidth() + topStartShift;
-    int radicalHeight = static_cast<int>((1 - gRadicalTopLeftPointYPos) * maxHeight);
-    int rootMarginTop = radicalHeight + style()->paddingBottom().value() + indexBox->offsetHeight() - (maxHeight + static_cast<int>(gRootPadding * style()->fontSize()));
+    LayoutUnit indexShift = indexBox->offsetWidth() + topStartShift;
+    LayoutUnit radicalHeight = static_cast<LayoutUnit>((1 - gRadicalTopLeftPointYPos) * maxHeight);
+    LayoutUnit rootMarginTop = radicalHeight + style()->paddingBottom().value() + indexBox->offsetHeight() - (maxHeight + static_cast<LayoutUnit>(gRootPadding * style()->fontSize()));
     
     style()->setPaddingLeft(Length(indexShift, Fixed));
     if (rootMarginTop > 0)
-        style()->setPaddingTop(Length(rootMarginTop + static_cast<int>(gRootPadding * style()->fontSize()), Fixed));
+        style()->setPaddingTop(Length(rootMarginTop + static_cast<LayoutUnit>(gRootPadding * style()->fontSize()), Fixed));
     
     setNeedsLayout(true);
     setPreferredLogicalWidthsDirty(true, false);
index ad54846..a615e52 100644 (file)
@@ -66,12 +66,12 @@ void RenderMathMLRow::layout()
 {
     RenderBlock::layout();
     
-    int maxHeight = 0;
+    LayoutUnit maxHeight = 0;
     int childCount = 0;
     int operatorCount = 0;
 
     // Calculate the non-operator max height of the row.
-    int operatorHeight = 0;
+    LayoutUnit operatorHeight = 0;
     for (RenderObject* current = firstChild(); current; current = current->nextSibling()) {
         childCount++;
         if (current->isRenderMathMLBlock()) {
index b431bbc..ca3b5c3 100644 (file)
@@ -160,7 +160,7 @@ void RenderMathMLSquareRoot::paint(PaintInfo& info, const IntPoint& paintOffset)
 
 void RenderMathMLSquareRoot::layout()
 {
-    int maxHeight = 0;
+    LayoutUnit maxHeight = 0;
     
     RenderObject* current = firstChild();
     while (current) {
@@ -179,8 +179,8 @@ void RenderMathMLSquareRoot::layout()
         maxHeight = style()->fontSize();
 
     
-    if (maxHeight > static_cast<int>(gThresholdBaseHeight * style()->fontSize()))
-        style()->setPaddingBottom(Length(static_cast<int>(gRootBottomPadding * style()->fontSize()), Fixed));
+    if (maxHeight > static_cast<LayoutUnit>(gThresholdBaseHeight * style()->fontSize()))
+        style()->setPaddingBottom(Length(static_cast<LayoutUnit>(gRootBottomPadding * style()->fontSize()), Fixed));
 
     
     RenderBlock::layout();
index f223acd..3a8a36c 100644 (file)
@@ -162,15 +162,15 @@ void RenderMathMLSubSup::layout()
     
     if (m_kind == SubSup) {
         if (RenderObject* base = firstChild()) {
-            int maxHeight = 0;
+            LayoutUnit maxHeight = 0;
             RenderObject* current = base->firstChild();
             while (current) {
-                int height = getBoxModelObjectHeight(current);
+                LayoutUnit height = getBoxModelObjectHeight(current);
                 if (height > maxHeight)
                     maxHeight = height;
                 current = current->nextSibling();
             }
-            int heightDiff = m_scripts ? (m_scripts->offsetHeight() - maxHeight) / 2 : 0;
+            LayoutUnit heightDiff = m_scripts ? (m_scripts->offsetHeight() - maxHeight) / 2 : 0;
             if (heightDiff < 0) 
                 heightDiff = 0;
             base->style()->setPaddingTop(Length(heightDiff, Fixed));
index 04ce9d2..8fcef5c 100644 (file)
@@ -159,7 +159,7 @@ void RenderMathMLUnderOver::layout()
             if (!over->firstChild() || !over->firstChild()->isBoxModelObject())
                 break;
             
-            int overSpacing = static_cast<int>(gOverSpacingAdjustment * (getOffsetHeight(over) - toRenderBoxModelObject(over->firstChild())->baselinePosition(AlphabeticBaseline, true, HorizontalLine)));
+            LayoutUnit overSpacing = static_cast<LayoutUnit>(gOverSpacingAdjustment * (getOffsetHeight(over) - toRenderBoxModelObject(over->firstChild())->baselinePosition(AlphabeticBaseline, true, HorizontalLine)));
             
             // base row wrapper
             base = over->nextSibling();
@@ -181,7 +181,7 @@ void RenderMathMLUnderOver::layout()
         // base row wrapper
         base = firstChild();
         if (base) {
-            int baseHeight = getOffsetHeight(base);
+            LayoutUnit baseHeight = getOffsetHeight(base);
             // actual base
             base = base->firstChild();
             if (!base || !base->isBoxModelObject())
@@ -189,7 +189,7 @@ void RenderMathMLUnderOver::layout()
             
             // FIXME: We need to look at the space between a single maximum height of
             //        the line boxes and the baseline and squeeze them together
-            int underSpacing = baseHeight - toRenderBoxModelObject(base)->baselinePosition(AlphabeticBaseline, true, HorizontalLine);
+            LayoutUnit underSpacing = baseHeight - toRenderBoxModelObject(base)->baselinePosition(AlphabeticBaseline, true, HorizontalLine);
             
             // adjust the base's intrusion into the under
             RenderObject* under = lastChild();
@@ -210,7 +210,7 @@ void RenderMathMLUnderOver::layout()
             // FIXME: bases that ascend higher than the line box intrude into the over
             if (!over->firstChild() || !over->firstChild()->isBoxModelObject())
                 break;
-            int overSpacing = static_cast<int>(gOverSpacingAdjustment * (getOffsetHeight(over) - toRenderBoxModelObject(over->firstChild())->baselinePosition(AlphabeticBaseline, true, HorizontalLine)));
+            LayoutUnit overSpacing = static_cast<LayoutUnit>(gOverSpacingAdjustment * (getOffsetHeight(over) - toRenderBoxModelObject(over->firstChild())->baselinePosition(AlphabeticBaseline, true, HorizontalLine)));
             
             // base row wrapper
             base = over->nextSibling();
@@ -222,7 +222,7 @@ void RenderMathMLUnderOver::layout()
                 // We need to calculate the baseline of the base versus the start of the under block and
                 // adjust the placement of the under block.
                 
-                int baseHeight = getOffsetHeight(base);
+                LayoutUnit baseHeight = getOffsetHeight(base);
                 // actual base
                 base = base->firstChild();
                 if (!base || !base->isBoxModelObject())
@@ -230,7 +230,7 @@ void RenderMathMLUnderOver::layout()
 
                 // FIXME: We need to look at the space between a single maximum height of
                 //        the line boxes and the baseline and squeeze them together
-                int underSpacing = baseHeight - toRenderBoxModelObject(base)->baselinePosition(AlphabeticBaseline, true, HorizontalLine);
+                LayoutUnit underSpacing = baseHeight - toRenderBoxModelObject(base)->baselinePosition(AlphabeticBaseline, true, HorizontalLine);
                 
                 RenderObject* under = lastChild();
                 if (under && under->firstChild() && under->firstChild()->isRenderInline() && underSpacing > 0)