Commit b0ad7c5c authored by kojii's avatar kojii Committed by Commit Bot

[LayoutNG] Set InlineBoxWrapper when copying fragments to LayoutBox

Re-land of r485142 due to one crash turned to flaky.

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@{#485160}
parent 7fa78bb0
......@@ -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 ]
......@@ -673,7 +673,7 @@ crbug.com/635619 virtual/layout_ng/fast/block/float/relative-painted-twice.html
crbug.com/635619 virtual/layout_ng/fast/block/float/remove-line-above-float-above-line-crash.html [ Failure ]
crbug.com/635619 virtual/layout_ng/fast/block/float/rubybase-children-made-inline-crash.html [ Failure ]
crbug.com/635619 virtual/layout_ng/fast/block/float/rubybase-children-moved-crash-2.html [ Failure Crash ]
crbug.com/635619 virtual/layout_ng/fast/block/float/rubybase-children-moved-crash.html [ Crash ]
crbug.com/635619 virtual/layout_ng/fast/block/float/rubybase-children-moved-crash.html [ Crash Failure ]
crbug.com/635619 virtual/layout_ng/fast/block/float/shrink-to-avoid-float-complexity.html [ Failure ]
crbug.com/635619 virtual/layout_ng/fast/block/float/shrink-to-fit-width.html [ Failure ]
crbug.com/635619 virtual/layout_ng/fast/block/float/split-inline-sibling-of-float-crash.html [ Crash ]
......
......@@ -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