aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout/construct.rs
diff options
context:
space:
mode:
authorPatrick Walton <pcwalton@mimiga.net>2014-10-10 15:13:12 -0700
committerPatrick Walton <pcwalton@mimiga.net>2014-10-13 21:40:36 -0700
commitbffaad118e2e73c3fbeee4a160f2b0d7d3ff4952 (patch)
tree061604ce620c43fbbf80d6937a07ecc82e021fc3 /components/layout/construct.rs
parentf350879574194bb612eac88e21d0920e9827afa7 (diff)
downloadservo-bffaad118e2e73c3fbeee4a160f2b0d7d3ff4952.tar.gz
servo-bffaad118e2e73c3fbeee4a160f2b0d7d3ff4952.zip
layout: Rewrite clipping to be per-display-item instead of having
a separate `ClipDisplayItem`. We push down clipping areas during absolute position calculation. This makes display items into a flat list, improving cache locality. It dramatically simplifies the code all around. Because we need to push down clip rects even for absolutely-positioned children of non-absolutely-positioned flows, this patch alters the parallel traversal to compute absolute positions for absolutely-positioned children at the same time it computes absolute positions for other children. This doesn't seem to break anything either in theory (since the overall order remains correct) or in practice. It simplifies the parallel traversal code quite a bit. See the relevant Gecko bug: https://bugzilla.mozilla.org/show_bug.cgi?id=615734
Diffstat (limited to 'components/layout/construct.rs')
-rw-r--r--components/layout/construct.rs1
1 files changed, 0 insertions, 1 deletions
diff --git a/components/layout/construct.rs b/components/layout/construct.rs
index c45c26d781c..ffdf535874e 100644
--- a/components/layout/construct.rs
+++ b/components/layout/construct.rs
@@ -1204,7 +1204,6 @@ impl FlowConstructionUtils for FlowRef {
base.children.push_back(new_child);
let _ = base.parallel.children_count.fetch_add(1, Relaxed);
- let _ = base.parallel.children_and_absolute_descendant_count.fetch_add(1, Relaxed);
}
/// Finishes a flow. Once a flow is finished, no more child flows or fragments may be added to