aboutsummaryrefslogtreecommitdiffstats
path: root/components/style/selector_matching.rs
diff options
context:
space:
mode:
authorMatt Brubeck <mbrubeck@limpet.net>2016-03-21 09:52:12 -0700
committerMatt Brubeck <mbrubeck@limpet.net>2016-03-21 10:05:17 -0700
commit37636e8377a8f493e5cd4002ac49af7d277d89f5 (patch)
tree9f37ed593b8bc5ebaaace73536cf1d5dfb029ec9 /components/style/selector_matching.rs
parente95368df6297e664122da8ae15f25724be557353 (diff)
downloadservo-37636e8377a8f493e5cd4002ac49af7d277d89f5.tar.gz
servo-37636e8377a8f493e5cd4002ac49af7d277d89f5.zip
Don't re-add stylesheets to recompute vw/vh lengths
This is a follow-up to #9876. It avoids clearing and rebuilding SelectorMaps when vh and vw units need to be recomputed. Instead it just dirties all nodes, to force elements to be re-cascaded. Filed #10104 for later follow-up work to dirty only affected nodes.
Diffstat (limited to 'components/style/selector_matching.rs')
-rw-r--r--components/style/selector_matching.rs3
1 files changed, 0 insertions, 3 deletions
diff --git a/components/style/selector_matching.rs b/components/style/selector_matching.rs
index 43aa3363be2..d2ac9409722 100644
--- a/components/style/selector_matching.rs
+++ b/components/style/selector_matching.rs
@@ -226,10 +226,7 @@ impl<Impl: SelectorImplExt> Stylist<Impl> {
device = Device::new(MediaType::Screen, constraints.size);
}
- let size_changed = device.viewport_size != self.device.viewport_size;
-
self.is_device_dirty |= stylesheets.iter().any(|stylesheet| {
- (size_changed && stylesheet.dirty_on_viewport_size_change) ||
stylesheet.rules().media().any(|media_rule|
media_rule.evaluate(&self.device) != media_rule.evaluate(&device))
});