diff options
author | Matt Brubeck <mbrubeck@limpet.net> | 2016-03-04 11:02:45 -0800 |
---|---|---|
committer | Matt Brubeck <mbrubeck@limpet.net> | 2016-03-19 13:23:39 -0700 |
commit | 25c1bce9f6f7047523c481ecd371eb1fee18cf74 (patch) | |
tree | 7199abbe9b39bb2e97e2fe2161251eec6be743f1 | |
parent | 4df7975ed3e74f1d6c491b0435bb3e751b5386a8 (diff) | |
download | servo-25c1bce9f6f7047523c481ecd371eb1fee18cf74.tar.gz servo-25c1bce9f6f7047523c481ecd371eb1fee18cf74.zip |
Recompute viewport-dependent styles on viewport size change
Fixes #8754.
-rw-r--r-- | components/script/dom/htmlmetaelement.rs | 3 | ||||
-rw-r--r-- | components/servo/Cargo.lock | 20 | ||||
-rw-r--r-- | components/style/Cargo.toml | 2 | ||||
-rw-r--r-- | components/style/selector_matching.rs | 12 | ||||
-rw-r--r-- | components/style/stylesheets.rs | 42 | ||||
-rw-r--r-- | ports/cef/Cargo.lock | 18 | ||||
-rw-r--r-- | ports/geckolib/Cargo.lock | 12 | ||||
-rw-r--r-- | ports/gonk/Cargo.lock | 18 | ||||
-rw-r--r-- | tests/unit/style/stylesheets.rs | 1 |
9 files changed, 71 insertions, 57 deletions
diff --git a/components/script/dom/htmlmetaelement.rs b/components/script/dom/htmlmetaelement.rs index 779c5c79e07..73cc5c73aa0 100644 --- a/components/script/dom/htmlmetaelement.rs +++ b/components/script/dom/htmlmetaelement.rs @@ -73,6 +73,9 @@ impl HTMLMetaElement { rules: vec![CSSRule::Viewport(translated_rule)], origin: Origin::Author, media: None, + // Viewport constraints are always recomputed on resize; they don't need to + // force all styles to be recomputed. + dirty_on_viewport_size_change: false, })); let doc = document_from_node(self); doc.invalidate_stylesheets(); diff --git a/components/servo/Cargo.lock b/components/servo/Cargo.lock index 6a2284d2043..ce25b3ebabf 100644 --- a/components/servo/Cargo.lock +++ b/components/servo/Cargo.lock @@ -176,7 +176,7 @@ name = "canvas_traits" version = "0.0.1" dependencies = [ "azure 0.4.3 (git+https://github.com/servo/rust-azure)", - "cssparser 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "cssparser 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", "gfx_traits 0.0.1", "heapsize 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -369,7 +369,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "cssparser" -version = "0.5.4" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "encoding 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1046,7 +1046,7 @@ dependencies = [ "bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "canvas 0.0.1", "canvas_traits 0.0.1", - "cssparser 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "cssparser 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "gfx 0.0.1", @@ -1246,7 +1246,7 @@ name = "msg" version = "0.0.1" dependencies = [ "bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "cssparser 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "cssparser 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize_plugin 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1692,7 +1692,7 @@ dependencies = [ "canvas 0.0.1", "canvas_traits 0.0.1", "caseless 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "cssparser 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "cssparser 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", "devtools_traits 0.0.1", "encoding 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1776,7 +1776,7 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "cssparser 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "cssparser 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize_plugin 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1963,7 +1963,7 @@ version = "0.0.1" dependencies = [ "app_units 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "cssparser 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "cssparser 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", "encoding 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1991,7 +1991,7 @@ name = "style_tests" version = "0.0.1" dependencies = [ "app_units 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "cssparser 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "cssparser 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", "msg 0.0.1", "plugins 0.0.1", @@ -2007,7 +2007,7 @@ dependencies = [ name = "style_traits" version = "0.0.1" dependencies = [ - "cssparser 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "cssparser 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize_plugin 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2168,7 +2168,7 @@ version = "0.0.1" dependencies = [ "app_units 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "cssparser 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "cssparser 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", "deque 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", "getopts 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/components/style/Cargo.toml b/components/style/Cargo.toml index 2aebd38d239..47a308192bf 100644 --- a/components/style/Cargo.toml +++ b/components/style/Cargo.toml @@ -22,7 +22,7 @@ path = "../style_traits" [dependencies] app_units = {version = "0.2.3", features = ["plugins"]} bitflags = "0.3" -cssparser = {version = "0.5.4", features = ["heap_size", "serde-serialization"]} +cssparser = {version = "0.5.5", features = ["heap_size", "serde-serialization"]} encoding = "0.2" euclid = {version = "0.6.4", features = ["plugins"]} fnv = "1.0" diff --git a/components/style/selector_matching.rs b/components/style/selector_matching.rs index abcfd65dfb8..dd9a4cf68af 100644 --- a/components/style/selector_matching.rs +++ b/components/style/selector_matching.rs @@ -226,12 +226,16 @@ impl<Impl: SelectorImplExt> Stylist<Impl> { if let Some(ref constraints) = self.viewport_constraints { device = Device::new(MediaType::Screen, constraints.size); } - let is_device_dirty = self.is_device_dirty || stylesheets.iter() - .flat_map(|stylesheet| stylesheet.rules().media()) - .any(|media_rule| media_rule.evaluate(&self.device) != media_rule.evaluate(&device)); + + 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)) + }); self.device = device; - self.is_device_dirty |= is_device_dirty; } pub fn viewport_constraints(&self) -> &Option<ViewportConstraints> { diff --git a/components/style/stylesheets.rs b/components/style/stylesheets.rs index 44efaa6f3f2..0e40799eb2b 100644 --- a/components/style/stylesheets.rs +++ b/components/style/stylesheets.rs @@ -46,6 +46,7 @@ pub struct Stylesheet<Impl: SelectorImpl> { /// List of media associated with the Stylesheet, if any. pub media: Option<MediaQueryList>, pub origin: Origin, + pub dirty_on_viewport_size_change: bool, } @@ -113,27 +114,31 @@ impl<Impl: SelectorImpl> Stylesheet<Impl> { _impl: PhantomData, }; let mut input = Parser::new(css); - let mut iter = RuleListParser::new_for_stylesheet(&mut input, rule_parser); + input.look_for_viewport_percentages(); + let mut rules = Vec::new(); - while let Some(result) = iter.next() { - match result { - Ok(rule) => { - if let CSSRule::Namespace(ref prefix, ref namespace) = rule { - if let Some(prefix) = prefix.as_ref() { - iter.parser.context.selector_context.namespace_prefixes.insert( - prefix.clone(), namespace.clone()); - } else { - iter.parser.context.selector_context.default_namespace = - Some(namespace.clone()); + { + let mut iter = RuleListParser::new_for_stylesheet(&mut input, rule_parser); + while let Some(result) = iter.next() { + match result { + Ok(rule) => { + if let CSSRule::Namespace(ref prefix, ref namespace) = rule { + if let Some(prefix) = prefix.as_ref() { + iter.parser.context.selector_context.namespace_prefixes.insert( + prefix.clone(), namespace.clone()); + } else { + iter.parser.context.selector_context.default_namespace = + Some(namespace.clone()); + } } + rules.push(rule); + } + Err(range) => { + let pos = range.start; + let message = format!("Invalid rule: '{}'", iter.input.slice(range)); + let context = ParserContext::new(origin, &base_url, error_reporter.clone()); + log_css_error(iter.input, pos, &*message, &context); } - rules.push(rule); - } - Err(range) => { - let pos = range.start; - let message = format!("Invalid rule: '{}'", iter.input.slice(range)); - let context = ParserContext::new(origin, &base_url, error_reporter.clone()); - log_css_error(iter.input, pos, &*message, &context); } } } @@ -141,6 +146,7 @@ impl<Impl: SelectorImpl> Stylesheet<Impl> { origin: origin, rules: rules, media: None, + dirty_on_viewport_size_change: input.seen_viewport_percentages(), } } diff --git a/ports/cef/Cargo.lock b/ports/cef/Cargo.lock index d3f1f4bec43..2d918b277d6 100644 --- a/ports/cef/Cargo.lock +++ b/ports/cef/Cargo.lock @@ -161,7 +161,7 @@ name = "canvas_traits" version = "0.0.1" dependencies = [ "azure 0.4.3 (git+https://github.com/servo/rust-azure)", - "cssparser 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "cssparser 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", "gfx_traits 0.0.1", "heapsize 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -339,7 +339,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "cssparser" -version = "0.5.4" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "encoding 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)", @@ -966,7 +966,7 @@ dependencies = [ "bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "canvas 0.0.1", "canvas_traits 0.0.1", - "cssparser 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "cssparser 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "gfx 0.0.1", @@ -1166,7 +1166,7 @@ name = "msg" version = "0.0.1" dependencies = [ "bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "cssparser 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "cssparser 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize_plugin 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1567,7 +1567,7 @@ dependencies = [ "canvas 0.0.1", "canvas_traits 0.0.1", "caseless 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "cssparser 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "cssparser 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", "devtools_traits 0.0.1", "encoding 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1642,7 +1642,7 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "cssparser 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "cssparser 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize_plugin 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1867,7 +1867,7 @@ version = "0.0.1" dependencies = [ "app_units 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "cssparser 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "cssparser 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", "encoding 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1894,7 +1894,7 @@ dependencies = [ name = "style_traits" version = "0.0.1" dependencies = [ - "cssparser 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "cssparser 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize_plugin 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2055,7 +2055,7 @@ version = "0.0.1" dependencies = [ "app_units 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "cssparser 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "cssparser 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", "deque 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", "getopts 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/ports/geckolib/Cargo.lock b/ports/geckolib/Cargo.lock index b2bd3864ca9..19e09bfd209 100644 --- a/ports/geckolib/Cargo.lock +++ b/ports/geckolib/Cargo.lock @@ -4,7 +4,7 @@ version = "0.0.1" dependencies = [ "app_units 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "cssparser 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "cssparser 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize_plugin 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", @@ -79,7 +79,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "cssparser" -version = "0.5.4" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "encoding 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)", @@ -364,7 +364,7 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "cssparser 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "cssparser 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize_plugin 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", @@ -422,7 +422,7 @@ version = "0.0.1" dependencies = [ "app_units 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "cssparser 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "cssparser 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", "encoding 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -449,7 +449,7 @@ dependencies = [ name = "style_traits" version = "0.0.1" dependencies = [ - "cssparser 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "cssparser 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize_plugin 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", @@ -528,7 +528,7 @@ version = "0.0.1" dependencies = [ "app_units 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "cssparser 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "cssparser 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", "deque 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", "getopts 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/ports/gonk/Cargo.lock b/ports/gonk/Cargo.lock index 6da00e67649..dfae40d76dd 100644 --- a/ports/gonk/Cargo.lock +++ b/ports/gonk/Cargo.lock @@ -154,7 +154,7 @@ name = "canvas_traits" version = "0.0.1" dependencies = [ "azure 0.4.3 (git+https://github.com/servo/rust-azure)", - "cssparser 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "cssparser 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", "gfx_traits 0.0.1", "heapsize 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -332,7 +332,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "cssparser" -version = "0.5.4" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "encoding 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)", @@ -948,7 +948,7 @@ dependencies = [ "bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "canvas 0.0.1", "canvas_traits 0.0.1", - "cssparser 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "cssparser 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "gfx 0.0.1", @@ -1148,7 +1148,7 @@ name = "msg" version = "0.0.1" dependencies = [ "bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "cssparser 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "cssparser 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize_plugin 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1549,7 +1549,7 @@ dependencies = [ "canvas 0.0.1", "canvas_traits 0.0.1", "caseless 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "cssparser 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "cssparser 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", "devtools_traits 0.0.1", "encoding 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1624,7 +1624,7 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "cssparser 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "cssparser 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize_plugin 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1847,7 +1847,7 @@ version = "0.0.1" dependencies = [ "app_units 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "cssparser 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "cssparser 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", "encoding 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1874,7 +1874,7 @@ dependencies = [ name = "style_traits" version = "0.0.1" dependencies = [ - "cssparser 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "cssparser 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize_plugin 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2035,7 +2035,7 @@ version = "0.0.1" dependencies = [ "app_units 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "cssparser 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "cssparser 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", "deque 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", "getopts 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/tests/unit/style/stylesheets.rs b/tests/unit/style/stylesheets.rs index 46e1f89aaff..1bed8f94a1d 100644 --- a/tests/unit/style/stylesheets.rs +++ b/tests/unit/style/stylesheets.rs @@ -29,6 +29,7 @@ fn test_parse_stylesheet() { assert_eq!(stylesheet, Stylesheet { origin: Origin::UserAgent, media: None, + dirty_on_viewport_size_change: false, rules: vec![ CSSRule::Namespace(None, ns!(html)), CSSRule::Style(StyleRule { |