[LayoutNG] Avoid inline fragment traversal on self-painting inlines
NGInlineFragmentTraversal::SelfFragmentsOf() traverses the entire inline formatting context's fragment tree to find fragments of a certain layout object, which is basically unnecessary since we can locate the paint fragments directly. The only exception is culled inline, where the layout object doesn't have its own fragments, in which case we still need to traverse the fragment tree. As performance optimization, this patch changes SelfFragmentsOf() to find paint fragments directly, unless the given layout object can be a culled inline. With this patch, the time spent on SelfFragmentsOf() when rendering the single-page HTML5 spec becomes negligible. Bug: 873798 Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng Change-Id: Id4a9e5a8a8e416e9757916e5ae9cf589c4660688 Reviewed-on: https://chromium-review.googlesource.com/1173725 Commit-Queue: Xiaocheng Hu <xiaochengh@chromium.org> Reviewed-by:Emil A Eklund <eae@chromium.org> Reviewed-by:
Yoshifumi Inoue <yosin@chromium.org> Reviewed-by:
Koji Ishii <kojii@chromium.org> Cr-Commit-Position: refs/heads/master@{#583499}
Showing
Please register or sign in to comment