Add early return logic to LayoutNGBlockFlowMixin::NodeAtPoint
Following r813630 crrev.com/c/2448269 that added the early return to |NGBoxFragmentPainter::NodeAtPoint|, this patch: * Extracts more correct early return logic from |LayoutBox:: HitTestAllPhases|. It looks like |LayoutNGBlockFlowMixin| copied from it in 2017 (r508056 crrev.com/c/710498), but the logic in |LayoutBox::HitTestAllPhases| evolved. * Changes |IsScrollContainer| to |ShouldClipOverflowAlongBothAxis| because it misses other clipping situations. * Changes to unite |PhysicalBorderBoxRect| and the overflow. * Changes |LayoutNGBlockFlowMixin| to apply the early return logic not only when |NGPaintFragment|. The early return in |LayoutNGBlockFlowMixin| improves the perf test by ~65%, to almost equivalent to M85. Note the previous patch (r813630) should match this, I will do it in a following patch. Bug: 1134574 Change-Id: If8e2fc5f52254168cd994c7fdf1d54aa5653da0c Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2448709 Commit-Queue: Koji Ishii <kojii@chromium.org> Reviewed-by:Xianzhu Wang <wangxianzhu@chromium.org> Reviewed-by:
Ian Kilpatrick <ikilpatrick@chromium.org> Cr-Commit-Position: refs/heads/master@{#814225}
Showing
Please register or sign in to comment