[LayoutNG] Reduce paint tree traversal for floats
This patch reduces tree traversals in NGBoxFragmentPainter when there are floating objects. When a PaintLayer has floating objects, PaintPhase::kFloat runs tree traversals twice, once for regular children and another for floating children. This patch adds HasFloatingDescendants() to NGPhysicalContainerFragment to optimize the traversal. With this change, we will no longer traverse normal children when PaintPhase::kFloat, and skip traversing descendants that don't have floating objects. Bug: 936024 Change-Id: I1df35b788501dd39660e781b03ed76af1190e7f0 Reviewed-on: https://chromium-review.googlesource.com/c/1490355 Commit-Queue: Koji Ishii <kojii@chromium.org> Reviewed-by:Emil A Eklund <eae@chromium.org> Reviewed-by:
Xianzhu Wang <wangxianzhu@chromium.org> Reviewed-by:
Ian Kilpatrick <ikilpatrick@chromium.org> Cr-Commit-Position: refs/heads/master@{#636204}
Showing
Please register or sign in to comment