https://bugs.webkit.org/show_bug.cgi?id=46482, rename the various prefWidth functions...
authorhyatt@apple.com <hyatt@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 24 Sep 2010 18:07:44 +0000 (18:07 +0000)
committerhyatt@apple.com <hyatt@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 24 Sep 2010 18:07:44 +0000 (18:07 +0000)
preferredLogicalWidth.

Reviewed by Simon Fraser.

* rendering/AutoTableLayout.cpp:
(WebCore::AutoTableLayout::recalcColumn):
(WebCore::AutoTableLayout::computePreferredLogicalWidths):
(WebCore::AutoTableLayout::calcEffectiveWidth):
* rendering/AutoTableLayout.h:
* rendering/FixedTableLayout.cpp:
(WebCore::FixedTableLayout::calcWidthArray):
(WebCore::FixedTableLayout::computePreferredLogicalWidths):
* rendering/FixedTableLayout.h:
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::layoutBlockChildren):
(WebCore::RenderBlock::layoutPositionedObjects):
(WebCore::RenderBlock::getClearDelta):
(WebCore::RenderBlock::computePreferredLogicalWidths):
(WebCore::RenderBlock::computeInlinePreferredLogicalWidths):
(WebCore::RenderBlock::computeBlockPreferredLogicalWidths):
* rendering/RenderBlock.h:
* rendering/RenderBlockLineLayout.cpp:
(WebCore::dirtyLineBoxesForRenderer):
(WebCore::RenderBlock::layoutInlineChildren):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::RenderBox):
(WebCore::RenderBox::minPreferredLogicalWidth):
(WebCore::RenderBox::maxPreferredLogicalWidth):
(WebCore::RenderBox::computeLogicalWidth):
(WebCore::RenderBox::computeLogicalWidthUsing):
(WebCore::RenderBox::computePositionedLogicalWidth):
(WebCore::RenderBox::computePositionedLogicalWidthUsing):
* rendering/RenderBox.h:
(WebCore::RenderBox::computePreferredLogicalWidths):
* rendering/RenderCounter.cpp:
(WebCore::RenderCounter::computePreferredLogicalWidths):
* rendering/RenderCounter.h:
* rendering/RenderDataGrid.cpp:
(WebCore::RenderDataGrid::computePreferredLogicalWidths):
* rendering/RenderDataGrid.h:
* rendering/RenderFieldset.cpp:
(WebCore::RenderFieldset::computePreferredLogicalWidths):
* rendering/RenderFieldset.h:
* rendering/RenderFileUploadControl.cpp:
(WebCore::RenderFileUploadControl::computePreferredLogicalWidths):
* rendering/RenderFileUploadControl.h:
* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::calcHorizontalPrefWidths):
(WebCore::RenderFlexibleBox::calcVerticalPrefWidths):
(WebCore::RenderFlexibleBox::computePreferredLogicalWidths):
(WebCore::RenderFlexibleBox::allowedChildFlex):
* rendering/RenderFlexibleBox.h:
* rendering/RenderFrameBase.cpp:
(WebCore::RenderFrameBase::layoutWithFlattening):
* rendering/RenderHTMLCanvas.cpp:
(WebCore::RenderHTMLCanvas::canvasSizeChanged):
* rendering/RenderImage.cpp:
(WebCore::RenderImage::imageChanged):
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::computePreferredLogicalWidths):
* rendering/RenderListBox.h:
* rendering/RenderListItem.cpp:
(WebCore::RenderListItem::updateMarkerLocation):
(WebCore::RenderListItem::computePreferredLogicalWidths):
* rendering/RenderListItem.h:
* rendering/RenderListMarker.cpp:
(WebCore::RenderListMarker::layout):
(WebCore::RenderListMarker::computePreferredLogicalWidths):
(WebCore::RenderListMarker::updateMargins):
* rendering/RenderListMarker.h:
* rendering/RenderMenuList.cpp:
(WebCore::RenderMenuList::computePreferredLogicalWidths):
* rendering/RenderMenuList.h:
* rendering/RenderObject.cpp:
(WebCore::RenderObject::RenderObject):
(WebCore::RenderObject::setPreferredLogicalWidthsDirty):
(WebCore::RenderObject::invalidateContainerPreferredLogicalWidths):
* rendering/RenderObject.h:
(WebCore::RenderObject::preferredLogicalWidthsDirty):
(WebCore::RenderObject::setNeedsLayoutAndPrefWidthsRecalc):
(WebCore::RenderObject::minPreferredLogicalWidth):
(WebCore::RenderObject::maxPreferredLogicalWidth):
* rendering/RenderReplaced.cpp:
(WebCore::RenderReplaced::computePreferredLogicalWidths):
* rendering/RenderReplaced.h:
* rendering/RenderReplica.cpp:
(WebCore::RenderReplica::computePreferredLogicalWidths):
* rendering/RenderReplica.h:
* rendering/RenderSVGRoot.cpp:
(WebCore::RenderSVGRoot::computePreferredLogicalWidths):
* rendering/RenderSVGRoot.h:
* rendering/RenderScrollbarPart.cpp:
(WebCore::RenderScrollbarPart::computePreferredLogicalWidths):
* rendering/RenderScrollbarPart.h:
* rendering/RenderSlider.cpp:
(WebCore::RenderSlider::computePreferredLogicalWidths):
* rendering/RenderSlider.h:
* rendering/RenderTable.cpp:
(WebCore::RenderTable::computeLogicalWidth):
(WebCore::RenderTable::computePreferredLogicalWidths):
* rendering/RenderTable.h:
* rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::computePreferredLogicalWidths):
* rendering/RenderTableCell.h:
* rendering/RenderTableCol.cpp:
(WebCore::RenderTableCol::computePreferredLogicalWidths):
* rendering/RenderTableCol.h:
* rendering/RenderText.cpp:
(WebCore::RenderText::trimmedPrefWidths):
(WebCore::RenderText::minPreferredLogicalWidth):
(WebCore::RenderText::maxPreferredLogicalWidth):
(WebCore::RenderText::computePreferredLogicalWidths):
(WebCore::RenderText::width):
* rendering/RenderText.h:
* rendering/RenderTextControl.cpp:
(WebCore::RenderTextControl::computePreferredLogicalWidths):
* rendering/RenderTextControl.h:
* rendering/RenderTextControlSingleLine.cpp:
(WebCore::RenderTextControlSingleLine::preferredContentWidth):
(WebCore::RenderTextControlSingleLine::preferredDecorationWidthRight):
* rendering/RenderVideo.cpp:
(WebCore::RenderVideo::updateIntrinsicSize):
* rendering/RenderView.cpp:
(WebCore::RenderView::RenderView):
(WebCore::RenderView::computePreferredLogicalWidths):
(WebCore::RenderView::layout):
* rendering/RenderView.h:
* rendering/TableLayout.h:

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

58 files changed:
WebCore/ChangeLog
WebCore/rendering/AutoTableLayout.cpp
WebCore/rendering/AutoTableLayout.h
WebCore/rendering/FixedTableLayout.cpp
WebCore/rendering/FixedTableLayout.h
WebCore/rendering/RenderBlock.cpp
WebCore/rendering/RenderBlock.h
WebCore/rendering/RenderBlockLineLayout.cpp
WebCore/rendering/RenderBox.cpp
WebCore/rendering/RenderBox.h
WebCore/rendering/RenderCounter.cpp
WebCore/rendering/RenderCounter.h
WebCore/rendering/RenderDataGrid.cpp
WebCore/rendering/RenderDataGrid.h
WebCore/rendering/RenderFieldset.cpp
WebCore/rendering/RenderFieldset.h
WebCore/rendering/RenderFileUploadControl.cpp
WebCore/rendering/RenderFileUploadControl.h
WebCore/rendering/RenderFlexibleBox.cpp
WebCore/rendering/RenderFlexibleBox.h
WebCore/rendering/RenderFrameBase.cpp
WebCore/rendering/RenderHTMLCanvas.cpp
WebCore/rendering/RenderImage.cpp
WebCore/rendering/RenderListBox.cpp
WebCore/rendering/RenderListBox.h
WebCore/rendering/RenderListItem.cpp
WebCore/rendering/RenderListItem.h
WebCore/rendering/RenderListMarker.cpp
WebCore/rendering/RenderListMarker.h
WebCore/rendering/RenderMenuList.cpp
WebCore/rendering/RenderMenuList.h
WebCore/rendering/RenderObject.cpp
WebCore/rendering/RenderObject.h
WebCore/rendering/RenderReplaced.cpp
WebCore/rendering/RenderReplaced.h
WebCore/rendering/RenderReplica.cpp
WebCore/rendering/RenderReplica.h
WebCore/rendering/RenderSVGRoot.cpp
WebCore/rendering/RenderSVGRoot.h
WebCore/rendering/RenderScrollbarPart.cpp
WebCore/rendering/RenderScrollbarPart.h
WebCore/rendering/RenderSlider.cpp
WebCore/rendering/RenderSlider.h
WebCore/rendering/RenderTable.cpp
WebCore/rendering/RenderTable.h
WebCore/rendering/RenderTableCell.cpp
WebCore/rendering/RenderTableCell.h
WebCore/rendering/RenderTableCol.cpp
WebCore/rendering/RenderTableCol.h
WebCore/rendering/RenderText.cpp
WebCore/rendering/RenderText.h
WebCore/rendering/RenderTextControl.cpp
WebCore/rendering/RenderTextControl.h
WebCore/rendering/RenderTextControlSingleLine.cpp
WebCore/rendering/RenderVideo.cpp
WebCore/rendering/RenderView.cpp
WebCore/rendering/RenderView.h
WebCore/rendering/TableLayout.h

index 267cced..da44b17 100644 (file)
@@ -1,3 +1,135 @@
+2010-09-24  David Hyatt  <hyatt@apple.com>
+
+        Reviewed by Simon Fraser.
+
+        https://bugs.webkit.org/show_bug.cgi?id=46482, rename the various prefWidth functions to use
+        preferredLogicalWidth.
+
+        * rendering/AutoTableLayout.cpp:
+        (WebCore::AutoTableLayout::recalcColumn):
+        (WebCore::AutoTableLayout::computePreferredLogicalWidths):
+        (WebCore::AutoTableLayout::calcEffectiveWidth):
+        * rendering/AutoTableLayout.h:
+        * rendering/FixedTableLayout.cpp:
+        (WebCore::FixedTableLayout::calcWidthArray):
+        (WebCore::FixedTableLayout::computePreferredLogicalWidths):
+        * rendering/FixedTableLayout.h:
+        * rendering/RenderBlock.cpp:
+        (WebCore::RenderBlock::layoutBlockChildren):
+        (WebCore::RenderBlock::layoutPositionedObjects):
+        (WebCore::RenderBlock::getClearDelta):
+        (WebCore::RenderBlock::computePreferredLogicalWidths):
+        (WebCore::RenderBlock::computeInlinePreferredLogicalWidths):
+        (WebCore::RenderBlock::computeBlockPreferredLogicalWidths):
+        * rendering/RenderBlock.h:
+        * rendering/RenderBlockLineLayout.cpp:
+        (WebCore::dirtyLineBoxesForRenderer):
+        (WebCore::RenderBlock::layoutInlineChildren):
+        * rendering/RenderBox.cpp:
+        (WebCore::RenderBox::RenderBox):
+        (WebCore::RenderBox::minPreferredLogicalWidth):
+        (WebCore::RenderBox::maxPreferredLogicalWidth):
+        (WebCore::RenderBox::computeLogicalWidth):
+        (WebCore::RenderBox::computeLogicalWidthUsing):
+        (WebCore::RenderBox::computePositionedLogicalWidth):
+        (WebCore::RenderBox::computePositionedLogicalWidthUsing):
+        * rendering/RenderBox.h:
+        (WebCore::RenderBox::computePreferredLogicalWidths):
+        * rendering/RenderCounter.cpp:
+        (WebCore::RenderCounter::computePreferredLogicalWidths):
+        * rendering/RenderCounter.h:
+        * rendering/RenderDataGrid.cpp:
+        (WebCore::RenderDataGrid::computePreferredLogicalWidths):
+        * rendering/RenderDataGrid.h:
+        * rendering/RenderFieldset.cpp:
+        (WebCore::RenderFieldset::computePreferredLogicalWidths):
+        * rendering/RenderFieldset.h:
+        * rendering/RenderFileUploadControl.cpp:
+        (WebCore::RenderFileUploadControl::computePreferredLogicalWidths):
+        * rendering/RenderFileUploadControl.h:
+        * rendering/RenderFlexibleBox.cpp:
+        (WebCore::RenderFlexibleBox::calcHorizontalPrefWidths):
+        (WebCore::RenderFlexibleBox::calcVerticalPrefWidths):
+        (WebCore::RenderFlexibleBox::computePreferredLogicalWidths):
+        (WebCore::RenderFlexibleBox::allowedChildFlex):
+        * rendering/RenderFlexibleBox.h:
+        * rendering/RenderFrameBase.cpp:
+        (WebCore::RenderFrameBase::layoutWithFlattening):
+        * rendering/RenderHTMLCanvas.cpp:
+        (WebCore::RenderHTMLCanvas::canvasSizeChanged):
+        * rendering/RenderImage.cpp:
+        (WebCore::RenderImage::imageChanged):
+        * rendering/RenderListBox.cpp:
+        (WebCore::RenderListBox::computePreferredLogicalWidths):
+        * rendering/RenderListBox.h:
+        * rendering/RenderListItem.cpp:
+        (WebCore::RenderListItem::updateMarkerLocation):
+        (WebCore::RenderListItem::computePreferredLogicalWidths):
+        * rendering/RenderListItem.h:
+        * rendering/RenderListMarker.cpp:
+        (WebCore::RenderListMarker::layout):
+        (WebCore::RenderListMarker::computePreferredLogicalWidths):
+        (WebCore::RenderListMarker::updateMargins):
+        * rendering/RenderListMarker.h:
+        * rendering/RenderMenuList.cpp:
+        (WebCore::RenderMenuList::computePreferredLogicalWidths):
+        * rendering/RenderMenuList.h:
+        * rendering/RenderObject.cpp:
+        (WebCore::RenderObject::RenderObject):
+        (WebCore::RenderObject::setPreferredLogicalWidthsDirty):
+        (WebCore::RenderObject::invalidateContainerPreferredLogicalWidths):
+        * rendering/RenderObject.h:
+        (WebCore::RenderObject::preferredLogicalWidthsDirty):
+        (WebCore::RenderObject::setNeedsLayoutAndPrefWidthsRecalc):
+        (WebCore::RenderObject::minPreferredLogicalWidth):
+        (WebCore::RenderObject::maxPreferredLogicalWidth):
+        * rendering/RenderReplaced.cpp:
+        (WebCore::RenderReplaced::computePreferredLogicalWidths):
+        * rendering/RenderReplaced.h:
+        * rendering/RenderReplica.cpp:
+        (WebCore::RenderReplica::computePreferredLogicalWidths):
+        * rendering/RenderReplica.h:
+        * rendering/RenderSVGRoot.cpp:
+        (WebCore::RenderSVGRoot::computePreferredLogicalWidths):
+        * rendering/RenderSVGRoot.h:
+        * rendering/RenderScrollbarPart.cpp:
+        (WebCore::RenderScrollbarPart::computePreferredLogicalWidths):
+        * rendering/RenderScrollbarPart.h:
+        * rendering/RenderSlider.cpp:
+        (WebCore::RenderSlider::computePreferredLogicalWidths):
+        * rendering/RenderSlider.h:
+        * rendering/RenderTable.cpp:
+        (WebCore::RenderTable::computeLogicalWidth):
+        (WebCore::RenderTable::computePreferredLogicalWidths):
+        * rendering/RenderTable.h:
+        * rendering/RenderTableCell.cpp:
+        (WebCore::RenderTableCell::computePreferredLogicalWidths):
+        * rendering/RenderTableCell.h:
+        * rendering/RenderTableCol.cpp:
+        (WebCore::RenderTableCol::computePreferredLogicalWidths):
+        * rendering/RenderTableCol.h:
+        * rendering/RenderText.cpp:
+        (WebCore::RenderText::trimmedPrefWidths):
+        (WebCore::RenderText::minPreferredLogicalWidth):
+        (WebCore::RenderText::maxPreferredLogicalWidth):
+        (WebCore::RenderText::computePreferredLogicalWidths):
+        (WebCore::RenderText::width):
+        * rendering/RenderText.h:
+        * rendering/RenderTextControl.cpp:
+        (WebCore::RenderTextControl::computePreferredLogicalWidths):
+        * rendering/RenderTextControl.h:
+        * rendering/RenderTextControlSingleLine.cpp:
+        (WebCore::RenderTextControlSingleLine::preferredContentWidth):
+        (WebCore::RenderTextControlSingleLine::preferredDecorationWidthRight):
+        * rendering/RenderVideo.cpp:
+        (WebCore::RenderVideo::updateIntrinsicSize):
+        * rendering/RenderView.cpp:
+        (WebCore::RenderView::RenderView):
+        (WebCore::RenderView::computePreferredLogicalWidths):
+        (WebCore::RenderView::layout):
+        * rendering/RenderView.h:
+        * rendering/TableLayout.h:
+
 2010-09-24  Jian Li  <jianli@chromium.org>
 
         Reviewed by Alexey Proskuryakov.
