[LayoutNG] Use cached fragment if size won't change.
Available size may change from one layout pass to another, but that doesn't have to mean that we need to re-lay out a child. If we can be sure that its size will remain the same, and that if it will keep the same size, that won't affect any descendants, we can skip layout and return the cached fragment. We cannot ignore initial containing block size changes if there are orthogonal flow root children, so keep track of that. Makes perf_tests/layout/many-block-children-fixed-inline-size.html about 3 times faster. Update expectations for one invalidation test. The test has some fixed-width descendants, so when only the window width changes, there's less work to do, than before. Update one unit test, and expand it a bit, to provide a case where we actually still do need layout. Bug: 897450 Change-Id: I063f650110d5a488de430b938b3d46e713a1433e Reviewed-on: https://chromium-review.googlesource.com/c/1297367 Commit-Queue: Morten Stenshorne <mstensho@chromium.org> Reviewed-by:Christian Biesinger <cbiesinger@chromium.org> Reviewed-by:
Ian Kilpatrick <ikilpatrick@chromium.org> Cr-Commit-Position: refs/heads/master@{#605168}
Showing
Please register or sign in to comment