Commit c8534dd1 authored by Xiaocheng Hu's avatar Xiaocheng Hu Committed by Commit Bot

[LayoutNG] Simplify NGInlineFragmentTraversal

Old implementation of NGInlineFragmentTraversal traverses all descendants
of an NGPhysicalFragment, and uses a filter to decide which fragments to
emit. As a result, the implementation is convoluted.

This patch rewrites it by using a visitor that can decide the traversal
process, and also when/what to emit. As a result, the implementation
is greatly simplified.

Bug: 851075
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng
Change-Id: I67a1331f906981e48cc366697234f8d5996c02ea
Reviewed-on: https://chromium-review.googlesource.com/1097877
Commit-Queue: Xiaocheng Hu <xiaochengh@chromium.org>
Reviewed-by: default avatarYoshifumi Inoue <yosin@chromium.org>
Reviewed-by: default avatarYoichi Osato <yoichio@chromium.org>
Reviewed-by: default avatarEmil A Eklund <eae@chromium.org>
Cr-Commit-Position: refs/heads/master@{#568207}
parent 4d425660
......@@ -44,7 +44,7 @@ class CORE_EXPORT NGInlineFragmentTraversal {
// Returns list of inline fragments produced from the specified LayoutObject.
// The search is restricted in the subtree of |container|.
static Vector<NGPhysicalFragmentWithOffset, 1> SelfFragmentsOf(
static Vector<NGPhysicalFragmentWithOffset> SelfFragmentsOf(
const NGPhysicalContainerFragment& container,
const LayoutObject* target);
};
......
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