index 1cf785c..1dcdeb8 100644 (file)
@@ -60,7 +60,7 @@ void AutoTableLayout::recalcColumn(int effCol)
 
     while (child) {
         if (child->isTableCol())
-            toRenderTableCol(child)->calcPrefWidths();
+            toRenderTableCol(child)->computePreferredLogicalWidths();
         else if (child->isTableSection()) {
             RenderTableSection* section = toRenderTableSection(child);
             int numRows = section->numRows();
@@ -79,11 +79,11 @@ void AutoTableLayout::recalcColumn(int effCol)
                     // a min/max width of at least 1px for this column now.
                     l.minWidth = max(l.minWidth, cellHasContent ? 1 : 0);
                     l.maxWidth = max(l.maxWidth, 1);
-                    if (cell->prefWidthsDirty())
-                        cell->calcPrefWidths();
-                    l.minWidth = max(cell->minPrefWidth(), l.minWidth);
-                    if (cell->maxPrefWidth() > l.maxWidth) {
-                        l.maxWidth = cell->maxPrefWidth();
+                    if (cell->preferredLogicalWidthsDirty())
+                        cell->computePreferredLogicalWidths();
+                    l.minWidth = max(cell->minPreferredLogicalWidth(), l.minWidth);
+                    if (cell->maxPreferredLogicalWidth() > l.maxWidth) {
+                        l.maxWidth = cell->maxPreferredLogicalWidth();
                         maxContributor = cell;
                     }
 
@@ -239,7 +239,7 @@ static bool shouldScaleColumns(RenderTable* table)
     return scale;
 }
 
-void AutoTableLayout::calcPrefWidths(int& minWidth, int& maxWidth)
+void AutoTableLayout::computePreferredLogicalWidths(int& minWidth, int& maxWidth)
 {
     fullRecalc();
 
@@ -317,8 +317,8 @@ int AutoTableLayout::calcEffectiveWidth()
 
         int col = m_table->colToEffCol(cell->col());
         unsigned int lastCol = col;
-        int cMinWidth = cell->minPrefWidth() + hspacing;
-        float cMaxWidth = cell->maxPrefWidth() + hspacing;
+        int cMinWidth = cell->minPreferredLogicalWidth() + hspacing;
+        float cMaxWidth = cell->maxPreferredLogicalWidth() + hspacing;
         int totalPercent = 0;
         int minWidth = 0;
         float maxWidth = 0;
index f1ef768..5726ba6 100644 (file)
@@ -35,7 +35,7 @@ public:
     AutoTableLayout(RenderTable*);
     ~AutoTableLayout();
 
-    virtual void calcPrefWidths(int& minWidth, int& maxWidth);
+    virtual void computePreferredLogicalWidths(int& minWidth, int& maxWidth);
     virtual void layout();
 
 protected:
index b5ff971..ba99336 100644 (file)
@@ -126,7 +126,7 @@ int FixedTableLayout::calcWidthArray(int)
                     currentEffectiveColumn++;
                 }
             }
-            toRenderTableCol(child)->calcPrefWidths();
+            toRenderTableCol(child)->computePreferredLogicalWidths();
         } else
             break;
 
