Chromium Code Reviews| Index: third_party/WebKit/Source/core/layout/LayoutFlexibleBox.cpp |
| diff --git a/third_party/WebKit/Source/core/layout/LayoutFlexibleBox.cpp b/third_party/WebKit/Source/core/layout/LayoutFlexibleBox.cpp |
| index 5499abfa2bb724aa3ef6aa575a1d009780070f0c..86e675a59d17499903582d68ed9d1edfea84d88c 100644 |
| --- a/third_party/WebKit/Source/core/layout/LayoutFlexibleBox.cpp |
| +++ b/third_party/WebKit/Source/core/layout/LayoutFlexibleBox.cpp |
| @@ -883,7 +883,7 @@ void LayoutFlexibleBox::layoutFlexItems(bool relayoutChildren, SubtreeLayoutScop |
| m_orderIterator.first(); |
| LayoutUnit crossAxisOffset = flowAwareBorderBefore() + flowAwarePaddingBefore(); |
| - while (computeNextFlexLine(orderedChildren, sumFlexBaseSize, totalFlexGrow, totalFlexShrink, totalWeightedFlexShrink, sumHypotheticalMainSize, relayoutChildren)) { |
| + while (computeNextFlexLine(orderedChildren, sumFlexBaseSize, totalFlexGrow, totalFlexShrink, totalWeightedFlexShrink, sumHypotheticalMainSize, relayoutChildren, layoutScope)) { |
| LayoutUnit containerMainInnerSize = mainAxisContentExtent(sumHypotheticalMainSize); |
| // availableFreeSpace is the initial amount of free space in this flexbox. |
| // remainingFreeSpace starts out at the same value but as we place and lay out |
| @@ -1200,7 +1200,7 @@ LayoutUnit LayoutFlexibleBox::adjustChildSizeForAspectRatioCrossAxisMinAndMax(co |
| return childSize; |
| } |
| -bool LayoutFlexibleBox::computeNextFlexLine(OrderedFlexItemList& orderedChildren, LayoutUnit& sumFlexBaseSize, double& totalFlexGrow, double& totalFlexShrink, double& totalWeightedFlexShrink, LayoutUnit& sumHypotheticalMainSize, bool relayoutChildren) |
| +bool LayoutFlexibleBox::computeNextFlexLine(OrderedFlexItemList& orderedChildren, LayoutUnit& sumFlexBaseSize, double& totalFlexGrow, double& totalFlexShrink, double& totalWeightedFlexShrink, LayoutUnit& sumHypotheticalMainSize, bool relayoutChildren, SubtreeLayoutScope& layoutScope) |
| { |
| orderedChildren.clear(); |
| sumFlexBaseSize = LayoutUnit(); |
| @@ -1214,7 +1214,16 @@ bool LayoutFlexibleBox::computeNextFlexLine(OrderedFlexItemList& orderedChildren |
| bool lineHasInFlowItem = false; |
| + // Fieldsets need to find their legend and position it inside the border of the object. |
| + // The legend then gets skipped during normal layout. |
| + // It doesn't get included in the normal layout process but is instead skipped. |
| + LayoutObject* childToExclude = layoutSpecialExcludedChild(relayoutChildren, layoutScope); |
|
cbiesinger
2016/07/20 01:42:31
Thanks for doing this! I'll take a closer look tom
Gleb Lanbin
2016/07/21 18:25:31
Done.
|
| + |
| for (LayoutBox* child = m_orderIterator.currentChild(); child; child = m_orderIterator.next()) { |
| + |
| + if (childToExclude == child) |
| + continue; // Skip this child, since it will be positioned by the specialized subclass (fieldsets runs). |
| + |
| if (child->isOutOfFlowPositioned()) { |
| orderedChildren.append(FlexItem(child)); |
| continue; |