https://bugs.webkit.org/show_bug.cgi?id=46454, rename a bunch of the width and height...
authorhyatt@apple.com <hyatt@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 24 Sep 2010 07:26:31 +0000 (07:26 +0000)
committerhyatt@apple.com <hyatt@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 24 Sep 2010 07:26:31 +0000 (07:26 +0000)
Reviewed by Maciej Stachowiak.

calcReplacedWidth -> computeReplacedWidth

calcHorizontalMargins -> computeInlineDirectionMargins

calcVerticalMargins -> computeBlockDirectionMargins

calcWidthUsing -> computeLogicalWidthUsing

calcHeightUsing -> computeLogicalHeightUsing

calcReplacedHeight/HeightUsing -> computeReplacedHeight/HeightUsing

calcAbsoluteHorizontalValues -> computePositionedLogicalWidthUsing

calcAbsoluteVerticalValues -> computePositionedLogicalHeightUsing

calcAbsoluteHorizontal -> computePositionedLogicalWIdth

calcAbsoluteVertical -> computePositionedLogicalHeight

calcAbsoluteHorizontalReplaced -> computePositionedLogicalWidthReplaced

calcAbsoluteVerticalReplaced -> computePositionedLogicalHeightReplaced

calcBorderBoxWidth/Height -> computeBorderBoxLogicalWidth/LogicalHeight

calcContentBoxWidth/Height -> computeContentBoxLogicalWidth/LogicalHeight

shouldCalculateSizeAsReplaced -> shouldComputeSizeAsReplaced

calcPercentageHeight -> computePercentageLogicalHeight

* rendering/AutoTableLayout.cpp:
(WebCore::AutoTableLayout::recalcColumn):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::adjustPositionedBlock):
(WebCore::RenderBlock::determineHorizontalPosition):
(WebCore::RenderBlock::layoutBlockChild):
(WebCore::RenderBlock::insertFloatingObject):
(WebCore::RenderBlock::calcPrefWidths):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::computeBorderBoxLogicalWidth):
(WebCore::RenderBox::computeBorderBoxLogicalHeight):
(WebCore::RenderBox::computeContentBoxLogicalWidth):
(WebCore::RenderBox::computeContentBoxLogicalHeight):
(WebCore::RenderBox::computeLogicalWidth):
(WebCore::RenderBox::computeLogicalWidthUsing):
(WebCore::RenderBox::computeInlineDirectionMargins):
(WebCore::RenderBox::computeLogicalHeight):
(WebCore::RenderBox::computeLogicalHeightUsing):
(WebCore::RenderBox::computePercentageLogicalHeight):
(WebCore::RenderBox::computeReplacedWidth):
(WebCore::RenderBox::computeReplacedWidthUsing):
(WebCore::RenderBox::computeReplacedHeight):
(WebCore::RenderBox::computeReplacedHeightUsing):
(WebCore::RenderBox::availableHeightUsing):
(WebCore::RenderBox::computeBlockDirectionMargins):
(WebCore::RenderBox::computePositionedLogicalWidth):
(WebCore::RenderBox::computePositionedLogicalWidthUsing):
(WebCore::RenderBox::computePositionedLogicalHeight):
(WebCore::RenderBox::computePositionedLogicalHeightUsing):
(WebCore::RenderBox::computePositionedLogicalWidthReplaced):
(WebCore::RenderBox::computePositionedLogicalHeightReplaced):
* rendering/RenderBox.h:
(WebCore::RenderBox::shouldComputeSizeAsReplaced):
* rendering/RenderDataGrid.cpp:
(WebCore::RenderDataGrid::calcPrefWidths):
* rendering/RenderFileUploadControl.cpp:
(WebCore::RenderFileUploadControl::calcPrefWidths):
* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::calcPrefWidths):
(WebCore::RenderFlexibleBox::layoutHorizontalBox):
(WebCore::RenderFlexibleBox::layoutVerticalBox):
* rendering/RenderImage.cpp:
(WebCore::RenderImage::computeReplacedWidth):
(WebCore::RenderImage::computeReplacedHeight):
(WebCore::RenderImage::calcAspectRatioWidth):
(WebCore::RenderImage::calcAspectRatioHeight):
* rendering/RenderImage.h:
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::calcPrefWidths):
* rendering/RenderMenuList.cpp:
(WebCore::RenderMenuList::calcPrefWidths):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::container):
* rendering/RenderObject.h:
(WebCore::RenderObject::computeBlockDirectionMargins):
* rendering/RenderReplaced.cpp:
(WebCore::RenderReplaced::computeReplacedWidth):
(WebCore::RenderReplaced::computeReplacedHeight):
(WebCore::RenderReplaced::calcAspectRatioWidth):
(WebCore::RenderReplaced::calcAspectRatioHeight):
(WebCore::RenderReplaced::calcPrefWidths):
* rendering/RenderReplaced.h:
* rendering/RenderSVGRoot.cpp:
(WebCore::RenderSVGRoot::calcPrefWidths):
(WebCore::RenderSVGRoot::computeReplacedWidth):
(WebCore::RenderSVGRoot::computeReplacedHeight):
* rendering/RenderSVGRoot.h:
* rendering/RenderSlider.cpp:
(WebCore::RenderSlider::calcPrefWidths):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::computeLogicalWidth):
(WebCore::RenderTable::layout):
* rendering/RenderTableRow.cpp:
(WebCore::RenderTableRow::layout):
* rendering/RenderTextControl.cpp:
(WebCore::RenderTextControl::calcPrefWidths):
* rendering/RenderVideo.cpp:
(WebCore::RenderVideo::computeReplacedWidth):
(WebCore::RenderVideo::computeReplacedHeight):
* rendering/RenderVideo.h:

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

24 files changed:
WebCore/ChangeLog
WebCore/rendering/AutoTableLayout.cpp
WebCore/rendering/RenderBlock.cpp
WebCore/rendering/RenderBox.cpp
WebCore/rendering/RenderBox.h
WebCore/rendering/RenderDataGrid.cpp
WebCore/rendering/RenderFileUploadControl.cpp
WebCore/rendering/RenderFlexibleBox.cpp
WebCore/rendering/RenderImage.cpp
WebCore/rendering/RenderImage.h
WebCore/rendering/RenderListBox.cpp
WebCore/rendering/RenderMenuList.cpp
WebCore/rendering/RenderObject.cpp
WebCore/rendering/RenderObject.h
WebCore/rendering/RenderReplaced.cpp
WebCore/rendering/RenderReplaced.h
WebCore/rendering/RenderSVGRoot.cpp
WebCore/rendering/RenderSVGRoot.h
WebCore/rendering/RenderSlider.cpp
WebCore/rendering/RenderTable.cpp
WebCore/rendering/RenderTableRow.cpp
WebCore/rendering/RenderTextControl.cpp
WebCore/rendering/RenderVideo.cpp
WebCore/rendering/RenderVideo.h

index b0acb9b..40f3c70 100644 (file)
@@ -1,3 +1,122 @@
+2010-09-24  David Hyatt  <hyatt@apple.com>
+
+        Reviewed by Maciej Stachowiak.
+
+        https://bugs.webkit.org/show_bug.cgi?id=46454, rename a bunch of the width and height calculation methods.
+
+        calcReplacedWidth -> computeReplacedWidth
+
+        calcHorizontalMargins -> computeInlineDirectionMargins
+
+        calcVerticalMargins -> computeBlockDirectionMargins
+
+        calcWidthUsing -> computeLogicalWidthUsing
+
+        calcHeightUsing -> computeLogicalHeightUsing
+
+        calcReplacedHeight/HeightUsing -> computeReplacedHeight/HeightUsing
+
+        calcAbsoluteHorizontalValues -> computePositionedLogicalWidthUsing
+
+        calcAbsoluteVerticalValues -> computePositionedLogicalHeightUsing
+
+        calcAbsoluteHorizontal -> computePositionedLogicalWIdth
+
+        calcAbsoluteVertical -> computePositionedLogicalHeight
+
+        calcAbsoluteHorizontalReplaced -> computePositionedLogicalWidthReplaced
+
+        calcAbsoluteVerticalReplaced -> computePositionedLogicalHeightReplaced
+
+        calcBorderBoxWidth/Height -> computeBorderBoxLogicalWidth/LogicalHeight
+
+        calcContentBoxWidth/Height -> computeContentBoxLogicalWidth/LogicalHeight
+
+        shouldCalculateSizeAsReplaced -> shouldComputeSizeAsReplaced
+
+        calcPercentageHeight -> computePercentageLogicalHeight
+
+        * rendering/AutoTableLayout.cpp:
+        (WebCore::AutoTableLayout::recalcColumn):
+        * rendering/RenderBlock.cpp:
+        (WebCore::RenderBlock::adjustPositionedBlock):
+        (WebCore::RenderBlock::determineHorizontalPosition):
+        (WebCore::RenderBlock::layoutBlockChild):
+        (WebCore::RenderBlock::insertFloatingObject):
+        (WebCore::RenderBlock::calcPrefWidths):
+        * rendering/RenderBox.cpp:
+        (WebCore::RenderBox::computeBorderBoxLogicalWidth):
+        (WebCore::RenderBox::computeBorderBoxLogicalHeight):
+        (WebCore::RenderBox::computeContentBoxLogicalWidth):
+        (WebCore::RenderBox::computeContentBoxLogicalHeight):
+        (WebCore::RenderBox::computeLogicalWidth):
+        (WebCore::RenderBox::computeLogicalWidthUsing):
+        (WebCore::RenderBox::computeInlineDirectionMargins):
+        (WebCore::RenderBox::computeLogicalHeight):
+        (WebCore::RenderBox::computeLogicalHeightUsing):
+        (WebCore::RenderBox::computePercentageLogicalHeight):
+        (WebCore::RenderBox::computeReplacedWidth):
+        (WebCore::RenderBox::computeReplacedWidthUsing):
+        (WebCore::RenderBox::computeReplacedHeight):
+        (WebCore::RenderBox::computeReplacedHeightUsing):
+        (WebCore::RenderBox::availableHeightUsing):
+        (WebCore::RenderBox::computeBlockDirectionMargins):
+        (WebCore::RenderBox::computePositionedLogicalWidth):
+        (WebCore::RenderBox::computePositionedLogicalWidthUsing):
+        (WebCore::RenderBox::computePositionedLogicalHeight):
+        (WebCore::RenderBox::computePositionedLogicalHeightUsing):
+        (WebCore::RenderBox::computePositionedLogicalWidthReplaced):
+        (WebCore::RenderBox::computePositionedLogicalHeightReplaced):
+        * rendering/RenderBox.h:
+        (WebCore::RenderBox::shouldComputeSizeAsReplaced):
+        * rendering/RenderDataGrid.cpp:
+        (WebCore::RenderDataGrid::calcPrefWidths):
+        * rendering/RenderFileUploadControl.cpp:
+        (WebCore::RenderFileUploadControl::calcPrefWidths):
+        * rendering/RenderFlexibleBox.cpp:
+        (WebCore::RenderFlexibleBox::calcPrefWidths):
+        (WebCore::RenderFlexibleBox::layoutHorizontalBox):
+        (WebCore::RenderFlexibleBox::layoutVerticalBox):
+        * rendering/RenderImage.cpp:
+        (WebCore::RenderImage::computeReplacedWidth):
+        (WebCore::RenderImage::computeReplacedHeight):
+        (WebCore::RenderImage::calcAspectRatioWidth):
+        (WebCore::RenderImage::calcAspectRatioHeight):
+        * rendering/RenderImage.h:
+        * rendering/RenderListBox.cpp:
+        (WebCore::RenderListBox::calcPrefWidths):
+        * rendering/RenderMenuList.cpp:
+        (WebCore::RenderMenuList::calcPrefWidths):
+        * rendering/RenderObject.cpp:
+        (WebCore::RenderObject::container):
+        * rendering/RenderObject.h:
+        (WebCore::RenderObject::computeBlockDirectionMargins):
+        * rendering/RenderReplaced.cpp:
+        (WebCore::RenderReplaced::computeReplacedWidth):
+        (WebCore::RenderReplaced::computeReplacedHeight):
+        (WebCore::RenderReplaced::calcAspectRatioWidth):
+        (WebCore::RenderReplaced::calcAspectRatioHeight):
+        (WebCore::RenderReplaced::calcPrefWidths):
+        * rendering/RenderReplaced.h:
+        * rendering/RenderSVGRoot.cpp:
+        (WebCore::RenderSVGRoot::calcPrefWidths):
+        (WebCore::RenderSVGRoot::computeReplacedWidth):
+        (WebCore::RenderSVGRoot::computeReplacedHeight):
+        * rendering/RenderSVGRoot.h:
+        * rendering/RenderSlider.cpp:
+        (WebCore::RenderSlider::calcPrefWidths):
+        * rendering/RenderTable.cpp:
+        (WebCore::RenderTable::computeLogicalWidth):
+        (WebCore::RenderTable::layout):
+        * rendering/RenderTableRow.cpp:
+        (WebCore::RenderTableRow::layout):
+        * rendering/RenderTextControl.cpp:
+        (WebCore::RenderTextControl::calcPrefWidths):
+        * rendering/RenderVideo.cpp:
+        (WebCore::RenderVideo::computeReplacedWidth):
+        (WebCore::RenderVideo::computeReplacedHeight):
+        * rendering/RenderVideo.h:
+
 2010-09-23  David Hyatt  <hyatt@apple.com>
 
         Reviewed by Sam Weinig.
index d72102d..1cf785c 100644 (file)
@@ -97,7 +97,7 @@ void AutoTableLayout::recalcColumn(int effCol)
                     case Fixed:
                         // ignore width=0
                         if (w.value() > 0 && (int)l.width.type() != Percent) {
-                            int wval = cell->calcBorderBoxWidth(w.value());
+                            int wval = cell->computeBorderBoxLogicalWidth(w.value());
                             if (l.width.isFixed()) {
                                 // Nav/IE weirdness
                                 if ((wval > l.width.value()) ||
index 67c4b9f..4d2ffec 100644 (file)
@@ -1330,7 +1330,7 @@ void RenderBlock::adjustPositionedBlock(RenderBox* child, const MarginInfo& marg
     if (child->style()->hasStaticY()) {
         int y = height();
         if (!marginInfo.canCollapseWithTop()) {
-            child->calcVerticalMargins();
+            child->computeBlockDirectionMargins();
             int marginTop = child->marginTop();
             int collapsedTopPos = marginInfo.posMargin();
             int collapsedTopNeg = marginInfo.negMargin();
@@ -1659,9 +1659,9 @@ void RenderBlock::determineHorizontalPosition(RenderBox* child)
                 // The object is shifting right. The object might be centered, so we need to
                 // recalculate our horizontal margins. Note that the containing block content
                 // width computation will take into account the delta between |leftOff| and |xPos|
-                // so that we can just pass the content width in directly to the |calcHorizontalMargins|
+                // so that we can just pass the content width in directly to the |computeInlineDirectionMargins|
                 // function.
-                child->calcHorizontalMargins(child->style()->marginLeft(), child->style()->marginRight(), lineWidth(child->y(), false));
+                child->computeInlineDirectionMargins(child->style()->marginLeft(), child->style()->marginRight(), lineWidth(child->y(), false));
                 chPos = leftOff + child->marginLeft();
             }
         }
@@ -1680,9 +1680,9 @@ void RenderBlock::determineHorizontalPosition(RenderBox* child)
                 // The object is shifting left. The object might be centered, so we need to
                 // recalculate our horizontal margins. Note that the containing block content
                 // width computation will take into account the delta between |rightOff| and |xPos|
-                // so that we can just pass the content width in directly to the |calcHorizontalMargins|
+                // so that we can just pass the content width in directly to the |computeInlineDirectionMargins|
                 // function.
-                child->calcHorizontalMargins(child->style()->marginLeft(), child->style()->marginRight(), lineWidth(child->y(), false));
+                child->computeInlineDirectionMargins(child->style()->marginLeft(), child->style()->marginRight(), lineWidth(child->y(), false));
                 chPos = rightOff - child->marginRight() - child->width();
             }
         }
@@ -1803,7 +1803,7 @@ void RenderBlock::layoutBlockChild(RenderBox* child, MarginInfo& marginInfo, int
     int oldTopNegMargin = maxTopNegMargin();
 
     // The child is a normal flow object.  Compute its vertical margins now.
-    child->calcVerticalMargins();
+    child->computeBlockDirectionMargins();
 
     // Do not allow a collapse if the margin top collapse style is set to SEPARATE.
     if (child->style()->marginTopCollapse() == MSEPARATE) {
@@ -2925,7 +2925,7 @@ RenderBlock::FloatingObject* RenderBlock::insertFloatingObject(RenderBox* o)
         o->layoutIfNeeded();
     else {
         o->computeLogicalWidth();
-        o->calcVerticalMargins();
+        o->computeBlockDirectionMargins();
     }
     newObj->m_width = o->width() + o->marginLeft() + o->marginRight();
 
@@ -4597,7 +4597,7 @@ void RenderBlock::calcPrefWidths()
     updateFirstLetter();
 
     if (!isTableCell() && style()->width().isFixed() && style()->width().value() > 0)
-        m_minPrefWidth = m_maxPrefWidth = calcContentBoxWidth(style()->width().value());
+        m_minPrefWidth = m_maxPrefWidth = computeContentBoxLogicalWidth(style()->width().value());
     else {
         m_minPrefWidth = 0;
         m_maxPrefWidth = 0;
@@ -4620,18 +4620,18 @@ void RenderBlock::calcPrefWidths()
         if (isTableCell()) {
             Length w = toRenderTableCell(this)->styleOrColWidth();
             if (w.isFixed() && w.value() > 0)
-                m_maxPrefWidth = max(m_minPrefWidth, calcContentBoxWidth(w.value()));
+                m_maxPrefWidth = max(m_minPrefWidth, computeContentBoxLogicalWidth(w.value()));
         }
     }
     
     if (style()->minWidth().isFixed() && style()->minWidth().value() > 0) {
-        m_maxPrefWidth = max(m_maxPrefWidth, calcContentBoxWidth(style()->minWidth().value()));
-        m_minPrefWidth = max(m_minPrefWidth, calcContentBoxWidth(style()->minWidth().value()));
+        m_maxPrefWidth = max(m_maxPrefWidth, computeContentBoxLogicalWidth(style()->minWidth().value()));
+        m_minPrefWidth = max(m_minPrefWidth, computeContentBoxLogicalWidth(style()->minWidth().value()));
     }
     
     if (style()->maxWidth().isFixed() && style()->maxWidth().value() != undefinedLength) {
-        m_maxPrefWidth = min(m_maxPrefWidth, calcContentBoxWidth(style()->maxWidth().value()));
-        m_minPrefWidth = min(m_minPrefWidth, calcContentBoxWidth(style()->maxWidth().value()));
+        m_maxPrefWidth = min(m_maxPrefWidth, computeContentBoxLogicalWidth(style()->maxWidth().value()));
+        m_minPrefWidth = min(m_minPrefWidth, computeContentBoxLogicalWidth(style()->maxWidth().value()));
     }
 
     int toAdd = 0;
index d185857..ad0f33c 100644 (file)
@@ -587,7 +587,7 @@ int RenderBox::overrideHeight() const
     return hasOverrideSize() ? overrideSize() : height();
 }
 
-int RenderBox::calcBorderBoxWidth(int width) const
+int RenderBox::computeBorderBoxLogicalWidth(int width) const
 {
     int bordersPlusPadding = borderAndPaddingWidth();
     if (style()->boxSizing() == CONTENT_BOX)
@@ -595,7 +595,7 @@ int RenderBox::calcBorderBoxWidth(int width) const
     return max(width, bordersPlusPadding);
 }
 
-int RenderBox::calcBorderBoxHeight(int height) const
+int RenderBox::computeBorderBoxLogicalHeight(int height) const
 {
     int bordersPlusPadding = borderAndPaddingHeight();
     if (style()->boxSizing() == CONTENT_BOX)
@@ -603,14 +603,14 @@ int RenderBox::calcBorderBoxHeight(int height) const
     return max(height, bordersPlusPadding);
 }
 
-int RenderBox::calcContentBoxWidth(int width) const
+int RenderBox::computeContentBoxLogicalWidth(int width) const
 {
     if (style()->boxSizing() == BORDER_BOX)
         width -= borderAndPaddingWidth();
     return max(0, width);
 }
 
-int RenderBox::calcContentBoxHeight(int height) const
+int RenderBox::computeContentBoxLogicalHeight(int height) const
 {
     if (style()->boxSizing() == BORDER_BOX)
         height -= borderAndPaddingHeight();
@@ -1350,7 +1350,7 @@ void RenderBox::repaintDuringLayoutIfMoved(const IntRect& rect)
 void RenderBox::computeLogicalWidth()
 {
     if (isPositioned()) {
-        calcAbsoluteHorizontal();
+        computePositionedLogicalWidth();
         return;
     }
 
@@ -1368,9 +1368,9 @@ void RenderBox::computeLogicalWidth()
 
     bool inVerticalBox = parent()->isFlexibleBox() && (parent()->style()->boxOrient() == VERTICAL);
     bool stretching = (parent()->style()->boxAlign() == BSTRETCH);
-    bool treatAsReplaced = shouldCalculateSizeAsReplaced() && (!inVerticalBox || !stretching);
+    bool treatAsReplaced = shouldComputeSizeAsReplaced() && (!inVerticalBox || !stretching);
 
-    Length w = (treatAsReplaced) ? Length(calcReplacedWidth(), Fixed) : style()->width();
+    Length w = (treatAsReplaced) ? Length(computeReplacedWidth(), Fixed) : style()->width();
 
     RenderBlock* cb = containingBlock();
     int containerWidth = max(0, containingBlockWidthForContent());
@@ -1393,11 +1393,11 @@ void RenderBox::computeLogicalWidth()
         setWidth(w.value() + borderAndPaddingWidth());
     else {
         // Calculate Width
-        setWidth(calcWidthUsing(Width, containerWidth));
+        setWidth(computeLogicalWidthUsing(Width, containerWidth));
 
         // Calculate MaxWidth
         if (!style()->maxWidth().isUndefined()) {
-            int maxW = calcWidthUsing(MaxWidth, containerWidth);
+            int maxW = computeLogicalWidthUsing(MaxWidth, containerWidth);
             if (width() > maxW) {
                 setWidth(maxW);
                 w = style()->maxWidth();
@@ -1405,7 +1405,7 @@ void RenderBox::computeLogicalWidth()
         }
 
         // Calculate MinWidth
-        int minW = calcWidthUsing(MinWidth, containerWidth);
+        int minW = computeLogicalWidthUsing(MinWidth, containerWidth);
         if (width() < minW) {
             setWidth(minW);
             w = style()->minWidth();
@@ -1424,7 +1424,7 @@ void RenderBox::computeLogicalWidth()
     } else {
         m_marginLeft = 0;
         m_marginRight = 0;
-        calcHorizontalMargins(marginLeft, marginRight, containerWidth);
+        computeInlineDirectionMargins(marginLeft, marginRight, containerWidth);
     }
 
     if (containerWidth && containerWidth != (width() + m_marginLeft + m_marginRight)
@@ -1436,7 +1436,7 @@ void RenderBox::computeLogicalWidth()
     }
 }
 
-int RenderBox::calcWidthUsing(WidthType widthType, int cw)
+int RenderBox::computeLogicalWidthUsing(WidthType widthType, int cw)
 {
     int widthResult = width();
     Length w;
@@ -1458,7 +1458,7 @@ int RenderBox::calcWidthUsing(WidthType widthType, int cw)
             widthResult = min(widthResult, maxPrefWidth());
         }
     } else
-        widthResult = calcBorderBoxWidth(w.calcValue(cw));
+        widthResult = computeBorderBoxLogicalWidth(w.calcValue(cw));
 
     return widthResult;
 }
@@ -1499,7 +1499,7 @@ bool RenderBox::sizesToIntrinsicWidth(WidthType widthType) const
     return false;
 }
 
-void RenderBox::calcHorizontalMargins(const Length& marginLeft, const Length& marginRight, int containerWidth)
+void RenderBox::computeInlineDirectionMargins(const Length& marginLeft, const Length& marginRight, int containerWidth)
 {
     if (isFloating() || isInline()) {
         // Inline blocks/tables and floats don't have their margins increased.
@@ -1535,9 +1535,9 @@ void RenderBox::computeLogicalHeight()
 
     Length h;
     if (isPositioned())
-        calcAbsoluteVertical();
+        computePositionedLogicalHeight();
     else {
-        calcVerticalMargins();
+        computeBlockDirectionMargins();
 
         // For tables, calculate margins only.
         if (isTable())
@@ -1545,7 +1545,7 @@ void RenderBox::computeLogicalHeight()
 
         bool inHorizontalBox = parent()->isFlexibleBox() && parent()->style()->boxOrient() == HORIZONTAL;
         bool stretching = parent()->style()->boxAlign() == BSTRETCH;
-        bool treatAsReplaced = shouldCalculateSizeAsReplaced() && (!inHorizontalBox || !stretching);
+        bool treatAsReplaced = shouldComputeSizeAsReplaced() && (!inHorizontalBox || !stretching);
         bool checkMinMaxHeight = false;
 
         // The parent box is flexing us, so it has increased or decreased our height.  We have to
@@ -1554,7 +1554,7 @@ void RenderBox::computeLogicalHeight()
                 && parent()->isFlexingChildren())
             h = Length(overrideSize() - borderAndPaddingHeight(), Fixed);
         else if (treatAsReplaced)
-            h = Length(calcReplacedHeight(), Fixed);
+            h = Length(computeReplacedHeight(), Fixed);
         else {
             h = style()->height();
             checkMinMaxHeight = true;
@@ -1569,11 +1569,11 @@ void RenderBox::computeLogicalHeight()
 
         int heightResult;
         if (checkMinMaxHeight) {
-            heightResult = calcHeightUsing(style()->height());
+            heightResult = computeLogicalHeightUsing(style()->height());
             if (heightResult == -1)
                 heightResult = height();
-            int minH = calcHeightUsing(style()->minHeight()); // Leave as -1 if unset.
-            int maxH = style()->maxHeight().isUndefined() ? heightResult : calcHeightUsing(style()->maxHeight());
+            int minH = computeLogicalHeightUsing(style()->minHeight()); // Leave as -1 if unset.
+            int maxH = style()->maxHeight().isUndefined() ? heightResult : computeLogicalHeightUsing(style()->maxHeight());
             if (maxH == -1)
                 maxH = heightResult;
             heightResult = min(maxH, heightResult);
@@ -1607,23 +1607,23 @@ void RenderBox::computeLogicalHeight()
     }
 }
 
-int RenderBox::calcHeightUsing(const Length& h)
+int RenderBox::computeLogicalHeightUsing(const Length& h)
 {
     int height = -1;
     if (!h.isAuto()) {
         if (h.isFixed())
             height = h.value();
         else if (h.isPercent())
-            height = calcPercentageHeight(h);
+            height = computePercentageLogicalHeight(h);
         if (height != -1) {
-            height = calcBorderBoxHeight(height);
+            height = computeBorderBoxLogicalHeight(height);
             return height;
         }
     }
     return height;
 }
 
-int RenderBox::calcPercentageHeight(const Length& height)
+int RenderBox::computePercentageLogicalHeight(const Length& height)
 {
     int result = -1;
     bool skippedAutoHeightContainingBlock = false;
@@ -1671,12 +1671,12 @@ int RenderBox::calcPercentageHeight(const Length& height)
     // Otherwise we only use our percentage height if our containing block had a specified
     // height.
     else if (cb->style()->height().isFixed())
-        result = cb->calcContentBoxHeight(cb->style()->height().value());
+        result = cb->computeContentBoxLogicalHeight(cb->style()->height().value());
     else if (cb->style()->height().isPercent() && !isPositionedWithSpecifiedHeight) {
         // We need to recur and compute the percentage height for our containing block.
-        result = cb->calcPercentageHeight(cb->style()->height());
+        result = cb->computePercentageLogicalHeight(cb->style()->height());
         if (result != -1)
-            result = cb->calcContentBoxHeight(result);
+            result = cb->computeContentBoxLogicalHeight(result);
     } else if (cb->isRenderView() || (cb->isBody() && document()->inQuirksMode()) || isPositionedWithSpecifiedHeight) {
         // Don't allow this to affect the block' height() member variable, since this
         // can get called while the block is still laying out its kids.
@@ -1686,8 +1686,8 @@ int RenderBox::calcPercentageHeight(const Length& height)
         cb->setHeight(oldHeight);
     } else if (cb->isRoot() && isPositioned())
         // Match the positioned objects behavior, which is that positioned objects will fill their viewport
-        // always.  Note we could only hit this case by recurring into calcPercentageHeight on a positioned containing block.
-        result = cb->calcContentBoxHeight(cb->availableHeight());
+        // always.  Note we could only hit this case by recurring into computePercentageLogicalHeight on a positioned containing block.
+        result = cb->computeContentBoxLogicalHeight(cb->availableHeight());
 
     if (result != -1) {
         result = height.calcValue(result);
@@ -1702,24 +1702,24 @@ int RenderBox::calcPercentageHeight(const Length& height)
     return result;
 }
 
-int RenderBox::calcReplacedWidth(bool includeMaxWidth) const
+int RenderBox::computeReplacedWidth(bool includeMaxWidth) const
 {
-    int width = calcReplacedWidthUsing(style()->width());
-    int minW = calcReplacedWidthUsing(style()->minWidth());
-    int maxW = !includeMaxWidth || style()->maxWidth().isUndefined() ? width : calcReplacedWidthUsing(style()->maxWidth());
+    int width = computeReplacedWidthUsing(style()->width());
+    int minW = computeReplacedWidthUsing(style()->minWidth());
+    int maxW = !includeMaxWidth || style()->maxWidth().isUndefined() ? width : computeReplacedWidthUsing(style()->maxWidth());
 
     return max(minW, min(width, maxW));
 }
 
-int RenderBox::calcReplacedWidthUsing(Length width) const
+int RenderBox::computeReplacedWidthUsing(Length width) const
 {
     switch (width.type()) {
         case Fixed:
-            return calcContentBoxWidth(width.value());
+            return computeContentBoxLogicalWidth(width.value());
         case Percent: {
             const int cw = isPositioned() ? containingBlockWidthForPositioned(toRenderBoxModelObject(container())) : containingBlockWidthForContent();
             if (cw > 0)
-                return calcContentBoxWidth(width.calcMinValue(cw));
+                return computeContentBoxLogicalWidth(width.calcMinValue(cw));
         }
         // fall through
         default:
@@ -1727,20 +1727,20 @@ int RenderBox::calcReplacedWidthUsing(Length width) const
      }
 }
 
-int RenderBox::calcReplacedHeight() const
+int RenderBox::computeReplacedHeight() const
 {
-    int height = calcReplacedHeightUsing(style()->height());
-    int minH = calcReplacedHeightUsing(style()->minHeight());
-    int maxH = style()->maxHeight().isUndefined() ? height : calcReplacedHeightUsing(style()->maxHeight());
+    int height = computeReplacedHeightUsing(style()->height());
+    int minH = computeReplacedHeightUsing(style()->minHeight());
+    int maxH = style()->maxHeight().isUndefined() ? height : computeReplacedHeightUsing(style()->maxHeight());
 
     return max(minH, min(height, maxH));
 }
 
-int RenderBox::calcReplacedHeightUsing(Length height) const
+int RenderBox::computeReplacedHeightUsing(Length height) const
 {
     switch (height.type()) {
         case Fixed:
-            return calcContentBoxHeight(height.value());
+            return computeContentBoxLogicalHeight(height.value());
         case Percent:
         {
             RenderObject* cb = isPositioned() ? container() : containingBlock();
@@ -1754,9 +1754,9 @@ int RenderBox::calcReplacedHeightUsing(Length height) const
                 RenderBlock* block = toRenderBlock(cb);
                 int oldHeight = block->height();
                 block->computeLogicalHeight();
-                int newHeight = block->calcContentBoxHeight(block->contentHeight());
+                int newHeight = block->computeContentBoxLogicalHeight(block->contentHeight());
                 block->setHeight(oldHeight);
-                return calcContentBoxHeight(height.calcValue(newHeight));
+                return computeContentBoxLogicalHeight(height.calcValue(newHeight));
             }
             
             int availableHeight = isPositioned() ? containingBlockHeightForPositioned(toRenderBoxModelObject(cb)) : toRenderBox(cb)->availableHeight();
@@ -1771,7 +1771,7 @@ int RenderBox::calcReplacedHeightUsing(Length height) const
                 return height.calcValue(availableHeight - borderAndPaddingHeight());
             }
 
-            return calcContentBoxHeight(height.calcValue(availableHeight));
+            return computeContentBoxLogicalHeight(height.calcValue(availableHeight));
         }
         default:
             return intrinsicSize().height();
@@ -1786,7 +1786,7 @@ int RenderBox::availableHeight() const
 int RenderBox::availableHeightUsing(const Length& h) const
 {
     if (h.isFixed())
-        return calcContentBoxHeight(h.value());
+        return computeContentBoxLogicalHeight(h.value());
 
     if (isRenderView())
         return toRenderView(this)->frameView()->visibleHeight();
@@ -1798,15 +1798,15 @@ int RenderBox::availableHeightUsing(const Length& h) const
         return overrideSize() - borderAndPaddingWidth();
 
     if (h.isPercent())
-       return calcContentBoxHeight(h.calcValue(containingBlock()->availableHeight()));
+       return computeContentBoxLogicalHeight(h.calcValue(containingBlock()->availableHeight()));
 
     if (isRenderBlock() && isPositioned() && style()->height().isAuto() && !(style()->top().isAuto() || style()->bottom().isAuto())) {
         RenderBlock* block = const_cast<RenderBlock*>(toRenderBlock(this));
         int oldHeight = block->height();
         block->computeLogicalHeight();
-        int newHeight = block->calcContentBoxHeight(block->contentHeight());
+        int newHeight = block->computeContentBoxLogicalHeight(block->contentHeight());
         block->setHeight(oldHeight);
-        return calcContentBoxHeight(newHeight);
+        return computeContentBoxLogicalHeight(newHeight);
     }
 
     return containingBlock()->availableHeight();
@@ -1819,7 +1819,7 @@ int RenderBox::availableLogicalWidth() const
     return contentHeight();
 }
 
-void RenderBox::calcVerticalMargins()
+void RenderBox::computeBlockDirectionMargins()
 {
     if (isTableCell()) {
         m_marginTop = 0;
@@ -1877,10 +1877,10 @@ int RenderBox::containingBlockHeightForPositioned(const RenderBoxModelObject* co
     return heightResult - containingBlock->borderTop() - containingBlock->borderBottom();
 }
 
-void RenderBox::calcAbsoluteHorizontal()
+void RenderBox::computePositionedLogicalWidth()
 {
     if (isReplaced()) {
-        calcAbsoluteHorizontalReplaced();
+        computePositionedLogicalWidthReplaced();
         return;
     }
 
@@ -1891,7 +1891,7 @@ void RenderBox::calcAbsoluteHorizontal()
     // was also previously done for deciding what to override when you had
     // over-constrained margins?  Also note that the container block is used
     // in similar situations in other parts of the RenderBox class (see computeLogicalWidth()
-    // and calcHorizontalMargins()). For now we are using the parent for quirks
+    // and computeInlineDirectionMargins()). For now we are using the parent for quirks
     // mode and the containing block for strict mode.
 
     // FIXME 2: Should we still deal with these the cases of 'left' or 'right' having
@@ -1905,7 +1905,7 @@ void RenderBox::calcAbsoluteHorizontal()
     // The following is based off of the W3C Working Draft from April 11, 2006 of
     // CSS 2.1: Section 10.3.7 "Absolutely positioned, non-replaced elements"
     // <http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width>
-    // (block-style-comments in this function and in calcAbsoluteHorizontalValues()
+    // (block-style-comments in this function and in computePositionedLogicalWidthUsing()
     // correspond to text from the spec)
 
 
@@ -1977,7 +1977,7 @@ void RenderBox::calcAbsoluteHorizontal()
     // Calculate constraint equation values for 'width' case.
     int widthResult;
     int xResult;
-    calcAbsoluteHorizontalValues(style()->width(), containerBlock, containerDirection,
+    computePositionedLogicalWidthUsing(style()->width(), containerBlock, containerDirection,
                                  containerWidth, bordersPlusPadding,
                                  left, right, marginLeft, marginRight,
                                  widthResult, m_marginLeft, m_marginRight, xResult);
@@ -1991,7 +1991,7 @@ void RenderBox::calcAbsoluteHorizontal()
         int maxMarginRight;
         int maxXPos;
 
-        calcAbsoluteHorizontalValues(style()->maxWidth(), containerBlock, containerDirection,
+        computePositionedLogicalWidthUsing(style()->maxWidth(), containerBlock, containerDirection,
                                      containerWidth, bordersPlusPadding,
                                      left, right, marginLeft, marginRight,
                                      maxWidth, maxMarginLeft, maxMarginRight, maxXPos);
@@ -2011,7 +2011,7 @@ void RenderBox::calcAbsoluteHorizontal()
         int minMarginRight;
         int minXPos;
 
-        calcAbsoluteHorizontalValues(style()->minWidth(), containerBlock, containerDirection,
+        computePositionedLogicalWidthUsing(style()->minWidth(), containerBlock, containerDirection,
                                      containerWidth, bordersPlusPadding,
                                      left, right, marginLeft, marginRight,
                                      minWidth, minMarginLeft, minMarginRight, minXPos);
@@ -2025,7 +2025,7 @@ void RenderBox::calcAbsoluteHorizontal()
     }
 
     if (stretchesToMinIntrinsicWidth() && width() < minPrefWidth() - bordersPlusPadding) {
-        calcAbsoluteHorizontalValues(Length(minPrefWidth() - bordersPlusPadding, Fixed), containerBlock, containerDirection,
+        computePositionedLogicalWidthUsing(Length(minPrefWidth() - bordersPlusPadding, Fixed), containerBlock, containerDirection,
                                      containerWidth, bordersPlusPadding,
                                      left, right, marginLeft, marginRight,
                                      widthResult, m_marginLeft, m_marginRight, xResult);
@@ -2037,7 +2037,7 @@ void RenderBox::calcAbsoluteHorizontal()
     setWidth(width() + bordersPlusPadding);
 }
 
-void RenderBox::calcAbsoluteHorizontalValues(Length width, const RenderBoxModelObject* containerBlock, TextDirection containerDirection,
+void RenderBox::computePositionedLogicalWidthUsing(Length width, const RenderBoxModelObject* containerBlock, TextDirection containerDirection,
                                              const int containerWidth, const int bordersPlusPadding,
                                              const Length left, const Length right, const Length marginLeft, const Length marginRight,
                                              int& widthValue, int& marginLeftValue, int& marginRightValue, int& xPos)
@@ -2069,7 +2069,7 @@ void RenderBox::calcAbsoluteHorizontalValues(Length width, const RenderBoxModelO
         // case because the value is not used for any further calculations.
 
         leftValue = left.calcValue(containerWidth);
-        widthValue = calcContentBoxWidth(width.calcValue(containerWidth));
+        widthValue = computeContentBoxLogicalWidth(width.calcValue(containerWidth));
 
         const int availableSpace = containerWidth - (leftValue + widthValue + right.calcValue(containerWidth) + bordersPlusPadding);
 
@@ -2177,7 +2177,7 @@ void RenderBox::calcAbsoluteHorizontalValues(Length width, const RenderBoxModelO
             widthValue = min(max(preferredMinWidth, availableWidth), preferredWidth);
         } else if (leftIsAuto && !width.isAuto() && !rightIsAuto) {
             // RULE 4: (solve for left)
-            widthValue = calcContentBoxWidth(width.calcValue(containerWidth));
+            widthValue = computeContentBoxLogicalWidth(width.calcValue(containerWidth));
             leftValue = availableSpace - (widthValue + right.calcValue(containerWidth));
         } else if (!leftIsAuto && widthIsAuto && !rightIsAuto) {
             // RULE 5: (solve for width)
@@ -2186,7 +2186,7 @@ void RenderBox::calcAbsoluteHorizontalValues(Length width, const RenderBoxModelO
         } else if (!leftIsAuto&& !widthIsAuto && rightIsAuto) {
             // RULE 6: (no need solve for right)
             leftValue = left.calcValue(containerWidth);
-            widthValue = calcContentBoxWidth(width.calcValue(containerWidth));
+            widthValue = computeContentBoxLogicalWidth(width.calcValue(containerWidth));
         }
     }
 
@@ -2209,17 +2209,17 @@ void RenderBox::calcAbsoluteHorizontalValues(Length width, const RenderBoxModelO
     xPos = leftValue + marginLeftValue + containerBlock->borderLeft();
 }
 
-void RenderBox::calcAbsoluteVertical()
+void RenderBox::computePositionedLogicalHeight()
 {
     if (isReplaced()) {
-        calcAbsoluteVerticalReplaced();
+        computePositionedLogicalHeightReplaced();
         return;
     }
 
     // The following is based off of the W3C Working Draft from April 11, 2006 of
     // CSS 2.1: Section 10.6.4 "Absolutely positioned, non-replaced elements"
     // <http://www.w3.org/TR/2005/WD-CSS21-20050613/visudet.html#abs-non-replaced-height>
-    // (block-style-comments in this function and in calcAbsoluteVerticalValues()
+    // (block-style-comments in this function and in computePositionedLogicalHeightUsing()
     // correspond to text from the spec)
 
 
@@ -2268,7 +2268,7 @@ void RenderBox::calcAbsoluteVertical()
     int y;
 
     // Calculate constraint equation values for 'height' case.
-    calcAbsoluteVerticalValues(style()->height(), containerBlock, containerHeight, bordersPlusPadding,
+    computePositionedLogicalHeightUsing(style()->height(), containerBlock, containerHeight, bordersPlusPadding,
                                top, bottom, marginTop, marginBottom,
                                h, m_marginTop, m_marginBottom, y);
     setY(y);
@@ -2283,7 +2283,7 @@ void RenderBox::calcAbsoluteVertical()
         int maxMarginBottom;
         int maxYPos;
 
-        calcAbsoluteVerticalValues(style()->maxHeight(), containerBlock, containerHeight, bordersPlusPadding,
+        computePositionedLogicalHeightUsing(style()->maxHeight(), containerBlock, containerHeight, bordersPlusPadding,
                                    top, bottom, marginTop, marginBottom,
                                    maxHeight, maxMarginTop, maxMarginBottom, maxYPos);
 
@@ -2302,7 +2302,7 @@ void RenderBox::calcAbsoluteVertical()
         int minMarginBottom;
         int minYPos;
 
-        calcAbsoluteVerticalValues(style()->minHeight(), containerBlock, containerHeight, bordersPlusPadding,
+        computePositionedLogicalHeightUsing(style()->minHeight(), containerBlock, containerHeight, bordersPlusPadding,
                                    top, bottom, marginTop, marginBottom,
                                    minHeight, minMarginTop, minMarginBottom, minYPos);
 
@@ -2318,13 +2318,13 @@ void RenderBox::calcAbsoluteVertical()
     setHeight(h + bordersPlusPadding);
 }
 
-void RenderBox::calcAbsoluteVerticalValues(Length h, const RenderBoxModelObject* containerBlock,
+void RenderBox::computePositionedLogicalHeightUsing(Length h, const RenderBoxModelObject* containerBlock,
                                            const int containerHeight, const int bordersPlusPadding,
                                            const Length top, const Length bottom, const Length marginTop, const Length marginBottom,
                                            int& heightValue, int& marginTopValue, int& marginBottomValue, int& yPos)
 {
     // 'top' and 'bottom' cannot both be 'auto' because 'top would of been
-    // converted to the static position in calcAbsoluteVertical()
+    // converted to the static position in computePositionedLogicalHeight()
     ASSERT(!(top.isAuto() && bottom.isAuto()));
 
     int contentHeight = height() - bordersPlusPadding;
@@ -2353,7 +2353,7 @@ void RenderBox::calcAbsoluteVerticalValues(Length h, const RenderBoxModelObject*
         // NOTE:  It is not necessary to solve for 'bottom' in the over constrained
         // case because the value is not used for any further calculations.
 
-        heightValue = calcContentBoxHeight(h.calcValue(containerHeight));
+        heightValue = computeContentBoxLogicalHeight(h.calcValue(containerHeight));
         topValue = top.calcValue(containerHeight);
 
         const int availableSpace = containerHeight - (topValue + heightValue + bottom.calcValue(containerHeight) + bordersPlusPadding);
@@ -2420,7 +2420,7 @@ void RenderBox::calcAbsoluteVerticalValues(Length h, const RenderBoxModelObject*
             heightValue = contentHeight;
         } else if (topIsAuto && !heightIsAuto && !bottomIsAuto) {
             // RULE 4: (solve of top)
-            heightValue = calcContentBoxHeight(h.calcValue(containerHeight));
+            heightValue = computeContentBoxLogicalHeight(h.calcValue(containerHeight));
             topValue = availableSpace - (heightValue + bottom.calcValue(containerHeight));
         } else if (!topIsAuto && heightIsAuto && !bottomIsAuto) {
             // RULE 5: (solve of height)
@@ -2428,7 +2428,7 @@ void RenderBox::calcAbsoluteVerticalValues(Length h, const RenderBoxModelObject*
             heightValue = max(0, availableSpace - (topValue + bottom.calcValue(containerHeight)));
         } else if (!topIsAuto && !heightIsAuto && bottomIsAuto) {
             // RULE 6: (no need solve of bottom)
-            heightValue = calcContentBoxHeight(h.calcValue(containerHeight));
+            heightValue = computeContentBoxLogicalHeight(h.calcValue(containerHeight));
             topValue = top.calcValue(containerHeight);
         }
     }
@@ -2437,7 +2437,7 @@ void RenderBox::calcAbsoluteVerticalValues(Length h, const RenderBoxModelObject*
     yPos = topValue + marginTopValue + containerBlock->borderTop();
 }
 
-void RenderBox::calcAbsoluteHorizontalReplaced()
+void RenderBox::computePositionedLogicalWidthReplaced()
 {
     // The following is based off of the W3C Working Draft from April 11, 2006 of
     // CSS 2.1: Section 10.3.8 "Absolutely positioned, replaced elements"
@@ -2467,9 +2467,9 @@ void RenderBox::calcAbsoluteHorizontalReplaced()
      *    elements.
     \*-----------------------------------------------------------------------*/
     // NOTE: This value of width is FINAL in that the min/max width calculations
-    // are dealt with in calcReplacedWidth().  This means that the steps to produce
+    // are dealt with in computeReplacedWidth().  This means that the steps to produce
     // correct max/min in the non-replaced version, are not necessary.
-    setWidth(calcReplacedWidth() + borderAndPaddingWidth());
+    setWidth(computeReplacedWidth() + borderAndPaddingWidth());
     const int availableSpace = containerWidth - width();
 
     /*-----------------------------------------------------------------------*\
@@ -2615,7 +2615,7 @@ void RenderBox::calcAbsoluteHorizontalReplaced()
     m_frameRect.setX(leftValue + m_marginLeft + containerBlock->borderLeft());
 }
 
-void RenderBox::calcAbsoluteVerticalReplaced()
+void RenderBox::computePositionedLogicalHeightReplaced()
 {
     // The following is based off of the W3C Working Draft from April 11, 2006 of
     // CSS 2.1: Section 10.6.5 "Absolutely positioned, replaced elements"
@@ -2640,9 +2640,9 @@ void RenderBox::calcAbsoluteVerticalReplaced()
      *    elements.
     \*-----------------------------------------------------------------------*/
     // NOTE: This value of height is FINAL in that the min/max height calculations
-    // are dealt with in calcReplacedHeight().  This means that the steps to produce
+    // are dealt with in computeReplacedHeight().  This means that the steps to produce
     // correct max/min in the non-replaced version, are not necessary.
-    setHeight(calcReplacedHeight() + borderAndPaddingHeight());
+    setHeight(computeReplacedHeight() + borderAndPaddingHeight());
     const int availableSpace = containerHeight - height();
 
     /*-----------------------------------------------------------------------*\
index 471cf8a..8624ef7 100644 (file)
@@ -185,10 +185,10 @@ public:
 
     virtual IntSize offsetFromContainer(RenderObject*, const IntPoint&) const;
     
-    int calcBorderBoxWidth(int width) const;
-    int calcBorderBoxHeight(int height) const;
-    int calcContentBoxWidth(int width) const;
-    int calcContentBoxHeight(int height) const;
+    int computeBorderBoxLogicalWidth(int width) const;
+    int computeBorderBoxLogicalHeight(int height) const;
+    int computeContentBoxLogicalWidth(int width) const;
+    int computeContentBoxLogicalHeight(int height) const;
 
     virtual void borderFitAdjust(int& /*x*/, int& /*w*/) const { } // Shrink the box in which the border paints if border-fit is set.
 
@@ -196,7 +196,7 @@ public:
     // shifted right by left-aligned floats can recompute their left and
     // right margins (so that they can remain centered after being
     // shifted. -dwh
-    void calcHorizontalMargins(const Length& marginLeft, const Length& marginRight, int containerWidth);
+    void computeInlineDirectionMargins(const Length& marginLeft, const Length& marginRight, int containerWidth);
 
     void positionLineBox(InlineBox*);
 
@@ -236,15 +236,15 @@ public:
     bool sizesToIntrinsicWidth(WidthType) const;
     virtual bool stretchesToMinIntrinsicWidth() const { return false; }
 
-    int calcWidthUsing(WidthType, int containerWidth);
-    int calcHeightUsing(const Length& height);
-    int calcReplacedWidthUsing(Length width) const;
-    int calcReplacedHeightUsing(Length height) const;
+    int computeLogicalWidthUsing(WidthType, int containerWidth);
+    int computeLogicalHeightUsing(const Length& height);
+    int computeReplacedWidthUsing(Length width) const;
+    int computeReplacedHeightUsing(Length height) const;
 
-    virtual int calcReplacedWidth(bool includeMaxWidth = true) const;
-    virtual int calcReplacedHeight() const;
+    virtual int computeReplacedWidth(bool includeMaxWidth = true) const;
+    virtual int computeReplacedHeight() const;
 
-    int calcPercentageHeight(const Length& height);
+    int computePercentageLogicalHeight(const Length& height);
 
     // Block flows subclass availableWidth to handle multi column layout (shrinking the width available to children when laying out.)
     virtual int availableWidth() const { return contentWidth(); } // FIXME: Investigate removing eventually. https://bugs.webkit.org/show_bug.cgi?id=46127
@@ -252,7 +252,7 @@ public:
     int availableHeightUsing(const Length&) const;
     virtual int availableLogicalWidth() const;
 
-    void calcVerticalMargins();
+    void computeBlockDirectionMargins();
 
     virtual int verticalScrollbarWidth() const;
     int horizontalScrollbarHeight() const;
@@ -324,9 +324,9 @@ protected:
     void paintCustomHighlight(int tx, int ty, const AtomicString& type, bool behindText);
 #endif
 
-    void calcAbsoluteHorizontal();
+    void computePositionedLogicalWidth();
     
-    virtual bool shouldCalculateSizeAsReplaced() const { return isReplaced() && !isInlineBlockOrInlineTable(); }
+    virtual bool shouldComputeSizeAsReplaced() const { return isReplaced() && !isInlineBlockOrInlineTable(); }
 
     virtual void mapLocalToContainer(RenderBoxModelObject* repaintContainer, bool fixed, bool useTransforms, TransformState&) const;
     virtual void mapAbsoluteToLocalPoint(bool fixed, bool useTransforms, TransformState&) const;
@@ -342,18 +342,18 @@ private:
     int containingBlockWidthForPositioned(const RenderBoxModelObject* containingBlock) const;
     int containingBlockHeightForPositioned(const RenderBoxModelObject* containingBlock) const;
 
-    void calcAbsoluteVertical();
-    void calcAbsoluteHorizontalValues(Length width, const RenderBoxModelObject* cb, TextDirection containerDirection,
+    void computePositionedLogicalHeight();
+    void computePositionedLogicalWidthUsing(Length width, const RenderBoxModelObject* cb, TextDirection containerDirection,
                                       int containerWidth, int bordersPlusPadding,
                                       Length left, Length right, Length marginLeft, Length marginRight,
                                       int& widthValue, int& marginLeftValue, int& marginRightValue, int& xPos);
-    void calcAbsoluteVerticalValues(Length height, const RenderBoxModelObject* cb,
+    void computePositionedLogicalHeightUsing(Length height, const RenderBoxModelObject* cb,
                                     int containerHeight, int bordersPlusPadding,
                                     Length top, Length bottom, Length marginTop, Length marginBottom,
                                     int& heightValue, int& marginTopValue, int& marginBottomValue, int& yPos);
 
-    void calcAbsoluteVerticalReplaced();
-    void calcAbsoluteHorizontalReplaced();
+    void computePositionedLogicalHeightReplaced();
+    void computePositionedLogicalWidthReplaced();
 
     // This function calculates the minimum and maximum preferred widths for an object.
     // These values are used in shrink-to-fit layout systems.
index 63a21cd..bf99f70 100644 (file)
@@ -94,21 +94,21 @@ void RenderDataGrid::calcPrefWidths()
     m_maxPrefWidth = 0;
 
     if (style()->width().isFixed() && style()->width().value() > 0)
-        m_minPrefWidth = m_maxPrefWidth = calcContentBoxWidth(style()->width().value());
+        m_minPrefWidth = m_maxPrefWidth = computeContentBoxLogicalWidth(style()->width().value());
     else
-        m_maxPrefWidth = calcContentBoxWidth(cDefaultWidth);
+        m_maxPrefWidth = computeContentBoxLogicalWidth(cDefaultWidth);
 
     if (style()->minWidth().isFixed() && style()->minWidth().value() > 0) {
-        m_maxPrefWidth = max(m_maxPrefWidth, calcContentBoxWidth(style()->minWidth().value()));
-        m_minPrefWidth = max(m_minPrefWidth, calcContentBoxWidth(style()->minWidth().value()));
+        m_maxPrefWidth = max(m_maxPrefWidth, computeContentBoxLogicalWidth(style()->minWidth().value()));
+        m_minPrefWidth = max(m_minPrefWidth, computeContentBoxLogicalWidth(style()->minWidth().value()));
     } else if (style()->width().isPercent() || (style()->width().isAuto() && style()->height().isPercent()))
         m_minPrefWidth = 0;
     else
         m_minPrefWidth = m_maxPrefWidth;
 
     if (style()->maxWidth().isFixed() && style()->maxWidth().value() != undefinedLength) {
-        m_maxPrefWidth = min(m_maxPrefWidth, calcContentBoxWidth(style()->maxWidth().value()));
-        m_minPrefWidth = min(m_minPrefWidth, calcContentBoxWidth(style()->maxWidth().value()));
+        m_maxPrefWidth = min(m_maxPrefWidth, computeContentBoxLogicalWidth(style()->maxWidth().value()));
+        m_minPrefWidth = min(m_minPrefWidth, computeContentBoxLogicalWidth(style()->maxWidth().value()));
     }
 
     int toAdd = borderAndPaddingWidth();
index 20ebe4d..a1a2bd5 100644 (file)
@@ -265,7 +265,7 @@ void RenderFileUploadControl::calcPrefWidths()
     m_maxPrefWidth = 0;
 
     if (style()->width().isFixed() && style()->width().value() > 0)
-        m_minPrefWidth = m_maxPrefWidth = calcContentBoxWidth(style()->width().value());
+        m_minPrefWidth = m_maxPrefWidth = computeContentBoxLogicalWidth(style()->width().value());
     else {
         // Figure out how big the filename space needs to be for a given number of characters
         // (using "0" as the nominal character).
@@ -275,16 +275,16 @@ void RenderFileUploadControl::calcPrefWidths()
     }
 
     if (style()->minWidth().isFixed() && style()->minWidth().value() > 0) {
-        m_maxPrefWidth = max(m_maxPrefWidth, calcContentBoxWidth(style()->minWidth().value()));
-        m_minPrefWidth = max(m_minPrefWidth, calcContentBoxWidth(style()->minWidth().value()));
+        m_maxPrefWidth = max(m_maxPrefWidth, computeContentBoxLogicalWidth(style()->minWidth().value()));
+        m_minPrefWidth = max(m_minPrefWidth, computeContentBoxLogicalWidth(style()->minWidth().value()));
     } else if (style()->width().isPercent() || (style()->width().isAuto() && style()->height().isPercent()))
         m_minPrefWidth = 0;
     else
         m_minPrefWidth = m_maxPrefWidth;
 
     if (style()->maxWidth().isFixed() && style()->maxWidth().value() != undefinedLength) {
-        m_maxPrefWidth = min(m_maxPrefWidth, calcContentBoxWidth(style()->maxWidth().value()));
-        m_minPrefWidth = min(m_minPrefWidth, calcContentBoxWidth(style()->maxWidth().value()));
+        m_maxPrefWidth = min(m_maxPrefWidth, computeContentBoxLogicalWidth(style()->maxWidth().value()));
+        m_minPrefWidth = min(m_minPrefWidth, computeContentBoxLogicalWidth(style()->maxWidth().value()));
     }
 
     int toAdd = borderAndPaddingWidth();
index 867e69c..1925493 100644 (file)
@@ -168,7 +168,7 @@ void RenderFlexibleBox::calcPrefWidths()
     ASSERT(prefWidthsDirty());
 
     if (style()->width().isFixed() && style()->width().value() > 0)
-        m_minPrefWidth = m_maxPrefWidth = calcContentBoxWidth(style()->width().value());
+        m_minPrefWidth = m_maxPrefWidth = computeContentBoxLogicalWidth(style()->width().value());
     else {
         m_minPrefWidth = m_maxPrefWidth = 0;
 
@@ -181,13 +181,13 @@ void RenderFlexibleBox::calcPrefWidths()
     }
 
     if (style()->minWidth().isFixed() && style()->minWidth().value() > 0) {
-        m_maxPrefWidth = max(m_maxPrefWidth, calcContentBoxWidth(style()->minWidth().value()));
-        m_minPrefWidth = max(m_minPrefWidth, calcContentBoxWidth(style()->minWidth().value()));
+        m_maxPrefWidth = max(m_maxPrefWidth, computeContentBoxLogicalWidth(style()->minWidth().value()));
+        m_minPrefWidth = max(m_minPrefWidth, computeContentBoxLogicalWidth(style()->minWidth().value()));
     }
     
     if (style()->maxWidth().isFixed() && style()->maxWidth().value() != undefinedLength) {
-        m_maxPrefWidth = min(m_maxPrefWidth, calcContentBoxWidth(style()->maxWidth().value()));
-        m_minPrefWidth = min(m_minPrefWidth, calcContentBoxWidth(style()->maxWidth().value()));
+        m_maxPrefWidth = min(m_maxPrefWidth, computeContentBoxLogicalWidth(style()->maxWidth().value()));
+        m_minPrefWidth = min(m_minPrefWidth, computeContentBoxLogicalWidth(style()->maxWidth().value()));
     }
 
     int toAdd = borderAndPaddingWidth();
@@ -364,7 +364,7 @@ void RenderFlexibleBox::layoutHorizontalBox(bool relayoutChildren)
             }
     
             // Compute the child's vertical margins.
-            child->calcVerticalMargins();
+            child->computeBlockDirectionMargins();
     
             if (!child->needsLayout() && paginated && view()->layoutState()->m_pageHeight) {
                 RenderBlock* childRenderBlock = child->isRenderBlock() ? toRenderBlock(child) : 0;
@@ -635,7 +635,7 @@ void RenderFlexibleBox::layoutHorizontalBox(bool relayoutChildren)
         }
     }
     
-    // So that the calcHeight in layoutBlock() knows to relayout positioned objects because of
+    // So that the computeLogicalHeight in layoutBlock() knows to relayout positioned objects because of
     // a height change, we revert our height back to the intrinsic height before returning.
     if (heightSpecified)
         setHeight(oldHeight);
@@ -705,7 +705,7 @@ void RenderFlexibleBox::layoutVerticalBox(bool relayoutChildren)
             } 
     
             // Compute the child's vertical margins.
-            child->calcVerticalMargins();
+            child->computeBlockDirectionMargins();
     
             // Add in the child's marginTop to our height.
             setHeight(height() + child->marginTop());
@@ -917,7 +917,7 @@ void RenderFlexibleBox::layoutVerticalBox(bool relayoutChildren)
         }
     }
 
-    // So that the calcHeight in layoutBlock() knows to relayout positioned objects because of
+    // So that the computeLogicalHeight in layoutBlock() knows to relayout positioned objects because of
     // a height change, we revert our height back to the intrinsic height before returning.
     if (heightSpecified)
         setHeight(oldHeight); 
index 21c0aed..a7d2606 100644 (file)
@@ -429,7 +429,7 @@ bool RenderImage::isHeightSpecified() const
     return false;
 }
 
-int RenderImage::calcReplacedWidth(bool includeMaxWidth) const
+int RenderImage::computeReplacedWidth(bool includeMaxWidth) const
 {
     if (m_imageResource->imageHasRelativeWidth())
         if (RenderObject* cb = isPositioned() ? container() : containingBlock()) {
@@ -439,7 +439,7 @@ int RenderImage::calcReplacedWidth(bool includeMaxWidth) const
 
     int width;
     if (isWidthSpecified())
-        width = calcReplacedWidthUsing(style()->width());
+        width = computeReplacedWidthUsing(style()->width());
     else if (m_imageResource->usesImageContainerSize())
         width = m_imageResource->imageSize(style()->effectiveZoom()).width();
     else if (m_imageResource->imageHasRelativeWidth())
@@ -447,17 +447,17 @@ int RenderImage::calcReplacedWidth(bool includeMaxWidth) const
     else
         width = calcAspectRatioWidth();
 
-    int minW = calcReplacedWidthUsing(style()->minWidth());
-    int maxW = !includeMaxWidth || style()->maxWidth().isUndefined() ? width : calcReplacedWidthUsing(style()->maxWidth());
+    int minW = computeReplacedWidthUsing(style()->minWidth());
+    int maxW = !includeMaxWidth || style()->maxWidth().isUndefined() ? width : computeReplacedWidthUsing(style()->maxWidth());
 
     return max(minW, min(width, maxW));
 }
 
-int RenderImage::calcReplacedHeight() const
+int RenderImage::computeReplacedHeight() const
 {
     int height;
     if (isHeightSpecified())
-        height = calcReplacedHeightUsing(style()->height());
+        height = computeReplacedHeightUsing(style()->height());
     else if (m_imageResource->usesImageContainerSize())
         height = m_imageResource->imageSize(style()->effectiveZoom()).height();
     else if (m_imageResource->imageHasRelativeHeight())
@@ -465,8 +465,8 @@ int RenderImage::calcReplacedHeight() const
     else
         height = calcAspectRatioHeight();
 
-    int minH = calcReplacedHeightUsing(style()->minHeight());
-    int maxH = style()->maxHeight().isUndefined() ? height : calcReplacedHeightUsing(style()->maxHeight());
+    int minH = computeReplacedHeightUsing(style()->minHeight());
+    int maxH = style()->maxHeight().isUndefined() ? height : computeReplacedHeightUsing(style()->maxHeight());
 
     return max(minH, min(height, maxH));
 }
@@ -478,7 +478,7 @@ int RenderImage::calcAspectRatioWidth() const
         return 0;
     if (!m_imageResource->hasImage() || m_imageResource->errorOccurred())
         return size.width(); // Don't bother scaling.
-    return RenderBox::calcReplacedHeight() * size.width() / size.height();
+    return RenderBox::computeReplacedHeight() * size.width() / size.height();
 }
 
 int RenderImage::calcAspectRatioHeight() const
@@ -488,7 +488,7 @@ int RenderImage::calcAspectRatioHeight() const
         return 0;
     if (!m_imageResource->hasImage() || m_imageResource->errorOccurred())
         return size.height(); // Don't bother scaling.
-    return RenderBox::calcReplacedWidth() * size.height() / size.width();
+    return RenderBox::computeReplacedWidth() * size.height() / size.width();
 }
 
 } // namespace WebCore
index 96d2988..022d792 100644 (file)
@@ -80,8 +80,8 @@ private:
     virtual void notifyFinished(CachedResource*);
     virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, int x, int y, int tx, int ty, HitTestAction);
 
-    virtual int calcReplacedWidth(bool includeMaxWidth = true) const;
-    virtual int calcReplacedHeight() const;
+    virtual int computeReplacedWidth(bool includeMaxWidth = true) const;
+    virtual int computeReplacedHeight() const;
 
     int calcAspectRatioWidth() const;
     int calcAspectRatioHeight() const;
index ebf845b..f2bb681 100644 (file)
@@ -168,7 +168,7 @@ void RenderListBox::calcPrefWidths()
     m_maxPrefWidth = 0;
 
     if (style()->width().isFixed() && style()->width().value() > 0)
-        m_minPrefWidth = m_maxPrefWidth = calcContentBoxWidth(style()->width().value());
+        m_minPrefWidth = m_maxPrefWidth = computeContentBoxLogicalWidth(style()->width().value());
     else {
         m_maxPrefWidth = m_optionsWidth + 2 * optionsSpacingHorizontal;
         if (m_vBar)
@@ -176,16 +176,16 @@ void RenderListBox::calcPrefWidths()
     }
 
     if (style()->minWidth().isFixed() && style()->minWidth().value() > 0) {
-        m_maxPrefWidth = max(m_maxPrefWidth, calcContentBoxWidth(style()->minWidth().value()));
-        m_minPrefWidth = max(m_minPrefWidth, calcContentBoxWidth(style()->minWidth().value()));
+        m_maxPrefWidth = max(m_maxPrefWidth, computeContentBoxLogicalWidth(style()->minWidth().value()));
+        m_minPrefWidth = max(m_minPrefWidth, computeContentBoxLogicalWidth(style()->minWidth().value()));
     } else if (style()->width().isPercent() || (style()->width().isAuto() && style()->height().isPercent()))
         m_minPrefWidth = 0;
     else
         m_minPrefWidth = m_maxPrefWidth;
 
     if (style()->maxWidth().isFixed() && style()->maxWidth().value() != undefinedLength) {
-        m_maxPrefWidth = min(m_maxPrefWidth, calcContentBoxWidth(style()->maxWidth().value()));
-        m_minPrefWidth = min(m_minPrefWidth, calcContentBoxWidth(style()->maxWidth().value()));
+        m_maxPrefWidth = min(m_maxPrefWidth, computeContentBoxLogicalWidth(style()->maxWidth().value()));
+        m_minPrefWidth = min(m_minPrefWidth, computeContentBoxLogicalWidth(style()->maxWidth().value()));
     }
 
     int toAdd = borderAndPaddingWidth();
index b6a97a9..5286e2c 100644 (file)
@@ -245,21 +245,21 @@ void RenderMenuList::calcPrefWidths()
     m_maxPrefWidth = 0;
     
     if (style()->width().isFixed() && style()->width().value() > 0)
-        m_minPrefWidth = m_maxPrefWidth = calcContentBoxWidth(style()->width().value());
+        m_minPrefWidth = m_maxPrefWidth = computeContentBoxLogicalWidth(style()->width().value());
     else
         m_maxPrefWidth = max(m_optionsWidth, theme()->minimumMenuListSize(style())) + m_innerBlock->paddingLeft() + m_innerBlock->paddingRight();
 
     if (style()->minWidth().isFixed() && style()->minWidth().value() > 0) {
-        m_maxPrefWidth = max(m_maxPrefWidth, calcContentBoxWidth(style()->minWidth().value()));
-        m_minPrefWidth = max(m_minPrefWidth, calcContentBoxWidth(style()->minWidth().value()));
+        m_maxPrefWidth = max(m_maxPrefWidth, computeContentBoxLogicalWidth(style()->minWidth().value()));
+        m_minPrefWidth = max(m_minPrefWidth, computeContentBoxLogicalWidth(style()->minWidth().value()));
     } else if (style()->width().isPercent() || (style()->width().isAuto() && style()->height().isPercent()))
         m_minPrefWidth = 0;
     else
         m_minPrefWidth = m_maxPrefWidth;
 
     if (style()->maxWidth().isFixed() && style()->maxWidth().value() != undefinedLength) {
-        m_maxPrefWidth = min(m_maxPrefWidth, calcContentBoxWidth(style()->maxWidth().value()));
-        m_minPrefWidth = min(m_minPrefWidth, calcContentBoxWidth(style()->maxWidth().value()));
+        m_maxPrefWidth = min(m_maxPrefWidth, computeContentBoxLogicalWidth(style()->maxWidth().value()));
+        m_minPrefWidth = min(m_minPrefWidth, computeContentBoxLogicalWidth(style()->maxWidth().value()));
     }
 
     int toAdd = borderAndPaddingWidth();
index 67855cf..39ee309 100644 (file)
@@ -2095,8 +2095,8 @@ RenderObject* RenderObject::container(RenderBoxModelObject* repaintContainer, bo
     // (2) For normal flow elements, it just returns the parent.
     // (3) For absolute positioned elements, it will return a relative positioned inline.
     // containingBlock() simply skips relpositioned inlines and lets an enclosing block handle
-    // the layout of the positioned object.  This does mean that calcAbsoluteHorizontal and
-    // calcAbsoluteVertical have to use container().
+    // the layout of the positioned object.  This does mean that computePositionedLogicalWidth and
+    // computePositionedLogicalHeight have to use container().
     RenderObject* o = parent();
 
     if (isText())
index f2ca471..84815ae 100644 (file)
@@ -688,7 +688,7 @@ public:
      */
     virtual IntRect localCaretRect(InlineBox*, int caretOffset, int* extraWidthToEndOfLine = 0);
 
-    virtual void calcVerticalMargins() { }
+    virtual void computeBlockDirectionMargins() { }
     bool isTopMarginQuirk() const { return m_topMarginQuirk; }
     bool isBottomMarginQuirk() const { return m_bottomMarginQuirk; }
     void setTopMarginQuirk(bool b = true) { m_topMarginQuirk = b; }
index dfb95d8..e0affc4 100644 (file)
@@ -207,34 +207,34 @@ static inline bool lengthIsSpecified(Length length)
     return lengthType == Fixed || lengthType == Percent;
 }
 
-int RenderReplaced::calcReplacedWidth(bool includeMaxWidth) const
+int RenderReplaced::computeReplacedWidth(bool includeMaxWidth) const
 {
     int width;
     if (lengthIsSpecified(style()->width()))
-        width = calcReplacedWidthUsing(style()->width());
+        width = computeReplacedWidthUsing(style()->width());
     else if (m_hasIntrinsicSize)
         width = calcAspectRatioWidth();
     else
         width = intrinsicSize().width();
 
-    int minW = calcReplacedWidthUsing(style()->minWidth());
-    int maxW = !includeMaxWidth || style()->maxWidth().isUndefined() ? width : calcReplacedWidthUsing(style()->maxWidth());
+    int minW = computeReplacedWidthUsing(style()->minWidth());
+    int maxW = !includeMaxWidth || style()->maxWidth().isUndefined() ? width : computeReplacedWidthUsing(style()->maxWidth());
 
     return max(minW, min(width, maxW));
 }
 
-int RenderReplaced::calcReplacedHeight() const
+int RenderReplaced::computeReplacedHeight() const
 {
     int height;
     if (lengthIsSpecified(style()->height()))
-        height = calcReplacedHeightUsing(style()->height());
+        height = computeReplacedHeightUsing(style()->height());
     else if (m_hasIntrinsicSize)
         height = calcAspectRatioHeight();
     else
         height = intrinsicSize().height();
 
-    int minH = calcReplacedHeightUsing(style()->minHeight());
-    int maxH = style()->maxHeight().isUndefined() ? height : calcReplacedHeightUsing(style()->maxHeight());
+    int minH = computeReplacedHeightUsing(style()->minHeight());
+    int maxH = style()->maxHeight().isUndefined() ? height : computeReplacedHeightUsing(style()->maxHeight());
 
     return max(minH, min(height, maxH));
 }
@@ -245,7 +245,7 @@ int RenderReplaced::calcAspectRatioWidth() const
     int intrinsicHeight = intrinsicSize().height();
     if (!intrinsicHeight)
         return 0;
-    return RenderBox::calcReplacedHeight() * intrinsicWidth / intrinsicHeight;
+    return RenderBox::computeReplacedHeight() * intrinsicWidth / intrinsicHeight;
 }
 
 int RenderReplaced::calcAspectRatioHeight() const
@@ -254,7 +254,7 @@ int RenderReplaced::calcAspectRatioHeight() const
     int intrinsicHeight = intrinsicSize().height();
     if (!intrinsicWidth)
         return 0;
-    return RenderBox::calcReplacedWidth() * intrinsicHeight / intrinsicWidth;
+    return RenderBox::computeReplacedWidth() * intrinsicHeight / intrinsicWidth;
 }
 
 void RenderReplaced::calcPrefWidths()
@@ -262,7 +262,7 @@ void RenderReplaced::calcPrefWidths()
     ASSERT(prefWidthsDirty());
 
     int borderAndPadding = borderAndPaddingWidth();
-    m_maxPrefWidth = calcReplacedWidth(false) + borderAndPadding;
+    m_maxPrefWidth = computeReplacedWidth(false) + borderAndPadding;
 
     if (style()->maxWidth().isFixed() && style()->maxWidth().value() != undefinedLength)
         m_maxPrefWidth = min(m_maxPrefWidth, style()->maxWidth().value() + (style()->boxSizing() == CONTENT_BOX ? borderAndPadding : 0));
index 0c99c89..a3f8de9 100644 (file)
@@ -39,8 +39,8 @@ protected:
 
     virtual IntSize intrinsicSize() const;
 
-    virtual int calcReplacedWidth(bool includeMaxWidth = true) const;
-    virtual int calcReplacedHeight() const;
+    virtual int computeReplacedWidth(bool includeMaxWidth = true) const;
+    virtual int computeReplacedHeight() const;
     virtual int minimumReplacedHeight() const { return 0; }
 
     virtual void setSelectionState(SelectionState);
index ac0d70b..cda3576 100644 (file)
@@ -68,7 +68,7 @@ void RenderSVGRoot::calcPrefWidths()
     ASSERT(prefWidthsDirty());
 
     int borderAndPadding = borderAndPaddingWidth();
-    int width = calcReplacedWidth(false) + borderAndPadding;
+    int width = computeReplacedWidth(false) + borderAndPadding;
 
     if (style()->maxWidth().isFixed() && style()->maxWidth().value() != undefinedLength)
         width = min(width, style()->maxWidth().value() + (style()->boxSizing() == CONTENT_BOX ? borderAndPadding : 0));
@@ -82,9 +82,9 @@ void RenderSVGRoot::calcPrefWidths()
     setPrefWidthsDirty(false);
 }
 
-int RenderSVGRoot::calcReplacedWidth(bool includeMaxWidth) const
+int RenderSVGRoot::computeReplacedWidth(bool includeMaxWidth) const
 {
-    int replacedWidth = RenderBox::calcReplacedWidth(includeMaxWidth);
+    int replacedWidth = RenderBox::computeReplacedWidth(includeMaxWidth);
     if (!style()->width().isPercent())
         return replacedWidth;
 
@@ -93,9 +93,9 @@ int RenderSVGRoot::calcReplacedWidth(bool includeMaxWidth) const
     return static_cast<int>(roundf(replacedWidth * svg->currentScale()));
 }
 
-int RenderSVGRoot::calcReplacedHeight() const
+int RenderSVGRoot::computeReplacedHeight() const
 {
-    int replacedHeight = RenderBox::calcReplacedHeight();
+    int replacedHeight = RenderBox::computeReplacedHeight();
     if (!style()->height().isPercent())
         return replacedHeight;
 
index 63a7b3f..a2a964d 100644 (file)
@@ -54,8 +54,8 @@ private:
     virtual int lineHeight(bool b, bool isRootLineBox = false) const;
     virtual int baselinePosition(bool b, bool isRootLineBox = false) const;
     virtual void calcPrefWidths();
-    virtual int calcReplacedWidth(bool includeMaxWidth = true) const;
-    virtual int calcReplacedHeight() const;
+    virtual int computeReplacedWidth(bool includeMaxWidth = true) const;
+    virtual int computeReplacedHeight() const;
     virtual void layout();
     virtual void paint(PaintInfo&, int parentX, int parentY);
 
index 27b6edf..ee735ef 100644 (file)
@@ -166,21 +166,21 @@ void RenderSlider::calcPrefWidths()
     m_maxPrefWidth = 0;
 
     if (style()->width().isFixed() && style()->width().value() > 0)
-        m_minPrefWidth = m_maxPrefWidth = calcContentBoxWidth(style()->width().value());
+        m_minPrefWidth = m_maxPrefWidth = computeContentBoxLogicalWidth(style()->width().value());
     else
         m_maxPrefWidth = defaultTrackLength * style()->effectiveZoom();
 
     if (style()->minWidth().isFixed() && style()->minWidth().value() > 0) {
-        m_maxPrefWidth = max(m_maxPrefWidth, calcContentBoxWidth(style()->minWidth().value()));
-        m_minPrefWidth = max(m_minPrefWidth, calcContentBoxWidth(style()->minWidth().value()));
+        m_maxPrefWidth = max(m_maxPrefWidth, computeContentBoxLogicalWidth(style()->minWidth().value()));
+        m_minPrefWidth = max(m_minPrefWidth, computeContentBoxLogicalWidth(style()->minWidth().value()));
     } else if (style()->width().isPercent() || (style()->width().isAuto() && style()->height().isPercent()))
         m_minPrefWidth = 0;
     else
         m_minPrefWidth = m_maxPrefWidth;
     
     if (style()->maxWidth().isFixed() && style()->maxWidth().value() != undefinedLength) {
-        m_maxPrefWidth = min(m_maxPrefWidth, calcContentBoxWidth(style()->maxWidth().value()));
-        m_minPrefWidth = min(m_minPrefWidth, calcContentBoxWidth(style()->maxWidth().value()));
+        m_maxPrefWidth = min(m_maxPrefWidth, computeContentBoxLogicalWidth(style()->maxWidth().value()));
+        m_minPrefWidth = min(m_minPrefWidth, computeContentBoxLogicalWidth(style()->maxWidth().value()));
     }
 
     int toAdd = borderAndPaddingWidth();
index 3a8b894..e7fb9f9 100644 (file)
@@ -197,7 +197,7 @@ void RenderTable::removeChild(RenderObject* oldChild)
 void RenderTable::computeLogicalWidth()
 {
     if (isPositioned())
-        calcAbsoluteHorizontal();
+        computePositionedLogicalWidth();
 
     RenderBlock* cb = containingBlock();
     int availableWidth = cb->availableWidth();
@@ -231,7 +231,7 @@ void RenderTable::computeLogicalWidth()
     // Finally, with our true width determined, compute our margins for real.
     m_marginRight = 0;
     m_marginLeft = 0;
-    calcHorizontalMargins(style()->marginLeft(), style()->marginRight(), availableWidth);
+    computeInlineDirectionMargins(style()->marginLeft(), style()->marginRight(), availableWidth);
 }
 
 void RenderTable::layout()
@@ -326,7 +326,7 @@ void RenderTable::layout()
         // Tables size as though CSS height includes border/padding.
         th = h.value() - (bpTop + bpBottom);
     else if (h.isPercent())
-        th = calcPercentageHeight(h);
+        th = computePercentageLogicalHeight(h);
     th = max(0, th);
 
     for (RenderObject* child = firstChild(); child; child = child->nextSibling()) {
index 0a8bfde..74baa97 100644 (file)
@@ -126,7 +126,7 @@ void RenderTableRow::layout()
                 cell->setChildNeedsLayout(true, false);
 
             if (child->needsLayout()) {
-                cell->calcVerticalMargins();
+                cell->computeBlockDirectionMargins();
                 cell->layout();
             }
         }
index 9be62d8..707a0a3 100644 (file)
@@ -512,7 +512,7 @@ void RenderTextControl::calcPrefWidths()
     m_maxPrefWidth = 0;
 
     if (style()->width().isFixed() && style()->width().value() > 0)
-        m_minPrefWidth = m_maxPrefWidth = calcContentBoxWidth(style()->width().value());
+        m_minPrefWidth = m_maxPrefWidth = computeContentBoxLogicalWidth(style()->width().value());
     else {
         // Use average character width. Matches IE.
         AtomicString family = style()->font().family().family();
@@ -520,16 +520,16 @@ void RenderTextControl::calcPrefWidths()
     }
 
     if (style()->minWidth().isFixed() && style()->minWidth().value() > 0) {
-        m_maxPrefWidth = max(m_maxPrefWidth, calcContentBoxWidth(style()->minWidth().value()));
-        m_minPrefWidth = max(m_minPrefWidth, calcContentBoxWidth(style()->minWidth().value()));
+        m_maxPrefWidth = max(m_maxPrefWidth, computeContentBoxLogicalWidth(style()->minWidth().value()));
+        m_minPrefWidth = max(m_minPrefWidth, computeContentBoxLogicalWidth(style()->minWidth().value()));
     } else if (style()->width().isPercent() || (style()->width().isAuto() && style()->height().isPercent()))
         m_minPrefWidth = 0;
     else
         m_minPrefWidth = m_maxPrefWidth;
 
     if (style()->maxWidth().isFixed() && style()->maxWidth().value() != undefinedLength) {
-        m_maxPrefWidth = min(m_maxPrefWidth, calcContentBoxWidth(style()->maxWidth().value()));
-        m_minPrefWidth = min(m_minPrefWidth, calcContentBoxWidth(style()->maxWidth().value()));
+        m_maxPrefWidth = min(m_maxPrefWidth, computeContentBoxLogicalWidth(style()->maxWidth().value()));
+        m_minPrefWidth = min(m_minPrefWidth, computeContentBoxLogicalWidth(style()->maxWidth().value()));
     }
 
     int toAdd = borderAndPaddingWidth();
index 3dfee7b..7ee88cb 100644 (file)
@@ -246,14 +246,14 @@ void RenderVideo::updatePlayer()
     mediaPlayer->setVisible(true);
 }
 
-int RenderVideo::calcReplacedWidth(bool includeMaxWidth) const
+int RenderVideo::computeReplacedWidth(bool includeMaxWidth) const
 {
-    return RenderReplaced::calcReplacedWidth(includeMaxWidth);
+    return RenderReplaced::computeReplacedWidth(includeMaxWidth);
 }
 
-int RenderVideo::calcReplacedHeight() const
+int RenderVideo::computeReplacedHeight() const
 {
-    return RenderReplaced::calcReplacedHeight();
+    return RenderReplaced::computeReplacedHeight();
 }
 
 int RenderVideo::minimumReplacedHeight() const 
index 2c47471..24f473d 100644 (file)
@@ -70,8 +70,8 @@ private:
 
     virtual void layout();
 
-    virtual int calcReplacedWidth(bool includeMaxWidth = true) const;
-    virtual int calcReplacedHeight() const;
+    virtual int computeReplacedWidth(bool includeMaxWidth = true) const;
+    virtual int computeReplacedHeight() const;
     virtual int minimumReplacedHeight() const;
 
     void updatePlayer();