@@ -155,8 +155,8 @@ int FixedTableLayout::calcWidthArray(int)
         while (child) {
             if (child->isTableCell()) {
                 RenderTableCell* cell = toRenderTableCell(child);
-                if (cell->prefWidthsDirty())
-                    cell->calcPrefWidths();
+                if (cell->preferredLogicalWidthsDirty())
+                    cell->computePreferredLogicalWidths();
 
                 Length w = cell->styleOrColWidth();
                 int span = cell->colSpan();
@@ -190,7 +190,7 @@ int FixedTableLayout::calcWidthArray(int)
 // Keep this in synch with BLOCK_MAX_WIDTH in RenderBlock.cpp
 #define TABLE_MAX_WIDTH 15000
 
-void FixedTableLayout::calcPrefWidths(int& minWidth, int& maxWidth)
+void FixedTableLayout::computePreferredLogicalWidths(int& minWidth, int& maxWidth)
 {
     // FIXME: This entire calculation is incorrect for both minwidth and maxwidth.
     
index 758ddbb..bf26d1b 100644 (file)
@@ -33,7 +33,7 @@ class FixedTableLayout : public TableLayout {
 public:
     FixedTableLayout(RenderTable*);
 
-    virtual void calcPrefWidths(int& minWidth, int& maxWidth);
+    virtual void computePreferredLogicalWidths(int& minWidth, int& maxWidth);
     virtual void layout();
 
 protected:
index 4d2ffec..e30a0a2 100644 (file)
@@ -1781,7 +1781,7 @@ void RenderBlock::layoutBlockChildren(bool relayoutChildren, int& maxFloatBottom
 
         // If relayoutChildren is set and we have percentage padding, we also need to invalidate the child's pref widths.
         if (relayoutChildren && (child->style()->paddingLeft().isPercent() || child->style()->paddingRight().isPercent()))
-            child->setPrefWidthsDirty(true, false);
+            child->setPreferredLogicalWidthsDirty(true, false);
 
         // Handle the four types of special elements first.  These include positioned content, floating content, compacts and
         // run-ins.  When we encounter these four types of objects, we don't actually lay them out as normal flow blocks.
@@ -2010,7 +2010,7 @@ void RenderBlock::layoutPositionedObjects(bool relayoutChildren)
                 
             // If relayoutChildren is set and we have percentage padding, we also need to invalidate the child's pref widths.
             //if (relayoutChildren && (r->style()->paddingLeft().isPercent() || r->style()->paddingRight().isPercent()))
-                r->setPrefWidthsDirty(true, false);
+                r->setPreferredLogicalWidthsDirty(true, false);
             
             if (!r->needsLayout() && paginated && view()->layoutState()->m_pageHeight) {
                 RenderBlock* childRenderBlock = r->isRenderBlock() ? toRenderBlock(r) : 0;
@@ -3933,7 +3933,7 @@ int RenderBlock::getClearDelta(RenderBox* child, int yPos)
     int result = clearSet ? max(0, bottom - yPos) : 0;
     if (!result && child->avoidsFloats()) {
         int availableWidth = this->availableWidth();
-        if (child->minPrefWidth() > availableWidth)
+        if (child->minPreferredLogicalWidth() > availableWidth)
             return 0;
 
         int y = yPos;
@@ -4590,48 +4590,48 @@ void RenderBlock::adjustForColumns(IntSize& offset, const IntPoint& point) const
     }
 }
 
-void RenderBlock::calcPrefWidths()
+void RenderBlock::computePreferredLogicalWidths()
 {
-    ASSERT(prefWidthsDirty());
+    ASSERT(preferredLogicalWidthsDirty());
 
     updateFirstLetter();
 
     if (!isTableCell() && style()->width().isFixed() && style()->width().value() > 0)
-        m_minPrefWidth = m_maxPrefWidth = computeContentBoxLogicalWidth(style()->width().value());
+        m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth = computeContentBoxLogicalWidth(style()->width().value());
     else {
-        m_minPrefWidth = 0;
-        m_maxPrefWidth = 0;
+        m_minPreferredLogicalWidth = 0;
+        m_maxPreferredLogicalWidth = 0;
 
         if (childrenInline())
-            calcInlinePrefWidths();
+            computeInlinePreferredLogicalWidths();
         else
-            calcBlockPrefWidths();
+            computeBlockPreferredLogicalWidths();
 
-        m_maxPrefWidth = max(m_minPrefWidth, m_maxPrefWidth);
+        m_maxPreferredLogicalWidth = max(m_minPreferredLogicalWidth, m_maxPreferredLogicalWidth);
 
         if (!style()->autoWrap() && childrenInline()) {
-            m_minPrefWidth = m_maxPrefWidth;
+            m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth;
             
             // A horizontal marquee with inline children has no minimum width.
             if (layer() && layer()->marquee() && layer()->marquee()->isHorizontal())
-                m_minPrefWidth = 0;
+                m_minPreferredLogicalWidth = 0;
         }
 
         if (isTableCell()) {
             Length w = toRenderTableCell(this)->styleOrColWidth();
             if (w.isFixed() && w.value() > 0)
-                m_maxPrefWidth = max(m_minPrefWidth, computeContentBoxLogicalWidth(w.value()));
+                m_maxPreferredLogicalWidth = max(m_minPreferredLogicalWidth, computeContentBoxLogicalWidth(w.value()));
         }
     }
     
     if (style()->minWidth().isFixed() && style()->minWidth().value() > 0) {
-        m_maxPrefWidth = max(m_maxPrefWidth, computeContentBoxLogicalWidth(style()->minWidth().value()));
-        m_minPrefWidth = max(m_minPrefWidth, computeContentBoxLogicalWidth(style()->minWidth().value()));
+        m_maxPreferredLogicalWidth = max(m_maxPreferredLogicalWidth, computeContentBoxLogicalWidth(style()->minWidth().value()));
+        m_minPreferredLogicalWidth = max(m_minPreferredLogicalWidth, computeContentBoxLogicalWidth(style()->minWidth().value()));
     }
     
     if (style()->maxWidth().isFixed() && style()->maxWidth().value() != undefinedLength) {
-        m_maxPrefWidth = min(m_maxPrefWidth, computeContentBoxLogicalWidth(style()->maxWidth().value()));
-        m_minPrefWidth = min(m_minPrefWidth, computeContentBoxLogicalWidth(style()->maxWidth().value()));
+        m_maxPreferredLogicalWidth = min(m_maxPreferredLogicalWidth, computeContentBoxLogicalWidth(style()->maxWidth().value()));
+        m_minPreferredLogicalWidth = min(m_minPreferredLogicalWidth, computeContentBoxLogicalWidth(style()->maxWidth().value()));
     }
 
     int toAdd = 0;
@@ -4640,10 +4640,10 @@ void RenderBlock::calcPrefWidths()
     if (hasOverflowClip() && style()->overflowY() == OSCROLL)
         toAdd += verticalScrollbarWidth();
 
-    m_minPrefWidth += toAdd;
-    m_maxPrefWidth += toAdd;
+    m_minPreferredLogicalWidth += toAdd;
+    m_maxPreferredLogicalWidth += toAdd;
 
-    setPrefWidthsDirty(false);
+    setPreferredLogicalWidthsDirty(false);
 }
 
 struct InlineMinMaxIterator {
@@ -4747,7 +4747,7 @@ static inline void stripTrailingSpace(int& inlineMax, int& inlineMin,
     }
 }
 
-void RenderBlock::calcInlinePrefWidths()
+void RenderBlock::computeInlinePreferredLogicalWidths()
 {
     int inlineMax = 0;
     int inlineMin = 0;
@@ -4826,7 +4826,7 @@ void RenderBlock::calcInlinePrefWidths()
                     inlineMin += childMin;
                     inlineMax += childMax;
                     
-                    child->setPrefWidthsDirty(false);
+                    child->setPreferredLogicalWidthsDirty(false);
                 } else {
                     // Inline replaced elts add in their margins to their min/max values.
                     int margins = 0;
@@ -4845,8 +4845,8 @@ void RenderBlock::calcInlinePrefWidths()
                 // Case (2). Inline replaced elements and floats.
                 // Go ahead and terminate the current line as far as
                 // minwidth is concerned.
-                childMin += child->minPrefWidth();
-                childMax += child->maxPrefWidth();
+                childMin += child->minPreferredLogicalWidth();
+                childMax += child->maxPreferredLogicalWidth();
 
                 bool clearPreviousFloat;
                 if (child->isFloating()) {
@@ -4859,13 +4859,13 @@ void RenderBlock::calcInlinePrefWidths()
 
                 bool canBreakReplacedElement = !child->isImage() || allowImagesToBreak;
                 if ((canBreakReplacedElement && (autoWrap || oldAutoWrap)) || clearPreviousFloat) {
-                    m_minPrefWidth = max(inlineMin, m_minPrefWidth);
+                    m_minPreferredLogicalWidth = max(inlineMin, m_minPreferredLogicalWidth);
                     inlineMin = 0;
                 }
 
                 // If we're supposed to clear the previous float, then terminate maxwidth as well.
                 if (clearPreviousFloat) {
-                    m_maxPrefWidth = max(inlineMax, m_maxPrefWidth);
+                    m_maxPreferredLogicalWidth = max(inlineMax, m_maxPreferredLogicalWidth);
                     inlineMax = 0;
                 }
 
@@ -4883,12 +4883,12 @@ void RenderBlock::calcInlinePrefWidths()
 
                 if (!autoWrap || !canBreakReplacedElement) {
                     if (child->isFloating())
-                        m_minPrefWidth = max(childMin, m_minPrefWidth);
+                        m_minPreferredLogicalWidth = max(childMin, m_minPreferredLogicalWidth);
                     else
                         inlineMin += childMin;
                 } else {
                     // Now check our line.
-                    m_minPrefWidth = max(childMin, m_minPrefWidth);
+                    m_minPreferredLogicalWidth = max(childMin, m_minPreferredLogicalWidth);
 
                     // Now start a new line.
                     inlineMin = 0;
@@ -4905,7 +4905,7 @@ void RenderBlock::calcInlinePrefWidths()
                 RenderText* t = toRenderText(child);
 
                 if (t->isWordBreak()) {
-                    m_minPrefWidth = max(inlineMin, m_minPrefWidth);
+                    m_minPreferredLogicalWidth = max(inlineMin, m_minPreferredLogicalWidth);
                     inlineMin = 0;
                     continue;
                 }
@@ -4926,7 +4926,7 @@ void RenderBlock::calcInlinePrefWidths()
                 // This text object will not be rendered, but it may still provide a breaking opportunity.
                 if (!hasBreak && childMax == 0) {
                     if (autoWrap && (beginWS || endWS)) {
-                        m_minPrefWidth = max(inlineMin, m_minPrefWidth);
+                        m_minPreferredLogicalWidth = max(inlineMin, m_minPreferredLogicalWidth);
                         inlineMin = 0;
                     }
                     continue;
@@ -4956,10 +4956,10 @@ void RenderBlock::calcInlinePrefWidths()
                     // we start and end with whitespace.
                     if (beginWS)
                         // Go ahead and end the current line.
-                        m_minPrefWidth = max(inlineMin, m_minPrefWidth);
+                        m_minPreferredLogicalWidth = max(inlineMin, m_minPreferredLogicalWidth);
                     else {
                         inlineMin += beginMin;
-                        m_minPrefWidth = max(inlineMin, m_minPrefWidth);
+                        m_minPreferredLogicalWidth = max(inlineMin, m_minPreferredLogicalWidth);
                         childMin -= ti;
                     }
 
@@ -4968,18 +4968,18 @@ void RenderBlock::calcInlinePrefWidths()
                     if (endWS) {
                         // We end in whitespace, which means we can go ahead
                         // and end our current line.
-                        m_minPrefWidth = max(inlineMin, m_minPrefWidth);
+                        m_minPreferredLogicalWidth = max(inlineMin, m_minPreferredLogicalWidth);
                         inlineMin = 0;
                     } else {
-                        m_minPrefWidth = max(inlineMin, m_minPrefWidth);
+                        m_minPreferredLogicalWidth = max(inlineMin, m_minPreferredLogicalWidth);
                         inlineMin = endMin;
                     }
                 }
 
                 if (hasBreak) {
                     inlineMax += beginMax;
-                    m_maxPrefWidth = max(inlineMax, m_maxPrefWidth);
-                    m_maxPrefWidth = max(childMax, m_maxPrefWidth);
+                    m_maxPreferredLogicalWidth = max(inlineMax, m_maxPreferredLogicalWidth);
+                    m_maxPreferredLogicalWidth = max(childMax, m_maxPreferredLogicalWidth);
                     inlineMax = endMax;
                 } else
                     inlineMax += childMax;
@@ -4989,8 +4989,8 @@ void RenderBlock::calcInlinePrefWidths()
             if (child->isListMarker())
                 stripFrontSpaces = true;
         } else {
-            m_minPrefWidth = max(inlineMin, m_minPrefWidth);
-            m_maxPrefWidth = max(inlineMax, m_maxPrefWidth);
+            m_minPreferredLogicalWidth = max(inlineMin, m_minPreferredLogicalWidth);
+            m_maxPreferredLogicalWidth = max(inlineMax, m_maxPreferredLogicalWidth);
             inlineMin = inlineMax = 0;
             stripFrontSpaces = true;
             trailingSpaceChild = 0;
@@ -5002,14 +5002,14 @@ void RenderBlock::calcInlinePrefWidths()
     if (style()->collapseWhiteSpace())
         stripTrailingSpace(inlineMax, inlineMin, trailingSpaceChild);
 
-    m_minPrefWidth = max(inlineMin, m_minPrefWidth);
-    m_maxPrefWidth = max(inlineMax, m_maxPrefWidth);
+    m_minPreferredLogicalWidth = max(inlineMin, m_minPreferredLogicalWidth);
+    m_maxPreferredLogicalWidth = max(inlineMax, m_maxPreferredLogicalWidth);
 }
 
 // Use a very large value (in effect infinite).
 #define BLOCK_MAX_WIDTH 15000
 
-void RenderBlock::calcBlockPrefWidths()
+void RenderBlock::computeBlockPreferredLogicalWidths()
 {
     bool nowrap = style()->whiteSpace() == NOWRAP;
 
@@ -5025,11 +5025,11 @@ void RenderBlock::calcBlockPrefWidths()
         if (child->isFloating() || (child->isBox() && toRenderBox(child)->avoidsFloats())) {
             int floatTotalWidth = floatLeftWidth + floatRightWidth;
             if (child->style()->clear() & CLEFT) {
-                m_maxPrefWidth = max(floatTotalWidth, m_maxPrefWidth);
+                m_maxPreferredLogicalWidth = max(floatTotalWidth, m_maxPreferredLogicalWidth);
                 floatLeftWidth = 0;
             }
             if (child->style()->clear() & CRIGHT) {
-                m_maxPrefWidth = max(floatTotalWidth, m_maxPrefWidth);
+                m_maxPreferredLogicalWidth = max(floatTotalWidth, m_maxPreferredLogicalWidth);
                 floatRightWidth = 0;
             }
         }
@@ -5046,14 +5046,14 @@ void RenderBlock::calcBlockPrefWidths()
             marginRight += mr.value();
         margin = marginLeft + marginRight;
 
-        int w = child->minPrefWidth() + margin;
-        m_minPrefWidth = max(w, m_minPrefWidth);
+        int w = child->minPreferredLogicalWidth() + margin;
+        m_minPreferredLogicalWidth = max(w, m_minPreferredLogicalWidth);
         
         // IE ignores tables for calculation of nowrap. Makes some sense.
         if (nowrap && !child->isTable())
-            m_maxPrefWidth = max(w, m_maxPrefWidth);
+            m_maxPreferredLogicalWidth = max(w, m_maxPreferredLogicalWidth);
 
-        w = child->maxPrefWidth() + margin;
+        w = child->maxPreferredLogicalWidth() + margin;
 
         if (!child->isFloating()) {
             if (child->isBox() && toRenderBox(child)->avoidsFloats()) {
@@ -5062,11 +5062,11 @@ void RenderBlock::calcBlockPrefWidths()
                 // is smaller than the float width.
                 int maxLeft = marginLeft > 0 ? max(floatLeftWidth, marginLeft) : floatLeftWidth + marginLeft;
                 int maxRight = marginRight > 0 ? max(floatRightWidth, marginRight) : floatRightWidth + marginRight;
-                w = child->maxPrefWidth() + maxLeft + maxRight;
+                w = child->maxPreferredLogicalWidth() + maxLeft + maxRight;
                 w = max(w, floatLeftWidth + floatRightWidth);
             }
             else
-                m_maxPrefWidth = max(floatLeftWidth + floatRightWidth, m_maxPrefWidth);
+                m_maxPreferredLogicalWidth = max(floatLeftWidth + floatRightWidth, m_maxPreferredLogicalWidth);
             floatLeftWidth = floatRightWidth = 0;
         }
         
@@ -5076,7 +5076,7 @@ void RenderBlock::calcBlockPrefWidths()
             else
                 floatRightWidth += w;
         } else
-            m_maxPrefWidth = max(w, m_maxPrefWidth);
+            m_maxPreferredLogicalWidth = max(w, m_maxPreferredLogicalWidth);
 
         // A very specific WinIE quirk.
         // Example:
@@ -5092,22 +5092,22 @@ void RenderBlock::calcBlockPrefWidths()
         // We can achieve this effect by making the maxwidth of blocks that contain tables
         // with percentage widths be infinite (as long as they are not inside a table cell).
         if (document()->inQuirksMode() && child->style()->width().isPercent() &&
-            !isTableCell() && child->isTable() && m_maxPrefWidth < BLOCK_MAX_WIDTH) {
+            !isTableCell() && child->isTable() && m_maxPreferredLogicalWidth < BLOCK_MAX_WIDTH) {
             RenderBlock* cb = containingBlock();
             while (!cb->isRenderView() && !cb->isTableCell())
                 cb = cb->containingBlock();
             if (!cb->isTableCell())
-                m_maxPrefWidth = BLOCK_MAX_WIDTH;
+                m_maxPreferredLogicalWidth = BLOCK_MAX_WIDTH;
         }
         
         child = child->nextSibling();
     }
 
     // Always make sure these values are non-negative.
-    m_minPrefWidth = max(0, m_minPrefWidth);
-    m_maxPrefWidth = max(0, m_maxPrefWidth);
+    m_minPreferredLogicalWidth = max(0, m_minPreferredLogicalWidth);
+    m_maxPreferredLogicalWidth = max(0, m_maxPreferredLogicalWidth);
 
-    m_maxPrefWidth = max(floatLeftWidth + floatRightWidth, m_maxPrefWidth);
+    m_maxPreferredLogicalWidth = max(floatLeftWidth + floatRightWidth, m_maxPreferredLogicalWidth);
 }
 
 bool RenderBlock::hasLineIfEmpty() const
index b8c551c..bddb037 100644 (file)
@@ -227,7 +227,7 @@ protected:
 
     virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, int x, int y, int tx, int ty, HitTestAction);
 
-    virtual void calcPrefWidths();
+    virtual void computePreferredLogicalWidths();
 
     virtual int firstLineBoxBaseline() const;
     virtual int lastLineBoxBaseline() const;
@@ -417,8 +417,8 @@ private:
 
     virtual bool isPointInOverflowControl(HitTestResult&, int x, int y, int tx, int ty);
 
-    void calcInlinePrefWidths();
-    void calcBlockPrefWidths();
+    void computeInlinePreferredLogicalWidths();
+    void computeBlockPreferredLogicalWidths();
 
     // Obtains the nearest enclosing block (including this block) that contributes a first-line style to our inline
     // children.
index 7b9271b..da24d9c 100644 (file)
@@ -202,8 +202,8 @@ static inline InlineBox* createInlineBoxForRenderer(RenderObject* obj, bool isRo
 static inline void dirtyLineBoxesForRenderer(RenderObject* o, bool fullLayout)
 {
     if (o->isText()) {
-        if (o->prefWidthsDirty() && o->isCounter())
-            toRenderText(o)->calcPrefWidths(0); // FIXME: Counters depend on this hack. No clue why. Should be investigated and removed.
+        if (o->preferredLogicalWidthsDirty() && o->isCounter())
+            toRenderText(o)->computePreferredLogicalWidths(0); // FIXME: Counters depend on this hack. No clue why. Should be investigated and removed.
         toRenderText(o)->dirtyLineBoxes(fullLayout);
     } else
         toRenderInline(o)->dirtyLineBoxes(fullLayout);
@@ -571,7 +571,7 @@ void RenderBlock::layoutInlineChildren(bool relayoutChildren, int& repaintTop, i
                     
                 // If relayoutChildren is set and we have percentage padding, we also need to invalidate the child's pref widths.
                 if (relayoutChildren && (o->style()->paddingLeft().isPercent() || o->style()->paddingRight().isPercent()))
-                    o->setPrefWidthsDirty(true, false);
+                    o->setPreferredLogicalWidthsDirty(true, false);
             
                 if (o->isPositioned())
                     o->containingBlock()->insertPositionedObject(box);
index dcddebe..83937a8 100644 (file)
@@ -72,8 +72,8 @@ RenderBox::RenderBox(Node* node)
     , m_marginRight(0)
     , m_marginTop(0)
     , m_marginBottom(0)
-    , m_minPrefWidth(-1)
-    , m_maxPrefWidth(-1)
+    , m_minPreferredLogicalWidth(-1)
+    , m_maxPreferredLogicalWidth(-1)
     , m_inlineBoxWrapper(0)
 {
     setIsBox();
@@ -539,20 +539,20 @@ void RenderBox::panScroll(const IntPoint& source)
         layer()->panScrollFromPoint(source);
 }
 
-int RenderBox::minPrefWidth() const
+int RenderBox::minPreferredLogicalWidth() const
 {
-    if (prefWidthsDirty())
-        const_cast<RenderBox*>(this)->calcPrefWidths();
+    if (preferredLogicalWidthsDirty())
+        const_cast<RenderBox*>(this)->computePreferredLogicalWidths();
         
-    return m_minPrefWidth;
+    return m_minPreferredLogicalWidth;
 }
 
-int RenderBox::maxPrefWidth() const
+int RenderBox::maxPreferredLogicalWidth() const
 {
-    if (prefWidthsDirty())
-        const_cast<RenderBox*>(this)->calcPrefWidths();
+    if (preferredLogicalWidthsDirty())
+        const_cast<RenderBox*>(this)->computePreferredLogicalWidths();
         
-    return m_maxPrefWidth;
+    return m_maxPreferredLogicalWidth;
 }
 
 int RenderBox::overrideSize() const
@@ -1383,7 +1383,7 @@ void RenderBox::computeLogicalWidth()
         m_marginLeft = marginLeft.calcMinValue(containerWidth);
         m_marginRight = marginRight.calcMinValue(containerWidth);
         if (treatAsReplaced)
-            setWidth(max(w.value() + borderAndPaddingWidth(), minPrefWidth()));
+            setWidth(max(w.value() + borderAndPaddingWidth(), minPreferredLogicalWidth()));
 
         return;
     }
@@ -1413,7 +1413,7 @@ void RenderBox::computeLogicalWidth()
     }
 
     if (stretchesToMinIntrinsicWidth()) {
-        setWidth(max(width(), minPrefWidth()));
+        setWidth(max(width(), minPreferredLogicalWidth()));
         w = Length(width(), Fixed);
     }
 
@@ -1454,8 +1454,8 @@ int RenderBox::computeLogicalWidthUsing(LogicalWidthType widthType, int availabl
             logicalWidthResult = availableLogicalWidth - marginStart - marginEnd;
 
         if (sizesToIntrinsicWidth(widthType)) {
-            logicalWidthResult = max(logicalWidthResult, minPrefWidth());
-            logicalWidthResult = min(logicalWidthResult, maxPrefWidth());
+            logicalWidthResult = max(logicalWidthResult, minPreferredLogicalWidth());
+            logicalWidthResult = min(logicalWidthResult, maxPreferredLogicalWidth());
         }
     } else // FIXME: If the containing block flow is perpendicular to our direction we need to use the available logical height instead.
         logicalWidthResult = computeBorderBoxLogicalWidth(logicalWidth.calcValue(availableLogicalWidth)); 
@@ -2031,8 +2031,8 @@ void RenderBox::computePositionedLogicalWidth()
         }
     }
 
-    if (stretchesToMinIntrinsicWidth() && width() < minPrefWidth() - bordersPlusPadding) {
-        computePositionedLogicalWidthUsing(Length(minPrefWidth() - bordersPlusPadding, Fixed), containerBlock, containerDirection,
+    if (stretchesToMinIntrinsicWidth() && width() < minPreferredLogicalWidth() - bordersPlusPadding) {
+        computePositionedLogicalWidthUsing(Length(minPreferredLogicalWidth() - bordersPlusPadding, Fixed), containerBlock, containerDirection,
                                      containerWidth, bordersPlusPadding,
                                      left, right, marginLeft, marginRight,
                                      widthResult, m_marginLeft, m_marginRight, xResult);
@@ -2168,8 +2168,8 @@ void RenderBox::computePositionedLogicalWidthUsing(Length width, const RenderBox
             int rightValue = right.calcValue(containerWidth);
 
             // FIXME: would it be better to have shrink-to-fit in one step?
-            int preferredWidth = maxPrefWidth() - bordersPlusPadding;
-            int preferredMinWidth = minPrefWidth() - bordersPlusPadding;
+            int preferredWidth = maxPreferredLogicalWidth() - bordersPlusPadding;
+            int preferredMinWidth = minPreferredLogicalWidth() - bordersPlusPadding;
             int availableWidth = availableSpace - rightValue;
             widthValue = min(max(preferredMinWidth, availableWidth), preferredWidth);
             leftValue = availableSpace - (widthValue + rightValue);
@@ -2178,8 +2178,8 @@ void RenderBox::computePositionedLogicalWidthUsing(Length width, const RenderBox
             leftValue = left.calcValue(containerWidth);
 
             // FIXME: would it be better to have shrink-to-fit in one step?
-            int preferredWidth = maxPrefWidth() - bordersPlusPadding;
-            int preferredMinWidth = minPrefWidth() - bordersPlusPadding;
+            int preferredWidth = maxPreferredLogicalWidth() - bordersPlusPadding;
+            int preferredMinWidth = minPreferredLogicalWidth() - bordersPlusPadding;
             int availableWidth = availableSpace - leftValue;
             widthValue = min(max(preferredMinWidth, availableWidth), preferredWidth);
         } else if (leftIsAuto && !width.isAuto() && !rightIsAuto) {
index d4cdb04..3952790 100644 (file)
@@ -175,8 +175,8 @@ public:
 
     virtual void destroy();
 
-    virtual int minPrefWidth() const;
-    virtual int maxPrefWidth() const;
+    virtual int minPreferredLogicalWidth() const;
+    virtual int maxPreferredLogicalWidth() const;
 
     int overrideSize() const;
     int overrideWidth() const;
@@ -358,7 +358,7 @@ private:
     // This function calculates the minimum and maximum preferred widths for an object.
     // These values are used in shrink-to-fit layout systems.
     // These include tables, positioned objects, floats and flexible boxes.
-    virtual void calcPrefWidths() { setPrefWidthsDirty(false); }
+    virtual void computePreferredLogicalWidths() { setPreferredLogicalWidthsDirty(false); }
 
 private:
     // The width/height of the contents + borders + padding.  The x/y location is relative to our container (which is not always our parent).
@@ -370,11 +370,11 @@ protected:
     int m_marginTop;
     int m_marginBottom;
 
-    // The preferred width of the element if it were to break its lines at every possible opportunity.
-    int m_minPrefWidth;
+    // The preferred logical width of the element if it were to break its lines at every possible opportunity.
+    int m_minPreferredLogicalWidth;
     
-    // The preferred width of the element if it never breaks any lines at all.
-    int m_maxPrefWidth;
+    // The preferred logical width of the element if it never breaks any lines at all.
+    int m_maxPreferredLogicalWidth;
 
     // For inline replaced elements, the inline box that owns us.
     InlineBox* m_inlineBoxWrapper;
index 6e678e8..639221d 100644 (file)
@@ -328,10 +328,10 @@ PassRefPtr<StringImpl> RenderCounter::originalText() const
     return text.impl();
 }
 
-void RenderCounter::calcPrefWidths(int lead)
+void RenderCounter::computePreferredLogicalWidths(int lead)
 {
     setTextInternal(originalText());
-    RenderText::calcPrefWidths(lead);
+    RenderText::computePreferredLogicalWidths(lead);
 }
 
 void RenderCounter::invalidate(const AtomicString& identifier)
index 10ba1dc..8d981df 100644 (file)
@@ -49,7 +49,7 @@ private:
     virtual bool isCounter() const;
     virtual PassRefPtr<StringImpl> originalText() const;
     
-    virtual void calcPrefWidths(int leadWidth);
+    virtual void computePreferredLogicalWidths(int leadWidth);
 
     CounterContent m_counter;
     mutable CounterNode* m_counterNode;
index bf99f70..c322389 100644 (file)
@@ -88,34 +88,34 @@ RenderStyle* RenderDataGrid::headerStyle(DataGridColumn* column)
     return column->headerStyle();
 }
 
-void RenderDataGrid::calcPrefWidths()
+void RenderDataGrid::computePreferredLogicalWidths()
 {
-    m_minPrefWidth = 0;
-    m_maxPrefWidth = 0;
+    m_minPreferredLogicalWidth = 0;
+    m_maxPreferredLogicalWidth = 0;
 
     if (style()->width().isFixed() && style()->width().value() > 0)
-        m_minPrefWidth = m_maxPrefWidth = computeContentBoxLogicalWidth(style()->width().value());
+        m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth = computeContentBoxLogicalWidth(style()->width().value());
     else
-        m_maxPrefWidth = computeContentBoxLogicalWidth(cDefaultWidth);
+        m_maxPreferredLogicalWidth = computeContentBoxLogicalWidth(cDefaultWidth);
 
     if (style()->minWidth().isFixed() && style()->minWidth().value() > 0) {
-        m_maxPrefWidth = max(m_maxPrefWidth, computeContentBoxLogicalWidth(style()->minWidth().value()));
-        m_minPrefWidth = max(m_minPrefWidth, computeContentBoxLogicalWidth(style()->minWidth().value()));
+        m_maxPreferredLogicalWidth = max(m_maxPreferredLogicalWidth, computeContentBoxLogicalWidth(style()->minWidth().value()));
+        m_minPreferredLogicalWidth = max(m_minPreferredLogicalWidth, computeContentBoxLogicalWidth(style()->minWidth().value()));
     } else if (style()->width().isPercent() || (style()->width().isAuto() && style()->height().isPercent()))
-        m_minPrefWidth = 0;
+        m_minPreferredLogicalWidth = 0;
     else
-        m_minPrefWidth = m_maxPrefWidth;
+        m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth;
 
     if (style()->maxWidth().isFixed() && style()->maxWidth().value() != undefinedLength) {
-        m_maxPrefWidth = min(m_maxPrefWidth, computeContentBoxLogicalWidth(style()->maxWidth().value()));
-        m_minPrefWidth = min(m_minPrefWidth, computeContentBoxLogicalWidth(style()->maxWidth().value()));
+        m_maxPreferredLogicalWidth = min(m_maxPreferredLogicalWidth, computeContentBoxLogicalWidth(style()->maxWidth().value()));
+        m_minPreferredLogicalWidth = min(m_minPreferredLogicalWidth, computeContentBoxLogicalWidth(style()->maxWidth().value()));
     }
 
     int toAdd = borderAndPaddingWidth();
-    m_minPrefWidth += toAdd;
-    m_maxPrefWidth += toAdd;
+    m_minPreferredLogicalWidth += toAdd;
+    m_maxPreferredLogicalWidth += toAdd;
                                 
-    setPrefWidthsDirty(false);
+    setPreferredLogicalWidthsDirty(false);
 }
 
 void RenderDataGrid::layout()
index c4b54df..1492d26 100644 (file)
@@ -44,7 +44,7 @@ public:
     
     virtual const char* renderName() const { return "RenderDataGrid"; }
     virtual bool canHaveChildren() const { return false; }
-    virtual void calcPrefWidths();
+    virtual void computePreferredLogicalWidths();
     virtual void layout();
     virtual void paintObject(PaintInfo&, int tx, int ty);
 
index bd245c7..d3b88c1 100644 (file)
@@ -44,11 +44,11 @@ RenderFieldset::RenderFieldset(Node* element)
 {
 }
 
-void RenderFieldset::calcPrefWidths()
+void RenderFieldset::computePreferredLogicalWidths()
 {
-    RenderBlock::calcPrefWidths();
+    RenderBlock::computePreferredLogicalWidths();
     if (RenderBox* legend = findLegend()) {
-        int legendMinWidth = legend->minPrefWidth();
+        int legendMinWidth = legend->minPreferredLogicalWidth();
 
         Length legendMarginLeft = legend->style()->marginLeft();
         Length legendMarginRight = legend->style()->marginLeft();
@@ -59,7 +59,7 @@ void RenderFieldset::calcPrefWidths()
         if (legendMarginRight.isFixed())
             legendMinWidth += legendMarginRight.value();
 
-        m_minPrefWidth = max(m_minPrefWidth, legendMinWidth + borderAndPaddingWidth());
+        m_minPreferredLogicalWidth = max(m_minPreferredLogicalWidth, legendMinWidth + borderAndPaddingWidth());
     }
 }
 
index df6a1da..e999f23 100644 (file)
@@ -40,7 +40,7 @@ private:
 
     virtual RenderObject* layoutLegend(bool relayoutChildren);
 
-    virtual void calcPrefWidths();
+    virtual void computePreferredLogicalWidths();
     virtual bool avoidsFloats() const { return true; }
     virtual bool stretchesToMinIntrinsicWidth() const { return true; }
 
index a1a2bd5..cdb0470 100644 (file)
@@ -257,41 +257,41 @@ void RenderFileUploadControl::paintObject(PaintInfo& paintInfo, int tx, int ty)
         paintInfo.context->restore();
 }
 
-void RenderFileUploadControl::calcPrefWidths()
+void RenderFileUploadControl::computePreferredLogicalWidths()
 {
-    ASSERT(prefWidthsDirty());
+    ASSERT(preferredLogicalWidthsDirty());
 
-    m_minPrefWidth = 0;
-    m_maxPrefWidth = 0;
+    m_minPreferredLogicalWidth = 0;
+    m_maxPreferredLogicalWidth = 0;
 
     if (style()->width().isFixed() && style()->width().value() > 0)
-        m_minPrefWidth = m_maxPrefWidth = computeContentBoxLogicalWidth(style()->width().value());
+        m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth = 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).
         const UChar ch = '0';
         float charWidth = style()->font().floatWidth(TextRun(&ch, 1, false, 0, 0, false, false, false));
-        m_maxPrefWidth = (int)ceilf(charWidth * defaultWidthNumChars);
+        m_maxPreferredLogicalWidth = (int)ceilf(charWidth * defaultWidthNumChars);
     }
 
     if (style()->minWidth().isFixed() && style()->minWidth().value() > 0) {
-        m_maxPrefWidth = max(m_maxPrefWidth, computeContentBoxLogicalWidth(style()->minWidth().value()));
-        m_minPrefWidth = max(m_minPrefWidth, computeContentBoxLogicalWidth(style()->minWidth().value()));
+        m_maxPreferredLogicalWidth = max(m_maxPreferredLogicalWidth, computeContentBoxLogicalWidth(style()->minWidth().value()));
+        m_minPreferredLogicalWidth = max(m_minPreferredLogicalWidth, computeContentBoxLogicalWidth(style()->minWidth().value()));
     } else if (style()->width().isPercent() || (style()->width().isAuto() && style()->height().isPercent()))
-        m_minPrefWidth = 0;
+        m_minPreferredLogicalWidth = 0;
     else
-        m_minPrefWidth = m_maxPrefWidth;
+        m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth;
 
     if (style()->maxWidth().isFixed() && style()->maxWidth().value() != undefinedLength) {
-        m_maxPrefWidth = min(m_maxPrefWidth, computeContentBoxLogicalWidth(style()->maxWidth().value()));
-        m_minPrefWidth = min(m_minPrefWidth, computeContentBoxLogicalWidth(style()->maxWidth().value()));
+        m_maxPreferredLogicalWidth = min(m_maxPreferredLogicalWidth, computeContentBoxLogicalWidth(style()->maxWidth().value()));
+        m_minPreferredLogicalWidth = min(m_minPreferredLogicalWidth, computeContentBoxLogicalWidth(style()->maxWidth().value()));
     }
 
     int toAdd = borderAndPaddingWidth();
-    m_minPrefWidth += toAdd;
-    m_maxPrefWidth += toAdd;
+    m_minPreferredLogicalWidth += toAdd;
+    m_maxPreferredLogicalWidth += toAdd;
 
-    setPrefWidthsDirty(false);
+    setPreferredLogicalWidthsDirty(false);
 }
 
 void RenderFileUploadControl::receiveDroppedFiles(const Vector<String>& paths)
index 205ba47..c96800c 100644 (file)
@@ -51,7 +51,7 @@ private:
     virtual const char* renderName() const { return "RenderFileUploadControl"; }
 
     virtual void updateFromElement();
-    virtual void calcPrefWidths();
+    virtual void computePreferredLogicalWidths();
     virtual void paintObject(PaintInfo&, int tx, int ty);
 
     virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle);
index 1925493..5ebe177 100644 (file)
@@ -132,8 +132,8 @@ void RenderFlexibleBox::calcHorizontalPrefWidths()
             marginRight += mr.value();
         margin = marginLeft + marginRight;
 
-        m_minPrefWidth += child->minPrefWidth() + margin;
-        m_maxPrefWidth += child->maxPrefWidth() + margin;
+        m_minPreferredLogicalWidth += child->minPreferredLogicalWidth() + margin;
+        m_maxPreferredLogicalWidth += child->maxPreferredLogicalWidth() + margin;
     }    
 }
 
