commit | 1e332ed67e30d372fcb6f56eff2c4763466dcf3a | [log] [tgz] |
---|---|---|
author | Koji Ishii <kojii@chromium.org> | Sun Oct 07 11:15:24 2018 |
committer | Commit Bot <commit-bot@chromium.org> | Sun Oct 07 11:15:24 2018 |
tree | dd61cc132c4f4eb4d48092c67af2fffa434d02e9 | |
parent | 649e079be78efe7b2d56babdc79aa0e98b7e463f [diff] |
[LayoutNG] Stop storing NGInlineBoxStateStack in NGInlineBreakToken NGInlineBoxStateStack has pointers to NGInlineItem, which may become stale when appending to an inline formatting context. Storing this in NGInlineBreakToken prevents reusing line boxes. This patch stops storing it. Instead, a NGLayoutContext is given to each call of NGInlineLayoutAlgorithm within an inline formatting context. NGInlineLayoutAlgorithm uses NGLayoutContext as the cached storage of NGInlineBoxStateStack, and regenerate if the cache is not available. This change also saves ~880 bytes for each line. Exploring to store more context into NGLayoutContext is possible but not done in this patch. Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng Change-Id: I7e60c1213d1cd399c959639a5bcd65c1c38a19eb Reviewed-on: https://chromium-review.googlesource.com/c/1258810 Reviewed-by: Morten Stenshorne <mstensho@chromium.org> Reviewed-by: Emil A Eklund <eae@chromium.org> Commit-Queue: Koji Ishii <kojii@chromium.org> Cr-Commit-Position: refs/heads/master@{#597459}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .