aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout/traversal.rs
diff options
context:
space:
mode:
authorBobby Holley <bobbyholley@gmail.com>2017-04-08 20:05:38 +0800
committerBobby Holley <bobbyholley@gmail.com>2017-04-09 14:52:49 +0800
commit3f52052cf9699020326fb6d0f3965b0402d79beb (patch)
treea6825088f7bee3d5dbd203e304370c0fa3295b24 /components/layout/traversal.rs
parent1b363ac9094594110908793c0e2af12cd011e55e (diff)
downloadservo-3f52052cf9699020326fb6d0f3965b0402d79beb.tar.gz
servo-3f52052cf9699020326fb6d0f3965b0402d79beb.zip
Do the sequential traversal breadth-first.
While we're at it, we also eliminate the 'unknown' dom depth for the bloom filter. Computing depth has negligible cost relative to the amount of work we do setting up the bloom filter at a given depth. Doing it once per traversal should be totally fine. I originally separated the elimination of unknown dom depth from the traversal changes, but I got bloom filter crashes on the intermediate patch, presumably because I didn't properly fix the sequential traversal for this case. Given that the final state is green, I just decided to squash and move on.
Diffstat (limited to 'components/layout/traversal.rs')
-rw-r--r--components/layout/traversal.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/components/layout/traversal.rs b/components/layout/traversal.rs
index 3c0c1763d0c..844a61527b6 100644
--- a/components/layout/traversal.rs
+++ b/components/layout/traversal.rs
@@ -56,7 +56,7 @@ impl<'a, E> DomTraversal<E> for RecalcStyleAndConstructFlows<'a>
{
type ThreadLocalContext = ScopedThreadLocalLayoutContext<E>;
- fn process_preorder(&self, traversal_data: &mut PerLevelTraversalData,
+ fn process_preorder(&self, traversal_data: &PerLevelTraversalData,
thread_local: &mut Self::ThreadLocalContext, node: E::ConcreteNode) {
// FIXME(pcwalton): Stop allocating here. Ideally this should just be
// done by the HTML parser.