@@ -155,39 +155,39 @@ void RenderFlexibleBox::calcVerticalPrefWidths()
         if (mr.isFixed())
             margin += mr.value();
         
-        int w = child->minPrefWidth() + margin;
-        m_minPrefWidth = max(w, m_minPrefWidth);
+        int w = child->minPreferredLogicalWidth() + margin;
+        m_minPreferredLogicalWidth = max(w, m_minPreferredLogicalWidth);
         
-        w = child->maxPrefWidth() + margin;
-        m_maxPrefWidth = max(w, m_maxPrefWidth);
+        w = child->maxPreferredLogicalWidth() + margin;
+        m_maxPreferredLogicalWidth = max(w, m_maxPreferredLogicalWidth);
     }    
 }
 
-void RenderFlexibleBox::calcPrefWidths()
+void RenderFlexibleBox::computePreferredLogicalWidths()
 {
-    ASSERT(prefWidthsDirty());
+    ASSERT(preferredLogicalWidthsDirty());
 
     if (style()->width().isFixed() && style()->width().value() > 0)
-        m_minPrefWidth = m_maxPrefWidth = computeContentBoxLogicalWidth(style()->width().value());
+        m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth = computeContentBoxLogicalWidth(style()->width().value());
     else {
-        m_minPrefWidth = m_maxPrefWidth = 0;
+        m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth = 0;
 
         if (hasMultipleLines() || isVertical())
             calcVerticalPrefWidths();
         else
             calcHorizontalPrefWidths();
 
-        m_maxPrefWidth = max(m_minPrefWidth, m_maxPrefWidth);
+        m_maxPreferredLogicalWidth = max(m_minPreferredLogicalWidth, m_maxPreferredLogicalWidth);
     }
 
     if (style()->minWidth().isFixed() && style()->minWidth().value() > 0) {
-        m_maxPrefWidth = max(m_maxPrefWidth, computeContentBoxLogicalWidth(style()->minWidth().value()));
-        m_minPrefWidth = max(m_minPrefWidth, computeContentBoxLogicalWidth(style()->minWidth().value()));
+        m_maxPreferredLogicalWidth = max(m_maxPreferredLogicalWidth, computeContentBoxLogicalWidth(style()->minWidth().value()));
+        m_minPreferredLogicalWidth = max(m_minPreferredLogicalWidth, computeContentBoxLogicalWidth(style()->minWidth().value()));
     }
     
     if (style()->maxWidth().isFixed() && style()->maxWidth().value() != undefinedLength) {
-        m_maxPrefWidth = min(m_maxPrefWidth, computeContentBoxLogicalWidth(style()->maxWidth().value()));
-        m_minPrefWidth = min(m_minPrefWidth, computeContentBoxLogicalWidth(style()->maxWidth().value()));
+        m_maxPreferredLogicalWidth = min(m_maxPreferredLogicalWidth, computeContentBoxLogicalWidth(style()->maxWidth().value()));
+        m_minPreferredLogicalWidth = min(m_minPreferredLogicalWidth, computeContentBoxLogicalWidth(style()->maxWidth().value()));
     }
 
     int toAdd = borderAndPaddingWidth();
@@ -195,10 +195,10 @@ void RenderFlexibleBox::calcPrefWidths()
     if (hasOverflowClip() && style()->overflowY() == OSCROLL)
         toAdd += verticalScrollbarWidth();
 
-    m_minPrefWidth += toAdd;
-    m_maxPrefWidth += toAdd;
+    m_minPreferredLogicalWidth += toAdd;
+    m_maxPreferredLogicalWidth += toAdd;
 
-    setPrefWidthsDirty(false);
+    setPreferredLogicalWidthsDirty(false);
 }
 
 void RenderFlexibleBox::layoutBlock(bool relayoutChildren, int /*pageHeight FIXME: Implement */)
