Lazily layout content that is hidden via `content-visibility: hidden`
Categories
(Core :: Layout, enhancement)
Tracking
()
Tracking | Status | |
---|---|---|
firefox106 | --- | fixed |
People
(Reporter: mrobinson, Assigned: mrobinson)
References
Details
Attachments
(1 file)
The containment specification [1] says:
When an element skips its contents, the user agent must change the used value of the contain property so as to turn on layout containment, style containment, paint containment, and size containment. Further, its contents (the flat tree descendants of the element, including both text and elements, or the replaced content of a replaced element) are not painted (as if they had visibility: hidden) and do not respond to hit-testing (as if they had pointer-events: none), and to a large extent do not update their styles at all unless explicitly requested by script (see § 4.3 Restrictions and Clarifications for details).
The user agent should additionally avoid as much layout/rendering work as possible for skipped contents; the combination of heavy containment and making the contents invisible and untouchable enables heavy optimizations. If rendering work is done at some point, the user-agent should retain the previously computed layout state if possible, to allow the skipped contents to be displayed quickly at a later moment.
The idea of this bug is that unless script specifically asks for the size of content that is hidden, we can avoid laying out that content.
Assignee | ||
Comment 1•2 years ago
|
||
Updated•2 years ago
|
Comment hidden (off-topic) |
Comment 3•2 years ago
|
||
Sorry, there was a problem with the detection of inactive users. I'm reverting the change.
Pushed by mrobinson@igalia.com: https://hg.mozilla.org/integration/autoland/rev/7538d23ee88e Lazily layout content that is hidden via `content-visibility: hidden` r=emilio
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/35472 for changes under testing/web-platform/tests
Comment 6•2 years ago
|
||
Backed out for causing failures at content-visibility-081.html.
Backout link: https://hg.mozilla.org/integration/autoland/rev/833f27f4d33b62fe14848a1651c2b5e766bcf2e5
Failure log: https://treeherder.mozilla.org/logviewer?job_id=387372098&repo=autoland&lineNumber=1884
Upstream PR was closed without merging
Comment 8•2 years ago
|
||
Backout has been merged to central: https://hg.mozilla.org/mozilla-central/rev/833f27f4d33b
Pushed by mrobinson@igalia.com: https://hg.mozilla.org/integration/autoland/rev/5a4a5749f8dc Lazily layout content that is hidden via `content-visibility: hidden` r=emilio
Comment 10•2 years ago
|
||
Backed out for causing wpt failures.
Backout link: https://hg.mozilla.org/integration/autoland/rev/2f6dd68ad96a2e98d47a25b2f7503bfc1d2949c2
Failure log: https://treeherder.mozilla.org/logviewer?job_id=388218664&repo=autoland&lineNumber=1797
Upstream PR was closed without merging
Comment 12•2 years ago
|
||
Pushed by mrobinson@igalia.com: https://hg.mozilla.org/integration/autoland/rev/f67c8298a104 Lazily layout content that is hidden via `content-visibility: hidden` r=emilio
Comment 13•2 years ago
|
||
Backed out changeset f67c8298a104 (bug 1767262) for causing wpt assertion failures in layout/base/PresShell.cpp
Backout link: https://hg.mozilla.org/integration/autoland/rev/c4bac60f5dc5e2ebc5db221ead691b329701aef3
Upstream PR was closed without merging
Assignee | ||
Comment 15•2 years ago
|
||
It seems that the problem here is an assertion failure. When forcing the layout of hidden content, layout requests are flushed. These layout requests can, in turn, trigger queries which force the layout of hidden content. We need to take this into account in the code. I've uploaded a new version of the change which does this.
Comment 16•2 years ago
|
||
Pushed by mrobinson@igalia.com: https://hg.mozilla.org/integration/autoland/rev/a02e1198c61e Lazily layout content that is hidden via `content-visibility: hidden` r=emilio
Comment 17•2 years ago
|
||
bugherder |
Upstream PR merged by moz-wptsync-bot
Description
•