aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout_2020/flow/root.rs
diff options
context:
space:
mode:
authorOriol Brufau <obrufau@igalia.com>2025-03-24 13:33:44 +0100
committerGitHub <noreply@github.com>2025-03-24 12:33:44 +0000
commitc09eed759b9533850c51ad0037fe68fab85ba6c5 (patch)
tree660dc2a9dce65c2f0d6ec7fe718d2af4be8c96c9 /components/layout_2020/flow/root.rs
parentefd6e8639369308715e35532b5f29e3bc399f1ce (diff)
downloadservo-c09eed759b9533850c51ad0037fe68fab85ba6c5.tar.gz
servo-c09eed759b9533850c51ad0037fe68fab85ba6c5.zip
layout: Cache `IndependentNonReplacedContents::layout()` (#36082)
This replaces `IndependentLayout` with `CacheableLayoutResult` and stores it in `LayoutBoxBase` so it can be reused when we need to lay out a box multiple times. This is a generalization of the caching that we had for flexbox, which is now removed in favor of the new one. With this, the number of runs per second in the Chromium perf test `flexbox-deeply-nested-column-flow.html` are multiplied by 3. Signed-off-by: Oriol Brufau <obrufau@igalia.com> Signed-off-by: Martin Robinson <mrobinson@igalia.com> Co-authored-by: Martin Robinson <mrobinson@igalia.com>
Diffstat (limited to 'components/layout_2020/flow/root.rs')
-rw-r--r--components/layout_2020/flow/root.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/components/layout_2020/flow/root.rs b/components/layout_2020/flow/root.rs
index 5b7cf077bab..4fb33bf71d4 100644
--- a/components/layout_2020/flow/root.rs
+++ b/components/layout_2020/flow/root.rs
@@ -365,6 +365,7 @@ impl BoxTree {
layout_context,
&mut positioning_context,
&(&initial_containing_block).into(),
+ false, /* depends_on_block_constraints */
);
let mut root_fragments = independent_layout.fragments.into_iter().collect::<Vec<_>>();