@@ -1054,9 +1054,9 @@ int RenderFlexibleBox::allowedChildFlex(RenderBox* child, bool expanding, unsign
                 child->style()->maxWidth().isFixed())
                 maxW = child->style()->maxWidth().value();
             else if (child->style()->maxWidth().type() == Intrinsic)
-                maxW = child->maxPrefWidth();
+                maxW = child->maxPreferredLogicalWidth();
             else if (child->style()->maxWidth().type() == MinIntrinsic)
-                maxW = child->minPrefWidth();
+                maxW = child->minPreferredLogicalWidth();
             if (maxW == INT_MAX)
                 return maxW;
             return max(0, maxW - w);
@@ -1075,14 +1075,14 @@ int RenderFlexibleBox::allowedChildFlex(RenderBox* child, bool expanding, unsign
 
     // FIXME: For now just handle fixed values.
     if (isHorizontal()) {
-        int minW = child->minPrefWidth();
+        int minW = child->minPreferredLogicalWidth();
         int w = child->overrideWidth() - child->borderAndPaddingWidth();
         if (child->style()->minWidth().isFixed())
             minW = child->style()->minWidth().value();
         else if (child->style()->minWidth().type() == Intrinsic)
-            minW = child->maxPrefWidth();
+            minW = child->maxPreferredLogicalWidth();
         else if (child->style()->minWidth().type() == MinIntrinsic)
-            minW = child->minPrefWidth();
+            minW = child->minPreferredLogicalWidth();
             
         int allowedShrinkage = min(0, minW - w);
         return allowedShrinkage;
index 2aa20b5..8525c29 100644 (file)
@@ -36,7 +36,7 @@ public:
 
     virtual const char* renderName() const;
 
-    virtual void calcPrefWidths();
+    virtual void computePreferredLogicalWidths();
     void calcHorizontalPrefWidths();
     void calcVerticalPrefWidths();
 
index 4a62f8a..b36ad3a 100644 (file)
@@ -53,8 +53,8 @@ void RenderFrameBase::layoutWithFlattening(bool fixedWidth, bool fixedHeight)
 
     // need to update to calculate min/max correctly
     updateWidgetPosition();
-    if (childRoot->prefWidthsDirty())
-        childRoot->calcPrefWidths();
+    if (childRoot->preferredLogicalWidthsDirty())
+        childRoot->computePreferredLogicalWidths();
 
     // if scrollbars are off, and the width or height are fixed
     // we obey them and do not expand. With frame flattening
@@ -69,7 +69,7 @@ void RenderFrameBase::layoutWithFlattening(bool fixedWidth, bool fixedHeight)
 
     // make sure minimum preferred width is enforced
     if (isScrollable || !fixedWidth) {
-        setWidth(max(width(), childRoot->minPrefWidth() + hBorder));
+        setWidth(max(width(), childRoot->minPreferredLogicalWidth() + hBorder));
         // update again to pass the new width to the child frame
         updateWidgetPosition();
         childFrameView->layout();
index e39a52e..68bb536 100644 (file)
@@ -73,8 +73,8 @@ void RenderHTMLCanvas::canvasSizeChanged()
     if (!parent())
         return;
 
-    if (!prefWidthsDirty())
-        setPrefWidthsDirty(true);
+    if (!preferredLogicalWidthsDirty())
+        setPreferredLogicalWidthsDirty(true);
 
     IntSize oldSize = size();
     computeLogicalWidth();
index a7d2606..2bd60a3 100644 (file)
@@ -151,8 +151,8 @@ void RenderImage::imageChanged(WrappedImagePtr newImage, const IntRect* rect)
             // lets see if we need to relayout at all..
             int oldwidth = width();
             int oldheight = height();
-            if (!prefWidthsDirty())
-                setPrefWidthsDirty(true);
+            if (!preferredLogicalWidthsDirty())
+                setPreferredLogicalWidthsDirty(true);
             computeLogicalWidth();
             computeLogicalHeight();
 
index f2bb681..39442e1 100644 (file)
@@ -160,39 +160,39 @@ void RenderListBox::scrollToRevealSelection()
         scrollToRevealElementAtListIndex(firstIndex);
 }
 
-void RenderListBox::calcPrefWidths()
+void RenderListBox::computePreferredLogicalWidths()
 {
     ASSERT(!m_optionsChanged);
 
-    m_minPrefWidth = 0;
-    m_maxPrefWidth = 0;
+    m_minPreferredLogicalWidth = 0;
+    m_maxPreferredLogicalWidth = 0;
 
     if (style()->width().isFixed() && style()->width().value() > 0)
-        m_minPrefWidth = m_maxPrefWidth = computeContentBoxLogicalWidth(style()->width().value());
+        m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth = computeContentBoxLogicalWidth(style()->width().value());
     else {
-        m_maxPrefWidth = m_optionsWidth + 2 * optionsSpacingHorizontal;
+        m_maxPreferredLogicalWidth = m_optionsWidth + 2 * optionsSpacingHorizontal;
         if (m_vBar)
-            m_maxPrefWidth += m_vBar->width();
+            m_maxPreferredLogicalWidth += m_vBar->width();
     }
 
     if (style()->minWidth().isFixed() && style()->minWidth().value() > 0) {
-        m_maxPrefWidth = max(m_maxPrefWidth, computeContentBoxLogicalWidth(style()->minWidth().value()));
-        m_minPrefWidth = max(m_minPrefWidth, computeContentBoxLogicalWidth(style()->minWidth().value()));
+        m_maxPreferredLogicalWidth = max(m_maxPreferredLogicalWidth, computeContentBoxLogicalWidth(style()->minWidth().value()));
+        m_minPreferredLogicalWidth = max(m_minPreferredLogicalWidth, computeContentBoxLogicalWidth(style()->minWidth().value()));
     } else if (style()->width().isPercent() || (style()->width().isAuto() && style()->height().isPercent()))
-        m_minPrefWidth = 0;
+        m_minPreferredLogicalWidth = 0;
     else
-        m_minPrefWidth = m_maxPrefWidth;
+        m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth;
 
     if (style()->maxWidth().isFixed() && style()->maxWidth().value() != undefinedLength) {
-        m_maxPrefWidth = min(m_maxPrefWidth, computeContentBoxLogicalWidth(style()->maxWidth().value()));
-        m_minPrefWidth = min(m_minPrefWidth, computeContentBoxLogicalWidth(style()->maxWidth().value()));
+        m_maxPreferredLogicalWidth = min(m_maxPreferredLogicalWidth, computeContentBoxLogicalWidth(style()->maxWidth().value()));
+        m_minPreferredLogicalWidth = min(m_minPreferredLogicalWidth, computeContentBoxLogicalWidth(style()->maxWidth().value()));
     }
 
     int toAdd = borderAndPaddingWidth();
-    m_minPrefWidth += toAdd;
-    m_maxPrefWidth += toAdd;
+    m_minPreferredLogicalWidth += toAdd;
+    m_maxPreferredLogicalWidth += toAdd;
                                 
-    setPrefWidthsDirty(false);
+    setPreferredLogicalWidthsDirty(false);
 }
 
 int RenderListBox::size() const
index 046daee..c69f205 100644 (file)
@@ -70,7 +70,7 @@ private:
 
     virtual bool scroll(ScrollDirection, ScrollGranularity, float multiplier = 1, Node** stopNode = 0);
 
-    virtual void calcPrefWidths();
+    virtual void computePreferredLogicalWidths();
     virtual int baselinePosition(bool firstLine, bool isRootLineBox) const;
     virtual void computeLogicalHeight();
 
index 18b7ac5..525abe7 100644 (file)
@@ -210,7 +210,7 @@ void RenderListItem::updateMarkerLocation()
                 lineBoxParent = this;
         }
 
-        if (markerPar != lineBoxParent || m_marker->prefWidthsDirty()) {
+        if (markerPar != lineBoxParent || m_marker->preferredLogicalWidthsDirty()) {
             // Removing and adding the marker can trigger repainting in
             // containers other than ourselves, so we need to disable LayoutState.
             view()->disableLayoutState();
@@ -219,20 +219,20 @@ void RenderListItem::updateMarkerLocation()
             if (!lineBoxParent)
                 lineBoxParent = this;
             lineBoxParent->addChild(m_marker, firstNonMarkerChild(lineBoxParent));
-            if (m_marker->prefWidthsDirty())
-                m_marker->calcPrefWidths();
+            if (m_marker->preferredLogicalWidthsDirty())
+                m_marker->computePreferredLogicalWidths();
             view()->enableLayoutState();
         }
     }
 }
 
-void RenderListItem::calcPrefWidths()
+void RenderListItem::computePreferredLogicalWidths()
 {
-    ASSERT(prefWidthsDirty());
+    ASSERT(preferredLogicalWidthsDirty());
     
     updateMarkerLocation();
 
-    RenderBlock::calcPrefWidths();
+    RenderBlock::computePreferredLogicalWidths();
 }
 
 void RenderListItem::layout()
index 13d81f2..19695d6 100644 (file)
@@ -59,7 +59,7 @@ private:
     virtual void paint(PaintInfo&, int tx, int ty);
 
     virtual void layout();
-    virtual void calcPrefWidths();
+    virtual void computePreferredLogicalWidths();
 
     virtual void positionListMarker();
 
index 7b33c3d..f07dfad 100644 (file)
@@ -1274,13 +1274,13 @@ void RenderListMarker::paint(PaintInfo& paintInfo, int tx, int ty)
 void RenderListMarker::layout()
 {
     ASSERT(needsLayout());
-    ASSERT(!prefWidthsDirty());
+    ASSERT(!preferredLogicalWidthsDirty());
 
     if (isImage()) {
         setWidth(m_image->imageSize(this, style()->effectiveZoom()).width());
         setHeight(m_image->imageSize(this, style()->effectiveZoom()).height());
     } else {
-        setWidth(minPrefWidth());
+        setWidth(minPreferredLogicalWidth());
         setHeight(style()->font().height());
     }
 
@@ -1308,9 +1308,9 @@ void RenderListMarker::imageChanged(WrappedImagePtr o, const IntRect*)
         repaint();
 }
 
-void RenderListMarker::calcPrefWidths()
+void RenderListMarker::computePreferredLogicalWidths()
 {
-    ASSERT(prefWidthsDirty());
+    ASSERT(preferredLogicalWidthsDirty());
 
     m_text = "";
 
@@ -1321,8 +1321,8 @@ void RenderListMarker::calcPrefWidths()
         // until we support the CSS3 marker pseudoclass to allow control over the width and height of the marker box.
         int bulletWidth = font.ascent() / 2;
         m_image->setImageContainerSize(IntSize(bulletWidth, bulletWidth));
-        m_minPrefWidth = m_maxPrefWidth = m_image->imageSize(this, style()->effectiveZoom()).width();
-        setPrefWidthsDirty(false);
+        m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth = m_image->imageSize(this, style()->effectiveZoom()).width();
+        setPreferredLogicalWidthsDirty(false);
         updateMargins();
         return;
     }
@@ -1428,10 +1428,10 @@ void RenderListMarker::calcPrefWidths()
             break;
     }
 
-    m_minPrefWidth = width;
-    m_maxPrefWidth = width;
+    m_minPreferredLogicalWidth = width;
+    m_maxPreferredLogicalWidth = width;
 
-    setPrefWidthsDirty(false);
+    setPreferredLogicalWidthsDirty(false);
     
     updateMargins();
 }
@@ -1455,9 +1455,9 @@ void RenderListMarker::updateMargins()
             case Square:
                 if (style()->direction() == LTR) {
                     marginLeft = -1;
-                    marginRight = font.ascent() - minPrefWidth() + 1;
+                    marginRight = font.ascent() - minPreferredLogicalWidth() + 1;
                 } else {
-                    marginLeft = font.ascent() - minPrefWidth() + 1;
+                    marginLeft = font.ascent() - minPreferredLogicalWidth() + 1;
                     marginRight = -1;
                 }
                 break;
@@ -1467,7 +1467,7 @@ void RenderListMarker::updateMargins()
     } else {
         if (style()->direction() == LTR) {
             if (isImage())
-                marginLeft = -minPrefWidth() - cMarkerPadding;
+                marginLeft = -minPreferredLogicalWidth() - cMarkerPadding;
             else {
                 int offset = font.ascent() * 2 / 3;
                 switch (style()->listStyleType()) {
@@ -1479,7 +1479,7 @@ void RenderListMarker::updateMargins()
                     case NoneListStyle:
                         break;
                     default:
-                        marginLeft = m_text.isEmpty() ? 0 : -minPrefWidth() - offset / 2;
+                        marginLeft = m_text.isEmpty() ? 0 : -minPreferredLogicalWidth() - offset / 2;
                 }
             }
         } else {
@@ -1491,7 +1491,7 @@ void RenderListMarker::updateMargins()
                     case Disc:
                     case Circle:
                     case Square:
-                        marginLeft = offset + cMarkerPadding + 1 - minPrefWidth();
+                        marginLeft = offset + cMarkerPadding + 1 - minPreferredLogicalWidth();
                         break;
                     case NoneListStyle:
                         break;
@@ -1500,7 +1500,7 @@ void RenderListMarker::updateMargins()
                 }
             }
         }
-        marginRight = -marginLeft - minPrefWidth();
+        marginRight = -marginLeft - minPreferredLogicalWidth();
     }
 
     style()->setMarginLeft(Length(marginLeft, Fixed));
index 971877b..ed59ab9 100644 (file)
@@ -38,7 +38,7 @@ public:
     RenderListMarker(RenderListItem*);
     virtual ~RenderListMarker();
 
-    virtual void calcPrefWidths();
+    virtual void computePreferredLogicalWidths();
 
     const String& text() const { return m_text; }
 
index 5286e2c..a88903f 100644 (file)
@@ -239,34 +239,34 @@ IntRect RenderMenuList::controlClipRect(int tx, int ty) const
     return intersection(outerBox, innerBox);
 }
 
-void RenderMenuList::calcPrefWidths()
+void RenderMenuList::computePreferredLogicalWidths()
 {
-    m_minPrefWidth = 0;
-    m_maxPrefWidth = 0;
+    m_minPreferredLogicalWidth = 0;
+    m_maxPreferredLogicalWidth = 0;
     
     if (style()->width().isFixed() && style()->width().value() > 0)
-        m_minPrefWidth = m_maxPrefWidth = computeContentBoxLogicalWidth(style()->width().value());
+        m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth = computeContentBoxLogicalWidth(style()->width().value());
     else
-        m_maxPrefWidth = max(m_optionsWidth, theme()->minimumMenuListSize(style())) + m_innerBlock->paddingLeft() + m_innerBlock->paddingRight();
+        m_maxPreferredLogicalWidth = 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, computeContentBoxLogicalWidth(style()->minWidth().value()));
-        m_minPrefWidth = max(m_minPrefWidth, computeContentBoxLogicalWidth(style()->minWidth().value()));
+        m_maxPreferredLogicalWidth = max(m_maxPreferredLogicalWidth, computeContentBoxLogicalWidth(style()->minWidth().value()));
+        m_minPreferredLogicalWidth = max(m_minPreferredLogicalWidth, computeContentBoxLogicalWidth(style()->minWidth().value()));
     } else if (style()->width().isPercent() || (style()->width().isAuto() && style()->height().isPercent()))
-        m_minPrefWidth = 0;
+        m_minPreferredLogicalWidth = 0;
     else
-        m_minPrefWidth = m_maxPrefWidth;
+        m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth;
 
     if (style()->maxWidth().isFixed() && style()->maxWidth().value() != undefinedLength) {
-        m_maxPrefWidth = min(m_maxPrefWidth, computeContentBoxLogicalWidth(style()->maxWidth().value()));
-        m_minPrefWidth = min(m_minPrefWidth, computeContentBoxLogicalWidth(style()->maxWidth().value()));
+        m_maxPreferredLogicalWidth = min(m_maxPreferredLogicalWidth, computeContentBoxLogicalWidth(style()->maxWidth().value()));
+        m_minPreferredLogicalWidth = min(m_minPreferredLogicalWidth, computeContentBoxLogicalWidth(style()->maxWidth().value()));
     }
 
     int toAdd = borderAndPaddingWidth();
-    m_minPrefWidth += toAdd;
-    m_maxPrefWidth += toAdd;
+    m_minPreferredLogicalWidth += toAdd;
+    m_maxPreferredLogicalWidth += toAdd;
 
-    setPrefWidthsDirty(false);
+    setPreferredLogicalWidthsDirty(false);
 }
 
 void RenderMenuList::showPopup()
index 512fa9b..7faa372 100644 (file)
@@ -74,7 +74,7 @@ private:
 
     virtual const char* renderName() const { return "RenderMenuList"; }
 
-    virtual void calcPrefWidths();
+    virtual void computePreferredLogicalWidths();
 
     virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle);
 
index 39ee309..8961482 100644 (file)
@@ -190,7 +190,7 @@ RenderObject::RenderObject(Node* node)
     , m_needsPositionedMovementLayout(false)
     , m_normalChildNeedsLayout(false)
     , m_posChildNeedsLayout(false)
-    , m_prefWidthsDirty(false)
+    , m_preferredLogicalWidthsDirty(false)
     , m_floating(false)
     , m_positioned(false)
     , m_relPositioned(false)
@@ -573,27 +573,27 @@ RenderBlock* RenderObject::firstLineBlock() const
     return 0;
 }
 
-void RenderObject::setPrefWidthsDirty(bool b, bool markParents)
+void RenderObject::setPreferredLogicalWidthsDirty(bool b, bool markParents)
 {
-    bool alreadyDirty = m_prefWidthsDirty;
-    m_prefWidthsDirty = b;
+    bool alreadyDirty = m_preferredLogicalWidthsDirty;
+    m_preferredLogicalWidthsDirty = b;
     if (b && !alreadyDirty && markParents && (isText() || (style()->position() != FixedPosition && style()->position() != AbsolutePosition)))
-        invalidateContainerPrefWidths();
+        invalidateContainerPreferredLogicalWidths();
 }
 
-void RenderObject::invalidateContainerPrefWidths()
+void RenderObject::invalidateContainerPreferredLogicalWidths()
 {
     // In order to avoid pathological behavior when inlines are deeply nested, we do include them
     // in the chain that we mark dirty (even though they're kind of irrelevant).
     RenderObject* o = isTableCell() ? containingBlock() : container();
-    while (o && !o->m_prefWidthsDirty) {
+    while (o && !o->m_preferredLogicalWidthsDirty) {
         // Don't invalidate the outermost object of an unrooted subtree. That object will be 
         // invalidated when the subtree is added to the document.
         RenderObject* container = o->isTableCell() ? o->containingBlock() : o->container();
         if (!container && !o->isRenderView())
             break;
 
-        o->m_prefWidthsDirty = true;
+        o->m_preferredLogicalWidthsDirty = true;
         if (o->style()->position() == FixedPosition || o->style()->position() == AbsolutePosition)
             // A positioned object has no effect on the min/max width of its containing block ever.
             // We can optimize this case and not go up any further.
index 84815ae..aff0348 100644 (file)
@@ -394,7 +394,7 @@ public:
     bool posChildNeedsLayout() const { return m_posChildNeedsLayout; }
     bool normalChildNeedsLayout() const { return m_normalChildNeedsLayout; }
     
-    bool prefWidthsDirty() const { return m_prefWidthsDirty; }
+    bool preferredLogicalWidthsDirty() const { return m_preferredLogicalWidthsDirty; }
 
     bool isSelectionBorder() const;
 
@@ -455,13 +455,13 @@ public:
     void setNeedsLayout(bool b, bool markParents = true);
     void setChildNeedsLayout(bool b, bool markParents = true);
     void setNeedsPositionedMovementLayout();
-    void setPrefWidthsDirty(bool, bool markParents = true);
-    void invalidateContainerPrefWidths();
+    void setPreferredLogicalWidthsDirty(bool, bool markParents = true);
+    void invalidateContainerPreferredLogicalWidths();
     
     void setNeedsLayoutAndPrefWidthsRecalc()
     {
         setNeedsLayout(true);
-        setPrefWidthsDirty(true);
+        setPreferredLogicalWidthsDirty(true);
     }
 
     void setPositioned(bool b = true)  { m_positioned = b;  }
@@ -561,8 +561,8 @@ public:
     // the rect that will be painted if this object is passed as the paintingRoot
     IntRect paintingRootRect(IntRect& topLevelRect);
 
-    virtual int minPrefWidth() const { return 0; }
-    virtual int maxPrefWidth() const { return 0; }
+    virtual int minPreferredLogicalWidth() const { return 0; }
+    virtual int maxPreferredLogicalWidth() const { return 0; }
 
     RenderStyle* style() const { return m_style.get(); }
     RenderStyle* firstLineStyle() const { return document()->usesFirstLineRules() ? firstLineStyleSlowCase() : style(); }
@@ -812,7 +812,7 @@ private:
     bool m_needsPositionedMovementLayout :1;
     bool m_normalChildNeedsLayout    : 1;
     bool m_posChildNeedsLayout       : 1;
-    bool m_prefWidthsDirty           : 1;
+    bool m_preferredLogicalWidthsDirty           : 1;
     bool m_floating                  : 1;
 
     bool m_positioned                : 1;
index e0affc4..d3b449c 100644 (file)
@@ -257,24 +257,24 @@ int RenderReplaced::calcAspectRatioHeight() const
     return RenderBox::computeReplacedWidth() * intrinsicHeight / intrinsicWidth;
 }
 
-void RenderReplaced::calcPrefWidths()
+void RenderReplaced::computePreferredLogicalWidths()
 {
-    ASSERT(prefWidthsDirty());
+    ASSERT(preferredLogicalWidthsDirty());
 
     int borderAndPadding = borderAndPaddingWidth();
-    m_maxPrefWidth = computeReplacedWidth(false) + borderAndPadding;
+    m_maxPreferredLogicalWidth = 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));
+        m_maxPreferredLogicalWidth = min(m_maxPreferredLogicalWidth, style()->maxWidth().value() + (style()->boxSizing() == CONTENT_BOX ? borderAndPadding : 0));
 
     if (style()->width().isPercent() || style()->height().isPercent()
         || style()->maxWidth().isPercent() || style()->maxHeight().isPercent()
         || style()->minWidth().isPercent() || style()->minHeight().isPercent())
-        m_minPrefWidth = 0;
+        m_minPreferredLogicalWidth = 0;
     else
-        m_minPrefWidth = m_maxPrefWidth;
+        m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth;
 
-    setPrefWidthsDirty(false);
+    setPreferredLogicalWidthsDirty(false);
 }
 
 int RenderReplaced::lineHeight(bool, bool) const
