mirror of
https://github.com/servo/servo.git
synced 2025-08-08 06:55:31 +01:00
layout: Split overflow calculation after fragment tree construction (#37203)
Instead of computing scrollable overflow while constructing the fragment tree, we will now do it later. In the future this will also allow to only recalculate the overflow without rebuilding the tree when transform properties change, but that's left for a follow-up. Stylo PR: https://github.com/servo/stylo/pull/194 Testing: One test is now passing (more investigation is needed), but otherwise this isn't expected to have any effect. Signed-off-by: Oriol Brufau <obrufau@igalia.com> Co-authored-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
parent
079198c898
commit
de2da3b1e1
11 changed files with 148 additions and 96 deletions
|
@ -3,7 +3,7 @@
|
|||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
//! Utilities for querying the layout, as needed by layout.
|
||||
use std::sync::Arc;
|
||||
use std::rc::Rc;
|
||||
|
||||
use app_units::Au;
|
||||
use euclid::default::{Point2D, Rect};
|
||||
|
@ -80,7 +80,7 @@ pub fn process_client_rect_request(node: ServoLayoutNode<'_>) -> Rect<i32> {
|
|||
/// <https://drafts.csswg.org/cssom-view/#scrolling-area>
|
||||
pub fn process_node_scroll_area_request(
|
||||
requested_node: Option<ServoLayoutNode<'_>>,
|
||||
fragment_tree: Option<Arc<FragmentTree>>,
|
||||
fragment_tree: Option<Rc<FragmentTree>>,
|
||||
) -> Rect<i32> {
|
||||
let Some(tree) = fragment_tree else {
|
||||
return Rect::zero();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue