| Index: third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp
|
| diff --git a/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp b/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp
|
| index b01da8d3b3445e15b912267c019740df4a0fe142..f144029ab2b9147b56ac81d796c3c86b10abae28 100644
|
| --- a/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp
|
| +++ b/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp
|
| @@ -1402,6 +1402,11 @@ void LayoutBlockFlow::layoutBlockChildren(bool relayoutChildren,
|
| BlockChildrenLayoutInfo layoutInfo(this, beforeEdge, afterEdge);
|
| MarginInfo& marginInfo = layoutInfo.marginInfo();
|
|
|
| + // Fieldsets need to find their legend and position it inside the border of
|
| + // the object.
|
| + // The legend then gets skipped during normal layout. The same is true for
|
| + // ruby text.
|
| + // It doesn't get included in the normal layout process but is instead skipped
|
| LayoutObject* childToExclude =
|
| layoutSpecialExcludedChild(relayoutChildren, layoutScope);
|
|
|
| @@ -1423,7 +1428,7 @@ void LayoutBlockFlow::layoutBlockChildren(bool relayoutChildren,
|
|
|
| if (childToExclude == child)
|
| continue; // Skip this child, since it will be positioned by the
|
| - // specialized subclass (ruby runs).
|
| + // specialized subclass (fieldsets and ruby runs).
|
|
|
| updateBlockChildDirtyBitsBeforeLayout(relayoutChildren, *child);
|
|
|
| @@ -2904,7 +2909,7 @@ void LayoutBlockFlow::addChild(LayoutObject* newChild,
|
| LayoutBox::addChild(newChild, beforeChild);
|
|
|
| if (madeBoxesNonInline && parent() && isAnonymousBlock() &&
|
| - parent()->isLayoutBlock() && !parent()->createsAnonymousWrapper()) {
|
| + parent()->isLayoutBlock()) {
|
| toLayoutBlock(parent())->removeLeftoverAnonymousBlock(this);
|
| // |this| may be dead now.
|
| }
|
| @@ -4149,6 +4154,12 @@ void LayoutBlockFlow::createOrDestroyMultiColumnFlowThreadIfNeeded(
|
| if (isRuby())
|
| return;
|
|
|
| + // Fieldsets look for a legend special child (layoutSpecialExcludedChild()).
|
| + // We currently only support one special child per layout object, and the
|
| + // flow thread would make for a second one.
|
| + if (isFieldset())
|
| + return;
|
| +
|
| // Form controls are replaced content, and are therefore not supposed to
|
| // support multicol.
|
| if (isFileUploadControl() || isTextControl() || isListBox())
|
|
|