Match LayoutNG's hit-test early return to newer logic
r813630 crrev.com/c/2448269 added the early return for hit- testing in NG. It turned out that the logic in |LayoutNGBlockFlowMixIn| was copied from |LayoutBox| in 2017 (r508056 crrev.com/c/710498) but the logic in |LayoutBox| has evolved since then. The new logic was then improved further and extracted to |LayoutBox::MayIntersect| in r814225 crrev.com/c/2448709. This patch changes LayoutNG to use the code instead. Note, we may need to add more early return checks to |NGBoxFragmentPainter|, e.g., |HitTestBlockChildren| and/or |HitTestChildBoxFragment|, but the early return itself has some costs. I will investigate the hit-testing in FragmentTraversal codepath and how much adding early return can improve in future patches. Bug: 1134574 Change-Id: Ibe95bfd5fdaafe1d3e6cd964f479eda98d48306a Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2452011Reviewed-by:Morten Stenshorne <mstensho@chromium.org> Commit-Queue: Koji Ishii <kojii@chromium.org> Cr-Commit-Position: refs/heads/master@{#814604}
Showing
Please register or sign in to comment