Commit e4823bcd authored by Yoshifumi Inoue's avatar Yoshifumi Inoue Committed by Commit Bot

Make NGInlineNode::GetOffsetMapping() to work with legacy layout tree

This function makes |NGInlineNode::GetOffsetMapping()| to work with legacy
layout tree by changing |CollectInlinesInnternal()| not to call |LayoutInline::
UpdateShouldCreateBoxFragment()| when it is called for offset mapping since
we don't need to call |UpdateShouldCreateBoxFragment()| for offset mapping and
it set |IsInInlineFormattingContext()| bit flag in |LayoutObject| then causing
DCHECK().

This patch is a preparation of the patch[1].

[1] http://crrev.com/c/1337224 Utilize NGInlineNode::GetOffsetMapping() in Element#innerText

Change-Id: I0d7d844faa2581c24cd786f15ec066141c445e1b
Reviewed-on: https://chromium-review.googlesource.com/c/1341780Reviewed-by: default avatarKoji Ishii <kojii@chromium.org>
Commit-Queue: Koji Ishii <kojii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#609263}
parent 60e2c0cc
......@@ -161,7 +161,8 @@ void CollectInlinesInternal(
// box to prevent having inline/block-mixed children.
DCHECK(node->IsInline());
LayoutInline* layout_inline = ToLayoutInline(node);
layout_inline->UpdateShouldCreateBoxFragment();
if (update_layout)
layout_inline->UpdateShouldCreateBoxFragment();
builder->EnterInline(layout_inline);
......
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