mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
layout: Only create a LayoutContext
if restyling (#37726)
The creation of `LayoutContext` does more work than necessary if layout just needs to do something like make a display list and not restyle and relayout. This change makes it so that these kind of non-restyle layouts do not need to create a display list. In addition, the creation of `LayoutContext` is better encapsulate Testing: This should not change observable behavior and is thus covered by existing WPT tests. Signed-off-by: Martin Robinson <mrobinson@igalia.com> Co-authored-by: Oriol Brufau <obrufau@igalia.com>
This commit is contained in:
parent
5e44582277
commit
9232b0f550
9 changed files with 208 additions and 196 deletions
|
@ -59,6 +59,7 @@ impl FragmentTree {
|
|||
let mut animations = layout_context.style_context.animations.sets.write();
|
||||
let mut invalid_animating_nodes: FxHashSet<_> = animations.keys().cloned().collect();
|
||||
let mut image_animations = layout_context
|
||||
.image_resolver
|
||||
.node_to_animating_image_map
|
||||
.write()
|
||||
.to_owned();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue