Changeset 128130 in webkit


Ignore:
Timestamp:
Sep 10, 2012 4:55:38 PM (12 years ago)
Author:
ojan@chromium.org
Message:

Rename box-sizing applying methods to be more clear about just applying box-sizing.
https://bugs.webkit.org/show_bug.cgi?id=96319

Reviewed by Tony Chang.

This is strictly a rename. No logic or web-exposed changes.

  • rendering/AutoTableLayout.cpp:

(WebCore::AutoTableLayout::recalcColumn):

  • rendering/FixedTableLayout.cpp:

(WebCore::FixedTableLayout::calcWidthArray):

  • rendering/RenderBlock.cpp:

(WebCore::RenderBlock::computePreferredLogicalWidths):

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::adjustBorderBoxLogicalWidthForBoxSizing):
(WebCore::RenderBox::adjustBorderBoxLogicalHeightForBoxSizing):
(WebCore::RenderBox::adjustContentBoxLogicalWidthForBoxSizing):
(WebCore::RenderBox::adjustContentBoxLogicalHeightForBoxSizing):
(WebCore::RenderBox::perpendicularContainingBlockLogicalHeight):
(WebCore::RenderBox::computeLogicalWidthInRegionUsing):
(WebCore::RenderBox::computeLogicalHeightUsing):
(WebCore::RenderBox::computeLogicalClientHeight):
(WebCore::RenderBox::computePercentageLogicalHeight):
(WebCore::RenderBox::computeReplacedLogicalWidthUsing):
(WebCore::RenderBox::computeReplacedLogicalHeightUsing):
(WebCore::RenderBox::availableLogicalHeightUsing):
(WebCore::RenderBox::computePositionedLogicalWidthUsing):
(WebCore::RenderBox::computePositionedLogicalHeightUsing):

  • rendering/RenderBox.h:

(RenderBox):

  • rendering/RenderDeprecatedFlexibleBox.cpp:

(WebCore::RenderDeprecatedFlexibleBox::computePreferredLogicalWidths):

  • rendering/RenderFileUploadControl.cpp:

(WebCore::RenderFileUploadControl::computePreferredLogicalWidths):

  • rendering/RenderFlexibleBox.cpp:

(WebCore::RenderFlexibleBox::computePreferredLogicalWidths):
(WebCore::RenderFlexibleBox::computeMainAxisExtentForChild):

  • rendering/RenderListBox.cpp:

(WebCore::RenderListBox::computePreferredLogicalWidths):

  • rendering/RenderMenuList.cpp:

(WebCore::RenderMenuList::computePreferredLogicalWidths):

  • rendering/RenderSlider.cpp:

(WebCore::RenderSlider::computePreferredLogicalWidths):

  • rendering/RenderTextControl.cpp:

(WebCore::RenderTextControl::computePreferredLogicalWidths):

Location:
trunk/Source/WebCore
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r128129 r128130  
     12012-09-10  Ojan Vafai  <ojan@chromium.org>
     2
     3        Rename box-sizing applying methods to be more clear about just applying box-sizing.
     4        https://bugs.webkit.org/show_bug.cgi?id=96319
     5
     6        Reviewed by Tony Chang.
     7
     8        This is strictly a rename. No logic or web-exposed changes.
     9
     10        * rendering/AutoTableLayout.cpp:
     11        (WebCore::AutoTableLayout::recalcColumn):
     12        * rendering/FixedTableLayout.cpp:
     13        (WebCore::FixedTableLayout::calcWidthArray):
     14        * rendering/RenderBlock.cpp:
     15        (WebCore::RenderBlock::computePreferredLogicalWidths):
     16        * rendering/RenderBox.cpp:
     17        (WebCore::RenderBox::adjustBorderBoxLogicalWidthForBoxSizing):
     18        (WebCore::RenderBox::adjustBorderBoxLogicalHeightForBoxSizing):
     19        (WebCore::RenderBox::adjustContentBoxLogicalWidthForBoxSizing):
     20        (WebCore::RenderBox::adjustContentBoxLogicalHeightForBoxSizing):
     21        (WebCore::RenderBox::perpendicularContainingBlockLogicalHeight):
     22        (WebCore::RenderBox::computeLogicalWidthInRegionUsing):
     23        (WebCore::RenderBox::computeLogicalHeightUsing):
     24        (WebCore::RenderBox::computeLogicalClientHeight):
     25        (WebCore::RenderBox::computePercentageLogicalHeight):
     26        (WebCore::RenderBox::computeReplacedLogicalWidthUsing):
     27        (WebCore::RenderBox::computeReplacedLogicalHeightUsing):
     28        (WebCore::RenderBox::availableLogicalHeightUsing):
     29        (WebCore::RenderBox::computePositionedLogicalWidthUsing):
     30        (WebCore::RenderBox::computePositionedLogicalHeightUsing):
     31        * rendering/RenderBox.h:
     32        (RenderBox):
     33        * rendering/RenderDeprecatedFlexibleBox.cpp:
     34        (WebCore::RenderDeprecatedFlexibleBox::computePreferredLogicalWidths):
     35        * rendering/RenderFileUploadControl.cpp:
     36        (WebCore::RenderFileUploadControl::computePreferredLogicalWidths):
     37        * rendering/RenderFlexibleBox.cpp:
     38        (WebCore::RenderFlexibleBox::computePreferredLogicalWidths):
     39        (WebCore::RenderFlexibleBox::computeMainAxisExtentForChild):
     40        * rendering/RenderListBox.cpp:
     41        (WebCore::RenderListBox::computePreferredLogicalWidths):
     42        * rendering/RenderMenuList.cpp:
     43        (WebCore::RenderMenuList::computePreferredLogicalWidths):
     44        * rendering/RenderSlider.cpp:
     45        (WebCore::RenderSlider::computePreferredLogicalWidths):
     46        * rendering/RenderTextControl.cpp:
     47        (WebCore::RenderTextControl::computePreferredLogicalWidths):
     48
    1492012-09-10  Jer Noble  <jer.noble@apple.com>
    250
  • trunk/Source/WebCore/rendering/AutoTableLayout.cpp

    r125917 r128130  
    9494                        // ignore width=0
    9595                        if (cellLogicalWidth.isPositive() && !columnLayout.logicalWidth.isPercent()) {
    96                             LayoutUnit logicalWidth = cell->computeBorderBoxLogicalWidth(cellLogicalWidth.value());
     96                            LayoutUnit logicalWidth = cell->adjustBorderBoxLogicalWidthForBoxSizing(cellLogicalWidth.value());
    9797                            if (columnLayout.logicalWidth.isFixed()) {
    9898                                // Nav/IE weirdness
  • trunk/Source/WebCore/rendering/FixedTableLayout.cpp

    r121279 r128130  
    146146        int fixedBorderBoxLogicalWidth = 0;
    147147        if (logicalWidth.isFixed() && logicalWidth.isPositive()) {
    148             fixedBorderBoxLogicalWidth = cell->computeBorderBoxLogicalWidth(logicalWidth.value());
     148            fixedBorderBoxLogicalWidth = cell->adjustBorderBoxLogicalWidthForBoxSizing(logicalWidth.value());
    149149            logicalWidth.setValue(fixedBorderBoxLogicalWidth);
    150150        }
  • trunk/Source/WebCore/rendering/RenderBlock.cpp

    r128110 r128130  
    55535553    if (!isTableCell() && styleToUse->logicalWidth().isFixed() && styleToUse->logicalWidth().value() >= 0
    55545554       && style()->marqueeBehavior() != MALTERNATE && !(isDeprecatedFlexItem() && !styleToUse->logicalWidth().intValue()))
    5555         m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth = computeContentBoxLogicalWidth(styleToUse->logicalWidth().value());
     5555        m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth = adjustContentBoxLogicalWidthForBoxSizing(styleToUse->logicalWidth().value());
    55565556    else {
    55575557        m_minPreferredLogicalWidth = 0;
     
    55855585            Length w = toRenderTableCell(this)->styleOrColLogicalWidth();
    55865586            if (w.isFixed() && w.value() > 0) {
    5587                 m_maxPreferredLogicalWidth = max(m_minPreferredLogicalWidth, computeContentBoxLogicalWidth(w.value()));
     5587                m_maxPreferredLogicalWidth = max(m_minPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(w.value()));
    55885588                scrollbarWidth = 0;
    55895589            }
     
    55945594   
    55955595    if (styleToUse->logicalMinWidth().isFixed() && styleToUse->logicalMinWidth().value() > 0) {
    5596         m_maxPreferredLogicalWidth = max(m_maxPreferredLogicalWidth, computeContentBoxLogicalWidth(styleToUse->logicalMinWidth().value()));
    5597         m_minPreferredLogicalWidth = max(m_minPreferredLogicalWidth, computeContentBoxLogicalWidth(styleToUse->logicalMinWidth().value()));
     5596        m_maxPreferredLogicalWidth = max(m_maxPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(styleToUse->logicalMinWidth().value()));
     5597        m_minPreferredLogicalWidth = max(m_minPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(styleToUse->logicalMinWidth().value()));
    55985598    }
    55995599   
    56005600    if (styleToUse->logicalMaxWidth().isFixed()) {
    5601         m_maxPreferredLogicalWidth = min(m_maxPreferredLogicalWidth, computeContentBoxLogicalWidth(styleToUse->logicalMaxWidth().value()));
    5602         m_minPreferredLogicalWidth = min(m_minPreferredLogicalWidth, computeContentBoxLogicalWidth(styleToUse->logicalMaxWidth().value()));
     5601        m_maxPreferredLogicalWidth = min(m_maxPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(styleToUse->logicalMaxWidth().value()));
     5602        m_minPreferredLogicalWidth = min(m_minPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(styleToUse->logicalMaxWidth().value()));
    56035603    }
    56045604
  • trunk/Source/WebCore/rendering/RenderBox.cpp

    r128110 r128130  
    708708}
    709709
    710 LayoutUnit RenderBox::computeBorderBoxLogicalWidth(LayoutUnit width) const
     710LayoutUnit RenderBox::adjustBorderBoxLogicalWidthForBoxSizing(LayoutUnit width) const
    711711{
    712712    LayoutUnit bordersPlusPadding = borderAndPaddingLogicalWidth();
     
    716716}
    717717
    718 LayoutUnit RenderBox::computeBorderBoxLogicalHeight(LayoutUnit height) const
     718LayoutUnit RenderBox::adjustBorderBoxLogicalHeightForBoxSizing(LayoutUnit height) const
    719719{
    720720    LayoutUnit bordersPlusPadding = borderAndPaddingLogicalHeight();
     
    724724}
    725725
    726 LayoutUnit RenderBox::computeContentBoxLogicalWidth(LayoutUnit width) const
     726LayoutUnit RenderBox::adjustContentBoxLogicalWidthForBoxSizing(LayoutUnit width) const
    727727{
    728728    if (style()->boxSizing() == BORDER_BOX)
     
    731731}
    732732
    733 LayoutUnit RenderBox::computeContentBoxLogicalHeight(LayoutUnit height) const
     733LayoutUnit RenderBox::adjustContentBoxLogicalHeightForBoxSizing(LayoutUnit height) const
    734734{
    735735    if (style()->boxSizing() == BORDER_BOX)
     
    12451245   
    12461246    // Use the content box logical height as specified by the style.
    1247     return cb->computeContentBoxLogicalHeight(logicalHeightLength.value());
     1247    return cb->adjustContentBoxLogicalHeightForBoxSizing(logicalHeightLength.value());
    12481248}
    12491249
     
    17331733
    17341734    if (widthType == MinSize && logicalWidth.isAuto())
    1735         return computeBorderBoxLogicalWidth(0);
     1735        return adjustBorderBoxLogicalWidthForBoxSizing(0);
    17361736   
    17371737    if (!logicalWidth.isIntrinsicOrAuto()) {
    17381738        // FIXME: If the containing block flow is perpendicular to our direction we need to use the available logical height instead.
    1739         return computeBorderBoxLogicalWidth(valueForLength(logicalWidth, availableLogicalWidth, view()));
     1739        return adjustBorderBoxLogicalWidthForBoxSizing(valueForLength(logicalWidth, availableLogicalWidth, view()));
    17401740    }
    17411741
     
    20922092    LayoutUnit logicalHeight = computeContentLogicalHeightUsing(heightType, height);
    20932093    if (logicalHeight != -1)
    2094         logicalHeight = computeBorderBoxLogicalHeight(logicalHeight);
     2094        logicalHeight = adjustBorderBoxLogicalHeightForBoxSizing(logicalHeight);
    20952095    return logicalHeight;
    20962096}
     
    21012101    if (heightIncludingScrollbar == -1)
    21022102        return -1;
    2103     return std::max<LayoutUnit>(0, computeContentBoxLogicalHeight(heightIncludingScrollbar) - scrollbarLogicalHeight());
     2103    return std::max<LayoutUnit>(0, adjustContentBoxLogicalHeightForBoxSizing(heightIncludingScrollbar) - scrollbarLogicalHeight());
    21042104}
    21052105
     
    21692169    } else if (cbstyle->logicalHeight().isFixed()) {
    21702170        // Otherwise we only use our percentage height if our containing block had a specified height.
    2171         LayoutUnit contentBoxHeightWithScrollbar = cb->computeContentBoxLogicalHeight(cbstyle->logicalHeight().value());
     2171        LayoutUnit contentBoxHeightWithScrollbar = cb->adjustContentBoxLogicalHeightForBoxSizing(cbstyle->logicalHeight().value());
    21722172        result = max<LayoutUnit>(0, contentBoxHeightWithScrollbar - cb->scrollbarLogicalHeight());
    21732173    } else if (cbstyle->logicalHeight().isPercent() && !isOutOfFlowPositionedWithSpecifiedHeight) {
     
    21752175        LayoutUnit heightWithScrollbar = cb->computePercentageLogicalHeight(cbstyle->logicalHeight());
    21762176        if (heightWithScrollbar != -1) {
    2177             LayoutUnit contentBoxHeightWithScrollbar = cb->computeContentBoxLogicalHeight(heightWithScrollbar);
     2177            LayoutUnit contentBoxHeightWithScrollbar = cb->adjustContentBoxLogicalHeightForBoxSizing(heightWithScrollbar);
    21782178            result = max<LayoutUnit>(0, contentBoxHeightWithScrollbar - cb->scrollbarLogicalHeight());
    21792179        }
     
    22152215{
    22162216    if (sizeType == MinSize && logicalWidth.isAuto())
    2217         return computeContentBoxLogicalWidth(0);
     2217        return adjustContentBoxLogicalWidthForBoxSizing(0);
    22182218
    22192219    switch (logicalWidth.type()) {
    22202220        case Fixed:
    2221             return computeContentBoxLogicalWidth(logicalWidth.value());
     2221            return adjustContentBoxLogicalWidthForBoxSizing(logicalWidth.value());
    22222222        case ViewportPercentageWidth:
    22232223        case ViewportPercentageHeight:
    22242224        case ViewportPercentageMin:
    2225             return computeContentBoxLogicalWidth(valueForLength(logicalWidth, 0, view()));
     2225            return adjustContentBoxLogicalWidthForBoxSizing(valueForLength(logicalWidth, 0, view()));
    22262226        case Percent:
    22272227        case Calculated: {
     
    22342234            // https://bugs.webkit.org/show_bug.cgi?id=91071
    22352235            if (cw > 0 || (!cw && (containerLogicalWidth.isFixed() || containerLogicalWidth.isPercent())))
    2236                 return computeContentBoxLogicalWidth(minimumValueForLength(logicalWidth, cw));
     2236                return adjustContentBoxLogicalWidthForBoxSizing(minimumValueForLength(logicalWidth, cw));
    22372237        }
    22382238        // fall through
     
    22572257{
    22582258    if (sizeType == MinSize && logicalHeight.isAuto())
    2259         return computeContentBoxLogicalHeight(0);
     2259        return adjustContentBoxLogicalHeightForBoxSizing(0);
    22602260
    22612261    switch (logicalHeight.type()) {
    22622262        case Fixed:
    2263             return computeContentBoxLogicalHeight(logicalHeight.value());
     2263            return adjustContentBoxLogicalHeightForBoxSizing(logicalHeight.value());
    22642264        case Percent:
    22652265        case Calculated:
     
    22782278                LayoutUnit oldHeight = block->height();
    22792279                block->computeLogicalHeight();
    2280                 LayoutUnit newHeight = block->computeContentBoxLogicalHeight(block->contentHeight());
     2280                LayoutUnit newHeight = block->adjustContentBoxLogicalHeightForBoxSizing(block->contentHeight());
    22812281                block->setHeight(oldHeight);
    2282                 return computeContentBoxLogicalHeight(valueForLength(logicalHeight, newHeight));
     2282                return adjustContentBoxLogicalHeightForBoxSizing(valueForLength(logicalHeight, newHeight));
    22832283            }
    22842284           
     
    23072307                }
    23082308            }
    2309             return computeContentBoxLogicalHeight(valueForLength(logicalHeight, availableHeight));
     2309            return adjustContentBoxLogicalHeightForBoxSizing(valueForLength(logicalHeight, availableHeight));
    23102310        }
    23112311        case ViewportPercentageWidth:
    23122312        case ViewportPercentageHeight:
    23132313        case ViewportPercentageMin:
    2314             return computeContentBoxLogicalHeight(valueForLength(logicalHeight, 0, view()));
     2314            return adjustContentBoxLogicalHeightForBoxSizing(valueForLength(logicalHeight, 0, view()));
    23152315        default:
    23162316            return intrinsicLogicalHeight();
     
    23362336    if (h.isPercent() && isOutOfFlowPositioned()) {
    23372337        LayoutUnit availableHeight = containingBlockLogicalHeightForPositioned(containingBlock());
    2338         return computeContentBoxLogicalHeight(valueForLength(h, availableHeight));
     2338        return adjustContentBoxLogicalHeightForBoxSizing(valueForLength(h, availableHeight));
    23392339    }
    23402340
    23412341    LayoutUnit heightIncludingScrollbar = computeContentLogicalHeightUsing(MainOrPreferredSize, h);
    23422342    if (heightIncludingScrollbar != -1)
    2343         return std::max<LayoutUnit>(0, computeContentBoxLogicalHeight(heightIncludingScrollbar) - scrollbarLogicalHeight());
     2343        return std::max<LayoutUnit>(0, adjustContentBoxLogicalHeightForBoxSizing(heightIncludingScrollbar) - scrollbarLogicalHeight());
    23442344
    23452345    // FIXME: Check logicalTop/logicalBottom here to correctly handle vertical writing-mode.
     
    23492349        LayoutUnit oldHeight = block->logicalHeight();
    23502350        block->computeLogicalHeight();
    2351         LayoutUnit newHeight = block->computeContentBoxLogicalHeight(block->contentLogicalHeight());
     2351        LayoutUnit newHeight = block->adjustContentBoxLogicalHeightForBoxSizing(block->contentLogicalHeight());
    23522352        block->setLogicalHeight(oldHeight);
    2353         return computeContentBoxLogicalHeight(newHeight);
     2353        return adjustContentBoxLogicalHeightForBoxSizing(newHeight);
    23542354    }
    23552355
     
    27182718
    27192719        logicalLeftValue = valueForLength(logicalLeft, containerLogicalWidth, renderView);
    2720         computedValues.m_extent = computeContentBoxLogicalWidth(valueForLength(logicalWidth, containerLogicalWidth, renderView));
     2720        computedValues.m_extent = adjustContentBoxLogicalWidthForBoxSizing(valueForLength(logicalWidth, containerLogicalWidth, renderView));
    27212721
    27222722        const LayoutUnit availableSpace = containerLogicalWidth - (logicalLeftValue + computedValues.m_extent + valueForLength(logicalRight, containerLogicalWidth, renderView) + bordersPlusPadding);
     
    28282828        } else if (logicalLeftIsAuto && !logicalWidthIsAuto && !logicalRightIsAuto) {
    28292829            // RULE 4: (solve for left)
    2830             computedValues.m_extent = computeContentBoxLogicalWidth(valueForLength(logicalWidth, containerLogicalWidth, renderView));
     2830            computedValues.m_extent = adjustContentBoxLogicalWidthForBoxSizing(valueForLength(logicalWidth, containerLogicalWidth, renderView));
    28312831            logicalLeftValue = availableSpace - (computedValues.m_extent + valueForLength(logicalRight, containerLogicalWidth, renderView));
    28322832        } else if (!logicalLeftIsAuto && logicalWidthIsAuto && !logicalRightIsAuto) {
     
    28372837            // RULE 6: (no need solve for right)
    28382838            logicalLeftValue = valueForLength(logicalLeft, containerLogicalWidth, renderView);
    2839             computedValues.m_extent = computeContentBoxLogicalWidth(valueForLength(logicalWidth, containerLogicalWidth, renderView));
     2839            computedValues.m_extent = adjustContentBoxLogicalWidthForBoxSizing(valueForLength(logicalWidth, containerLogicalWidth, renderView));
    28402840        }
    28412841    }
     
    30443044        // case because the value is not used for any further calculations.
    30453045
    3046         logicalHeightValue = computeContentBoxLogicalHeight(valueForLength(logicalHeightLength, containerLogicalHeight, renderView));
     3046        logicalHeightValue = adjustContentBoxLogicalHeightForBoxSizing(valueForLength(logicalHeightLength, containerLogicalHeight, renderView));
    30473047        logicalTopValue = valueForLength(logicalTop, containerLogicalHeight, renderView);
    30483048
     
    31113111        } else if (logicalTopIsAuto && !logicalHeightIsAuto && !logicalBottomIsAuto) {
    31123112            // RULE 4: (solve of top)
    3113             logicalHeightValue = computeContentBoxLogicalHeight(valueForLength(logicalHeightLength, containerLogicalHeight, renderView));
     3113            logicalHeightValue = adjustContentBoxLogicalHeightForBoxSizing(valueForLength(logicalHeightLength, containerLogicalHeight, renderView));
    31143114            logicalTopValue = availableSpace - (logicalHeightValue + valueForLength(logicalBottom, containerLogicalHeight, renderView));
    31153115        } else if (!logicalTopIsAuto && logicalHeightIsAuto && !logicalBottomIsAuto) {
     
    31193119        } else if (!logicalTopIsAuto && !logicalHeightIsAuto && logicalBottomIsAuto) {
    31203120            // RULE 6: (no need solve of bottom)
    3121             logicalHeightValue = computeContentBoxLogicalHeight(valueForLength(logicalHeightLength, containerLogicalHeight, renderView));
     3121            logicalHeightValue = adjustContentBoxLogicalHeightForBoxSizing(valueForLength(logicalHeightLength, containerLogicalHeight, renderView));
    31223122            logicalTopValue = valueForLength(logicalTop, containerLogicalHeight, renderView);
    31233123        }
  • trunk/Source/WebCore/rendering/RenderBox.h

    r128110 r128130  
    300300    virtual LayoutSize offsetFromContainer(RenderObject*, const LayoutPoint&, bool* offsetDependsOnPoint = 0) const;
    301301   
    302     LayoutUnit computeBorderBoxLogicalWidth(LayoutUnit width) const;
    303     LayoutUnit computeBorderBoxLogicalHeight(LayoutUnit height) const;
    304     LayoutUnit computeContentBoxLogicalWidth(LayoutUnit width) const;
    305     LayoutUnit computeContentBoxLogicalHeight(LayoutUnit height) const;
     302    LayoutUnit adjustBorderBoxLogicalWidthForBoxSizing(LayoutUnit width) const;
     303    LayoutUnit adjustBorderBoxLogicalHeightForBoxSizing(LayoutUnit height) const;
     304    LayoutUnit adjustContentBoxLogicalWidthForBoxSizing(LayoutUnit width) const;
     305    LayoutUnit adjustContentBoxLogicalHeightForBoxSizing(LayoutUnit height) const;
    306306
    307307    virtual void borderFitAdjust(LayoutRect&) const { } // Shrink the box in which the border paints if border-fit is set.
  • trunk/Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp

    r128110 r128130  
    193193
    194194    if (style()->width().isFixed() && style()->width().value() > 0)
    195         m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth = computeContentBoxLogicalWidth(style()->width().value());
     195        m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth = adjustContentBoxLogicalWidthForBoxSizing(style()->width().value());
    196196    else {
    197197        m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth = 0;
     
    213213
    214214    if (style()->minWidth().isFixed() && style()->minWidth().value() > 0) {
    215         m_maxPreferredLogicalWidth = max(m_maxPreferredLogicalWidth, computeContentBoxLogicalWidth(style()->minWidth().value()));
    216         m_minPreferredLogicalWidth = max(m_minPreferredLogicalWidth, computeContentBoxLogicalWidth(style()->minWidth().value()));
     215        m_maxPreferredLogicalWidth = max(m_maxPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(style()->minWidth().value()));
     216        m_minPreferredLogicalWidth = max(m_minPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(style()->minWidth().value()));
    217217    }
    218218
    219219    if (style()->maxWidth().isFixed()) {
    220         m_maxPreferredLogicalWidth = min(m_maxPreferredLogicalWidth, computeContentBoxLogicalWidth(style()->maxWidth().value()));
    221         m_minPreferredLogicalWidth = min(m_minPreferredLogicalWidth, computeContentBoxLogicalWidth(style()->maxWidth().value()));
     220        m_maxPreferredLogicalWidth = min(m_maxPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(style()->maxWidth().value()));
     221        m_minPreferredLogicalWidth = min(m_minPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(style()->maxWidth().value()));
    222222    }
    223223
  • trunk/Source/WebCore/rendering/RenderFileUploadControl.cpp

    r126359 r128130  
    185185    const Font& font = style->font();
    186186    if (style->width().isFixed() && style->width().value() > 0)
    187         m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth = computeContentBoxLogicalWidth(style->width().value());
     187        m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth = adjustContentBoxLogicalWidthForBoxSizing(style->width().value());
    188188    else {
    189189        // Figure out how big the filename space needs to be for a given number of characters
     
    202202
    203203    if (style->minWidth().isFixed() && style->minWidth().value() > 0) {
    204         m_maxPreferredLogicalWidth = max(m_maxPreferredLogicalWidth, computeContentBoxLogicalWidth(style->minWidth().value()));
    205         m_minPreferredLogicalWidth = max(m_minPreferredLogicalWidth, computeContentBoxLogicalWidth(style->minWidth().value()));
     204        m_maxPreferredLogicalWidth = max(m_maxPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(style->minWidth().value()));
     205        m_minPreferredLogicalWidth = max(m_minPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(style->minWidth().value()));
    206206    } else if (style->width().isPercent() || (style->width().isAuto() && style->height().isPercent()))
    207207        m_minPreferredLogicalWidth = 0;
     
    210210
    211211    if (style->maxWidth().isFixed()) {
    212         m_maxPreferredLogicalWidth = min(m_maxPreferredLogicalWidth, computeContentBoxLogicalWidth(style->maxWidth().value()));
    213         m_minPreferredLogicalWidth = min(m_minPreferredLogicalWidth, computeContentBoxLogicalWidth(style->maxWidth().value()));
     212        m_maxPreferredLogicalWidth = min(m_maxPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(style->maxWidth().value()));
     213        m_minPreferredLogicalWidth = min(m_minPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(style->maxWidth().value()));
    214214    }
    215215
  • trunk/Source/WebCore/rendering/RenderFlexibleBox.cpp

    r128110 r128130  
    168168    // FIXME: This should probably be checking for isSpecified since you should be able to use percentage, calc or viewport relative values for width.
    169169    if (styleToUse->logicalWidth().isFixed() && styleToUse->logicalWidth().value() > 0)
    170         m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth = computeContentBoxLogicalWidth(styleToUse->logicalWidth().value());
     170        m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth = adjustContentBoxLogicalWidthForBoxSizing(styleToUse->logicalWidth().value());
    171171    else {
    172172        m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth = 0;
     
    218218    // FIXME: This should probably be checking for isSpecified since you should be able to use percentage, calc or viewport relative values for min-width.
    219219    if (styleToUse->logicalMinWidth().isFixed() && styleToUse->logicalMinWidth().value() > 0) {
    220         m_maxPreferredLogicalWidth = std::max(m_maxPreferredLogicalWidth, computeContentBoxLogicalWidth(styleToUse->logicalMinWidth().value()));
    221         m_minPreferredLogicalWidth = std::max(m_minPreferredLogicalWidth, computeContentBoxLogicalWidth(styleToUse->logicalMinWidth().value()));
     220        m_maxPreferredLogicalWidth = std::max(m_maxPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(styleToUse->logicalMinWidth().value()));
     221        m_minPreferredLogicalWidth = std::max(m_minPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(styleToUse->logicalMinWidth().value()));
    222222    }
    223223
    224224    // FIXME: This should probably be checking for isSpecified since you should be able to use percentage, calc or viewport relative values for maxWidth.
    225225    if (styleToUse->logicalMaxWidth().isFixed()) {
    226         m_maxPreferredLogicalWidth = std::min(m_maxPreferredLogicalWidth, computeContentBoxLogicalWidth(styleToUse->logicalMaxWidth().value()));
    227         m_minPreferredLogicalWidth = std::min(m_minPreferredLogicalWidth, computeContentBoxLogicalWidth(styleToUse->logicalMaxWidth().value()));
     226        m_maxPreferredLogicalWidth = std::min(m_maxPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(styleToUse->logicalMaxWidth().value()));
     227        m_minPreferredLogicalWidth = std::min(m_minPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(styleToUse->logicalMaxWidth().value()));
    228228    }
    229229
     
    407407    if (isColumnFlow())
    408408        return child->computeLogicalClientHeight(sizeType, size);
    409     return child->computeContentBoxLogicalWidth(valueForLength(size, maximumValue, view()));
     409    return child->adjustContentBoxLogicalWidthForBoxSizing(valueForLength(size, maximumValue, view()));
    410410}
    411411
  • trunk/Source/WebCore/rendering/RenderListBox.cpp

    r126859 r128130  
    199199
    200200    if (style()->width().isFixed() && style()->width().value() > 0)
    201         m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth = computeContentBoxLogicalWidth(style()->width().value());
     201        m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth = adjustContentBoxLogicalWidthForBoxSizing(style()->width().value());
    202202    else {
    203203        m_maxPreferredLogicalWidth = m_optionsWidth + 2 * optionsSpacingHorizontal;
     
    207207
    208208    if (style()->minWidth().isFixed() && style()->minWidth().value() > 0) {
    209         m_maxPreferredLogicalWidth = max(m_maxPreferredLogicalWidth, computeContentBoxLogicalWidth(style()->minWidth().value()));
    210         m_minPreferredLogicalWidth = max(m_minPreferredLogicalWidth, computeContentBoxLogicalWidth(style()->minWidth().value()));
     209        m_maxPreferredLogicalWidth = max(m_maxPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(style()->minWidth().value()));
     210        m_minPreferredLogicalWidth = max(m_minPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(style()->minWidth().value()));
    211211    } else if (style()->width().isPercent() || (style()->width().isAuto() && style()->height().isPercent()))
    212212        m_minPreferredLogicalWidth = 0;
     
    215215
    216216    if (style()->maxWidth().isFixed()) {
    217         m_maxPreferredLogicalWidth = min(m_maxPreferredLogicalWidth, computeContentBoxLogicalWidth(style()->maxWidth().value()));
    218         m_minPreferredLogicalWidth = min(m_minPreferredLogicalWidth, computeContentBoxLogicalWidth(style()->maxWidth().value()));
     217        m_maxPreferredLogicalWidth = min(m_maxPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(style()->maxWidth().value()));
     218        m_minPreferredLogicalWidth = min(m_minPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(style()->maxWidth().value()));
    219219    }
    220220
  • trunk/Source/WebCore/rendering/RenderMenuList.cpp

    r126967 r128130  
    279279   
    280280    if (style()->width().isFixed() && style()->width().value() > 0)
    281         m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth = computeContentBoxLogicalWidth(style()->width().value());
     281        m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth = adjustContentBoxLogicalWidthForBoxSizing(style()->width().value());
    282282    else
    283283        m_maxPreferredLogicalWidth = max(m_optionsWidth, theme()->minimumMenuListSize(style())) + m_innerBlock->paddingLeft() + m_innerBlock->paddingRight();
    284284
    285285    if (style()->minWidth().isFixed() && style()->minWidth().value() > 0) {
    286         m_maxPreferredLogicalWidth = max(m_maxPreferredLogicalWidth, computeContentBoxLogicalWidth(style()->minWidth().value()));
    287         m_minPreferredLogicalWidth = max(m_minPreferredLogicalWidth, computeContentBoxLogicalWidth(style()->minWidth().value()));
     286        m_maxPreferredLogicalWidth = max(m_maxPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(style()->minWidth().value()));
     287        m_minPreferredLogicalWidth = max(m_minPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(style()->minWidth().value()));
    288288    } else if (style()->width().isPercent() || (style()->width().isAuto() && style()->height().isPercent()))
    289289        m_minPreferredLogicalWidth = 0;
     
    292292
    293293    if (style()->maxWidth().isFixed()) {
    294         m_maxPreferredLogicalWidth = min(m_maxPreferredLogicalWidth, computeContentBoxLogicalWidth(style()->maxWidth().value()));
    295         m_minPreferredLogicalWidth = min(m_minPreferredLogicalWidth, computeContentBoxLogicalWidth(style()->maxWidth().value()));
     294        m_maxPreferredLogicalWidth = min(m_maxPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(style()->maxWidth().value()));
     295        m_minPreferredLogicalWidth = min(m_minPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(style()->maxWidth().value()));
    296296    }
    297297
  • trunk/Source/WebCore/rendering/RenderSlider.cpp

    r124556 r128130  
    7777
    7878    if (style()->width().isFixed() && style()->width().value() > 0)
    79         m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth = computeContentBoxLogicalWidth(style()->width().value());
     79        m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth = adjustContentBoxLogicalWidthForBoxSizing(style()->width().value());
    8080    else
    8181        m_maxPreferredLogicalWidth = defaultTrackLength * style()->effectiveZoom();
    8282
    8383    if (style()->minWidth().isFixed() && style()->minWidth().value() > 0) {
    84         m_maxPreferredLogicalWidth = max(m_maxPreferredLogicalWidth, computeContentBoxLogicalWidth(style()->minWidth().value()));
    85         m_minPreferredLogicalWidth = max(m_minPreferredLogicalWidth, computeContentBoxLogicalWidth(style()->minWidth().value()));
     84        m_maxPreferredLogicalWidth = max(m_maxPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(style()->minWidth().value()));
     85        m_minPreferredLogicalWidth = max(m_minPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(style()->minWidth().value()));
    8686    } else if (style()->width().isPercent() || (style()->width().isAuto() && style()->height().isPercent()))
    8787        m_minPreferredLogicalWidth = 0;
     
    9090   
    9191    if (style()->maxWidth().isFixed()) {
    92         m_maxPreferredLogicalWidth = min(m_maxPreferredLogicalWidth, computeContentBoxLogicalWidth(style()->maxWidth().value()));
    93         m_minPreferredLogicalWidth = min(m_minPreferredLogicalWidth, computeContentBoxLogicalWidth(style()->maxWidth().value()));
     92        m_maxPreferredLogicalWidth = min(m_maxPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(style()->maxWidth().value()));
     93        m_minPreferredLogicalWidth = min(m_minPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(style()->maxWidth().value()));
    9494    }
    9595
  • trunk/Source/WebCore/rendering/RenderTextControl.cpp

    r127737 r128130  
    263263
    264264    if (style()->width().isFixed() && style()->width().value() >= 0)
    265         m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth = computeContentBoxLogicalWidth(style()->width().value());
     265        m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth = adjustContentBoxLogicalWidthForBoxSizing(style()->width().value());
    266266    else {
    267267        // Use average character width. Matches IE.
     
    273273
    274274    if (style()->minWidth().isFixed() && style()->minWidth().value() > 0) {
    275         m_maxPreferredLogicalWidth = max(m_maxPreferredLogicalWidth, computeContentBoxLogicalWidth(style()->minWidth().value()));
    276         m_minPreferredLogicalWidth = max(m_minPreferredLogicalWidth, computeContentBoxLogicalWidth(style()->minWidth().value()));
     275        m_maxPreferredLogicalWidth = max(m_maxPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(style()->minWidth().value()));
     276        m_minPreferredLogicalWidth = max(m_minPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(style()->minWidth().value()));
    277277    } else if (style()->width().isPercent() || (style()->width().isAuto() && style()->height().isPercent()))
    278278        m_minPreferredLogicalWidth = 0;
     
    281281
    282282    if (style()->maxWidth().isFixed()) {
    283         m_maxPreferredLogicalWidth = min(m_maxPreferredLogicalWidth, computeContentBoxLogicalWidth(style()->maxWidth().value()));
    284         m_minPreferredLogicalWidth = min(m_minPreferredLogicalWidth, computeContentBoxLogicalWidth(style()->maxWidth().value()));
     283        m_maxPreferredLogicalWidth = min(m_maxPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(style()->maxWidth().value()));
     284        m_minPreferredLogicalWidth = min(m_minPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(style()->maxWidth().value()));
    285285    }
    286286
Note: See TracChangeset for help on using the changeset viewer.