Commit b7dbfbe8 authored by Koji Ishii's avatar Koji Ishii Committed by Commit Bot

[FragmentItem] Change |NGInlineCusror::MoveTo| to support culled boxes

This patch changes |MoveTo(const LayoutObject&)| to eliminate
unnecessary code paths due to the changes to culled inline
boxes in r729656 <crrev.com/c/1774425>.

More specifically, this patch changes the function not to
return descendants when |NGFragmentItem| is enabled.

This fix is needed for <crrev.com/c/2016822>.

Bug: 982194
Change-Id: Ia9c6a86359543532aa70032c2752100a5878031b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2016771Reviewed-by: default avatarKent Tamura <tkent@chromium.org>
Commit-Queue: Koji Ishii <kojii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#735321}
parent 29913646
......@@ -901,7 +901,8 @@ void NGInlineCursor::InternalMoveTo(const LayoutObject& layout_object) {
void NGInlineCursor::MoveTo(const LayoutObject& layout_object) {
DCHECK(layout_object.IsInLayoutNGInlineFormattingContext()) << layout_object;
InternalMoveTo(layout_object);
if (*this || !HasRoot()) {
if (*this || !HasRoot() ||
RuntimeEnabledFeatures::LayoutNGFragmentItemEnabled()) {
layout_inline_ = nullptr;
return;
}
......
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