layout: Remove two arguments from StackingContextTree::new() (#37396)

This is a minor cleanup that simplifies the construct of
`StackingContextTree`. The two arguments removed are derived from the
`FragmentTree` which is already passed as an argument.

Testing: This should not change behavior and is thus covered by existing
tests.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
Martin Robinson 2025-06-11 14:42:54 +02:00 committed by GitHub
parent bda3e23c74
commit c36ef34464
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 8 additions and 12 deletions

View file

@ -872,21 +872,13 @@ impl LayoutThread {
viewport_size.height.to_f32_px(),
);
let scrollable_overflow = fragment_tree.scrollable_overflow();
let scrollable_overflow = LayoutSize::from_untyped(Size2D::new(
scrollable_overflow.size.width.to_f32_px(),
scrollable_overflow.size.height.to_f32_px(),
));
// Build the StackingContextTree. This turns the `FragmentTree` into a
// tree of fragments in CSS painting order and also creates all
// applicable spatial and clip nodes.
*self.stacking_context_tree.borrow_mut() = Some(StackingContextTree::new(
fragment_tree,
viewport_size,
scrollable_overflow,
self.id.into(),
fragment_tree.viewport_scroll_sensitivity,
self.first_reflow.get(),
&self.debug,
));