| Index: third_party/WebKit/Source/core/layout/ng/layout_ng_block_flow.cc
|
| diff --git a/third_party/WebKit/Source/core/layout/ng/layout_ng_block_flow.cc b/third_party/WebKit/Source/core/layout/ng/layout_ng_block_flow.cc
|
| index 6410d6ab882310807be524338ac5e5d86b8123ca..eeff2fa3f38af1e5810f49108b5a109054179400 100644
|
| --- a/third_party/WebKit/Source/core/layout/ng/layout_ng_block_flow.cc
|
| +++ b/third_party/WebKit/Source/core/layout/ng/layout_ng_block_flow.cc
|
| @@ -30,6 +30,21 @@ void LayoutNGBlockFlow::layoutBlock(bool relayoutChildren) {
|
| while (!m_box->Layout(constraint_space, &fragment))
|
| ;
|
|
|
| + if (isOutOfFlowPositioned()) {
|
| + // In legacy layout, abspos differs from regular blocks in that abspos
|
| + // blocks position themselves in their own layout, instead of getting
|
| + // positioned by their parent. So it we are a positioned block in a legacy-
|
| + // layout containing block, we have to emulate this positioning.
|
| + // Additionally, until we natively support abspos in LayoutNG, this code
|
| + // will also be reached though the layoutPositionedObjects call in
|
| + // NGBlockNode::CopyFragmentDataToLayoutBox.
|
| + LogicalExtentComputedValues computedValues;
|
| + computeLogicalWidth(computedValues);
|
| + setLogicalLeft(computedValues.m_position);
|
| + computeLogicalHeight(logicalHeight(), logicalTop(), computedValues);
|
| + setLogicalTop(computedValues.m_position);
|
| + }
|
| +
|
| for (auto& descendant : fragment->PhysicalFragment()->OutOfFlowDescendants())
|
| descendant->UseOldOutOfFlowPositioning();
|
| clearNeedsLayout();
|
|
|