| commit | 6e1680b718175c148a66a1fdf686eba0c3a78e05 | [log] [tgz] |
|---|---|---|
| author | Koji Ishii <kojii@chromium.org> | Fri Jun 21 23:41:54 2019 |
| committer | Commit Bot <commit-bot@chromium.org> | Fri Jun 21 23:41:54 2019 |
| tree | 85a7e9809f12e9d3646f72d2ee5f44157a8c3c3f | |
| parent | 08f005a8ab575962c029e0b2a3d0006454b44d65 [diff] |
[LayoutNG] Fix |ComputeMinMaxSize| not to clear |NeedsLayout| This patch fixes |ComputeMinMaxSize| not to clear |NeedsLayout| when all of following conditions are met: 1. Needs |MinMaxSize| 2. Is an orthogonal flow root. 3. Is legacy layout. 4. Change is applied that dirties the layout. In this case, |NGBlockNode::ComputeMinMaxSize()| calls |Layout()|, which goes to |RunLegacyLayout()|, which calls |LayoutObject::LayoutIfNeeded()|. However, its constraint space is intermediate that it does not update |CachedLayoutResult|. Then when laying it out, because |NeedsLayout()| is cleared, existing out-of-date |CachedLayoutResult| is used. This patch fixes: 1. Not to pre-layout orthogonal roots if it has |CachedLayoutResult|. 2. Set |NeedsLayout()| if |RunLegacyLayout()| clears it, but |CachedLayoutResult| was not updated. Bug: 976859 Change-Id: Ic2d979a3c4f9479040bfd0e54cf4283b60ed52b5 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1670146 Reviewed-by: Christian Biesinger <cbiesinger@chromium.org> Reviewed-by: Emil A Eklund <eae@chromium.org> Commit-Queue: Emil A Eklund <eae@chromium.org> Cr-Commit-Position: refs/heads/master@{#671460}
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 .