Commit 981fa39e authored by kojii's avatar kojii Committed by Commit Bot

[LayoutNG] Set InlineBoxWrapper when copying fragments to LayoutBox

This patch fixes to set InlineBoxWrapper when copying fragments to
LayoutBox.

To create InlineBox'es, NGInlineNode::CopyFragmentDataToLayoutBox()
calls LayoutBlockFlow::ConstructLine(), but it does not set
InlineBoxWrapper.

LayoutBlockFlow::ComputeBlockDirectionPositionsForLine() sets
InlineBoxWrapper but LayoutNG does not call this function. It does
several other things, but SetInlineBoxWrapper() is the only thing needed
for CopyFragmentDataToLayoutBox().

BUG=636993, 739365

Review-Url: https://codereview.chromium.org/2975663002
Cr-Commit-Position: refs/heads/master@{#485142}
parent cc07e7e5
......@@ -592,7 +592,7 @@ crbug.com/635619 virtual/layout_ng/fast/block/float/034.html [ Failure ]
crbug.com/635619 virtual/layout_ng/fast/block/float/035.html [ Failure ]
crbug.com/635619 virtual/layout_ng/fast/block/float/add-float-back-to-anonymous-block.html [ Failure ]
crbug.com/719615 virtual/layout_ng/fast/block/float/add-inlines-in-block-children-block.html [ Failure ]
crbug.com/635619 virtual/layout_ng/fast/block/float/assert-when-moving-float.html [ Crash ]
crbug.com/635619 virtual/layout_ng/fast/block/float/assert-when-moving-float.html [ Failure ]
crbug.com/635619 virtual/layout_ng/fast/block/float/avoid-floats-when-negative-margin-top-2.html [ Failure ]
crbug.com/635619 virtual/layout_ng/fast/block/float/avoid-floats-when-negative-margin-top-3.html [ Failure ]
crbug.com/635619 virtual/layout_ng/fast/block/float/avoid-floats-when-negative-margin-top-4.html [ Failure ]
......
......@@ -8,6 +8,7 @@
#include "core/layout/LayoutBlockFlow.h"
#include "core/layout/LayoutObject.h"
#include "core/layout/LayoutText.h"
#include "core/layout/api/LineLayoutAPIShim.h"
#include "core/layout/line/LineInfo.h"
#include "core/layout/line/RootInlineBox.h"
#include "core/layout/ng/inline/ng_bidi_paragraph.h"
......@@ -148,6 +149,10 @@ unsigned PlaceInlineBoxChildren(
if (inline_box->GetLineLayoutItem().IsBox()) {
LineLayoutBox box(inline_box->GetLineLayoutItem());
box.SetLocation(inline_box->Location());
LayoutObject* layout_object = LineLayoutAPIShim::LayoutObjectFrom(box);
if (layout_object->IsAtomicInlineLevel())
ToLayoutBox(layout_object)->SetInlineBoxWrapper(inline_box);
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment