Issue full paint invalidation when fragment count changes. Only do this if a fragment count of greater than 1 is involved, though. We cannot re-use the cached drawing if a box gets refragmented. We would otherwise do that if the total block-size of the box remains unchanged, and its offset doesn't change. Note that the call to FragmentCountDidChange() when *adding* fragments isn't strictly required, since we'd detect a geometry change when new FragmentData entries are added, but it doesn't seem right to rely on that. We now need to be more careful about changing the size of the layout_results_ vector in LayoutBox, as that will trigger repaint. Therefore, only shrink the vector when we have reached the last fragment, which means that if the final fragment count turns out to remain unchanged, we'll leave the vector size alone during layout, which should be a good thing anyway. Bug: 1285795 Change-Id: I8a0eaa047bb448dacb2f0325f94fb361976ae7de Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3393649 Reviewed-by: Xianzhu Wang <wangxianzhu@chromium.org> Reviewed-by: Koji Ishii <kojii@chromium.org> Commit-Queue: Morten Stenshorne <mstensho@chromium.org> Cr-Commit-Position: refs/heads/main@{#960169}
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.
To check out the source code locally, don't use git clone! Instead, follow the instructions on how to get the code.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .
For historical reasons, there are some small top level directories. Now the guidance is that new top level directories are for product (e.g. Chrome, Android WebView, Ash). Even if these products have multiple executables, the code should be in subdirectories of the product.
If you found a bug, please file it at https://crbug.com/new.