Changeset 95856 in webkit


Ignore:
Timestamp:
Sep 23, 2011 1:32:18 PM (13 years ago)
Author:
ojan@chromium.org
Message:

refactor RenderFlexibleBox to use flex-flow aware methods
https://bugs.webkit.org/show_bug.cgi?id=68665

Reviewed by Tony Chang.

This is just a refactor. Just move the all the code that needs to
be flow aware into helper functions. Actually making them flow-aware
can be done in a followup patch.

  • rendering/RenderBlock.cpp:
  • rendering/RenderBlock.h:

Moved setLogicalLocationForChild into RenderFlexibleBox since that was the only caller.

  • rendering/RenderFlexibleBox.cpp:

(WebCore::RenderFlexibleBox::hasOrthogonalFlow):
(WebCore::RenderFlexibleBox::isHorizontalFlow):
(WebCore::RenderFlexibleBox::isLeftToRightFlow):
(WebCore::RenderFlexibleBox::setFlowAwareLogicalHeight):
(WebCore::RenderFlexibleBox::flowAwareLogicalHeightForChild):
(WebCore::RenderFlexibleBox::flowAwareLogicalWidthForChild):
(WebCore::RenderFlexibleBox::flowAwareLogicalHeight):
(WebCore::RenderFlexibleBox::flowAwareContentLogicalWidth):
(WebCore::RenderFlexibleBox::flowAwareAvailableLogicalWidth):
(WebCore::RenderFlexibleBox::flowAwareBorderStart):
(WebCore::RenderFlexibleBox::flowAwareBorderBefore):
(WebCore::RenderFlexibleBox::flowAwareBorderAfter):
(WebCore::RenderFlexibleBox::flowAwarePaddingStart):
(WebCore::RenderFlexibleBox::flowAwarePaddingBefore):
(WebCore::RenderFlexibleBox::flowAwarePaddingAfter):
(WebCore::RenderFlexibleBox::flowAwareMarginStartForChild):
(WebCore::RenderFlexibleBox::flowAwareMarginBeforeForChild):
(WebCore::RenderFlexibleBox::flowAwareMarginAfterForChild):
(WebCore::RenderFlexibleBox::setFlowAwareMarginStartForChild):
(WebCore::RenderFlexibleBox::setFlowAwareMarginEndForChild):
(WebCore::RenderFlexibleBox::setFlowAwareLogicalLocationForChild):
(WebCore::RenderFlexibleBox::logicalBorderAndPaddingWidthForChild):
(WebCore::RenderFlexibleBox::logicalScrollbarHeightForChild):
(WebCore::RenderFlexibleBox::marginStartStyleForChild):
(WebCore::RenderFlexibleBox::marginEndStyleForChild):
(WebCore::RenderFlexibleBox::preferredLogicalContentWidthForFlexItem):
(WebCore::RenderFlexibleBox::layoutInlineDirection):
(WebCore::RenderFlexibleBox::logicalPositiveFlexForChild):
(WebCore::RenderFlexibleBox::logicalNegativeFlexForChild):
(WebCore::RenderFlexibleBox::computePreferredLogicalWidth):
(WebCore::RenderFlexibleBox::runFreeSpaceAllocationAlgorithmInlineDirection):
(WebCore::RenderFlexibleBox::setLogicalOverrideSize):
(WebCore::RenderFlexibleBox::layoutAndPlaceChildrenInlineDirection):

  • rendering/RenderFlexibleBox.h:
Location:
trunk/Source/WebCore
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r95855 r95856  
     12011-09-22  Ojan Vafai  <ojan@chromium.org>
     2
     3        refactor RenderFlexibleBox to use flex-flow aware methods
     4        https://bugs.webkit.org/show_bug.cgi?id=68665
     5
     6        Reviewed by Tony Chang.
     7
     8        This is just a refactor. Just move the all the code that needs to
     9        be flow aware into helper functions. Actually making them flow-aware
     10        can be done in a followup patch.
     11
     12        * rendering/RenderBlock.cpp:
     13        * rendering/RenderBlock.h:
     14        Moved setLogicalLocationForChild into RenderFlexibleBox since that was the only caller.
     15        * rendering/RenderFlexibleBox.cpp:
     16        (WebCore::RenderFlexibleBox::hasOrthogonalFlow):
     17        (WebCore::RenderFlexibleBox::isHorizontalFlow):
     18        (WebCore::RenderFlexibleBox::isLeftToRightFlow):
     19        (WebCore::RenderFlexibleBox::setFlowAwareLogicalHeight):
     20        (WebCore::RenderFlexibleBox::flowAwareLogicalHeightForChild):
     21        (WebCore::RenderFlexibleBox::flowAwareLogicalWidthForChild):
     22        (WebCore::RenderFlexibleBox::flowAwareLogicalHeight):
     23        (WebCore::RenderFlexibleBox::flowAwareContentLogicalWidth):
     24        (WebCore::RenderFlexibleBox::flowAwareAvailableLogicalWidth):
     25        (WebCore::RenderFlexibleBox::flowAwareBorderStart):
     26        (WebCore::RenderFlexibleBox::flowAwareBorderBefore):
     27        (WebCore::RenderFlexibleBox::flowAwareBorderAfter):
     28        (WebCore::RenderFlexibleBox::flowAwarePaddingStart):
     29        (WebCore::RenderFlexibleBox::flowAwarePaddingBefore):
     30        (WebCore::RenderFlexibleBox::flowAwarePaddingAfter):
     31        (WebCore::RenderFlexibleBox::flowAwareMarginStartForChild):
     32        (WebCore::RenderFlexibleBox::flowAwareMarginBeforeForChild):
     33        (WebCore::RenderFlexibleBox::flowAwareMarginAfterForChild):
     34        (WebCore::RenderFlexibleBox::setFlowAwareMarginStartForChild):
     35        (WebCore::RenderFlexibleBox::setFlowAwareMarginEndForChild):
     36        (WebCore::RenderFlexibleBox::setFlowAwareLogicalLocationForChild):
     37        (WebCore::RenderFlexibleBox::logicalBorderAndPaddingWidthForChild):
     38        (WebCore::RenderFlexibleBox::logicalScrollbarHeightForChild):
     39        (WebCore::RenderFlexibleBox::marginStartStyleForChild):
     40        (WebCore::RenderFlexibleBox::marginEndStyleForChild):
     41        (WebCore::RenderFlexibleBox::preferredLogicalContentWidthForFlexItem):
     42        (WebCore::RenderFlexibleBox::layoutInlineDirection):
     43        (WebCore::RenderFlexibleBox::logicalPositiveFlexForChild):
     44        (WebCore::RenderFlexibleBox::logicalNegativeFlexForChild):
     45        (WebCore::RenderFlexibleBox::computePreferredLogicalWidth):
     46        (WebCore::RenderFlexibleBox::runFreeSpaceAllocationAlgorithmInlineDirection):
     47        (WebCore::RenderFlexibleBox::setLogicalOverrideSize):
     48        (WebCore::RenderFlexibleBox::layoutAndPlaceChildrenInlineDirection):
     49        * rendering/RenderFlexibleBox.h:
     50
    1512011-09-23  David Hyatt  <hyatt@apple.com>
    252
  • trunk/Source/WebCore/rendering/RenderBlock.cpp

    r95855 r95856  
    18621862    // Update our bottom collapsed margin info.
    18631863    setCollapsedBottomMargin(marginInfo);
    1864 }
    1865 
    1866 void RenderBlock::setLogicalLocationForChild(RenderBox* child, const LayoutPoint& location)
    1867 {
    1868     if (style()->isHorizontalWritingMode())
    1869         child->setLocation(location);
    1870     else
    1871         child->setLocation(location.transposedPoint());
    18721864}
    18731865
  • trunk/Source/WebCore/rendering/RenderBlock.h

    r95855 r95856  
    210210    LayoutUnit logicalTopForChild(RenderBox* child) { return isHorizontalWritingMode() ? child->y() : child->x(); }
    211211    LayoutUnit logicalLeftForChild(RenderBox* child) { return isHorizontalWritingMode() ? child->x() : child->y(); }
    212     // FIXME: Supporting layout deltas.
    213     void setLogicalLocationForChild(RenderBox* child, const LayoutPoint&);
    214212    void setLogicalLeftForChild(RenderBox* child, LayoutUnit logicalLeft, ApplyLayoutDeltaMode = DoNotApplyLayoutDelta);
    215213    void setLogicalTopForChild(RenderBox* child, LayoutUnit logicalTop, ApplyLayoutDeltaMode = DoNotApplyLayoutDelta);
  • trunk/Source/WebCore/rendering/RenderFlexibleBox.cpp

    r95783 r95856  
    188188}
    189189
    190 LayoutUnit RenderFlexibleBox::logicalBorderAndPaddingWidthForChild(RenderBox* child)
    191 {
    192     return isHorizontalWritingMode() ? child->borderAndPaddingWidth() : child->borderAndPaddingHeight();
    193 }
    194 
    195 LayoutUnit RenderFlexibleBox::logicalScrollbarHeightForChild(RenderBox* child)
    196 {
    197     return isHorizontalWritingMode() ? child->verticalScrollbarWidth() : child->horizontalScrollbarHeight();
    198 }
    199 
    200 Length RenderFlexibleBox::marginStartStyleForChild(RenderBox* child)
    201 {
    202     if (isHorizontalWritingMode())
    203         return style()->isLeftToRightDirection() ? child->style()->marginLeft() : child->style()->marginRight();
    204     return style()->isLeftToRightDirection() ? child->style()->marginTop() : child->style()->marginBottom();
    205 }
    206 
    207 Length RenderFlexibleBox::marginEndStyleForChild(RenderBox* child)
    208 {
    209     if (isHorizontalWritingMode())
    210         return style()->isLeftToRightDirection() ? child->style()->marginRight() : child->style()->marginLeft();
    211     return style()->isLeftToRightDirection() ? child->style()->marginBottom() : child->style()->marginTop();
    212 }
    213 
    214 LayoutUnit RenderFlexibleBox::preferredLogicalContentWidthForFlexItem(RenderBox* child)
    215 {
    216     Length width = isHorizontalWritingMode() ? child->style()->width() : child->style()->height();
     190bool RenderFlexibleBox::hasOrthogonalFlow(RenderBox* child) const
     191{
     192    // FIXME: Is the child->isHorizontalWritingMode() check correct if the child is a flexbox?
     193    // Should it be using child->isHorizontalFlow in that case?
     194    // Or do we only care about the parent's writing mode?
     195    return isHorizontalFlow() != child->isHorizontalWritingMode();
     196}
     197
     198bool RenderFlexibleBox::isHorizontalFlow() const
     199{
     200    // FIXME: Take flex-flow value into account.
     201    return isHorizontalWritingMode();
     202}
     203
     204bool RenderFlexibleBox::isLeftToRightFlow() const
     205{
     206    // FIXME: Take flex-flow value into account.
     207    return style()->isLeftToRightDirection();
     208}
     209
     210// FIXME: Make all these flow aware methods actually be flow aware.
     211
     212void RenderFlexibleBox::setFlowAwareLogicalHeight(LayoutUnit size)
     213{
     214    setLogicalHeight(size);
     215}
     216
     217LayoutUnit RenderFlexibleBox::flowAwareLogicalHeightForChild(RenderBox* child)
     218{
     219    return logicalHeightForChild(child);
     220}
     221
     222LayoutUnit RenderFlexibleBox::flowAwareLogicalWidthForChild(RenderBox* child)
     223{
     224    return logicalWidthForChild(child);
     225}
     226
     227LayoutUnit RenderFlexibleBox::flowAwareLogicalHeight() const
     228{
     229    return logicalHeight();
     230}
     231
     232LayoutUnit RenderFlexibleBox::flowAwareContentLogicalWidth() const
     233{
     234    return contentLogicalWidth();
     235}
     236
     237LayoutUnit RenderFlexibleBox::flowAwareAvailableLogicalWidth() const
     238{
     239    return availableLogicalWidth();
     240}
     241
     242LayoutUnit RenderFlexibleBox::flowAwareBorderStart() const
     243{
     244    return borderStart();
     245}
     246
     247LayoutUnit RenderFlexibleBox::flowAwareBorderBefore() const
     248{
     249    return borderBefore();
     250}
     251
     252LayoutUnit RenderFlexibleBox::flowAwareBorderAfter() const
     253{
     254    return borderAfter();
     255}
     256
     257LayoutUnit RenderFlexibleBox::flowAwarePaddingStart() const
     258{
     259    return paddingStart();
     260}
     261
     262LayoutUnit RenderFlexibleBox::flowAwarePaddingBefore() const
     263{
     264    return paddingBefore();
     265}
     266
     267LayoutUnit RenderFlexibleBox::flowAwarePaddingAfter() const
     268{
     269    return paddingAfter();
     270}
     271
     272LayoutUnit RenderFlexibleBox::flowAwareMarginStartForChild(RenderBox* child) const
     273{
     274    return marginStartForChild(child);
     275}
     276
     277LayoutUnit RenderFlexibleBox::flowAwareMarginBeforeForChild(RenderBox* child) const
     278{
     279    return marginBeforeForChild(child);
     280}
     281
     282LayoutUnit RenderFlexibleBox::flowAwareMarginAfterForChild(RenderBox* child) const
     283{
     284    return marginAfterForChild(child);
     285}
     286
     287void RenderFlexibleBox::setFlowAwareMarginStartForChild(RenderBox* child, LayoutUnit margin)
     288{
     289    setMarginStartForChild(child, margin);
     290}
     291
     292void RenderFlexibleBox::setFlowAwareMarginEndForChild(RenderBox* child, LayoutUnit margin)
     293{
     294    setMarginEndForChild(child, margin);
     295}
     296
     297void RenderFlexibleBox::setFlowAwareLogicalLocationForChild(RenderBox* child, const LayoutPoint& location)
     298{
     299    if (isHorizontalFlow())
     300        child->setLocation(location);
     301    else
     302        child->setLocation(location.transposedPoint());
     303}
     304
     305LayoutUnit RenderFlexibleBox::logicalBorderAndPaddingWidthForChild(RenderBox* child) const
     306{
     307    return isHorizontalFlow() ? child->borderAndPaddingWidth() : child->borderAndPaddingHeight();
     308}
     309
     310LayoutUnit RenderFlexibleBox::logicalScrollbarHeightForChild(RenderBox* child) const
     311{
     312    return isHorizontalFlow() ? child->verticalScrollbarWidth() : child->horizontalScrollbarHeight();
     313}
     314
     315Length RenderFlexibleBox::marginStartStyleForChild(RenderBox* child) const
     316{
     317    if (isHorizontalFlow())
     318        return isLeftToRightFlow() ? child->style()->marginLeft() : child->style()->marginRight();
     319    return isLeftToRightFlow() ? child->style()->marginTop() : child->style()->marginBottom();
     320}
     321
     322Length RenderFlexibleBox::marginEndStyleForChild(RenderBox* child) const
     323{
     324    if (isHorizontalFlow())
     325        return isLeftToRightFlow() ? child->style()->marginRight() : child->style()->marginLeft();
     326    return isLeftToRightFlow() ? child->style()->marginBottom() : child->style()->marginTop();
     327}
     328
     329LayoutUnit RenderFlexibleBox::preferredLogicalContentWidthForFlexItem(RenderBox* child) const
     330{
     331    Length width = isHorizontalFlow() ? child->style()->width() : child->style()->height();
    217332    if (width.isAuto()) {
    218         LayoutUnit logicalWidth = isHorizontalWritingMode() == child->isHorizontalWritingMode() ? child->maxPreferredLogicalWidth() : child->logicalHeight();
     333        LayoutUnit logicalWidth = hasOrthogonalFlow(child) ? child->logicalHeight() : child->maxPreferredLogicalWidth();
    219334        return logicalWidth - logicalBorderAndPaddingWidthForChild(child) - logicalScrollbarHeightForChild(child);
    220335    }
    221     return isHorizontalWritingMode() ? child->contentWidth() : child->contentHeight();
     336    return isHorizontalFlow() ? child->contentWidth() : child->contentHeight();
    222337}
    223338
     
    230345
    231346    computePreferredLogicalWidth(relayoutChildren, treeIterator, preferredLogicalWidth, totalPositiveFlexibility, totalNegativeFlexibility);
    232     LayoutUnit availableFreeSpace = contentLogicalWidth() - preferredLogicalWidth;
     347    LayoutUnit availableFreeSpace = flowAwareContentLogicalWidth() - preferredLogicalWidth;
    233348
    234349    FlexOrderIterator flexIterator(this, treeIterator.flexOrderValues());
     
    245360}
    246361
    247 float RenderFlexibleBox::logicalPositiveFlexForChild(RenderBox* child)
    248 {
    249     return isHorizontalWritingMode() ? child->style()->flexboxWidthPositiveFlex() : child->style()->flexboxHeightPositiveFlex();
    250 }
    251 
    252 float RenderFlexibleBox::logicalNegativeFlexForChild(RenderBox* child)
    253 {
    254     return isHorizontalWritingMode() ? child->style()->flexboxWidthNegativeFlex() : child->style()->flexboxHeightNegativeFlex();
     362float RenderFlexibleBox::logicalPositiveFlexForChild(RenderBox* child) const
     363{
     364    return isHorizontalFlow() ? child->style()->flexboxWidthPositiveFlex() : child->style()->flexboxHeightPositiveFlex();
     365}
     366
     367float RenderFlexibleBox::logicalNegativeFlexForChild(RenderBox* child) const
     368{
     369    return isHorizontalFlow() ? child->style()->flexboxWidthNegativeFlex() : child->style()->flexboxHeightNegativeFlex();
    255370}
    256371
     
    260375    totalPositiveFlexibility = totalNegativeFlexibility = 0;
    261376
    262     LayoutUnit flexboxAvailableLogicalWidth = availableLogicalWidth();
     377    LayoutUnit flexboxAvailableLogicalWidth = flowAwareAvailableLogicalWidth();
    263378    for (RenderBox* child = iterator.first(); child; child = iterator.next()) {
    264379        // We always have to lay out flexible objects again, since the flex distribution
     
    270385
    271386        // We can't just use marginStartForChild, et. al. because "auto" needs to be treated as 0.
    272         if (isHorizontalWritingMode()) {
     387        if (isHorizontalFlow()) {
    273388            preferredLogicalWidth += child->style()->marginLeft().calcMinValue(flexboxAvailableLogicalWidth);
    274389            preferredLogicalWidth += child->style()->marginRight().calcMinValue(flexboxAvailableLogicalWidth);
     
    296411    childSizes.clear();
    297412
    298     LayoutUnit flexboxAvailableLogicalWidth = availableLogicalWidth();
     413    LayoutUnit flexboxAvailableLogicalWidth = flowAwareAvailableLogicalWidth();
    299414    for (RenderBox* child = iterator.first(); child; child = iterator.next()) {
    300415        LayoutUnit childPreferredSize;
     
    306421                childPreferredSize += lroundf(availableFreeSpace * logicalPositiveFlexForChild(child) / totalPositiveFlexibility);
    307422
    308                 Length childLogicalMaxWidth = isHorizontalWritingMode() ? child->style()->maxWidth() : child->style()->maxHeight();
     423                Length childLogicalMaxWidth = isHorizontalFlow() ? child->style()->maxWidth() : child->style()->maxHeight();
    309424                if (!childLogicalMaxWidth.isUndefined() && childLogicalMaxWidth.isSpecified() && childPreferredSize > childLogicalMaxWidth.calcValue(flexboxAvailableLogicalWidth)) {
    310425                    childPreferredSize = childLogicalMaxWidth.calcValue(flexboxAvailableLogicalWidth);
     
    318433                childPreferredSize += lroundf(availableFreeSpace * logicalNegativeFlexForChild(child) / totalNegativeFlexibility);
    319434
    320                 Length childLogicalMinWidth = isHorizontalWritingMode() ? child->style()->minWidth() : child->style()->minHeight();
     435                Length childLogicalMinWidth = isHorizontalFlow() ? child->style()->minWidth() : child->style()->minHeight();
    321436                if (!childLogicalMinWidth.isUndefined() && childLogicalMinWidth.isSpecified() && childPreferredSize < childLogicalMinWidth.calcValue(flexboxAvailableLogicalWidth)) {
    322437                    childPreferredSize = childLogicalMinWidth.calcValue(flexboxAvailableLogicalWidth);
     
    342457{
    343458    // FIXME: Rename setOverrideWidth/setOverrideHeight to setOverrideLogicalWidth/setOverrideLogicalHeight.
    344     if (isHorizontalWritingMode())
    345         child->isHorizontalWritingMode() ? child->setOverrideWidth(childPreferredSize) : child->setOverrideHeight(childPreferredSize);
     459    if (hasOrthogonalFlow(child))
     460        child->setOverrideHeight(childPreferredSize);
    346461    else
    347         child->isHorizontalWritingMode() ? child->setOverrideHeight(childPreferredSize) : child->setOverrideWidth(childPreferredSize);
     462        child->setOverrideWidth(childPreferredSize);
    348463}
    349464
    350465void RenderFlexibleBox::layoutAndPlaceChildrenInlineDirection(FlexOrderIterator& iterator, const WTF::Vector<LayoutUnit>& childSizes, LayoutUnit availableFreeSpace, float totalPositiveFlexibility)
    351466{
    352     LayoutUnit startEdge = borderStart() + paddingStart();
     467    LayoutUnit startEdge = flowAwareBorderStart() + flowAwarePaddingStart();
    353468
    354469    if (hasPackingSpace(availableFreeSpace, totalPositiveFlexibility)) {
     
    359474    }
    360475
    361     LayoutUnit logicalTop = borderBefore() + paddingBefore();
    362     LayoutUnit totalAvailableLogicalWidth = availableLogicalWidth();
    363     setLogicalHeight(0);
     476    LayoutUnit logicalTop = flowAwareBorderBefore() + flowAwarePaddingBefore();
     477    LayoutUnit totalAvailableLogicalWidth = flowAwareAvailableLogicalWidth();
     478    setFlowAwareLogicalHeight(0);
    364479    size_t i = 0;
    365480    for (RenderBox* child = iterator.first(); child; child = iterator.next(), ++i) {
     
    370485        child->layoutIfNeeded();
    371486
    372         setLogicalHeight(std::max(logicalHeight(), borderBefore() + paddingBefore() + marginBeforeForChild(child) + logicalHeightForChild(child) + marginAfterForChild(child) + paddingAfter() + borderAfter() + scrollbarLogicalHeight()));
     487        setFlowAwareLogicalHeight(std::max(flowAwareLogicalHeight(), flowAwareBorderBefore() + flowAwarePaddingBefore() + flowAwareMarginBeforeForChild(child) + flowAwareLogicalHeightForChild(child) + flowAwareMarginAfterForChild(child) + flowAwarePaddingAfter() + flowAwareBorderAfter() + scrollbarLogicalHeight()));
    373488
    374489        if (marginStartStyleForChild(child).isAuto())
    375             setMarginStartForChild(child, availableFreeSpace > 0 ? lroundf(availableFreeSpace / totalPositiveFlexibility) : 0);
     490            setFlowAwareMarginStartForChild(child, availableFreeSpace > 0 ? lroundf(availableFreeSpace / totalPositiveFlexibility) : 0);
    376491        if (marginEndStyleForChild(child).isAuto())
    377             setMarginEndForChild(child, availableFreeSpace > 0 ? lroundf(availableFreeSpace / totalPositiveFlexibility) : 0);
    378 
    379         startEdge += marginStartForChild(child);
    380 
    381         LayoutUnit childLogicalWidth = logicalWidthForChild(child);
    382         LayoutUnit logicalLeft = style()->isLeftToRightDirection() ? startEdge : totalAvailableLogicalWidth - startEdge - childLogicalWidth;
     492            setFlowAwareMarginEndForChild(child, availableFreeSpace > 0 ? lroundf(availableFreeSpace / totalPositiveFlexibility) : 0);
     493
     494        startEdge += flowAwareMarginStartForChild(child);
     495
     496        LayoutUnit childLogicalWidth = flowAwareLogicalWidthForChild(child);
     497        LayoutUnit logicalLeft = isLeftToRightFlow() ? startEdge : totalAvailableLogicalWidth - startEdge - childLogicalWidth;
    383498        // FIXME: Do repaintDuringLayoutIfMoved.
    384499        // FIXME: Supporting layout deltas.
    385         setLogicalLocationForChild(child, IntPoint(logicalLeft, logicalTop));
     500        setFlowAwareLogicalLocationForChild(child, IntPoint(logicalLeft, logicalTop));
    386501        startEdge += childLogicalWidth + marginEndForChild(child);
    387502
  • trunk/Source/WebCore/rendering/RenderFlexibleBox.h

    r95783 r95856  
    5454    typedef WTF::HashMap<const RenderBox*, LayoutUnit> InflexibleFlexItemSize;
    5555
    56     LayoutUnit logicalBorderAndPaddingWidthForChild(RenderBox* child);
    57     LayoutUnit logicalScrollbarHeightForChild(RenderBox* child);
    58     Length marginStartStyleForChild(RenderBox* child);
    59     Length marginEndStyleForChild(RenderBox* child);
    60     LayoutUnit preferredLogicalContentWidthForFlexItem(RenderBox* child);
     56    bool hasOrthogonalFlow(RenderBox* child) const;
     57    bool isHorizontalFlow() const;
     58    bool isLeftToRightFlow() const;
     59    void setFlowAwareLogicalHeight(LayoutUnit);
     60    LayoutUnit flowAwareLogicalHeightForChild(RenderBox* child);
     61    LayoutUnit flowAwareLogicalWidthForChild(RenderBox* child);
     62    LayoutUnit flowAwareLogicalHeight() const;
     63    LayoutUnit flowAwareContentLogicalWidth() const;
     64    LayoutUnit flowAwareAvailableLogicalWidth() const;
     65    LayoutUnit flowAwareBorderStart() const;
     66    LayoutUnit flowAwareBorderBefore() const;
     67    LayoutUnit flowAwareBorderAfter() const;
     68    LayoutUnit flowAwarePaddingStart() const;
     69    LayoutUnit flowAwarePaddingBefore() const;
     70    LayoutUnit flowAwarePaddingAfter() const;
     71    LayoutUnit flowAwareMarginStartForChild(RenderBox* child) const;
     72    LayoutUnit flowAwareMarginBeforeForChild(RenderBox* child) const;
     73    LayoutUnit flowAwareMarginAfterForChild(RenderBox* child) const;
     74    void setFlowAwareMarginStartForChild(RenderBox* child, LayoutUnit);
     75    void setFlowAwareMarginEndForChild(RenderBox* child, LayoutUnit);
     76    // FIXME: Supporting layout deltas.
     77    void setFlowAwareLogicalLocationForChild(RenderBox* child, const LayoutPoint&);
     78    LayoutUnit logicalBorderAndPaddingWidthForChild(RenderBox* child) const;
     79    LayoutUnit logicalScrollbarHeightForChild(RenderBox* child) const;
     80    Length marginStartStyleForChild(RenderBox* child) const;
     81    Length marginEndStyleForChild(RenderBox* child) const;
     82    LayoutUnit preferredLogicalContentWidthForFlexItem(RenderBox* child) const;
    6183
    6284    void layoutInlineDirection(bool relayoutChildren);
    6385
    64     float logicalPositiveFlexForChild(RenderBox* child);
    65     float logicalNegativeFlexForChild(RenderBox* child);
     86    float logicalPositiveFlexForChild(RenderBox* child) const;
     87    float logicalNegativeFlexForChild(RenderBox* child) const;
    6688
    6789    void computePreferredLogicalWidth(bool relayoutChildren, TreeOrderIterator&, LayoutUnit&, float& totalPositiveFlexibility, float& totalNegativeFlexibility);
Note: See TracChangeset for help on using the changeset viewer.