layout: Preserve independent formatting contexts fragment caches when undamaged#42871
Merged
mrobinson merged 1 commit intoservo:mainfrom Feb 26, 2026
Merged
layout: Preserve independent formatting contexts fragment caches when undamaged#42871mrobinson merged 1 commit intoservo:mainfrom
mrobinson merged 1 commit intoservo:mainfrom
Conversation
… undamaged When fragment tree layout is going to run for a node that starts an independent formatting context, but only because an ancestor was damaged, preserve the fragment cache. This means that in the optimistic case we do not need to re-run fragment tree layout for this independent formatting context. Previously this was only done for the children of the independent formatting context, but the fragment cache is robust enough to detect any layout changes necessary for the IFC fragment itself as well. This helps to avoid so much fragment reconstruction during incremental layout. Signed-off-by: Martin Robinson <mrobinson@igalia.com> Co-authored-by: Luke Warlow <lwarlow@igalia.com> Co-authored-by: Oriol Brufau <obrufau@igalia.com>
a40207e to
a4efc9f
Compare
|
🔨 Triggering try run (#22437287649) for Linux (WPT) |
|
Test results for linux-wpt from try job (#22437287649): Flaky unexpected result (40)
Stable unexpected results that are known to be intermittent (20)
|
|
✨ Try run (#22437287649) succeeded. |
Loirooriol
approved these changes
Feb 26, 2026
shubhamg13
pushed a commit
to shubhamg13/servo
that referenced
this pull request
Mar 2, 2026
… undamaged (servo#42871) When fragment tree layout is going to run for a node that starts an independent formatting context, but only because an ancestor was damaged, preserve the fragment cache. This means that in the optimistic case we do not need to re-run fragment tree layout for this independent formatting context. Previously this was only done for the children of the independent formatting context, but the fragment cache is robust enough to detect any layout changes necessary for the IFC fragment itself as well. This helps to avoid so much fragment reconstruction during incremental layout. Testing: `basic-fragment-tree-layout.html` is updated reflecting the decrease in the number of fragments rebuilt. Signed-off-by: Martin Robinson <mrobinson@igalia.com> Co-authored-by: Luke Warlow <lwarlow@igalia.com> Co-authored-by: Oriol Brufau <obrufau@igalia.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When fragment tree layout is going to run for a node that starts an
independent formatting context, but only because an ancestor was
damaged, preserve the fragment cache. This means that in the optimistic
case we do not need to re-run fragment tree layout for this independent
formatting context. Previously this was only done for the children of
the independent formatting context, but the fragment cache is robust
enough to detect any layout changes necessary for the IFC fragment
itself as well. This helps to avoid so much fragment reconstruction
during incremental layout.
Testing:
basic-fragment-tree-layout.htmlis updated reflecting the decreasein the number of fragments rebuilt.