commit | 55321ed58a44b095732e4c59ad889923ab3f676e | [log] [tgz] |
---|---|---|
author | Rune Lillesveen <futhark@chromium.org> | Mon Jan 14 11:01:08 2019 |
committer | Commit Bot <commit-bot@chromium.org> | Mon Jan 14 11:01:08 2019 |
tree | 89f19e162420b54289b80d830d224d8e871c767a | |
parent | 3e29b761f510c9322b4c6e4caa17c54afb21def7 [diff] |
Avoid style recalc in display:none subtrees. ParentComputedStyle() should be null in display:none subtrees to avoid computing style unnecessarily when we start at a recalc root inside a display:none subtree where the parent of the recalc root has a ComputedStyle because it's forced by Window.getComputedStyle(). First, we introduce a flag to mark ComputedStyle as being forced inside a display:none subtree. This is strictly not necessary for the current code since we can check where it is stored, but for the unify-computed-style storage issue (914784), we will start storing ComputedStyle in the same place for both rendered and display:none elements, so we'll need it soon. Let ParentComputedStyle() return null when this flag is set to make sure display:none subtrees stay free of ComputedStyles unless enforced. Bug: 920600, 914784 Change-Id: Iea07af009c0237d4ac6ba155af774d2e3dece354 Reviewed-on: https://chromium-review.googlesource.com/c/1404171 Reviewed-by: Anders Hartvoll Ruud <andruud@chromium.org> Commit-Queue: Rune Lillesveen <futhark@chromium.org> Cr-Commit-Position: refs/heads/master@{#622414}
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 .