index a3f8de9..872f6d0 100644 (file)
@@ -65,7 +65,7 @@ private:
     virtual int lineHeight(bool firstLine, bool isRootLineBox = false) const;
     virtual int baselinePosition(bool firstLine, bool isRootLineBox = false) const;
 
-    virtual void calcPrefWidths();
+    virtual void computePreferredLogicalWidths();
 
     int calcAspectRatioWidth() const;
     int calcAspectRatioHeight() const;
index 1d589ae..4b11f40 100644 (file)
@@ -52,11 +52,11 @@ void RenderReplica::layout()
     setNeedsLayout(false);
 }
 
-void RenderReplica::calcPrefWidths()
+void RenderReplica::computePreferredLogicalWidths()
 {
-    m_minPrefWidth = parentBox()->width();
-    m_maxPrefWidth = m_minPrefWidth;
-    setPrefWidthsDirty(false);
+    m_minPreferredLogicalWidth = parentBox()->width();
+    m_maxPreferredLogicalWidth = m_minPreferredLogicalWidth;
+    setPreferredLogicalWidthsDirty(false);
 }
 
 void RenderReplica::paint(PaintInfo& paintInfo, int tx, int ty)
index 48c64e4..a7b03f6 100644 (file)
@@ -43,7 +43,7 @@ public:
     virtual bool requiresLayer() const { return true; }
 
     virtual void layout();
-    virtual void calcPrefWidths();
+    virtual void computePreferredLogicalWidths();
     
     virtual void paint(PaintInfo&, int tx, int ty);
 
index cda3576..9c52d8c 100644 (file)
@@ -63,9 +63,9 @@ int RenderSVGRoot::baselinePosition(bool, bool) const
     return height() + marginTop() + marginBottom();
 }
 
-void RenderSVGRoot::calcPrefWidths()
+void RenderSVGRoot::computePreferredLogicalWidths()
 {
-    ASSERT(prefWidthsDirty());
+    ASSERT(preferredLogicalWidthsDirty());
 
     int borderAndPadding = borderAndPaddingWidth();
     int width = computeReplacedWidth(false) + borderAndPadding;
@@ -74,12 +74,12 @@ void RenderSVGRoot::calcPrefWidths()
         width = min(width, style()->maxWidth().value() + (style()->boxSizing() == CONTENT_BOX ? borderAndPadding : 0));
 
     if (style()->width().isPercent() || (style()->width().isAuto() && style()->height().isPercent())) {
-        m_minPrefWidth = 0;
-        m_maxPrefWidth = width;
+        m_minPreferredLogicalWidth = 0;
+        m_maxPreferredLogicalWidth = width;
     } else
-        m_minPrefWidth = m_maxPrefWidth = width;
+        m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth = width;
 
-    setPrefWidthsDirty(false);
+    setPreferredLogicalWidthsDirty(false);
 }
 
 int RenderSVGRoot::computeReplacedWidth(bool includeMaxWidth) const
index a2a964d..3c29b87 100644 (file)
@@ -53,7 +53,7 @@ private:
 
     virtual int lineHeight(bool b, bool isRootLineBox = false) const;
     virtual int baselinePosition(bool b, bool isRootLineBox = false) const;
-    virtual void calcPrefWidths();
+    virtual void computePreferredLogicalWidths();
     virtual int computeReplacedWidth(bool includeMaxWidth = true) const;
     virtual int computeReplacedHeight() const;
     virtual void layout();
index ea61e24..16cc204 100644 (file)
@@ -114,14 +114,14 @@ void RenderScrollbarPart::computeScrollbarHeight()
     m_marginBottom = style()->marginBottom().calcMinValue(visibleSize);
 }
 
-void RenderScrollbarPart::calcPrefWidths()
+void RenderScrollbarPart::computePreferredLogicalWidths()
 {
-    if (!prefWidthsDirty())
+    if (!preferredLogicalWidthsDirty())
         return;
     
-    m_minPrefWidth = m_maxPrefWidth = 0;
+    m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth = 0;
 
-    setPrefWidthsDirty(false);
+    setPreferredLogicalWidthsDirty(false);
 }
 
 void RenderScrollbarPart::styleWillChange(StyleDifference diff, const RenderStyle* newStyle)
index 114bbff..24485d0 100644 (file)
@@ -43,7 +43,7 @@ public:
     virtual bool requiresLayer() const { return false; }
 
     virtual void layout();
-    virtual void calcPrefWidths();
+    virtual void computePreferredLogicalWidths();
     
     void paintIntoRect(GraphicsContext*, int tx, int ty, const IntRect&);
     
index ee735ef..40cffc1 100644 (file)
@@ -160,34 +160,34 @@ int RenderSlider::baselinePosition(bool, bool) const
     return height() + marginTop();
 }
 
-void RenderSlider::calcPrefWidths()
+void RenderSlider::computePreferredLogicalWidths()
 {
-    m_minPrefWidth = 0;
-    m_maxPrefWidth = 0;
+    m_minPreferredLogicalWidth = 0;
+    m_maxPreferredLogicalWidth = 0;
 
     if (style()->width().isFixed() && style()->width().value() > 0)
-        m_minPrefWidth = m_maxPrefWidth = computeContentBoxLogicalWidth(style()->width().value());
+        m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth = computeContentBoxLogicalWidth(style()->width().value());
     else
-        m_maxPrefWidth = defaultTrackLength * style()->effectiveZoom();
+        m_maxPreferredLogicalWidth = defaultTrackLength * style()->effectiveZoom();
 
     if (style()->minWidth().isFixed() && style()->minWidth().value() > 0) {
-        m_maxPrefWidth = max(m_maxPrefWidth, computeContentBoxLogicalWidth(style()->minWidth().value()));
-        m_minPrefWidth = max(m_minPrefWidth, computeContentBoxLogicalWidth(style()->minWidth().value()));
+        m_maxPreferredLogicalWidth = max(m_maxPreferredLogicalWidth, computeContentBoxLogicalWidth(style()->minWidth().value()));
+        m_minPreferredLogicalWidth = max(m_minPreferredLogicalWidth, computeContentBoxLogicalWidth(style()->minWidth().value()));
     } else if (style()->width().isPercent() || (style()->width().isAuto() && style()->height().isPercent()))
-        m_minPrefWidth = 0;
+        m_minPreferredLogicalWidth = 0;
     else
-        m_minPrefWidth = m_maxPrefWidth;
+        m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth;
     
     if (style()->maxWidth().isFixed() && style()->maxWidth().value() != undefinedLength) {
-        m_maxPrefWidth = min(m_maxPrefWidth, computeContentBoxLogicalWidth(style()->maxWidth().value()));
-        m_minPrefWidth = min(m_minPrefWidth, computeContentBoxLogicalWidth(style()->maxWidth().value()));
+        m_maxPreferredLogicalWidth = min(m_maxPreferredLogicalWidth, computeContentBoxLogicalWidth(style()->maxWidth().value()));
+        m_minPreferredLogicalWidth = min(m_minPreferredLogicalWidth, computeContentBoxLogicalWidth(style()->maxWidth().value()));
     }
 
     int toAdd = borderAndPaddingWidth();
-    m_minPrefWidth += toAdd;
-    m_maxPrefWidth += toAdd;
+    m_minPreferredLogicalWidth += toAdd;
+    m_maxPreferredLogicalWidth += toAdd;
 
-    setPrefWidthsDirty(false); 
+    setPreferredLogicalWidthsDirty(false); 
 }
 
 void RenderSlider::styleDidChange(StyleDifference diff, const RenderStyle* oldStyle)
index fc8ce24..d214e41 100644 (file)
@@ -43,7 +43,7 @@ namespace WebCore {
         virtual bool isSlider() const { return true; }
 
         virtual int baselinePosition(bool, bool) const;
-        virtual void calcPrefWidths();
+        virtual void computePreferredLogicalWidths();
         virtual void layout();
         virtual void updateFromElement();
 
index e7fb9f9..0c81343 100644 (file)
@@ -206,7 +206,7 @@ void RenderTable::computeLogicalWidth()
     if (widthType > Relative && style()->width().isPositive()) {
         // Percent or fixed table
         setWidth(style()->width().calcMinValue(availableWidth));
-        setWidth(max(minPrefWidth(), width()));
+        setWidth(max(minPreferredLogicalWidth(), width()));
     } else {
         // An auto width table should shrink to fit within the line width if necessary in order to 
         // avoid overlapping floats.
@@ -223,10 +223,10 @@ void RenderTable::computeLogicalWidth()
         int availContentWidth = max(0, availableWidth - marginTotal);
         
         // Ensure we aren't bigger than our max width or smaller than our min width.
-        setWidth(min(availContentWidth, maxPrefWidth()));
+        setWidth(min(availContentWidth, maxPreferredLogicalWidth()));
     }
     
-    setWidth(max(width(), minPrefWidth()));
+    setWidth(max(width(), minPreferredLogicalWidth()));
 
     // Finally, with our true width determined, compute our margins for real.
     m_marginRight = 0;
@@ -533,19 +533,19 @@ void RenderTable::paintMask(PaintInfo& paintInfo, int tx, int ty)
     paintMaskImages(paintInfo, tx, ty, w, h);
 }
 
-void RenderTable::calcPrefWidths()
+void RenderTable::computePreferredLogicalWidths()
 {
-    ASSERT(prefWidthsDirty());
+    ASSERT(preferredLogicalWidthsDirty());
 
     recalcSectionsIfNeeded();
     recalcHorizontalBorders();
 
-    m_tableLayout->calcPrefWidths(m_minPrefWidth, m_maxPrefWidth);
+    m_tableLayout->computePreferredLogicalWidths(m_minPreferredLogicalWidth, m_maxPreferredLogicalWidth);
 
     if (m_caption)
-        m_minPrefWidth = max(m_minPrefWidth, m_caption->minPrefWidth());
+        m_minPreferredLogicalWidth = max(m_minPreferredLogicalWidth, m_caption->minPreferredLogicalWidth());
 
-    setPrefWidthsDirty(false);
+    setPreferredLogicalWidthsDirty(false);
 }
 
 void RenderTable::splitColumn(int pos, int firstSpan)
index c9eac7a..afea402 100644 (file)
@@ -160,7 +160,7 @@ private:
     virtual void paintBoxDecorations(PaintInfo&, int tx, int ty);
     virtual void paintMask(PaintInfo&, int tx, int ty);
     virtual void layout();
-    virtual void calcPrefWidths();
+    virtual void computePreferredLogicalWidths();
     virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, int xPos, int yPos, int tx, int ty, HitTestAction);
     
     virtual int firstLineBoxBaseline() const;
index f2bb21e..7bc80ae 100644 (file)
@@ -122,14 +122,14 @@ Length RenderTableCell::styleOrColWidth() const
     return w;
 }
 
-void RenderTableCell::calcPrefWidths()
+void RenderTableCell::computePreferredLogicalWidths()
 {
-    // The child cells rely on the grids up in the sections to do their calcPrefWidths work.  Normally the sections are set up early, as table
+    // The child cells rely on the grids up in the sections to do their computePreferredLogicalWidths work.  Normally the sections are set up early, as table
     // cells are added, but relayout can cause the cells to be freed, leaving stale pointers in the sections'
     // grids.  We must refresh those grids before the child cells try to use them.
     table()->recalcSectionsIfNeeded();
 
-    RenderBlock::calcPrefWidths();
+    RenderBlock::computePreferredLogicalWidths();
     if (node() && style()->autoWrap()) {
         // See if nowrap was set.
         Length w = styleOrColWidth();
@@ -140,7 +140,7 @@ void RenderTableCell::calcPrefWidths()
             // to make the minwidth of the cell into the fixed width.  They do this
             // even in strict mode, so do not make this a quirk.  Affected the top
             // of hiptop.com.
-            m_minPrefWidth = max(w.value(), m_minPrefWidth);
+            m_minPreferredLogicalWidth = max(w.value(), m_minPreferredLogicalWidth);
     }
 }
 
index 36dd38c..79376e9 100644 (file)
@@ -53,7 +53,7 @@ public:
 
     Length styleOrColWidth() const;
 
-    virtual void calcPrefWidths();
+    virtual void computePreferredLogicalWidths();
 
     void updateWidth(int);
 
index 80e74e1..66d060b 100644 (file)
@@ -88,12 +88,12 @@ void RenderTableCol::imageChanged(WrappedImagePtr, const IntRect*)
     repaint();
 }
 
-void RenderTableCol::calcPrefWidths()
+void RenderTableCol::computePreferredLogicalWidths()
 {
-    setPrefWidthsDirty(false);
+    setPreferredLogicalWidthsDirty(false);
 
     for (RenderObject* child = firstChild(); child; child = child->nextSibling())
-        child->setPrefWidthsDirty(false);
+        child->setPreferredLogicalWidthsDirty(false);
 }
 
 RenderTable* RenderTableCol::table() const
