[LayoutNG] Avoid creating unnecessary block break tokens.
We only need break tokens when doing block fragmentation. Long-term, even when we do have block fragmentation, we might not need to create break tokens when we're finished with a node, but that will require some more work, in any case. We currently use break tokens to figure out how much block space has been used in total by all previous fragments generated for a node, for instance. We now have to stop cheating in the paged overflow layout algorithm. If height was auto, we used to just disable block fragmentation, but since block fragmentation is what now triggers creation of break tokens, and we still have a flow thread to feed, we need to always enable block fragmentation for paged overflow (this is the correct solution long-term, anyway). We'll now fail all tests that have paged overflow and auto height, but only when LayoutNGBlockFragmentation is enabled, so no big deal. This should give both performance improvements and memory usage reduction. Some tests started to pass and some started to fail. Three new failures: Two of them are an obvious result of no longer supporting auto-height paged overflow containers. The last one (wpt/css/css-multicol/filter-with-abspos.html for the LayoutNGBlockFragmentation virtual test suite) I'm not quite sure about, but it probably has something to do with us no longer creating break tokens where we previously used to do it, and that upsets someone. Nothing to worry about for now, since it only affects NG block fragmentation, which isn't shipping in this phase. Some new tests also start to pass. Didn't do a thorough analysis, but we now only create break tokens from fragments generated by NGBlockLayoutAlgorithm, so e.g. nodes laid out by the legacy engine and nested column algorithms will no longer create break tokens. Which apparently is a good thing in some cases. Or it could be bugs canceling out other bugs. Anyway, since all the tests in question are also only for the LayoutNGBlockFragmentation virtual test suite, we don't have to worry about it yet. Finally, one unit test had to be updated, because orthogonal flow roots disable block fragmentation, and that suddenly means that there'll be no break tokens generated. Change-Id: Ief3d354e7ae0741ee239f530811ac9d9b3576ce3 Reviewed-on: https://chromium-review.googlesource.com/c/1296535Reviewed-by:Emil A Eklund <eae@chromium.org> Reviewed-by:
Ian Kilpatrick <ikilpatrick@chromium.org> Reviewed-by:
Christian Biesinger <cbiesinger@chromium.org> Commit-Queue: Morten Stenshorne <mstensho@chromium.org> Cr-Commit-Position: refs/heads/master@{#602304}
Showing
Please register or sign in to comment