[FlexNG] Walk over anonymous objects within ScopedPaintTimingDetectorBlockPaintHook
This fixes timeouts that were occurring when FlexNG was enabled: https://test-results.appspot.com/data/layout_results/linux-rel/292466/webkit_layout_tests%20%28with%20patch%29/layout-test-results/results.html (*/text-with-display-style.html) These tests timeout if they don't receive all the expected performance entries, causing the failure (the test never completes, waiting for the performance entries). The specific failure for FlexNG was occurring as we didn't have a ScopedPaintTimingDetectorBlockPaintHook for the flexbox on the stack, only one for the anonymous block-flow. This meant that the performance entry was never recorded for the flexbox element. Previously the ScopedPaintTimingDetectorBlockPaintHook would get emplaced in two different places - 1) Within BlockPainter 2) Within the inline painter This changes the EmplaceIfNeeded call to walk up the layout object tree to the first non-anonymous object which has a DOM node associated with it. This walk up the layout object tree should be relatively cheap. Most of the time it will be only walking up zero or one objects. Additionally with the layout object walk we don't need to EmplaceIfNeeded on nested <div>s, only when we actually encounter some text to be painted. Bug: 845235 Change-Id: I80e18539f70d2e1df56d3d85dd928dc10a35e28e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2032428 Commit-Queue: Ian Kilpatrick <ikilpatrick@chromium.org> Reviewed-by:Xianzhu Wang <wangxianzhu@chromium.org> Reviewed-by:
Steve Kobes <skobes@chromium.org> Cr-Commit-Position: refs/heads/master@{#739111}
Showing
Please register or sign in to comment