index 87209a1..c5f9afc 100644 (file)
@@ -39,7 +39,7 @@ public:
     const RenderObjectChildList* children() const { return &m_children; }
     RenderObjectChildList* children() { return &m_children; }
 
-    virtual void calcPrefWidths();
+    virtual void computePreferredLogicalWidths();
 
     int span() const { return m_span; }
     void setSpan(int span) { m_span = span; }
index 2d386d2..fada8b4 100644 (file)
@@ -581,8 +581,8 @@ void RenderText::trimmedPrefWidths(int leadWidth,
     if (!collapseWhiteSpace)
         stripFrontSpaces = false;
 
-    if (m_hasTab || prefWidthsDirty())
-        calcPrefWidths(leadWidth);
+    if (m_hasTab || preferredLogicalWidthsDirty())
+        computePreferredLogicalWidths(leadWidth);
 
     beginWS = !stripFrontSpaces && m_hasBeginWS;
     endWS = m_hasEndWS;
@@ -664,34 +664,34 @@ static inline bool isSpaceAccordingToStyle(UChar c, RenderStyle* style)
     return c == ' ' || (c == noBreakSpace && style->nbspMode() == SPACE);
 }
 
-int RenderText::minPrefWidth() const
+int RenderText::minPreferredLogicalWidth() const
 {
-    if (prefWidthsDirty())
-        const_cast<RenderText*>(this)->calcPrefWidths(0);
+    if (preferredLogicalWidthsDirty())
+        const_cast<RenderText*>(this)->computePreferredLogicalWidths(0);
         
     return m_minWidth;
 }
 
-int RenderText::maxPrefWidth() const
+int RenderText::maxPreferredLogicalWidth() const
 {
-    if (prefWidthsDirty())
-        const_cast<RenderText*>(this)->calcPrefWidths(0);
+    if (preferredLogicalWidthsDirty())
+        const_cast<RenderText*>(this)->computePreferredLogicalWidths(0);
         
     return m_maxWidth;
 }
 
-void RenderText::calcPrefWidths(int leadWidth)
+void RenderText::computePreferredLogicalWidths(int leadWidth)
 {
     HashSet<const SimpleFontData*> fallbackFonts;
     GlyphOverflow glyphOverflow;
-    calcPrefWidths(leadWidth, fallbackFonts, glyphOverflow);
+    computePreferredLogicalWidths(leadWidth, fallbackFonts, glyphOverflow);
     if (fallbackFonts.isEmpty() && !glyphOverflow.left && !glyphOverflow.right && !glyphOverflow.top && !glyphOverflow.bottom)
         m_knownToHaveNoOverflowAndNoFallbackFonts = true;
 }
 
-void RenderText::calcPrefWidths(int leadWidth, HashSet<const SimpleFontData*>& fallbackFonts, GlyphOverflow& glyphOverflow)
+void RenderText::computePreferredLogicalWidths(int leadWidth, HashSet<const SimpleFontData*>& fallbackFonts, GlyphOverflow& glyphOverflow)
 {
-    ASSERT(m_hasTab || prefWidthsDirty() || !m_knownToHaveNoOverflowAndNoFallbackFonts);
+    ASSERT(m_hasTab || preferredLogicalWidthsDirty() || !m_knownToHaveNoOverflowAndNoFallbackFonts);
 
     m_minWidth = 0;
     m_beginMinWidth = 0;
@@ -877,7 +877,7 @@ void RenderText::calcPrefWidths(int leadWidth, HashSet<const SimpleFontData*>& f
         m_endMinWidth = currMaxWidth;
     }
 
-    setPrefWidthsDirty(false);
+    setPreferredLogicalWidthsDirty(false);
 }
 
 bool RenderText::isAllCollapsibleWhitespace()
@@ -1249,14 +1249,14 @@ unsigned RenderText::width(unsigned from, unsigned len, const Font& f, int xPos,
         if (!style()->preserveNewline() && !from && len == textLength()) {
             if (fallbackFonts) {
                 ASSERT(glyphOverflow);
-                if (prefWidthsDirty() || !m_knownToHaveNoOverflowAndNoFallbackFonts) {
-                    const_cast<RenderText*>(this)->calcPrefWidths(0, *fallbackFonts, *glyphOverflow);
+                if (preferredLogicalWidthsDirty() || !m_knownToHaveNoOverflowAndNoFallbackFonts) {
+                    const_cast<RenderText*>(this)->computePreferredLogicalWidths(0, *fallbackFonts, *glyphOverflow);
                     if (fallbackFonts->isEmpty() && !glyphOverflow->left && !glyphOverflow->right && !glyphOverflow->top && !glyphOverflow->bottom)
                         m_knownToHaveNoOverflowAndNoFallbackFonts = true;
                 }
                 w = m_maxWidth;
             } else
-                w = maxPrefWidth();
+                w = maxPreferredLogicalWidth();
         } else
             w = widthFromCache(f, from, len, xPos, fallbackFonts, glyphOverflow);
     } else
index 6ab73f6..e3a6997 100644 (file)
@@ -76,8 +76,8 @@ public:
 
     virtual int lineHeight(bool firstLine, bool isRootLineBox = false) const;
 
-    virtual int minPrefWidth() const;
-    virtual int maxPrefWidth() const;
+    virtual int minPreferredLogicalWidth() const;
+    virtual int maxPreferredLogicalWidth() const;
 
     void trimmedPrefWidths(int leadWidth,
                            int& beginMinW, bool& beginWS,
@@ -124,7 +124,7 @@ public:
 
     void checkConsistency() const;
 
-    virtual void calcPrefWidths(int leadWidth);
+    virtual void computePreferredLogicalWidths(int leadWidth);
     bool isAllCollapsibleWhitespace();
     
 protected:
@@ -137,7 +137,7 @@ protected:
     virtual InlineTextBox* createTextBox(); // Subclassed by SVG.
 
 private:
-    void calcPrefWidths(int leadWidth, HashSet<const SimpleFontData*>& fallbackFonts, GlyphOverflow&);
+    void computePreferredLogicalWidths(int leadWidth, HashSet<const SimpleFontData*>& fallbackFonts, GlyphOverflow&);
 
     // Make length() private so that callers that have a RenderText*
     // will use the more efficient textLength() instead, while
index 707a0a3..f48081b 100644 (file)
@@ -504,40 +504,40 @@ float RenderTextControl::scaleEmToUnits(int x) const
     return roundf(style()->font().size() * x / unitsPerEm);
 }
 
-void RenderTextControl::calcPrefWidths()
+void RenderTextControl::computePreferredLogicalWidths()
 {
-    ASSERT(prefWidthsDirty());
+    ASSERT(preferredLogicalWidthsDirty());
 
-    m_minPrefWidth = 0;
-    m_maxPrefWidth = 0;
+    m_minPreferredLogicalWidth = 0;
+    m_maxPreferredLogicalWidth = 0;
 
     if (style()->width().isFixed() && style()->width().value() > 0)
-        m_minPrefWidth = m_maxPrefWidth = computeContentBoxLogicalWidth(style()->width().value());
+        m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth = computeContentBoxLogicalWidth(style()->width().value());
     else {
         // Use average character width. Matches IE.
         AtomicString family = style()->font().family().family();
-        m_maxPrefWidth = preferredContentWidth(getAvgCharWidth(family)) + m_innerText->renderBox()->paddingLeft() + m_innerText->renderBox()->paddingRight();
+        m_maxPreferredLogicalWidth = preferredContentWidth(getAvgCharWidth(family)) + m_innerText->renderBox()->paddingLeft() + m_innerText->renderBox()->paddingRight();
     }
 
     if (style()->minWidth().isFixed() && style()->minWidth().value() > 0) {
-        m_maxPrefWidth = max(m_maxPrefWidth, computeContentBoxLogicalWidth(style()->minWidth().value()));
-        m_minPrefWidth = max(m_minPrefWidth, computeContentBoxLogicalWidth(style()->minWidth().value()));
+        m_maxPreferredLogicalWidth = max(m_maxPreferredLogicalWidth, computeContentBoxLogicalWidth(style()->minWidth().value()));
+        m_minPreferredLogicalWidth = max(m_minPreferredLogicalWidth, computeContentBoxLogicalWidth(style()->minWidth().value()));
     } else if (style()->width().isPercent() || (style()->width().isAuto() && style()->height().isPercent()))
-        m_minPrefWidth = 0;
+        m_minPreferredLogicalWidth = 0;
     else
-        m_minPrefWidth = m_maxPrefWidth;
+        m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth;
 
     if (style()->maxWidth().isFixed() && style()->maxWidth().value() != undefinedLength) {
-        m_maxPrefWidth = min(m_maxPrefWidth, computeContentBoxLogicalWidth(style()->maxWidth().value()));
-        m_minPrefWidth = min(m_minPrefWidth, computeContentBoxLogicalWidth(style()->maxWidth().value()));
+        m_maxPreferredLogicalWidth = min(m_maxPreferredLogicalWidth, computeContentBoxLogicalWidth(style()->maxWidth().value()));
+        m_minPreferredLogicalWidth = min(m_minPreferredLogicalWidth, computeContentBoxLogicalWidth(style()->maxWidth().value()));
     }
 
     int toAdd = borderAndPaddingWidth();
 
-    m_minPrefWidth += toAdd;
-    m_maxPrefWidth += toAdd;
+    m_minPreferredLogicalWidth += toAdd;
+    m_maxPreferredLogicalWidth += toAdd;
 
-    setPrefWidthsDirty(false);
+    setPreferredLogicalWidthsDirty(false);
 }
 
 void RenderTextControl::selectionChanged(bool userTriggered)
index ecf5fdd..a33f11d 100644 (file)
@@ -95,7 +95,7 @@ protected:
 private:
     virtual const char* renderName() const { return "RenderTextControl"; }
     virtual bool isTextControl() const { return true; }
-    virtual void calcPrefWidths();
+    virtual void computePreferredLogicalWidths();
     virtual void removeLeftoverAnonymousBlock(RenderBlock*) { }
     virtual bool canHaveChildren() const { return false; }
     virtual bool avoidsFloats() const { return true; }
index bf5cdd1..2eea33b 100644 (file)
@@ -559,7 +559,7 @@ int RenderTextControlSingleLine::preferredContentWidth(float charWidth) const
                   cancelRenderer->paddingLeft() + cancelRenderer->paddingRight();
 
     if (RenderBox* spinRenderer = m_innerSpinButton ? m_innerSpinButton->renderBox() : 0)
-        result += spinRenderer->minPrefWidth();
+        result += spinRenderer->minPreferredLogicalWidth();
 
 #if ENABLE(INPUT_SPEECH)
     if (RenderBox* speechRenderer = m_speechButton ? m_speechButton->renderBox() : 0) {
@@ -575,7 +575,7 @@ int RenderTextControlSingleLine::preferredDecorationWidthRight() const
     int width = 0;
     if (RenderBox* spinRenderer = m_outerSpinButton ? m_outerSpinButton->renderBox() : 0) {
         spinRenderer->computeLogicalWidth();
-        width += spinRenderer->minPrefWidth() + spinRenderer->marginLeft() + spinRenderer->marginRight();
+        width += spinRenderer->minPreferredLogicalWidth() + spinRenderer->marginLeft() + spinRenderer->marginRight();
     }
     if (width > 0)
         width += paddingRight() + borderRight();
index 7ee88cb..470499a 100644 (file)
@@ -90,7 +90,7 @@ void RenderVideo::updateIntrinsicSize()
         return;
 
     setIntrinsicSize(size);
-    setPrefWidthsDirty(true);
+    setPreferredLogicalWidthsDirty(true);
     setNeedsLayout(true);
 }
     
index b6787f6..12a5e7e 100644 (file)
@@ -60,10 +60,10 @@ RenderView::RenderView(Node* node, FrameView* view)
     // init RenderObject attributes
     setInline(false);
     
-    m_minPrefWidth = 0;
-    m_maxPrefWidth = 0;
+    m_minPreferredLogicalWidth = 0;
+    m_maxPreferredLogicalWidth = 0;
 
-    setPrefWidthsDirty(true, false);
+    setPreferredLogicalWidthsDirty(true, false);
     
     setPositioned(true); // to 0,0 :)
 }
@@ -86,13 +86,13 @@ void RenderView::computeLogicalWidth()
     m_marginRight = 0;
 }
 
-void RenderView::calcPrefWidths()
+void RenderView::computePreferredLogicalWidths()
 {
-    ASSERT(prefWidthsDirty());
+    ASSERT(preferredLogicalWidthsDirty());
 
-    RenderBlock::calcPrefWidths();
+    RenderBlock::computePreferredLogicalWidths();
 
-    m_maxPrefWidth = m_minPrefWidth;
+    m_maxPreferredLogicalWidth = m_minPreferredLogicalWidth;
 }
 
 void RenderView::layout()
@@ -101,7 +101,7 @@ void RenderView::layout()
         setPageHeight(0);
 
     if (printing())
-        m_minPrefWidth = m_maxPrefWidth = width();
+        m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth = width();
 
     // Use calcWidth/Height to get the new width/height, since this will take the full page zoom factor into account.
     bool relayoutChildren = !printing() && (!m_frameView || width() != viewWidth() || height() != viewHeight());
index da6c4fa..b91a533 100644 (file)
@@ -49,7 +49,7 @@ public:
     virtual void layout();
     virtual void computeLogicalWidth();
     virtual void computeLogicalHeight();
-    virtual void calcPrefWidths();
+    virtual void computePreferredLogicalWidths();
 
     // The same as the FrameView's layoutHeight/layoutWidth but with null check guards.
     int viewHeight() const;
index 10d6e26..e0fa8ee 100644 (file)
@@ -36,7 +36,7 @@ public:
 
     virtual ~TableLayout() { }
 
-    virtual void calcPrefWidths(int& minWidth, int& maxWidth) = 0;
+    virtual void computePreferredLogicalWidths(int& minWidth, int& maxWidth) = 0;
     virtual void layout() = 0;
 
 protected: