| 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 0b1a11fa1a98f565256a2c16c4dcd9e8243918d9..57c2e41f9d8c112a52c45ccf5d9d1095079060af 100644
|
| --- a/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp
|
| +++ b/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp
|
| @@ -3000,29 +3000,8 @@ void LayoutBlockFlow::AddChild(LayoutObject* new_child,
|
| // children as blocks.
|
| // So, if our children are currently inline and a block child has to be
|
| // inserted, we move all our inline children into anonymous block boxes.
|
| - bool child_is_block_level = !new_child->IsInline();
|
| -
|
| - // ** LayoutNG **
|
| - // We want to use the block layout for out of flow positioned
|
| - // objects when they go in front of inline blocks or if they are just
|
| - // standalone objects.
|
| - // Example 1:
|
| - // <div id="zero"><div id="oof"></div></div>
|
| - // Legacy Layout: #oof is in inline context.
|
| - // LayoutNG: #oof is in block context.
|
| - //
|
| - // Example 2:
|
| - // <div id=container><oof></oof>Hello!</div>
|
| - // Legacy Layout: oof is in inline context.
|
| - // LayoutNG: oof is in block context.
|
| - //
|
| - // Example 3:
|
| - // <div id=container>Hello!<oof></oof></div>
|
| - // Legacy Layout: oof is in inline context.
|
| - // LayoutNG: oof is in inline context.
|
| - bool layout_ng_enabled = RuntimeEnabledFeatures::LayoutNGEnabled();
|
| - if (new_child->IsFloatingOrOutOfFlowPositioned())
|
| - child_is_block_level = layout_ng_enabled && !FirstChild();
|
| + bool child_is_block_level =
|
| + !new_child->IsInline() && !new_child->IsFloatingOrOutOfFlowPositioned();
|
|
|
| if (ChildrenInline()) {
|
| if (child_is_block_level) {
|
| @@ -3057,8 +3036,7 @@ void LayoutBlockFlow::AddChild(LayoutObject* new_child,
|
| LayoutBlockFlow* new_block = ToLayoutBlockFlow(CreateAnonymousBlock());
|
| LayoutBox::AddChild(new_block, before_child);
|
| // Reparent adjacent floating or out-of-flow siblings to the new box.
|
| - if (!layout_ng_enabled)
|
| - new_block->ReparentPrecedingFloatingOrOutOfFlowSiblings();
|
| + new_block->ReparentPrecedingFloatingOrOutOfFlowSiblings();
|
| new_block->AddChild(new_child);
|
| new_block->ReparentSubsequentFloatingOrOutOfFlowSiblings();
|
| return;
|
|
|