mirror of
https://github.com/servo/servo.git
synced 2025-06-21 07:38:59 +01:00
Recompute viewport-dependent styles on viewport size change
Fixes #8754.
This commit is contained in:
parent
4df7975ed3
commit
25c1bce9f6
9 changed files with 71 additions and 57 deletions
|
@ -73,6 +73,9 @@ impl HTMLMetaElement {
|
||||||
rules: vec![CSSRule::Viewport(translated_rule)],
|
rules: vec![CSSRule::Viewport(translated_rule)],
|
||||||
origin: Origin::Author,
|
origin: Origin::Author,
|
||||||
media: None,
|
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);
|
let doc = document_from_node(self);
|
||||||
doc.invalidate_stylesheets();
|
doc.invalidate_stylesheets();
|
||||||
|
|
20
components/servo/Cargo.lock
generated
20
components/servo/Cargo.lock
generated
|
@ -176,7 +176,7 @@ name = "canvas_traits"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"azure 0.4.3 (git+https://github.com/servo/rust-azure)",
|
"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)",
|
"euclid 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"gfx_traits 0.0.1",
|
"gfx_traits 0.0.1",
|
||||||
"heapsize 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
"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]]
|
[[package]]
|
||||||
name = "cssparser"
|
name = "cssparser"
|
||||||
version = "0.5.4"
|
version = "0.5.5"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"encoding 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)",
|
"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)",
|
"bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"canvas 0.0.1",
|
"canvas 0.0.1",
|
||||||
"canvas_traits 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)",
|
"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)",
|
"fnv 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"gfx 0.0.1",
|
"gfx 0.0.1",
|
||||||
|
@ -1246,7 +1246,7 @@ name = "msg"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bitflags 0.3.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)",
|
"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 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)",
|
"heapsize_plugin 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
@ -1692,7 +1692,7 @@ dependencies = [
|
||||||
"canvas 0.0.1",
|
"canvas 0.0.1",
|
||||||
"canvas_traits 0.0.1",
|
"canvas_traits 0.0.1",
|
||||||
"caseless 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"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",
|
"devtools_traits 0.0.1",
|
||||||
"encoding 0.2.32 (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)",
|
"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"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bitflags 0.3.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)",
|
||||||
"fnv 1.0.0 (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 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)",
|
"heapsize_plugin 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
@ -1963,7 +1963,7 @@ version = "0.0.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"app_units 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
"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)",
|
"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)",
|
"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)",
|
"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)",
|
"fnv 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
@ -1991,7 +1991,7 @@ name = "style_tests"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"app_units 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
"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)",
|
"euclid 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"msg 0.0.1",
|
"msg 0.0.1",
|
||||||
"plugins 0.0.1",
|
"plugins 0.0.1",
|
||||||
|
@ -2007,7 +2007,7 @@ dependencies = [
|
||||||
name = "style_traits"
|
name = "style_traits"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
dependencies = [
|
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)",
|
"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 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)",
|
"heapsize_plugin 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
@ -2168,7 +2168,7 @@ version = "0.0.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"app_units 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
"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)",
|
"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)",
|
"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)",
|
"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)",
|
"getopts 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
|
|
@ -22,7 +22,7 @@ path = "../style_traits"
|
||||||
[dependencies]
|
[dependencies]
|
||||||
app_units = {version = "0.2.3", features = ["plugins"]}
|
app_units = {version = "0.2.3", features = ["plugins"]}
|
||||||
bitflags = "0.3"
|
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"
|
encoding = "0.2"
|
||||||
euclid = {version = "0.6.4", features = ["plugins"]}
|
euclid = {version = "0.6.4", features = ["plugins"]}
|
||||||
fnv = "1.0"
|
fnv = "1.0"
|
||||||
|
|
|
@ -226,12 +226,16 @@ impl<Impl: SelectorImplExt> Stylist<Impl> {
|
||||||
if let Some(ref constraints) = self.viewport_constraints {
|
if let Some(ref constraints) = self.viewport_constraints {
|
||||||
device = Device::new(MediaType::Screen, constraints.size);
|
device = Device::new(MediaType::Screen, constraints.size);
|
||||||
}
|
}
|
||||||
let is_device_dirty = self.is_device_dirty || stylesheets.iter()
|
|
||||||
.flat_map(|stylesheet| stylesheet.rules().media())
|
let size_changed = device.viewport_size != self.device.viewport_size;
|
||||||
.any(|media_rule| media_rule.evaluate(&self.device) != media_rule.evaluate(&device));
|
|
||||||
|
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.device = device;
|
||||||
self.is_device_dirty |= is_device_dirty;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn viewport_constraints(&self) -> &Option<ViewportConstraints> {
|
pub fn viewport_constraints(&self) -> &Option<ViewportConstraints> {
|
||||||
|
|
|
@ -46,6 +46,7 @@ pub struct Stylesheet<Impl: SelectorImpl> {
|
||||||
/// List of media associated with the Stylesheet, if any.
|
/// List of media associated with the Stylesheet, if any.
|
||||||
pub media: Option<MediaQueryList>,
|
pub media: Option<MediaQueryList>,
|
||||||
pub origin: Origin,
|
pub origin: Origin,
|
||||||
|
pub dirty_on_viewport_size_change: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -113,27 +114,31 @@ impl<Impl: SelectorImpl> Stylesheet<Impl> {
|
||||||
_impl: PhantomData,
|
_impl: PhantomData,
|
||||||
};
|
};
|
||||||
let mut input = Parser::new(css);
|
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();
|
let mut rules = Vec::new();
|
||||||
while let Some(result) = iter.next() {
|
{
|
||||||
match result {
|
let mut iter = RuleListParser::new_for_stylesheet(&mut input, rule_parser);
|
||||||
Ok(rule) => {
|
while let Some(result) = iter.next() {
|
||||||
if let CSSRule::Namespace(ref prefix, ref namespace) = rule {
|
match result {
|
||||||
if let Some(prefix) = prefix.as_ref() {
|
Ok(rule) => {
|
||||||
iter.parser.context.selector_context.namespace_prefixes.insert(
|
if let CSSRule::Namespace(ref prefix, ref namespace) = rule {
|
||||||
prefix.clone(), namespace.clone());
|
if let Some(prefix) = prefix.as_ref() {
|
||||||
} else {
|
iter.parser.context.selector_context.namespace_prefixes.insert(
|
||||||
iter.parser.context.selector_context.default_namespace =
|
prefix.clone(), namespace.clone());
|
||||||
Some(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,
|
origin: origin,
|
||||||
rules: rules,
|
rules: rules,
|
||||||
media: None,
|
media: None,
|
||||||
|
dirty_on_viewport_size_change: input.seen_viewport_percentages(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
18
ports/cef/Cargo.lock
generated
18
ports/cef/Cargo.lock
generated
|
@ -161,7 +161,7 @@ name = "canvas_traits"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"azure 0.4.3 (git+https://github.com/servo/rust-azure)",
|
"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)",
|
"euclid 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"gfx_traits 0.0.1",
|
"gfx_traits 0.0.1",
|
||||||
"heapsize 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
"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]]
|
[[package]]
|
||||||
name = "cssparser"
|
name = "cssparser"
|
||||||
version = "0.5.4"
|
version = "0.5.5"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"encoding 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)",
|
"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)",
|
"bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"canvas 0.0.1",
|
"canvas 0.0.1",
|
||||||
"canvas_traits 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)",
|
"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)",
|
"fnv 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"gfx 0.0.1",
|
"gfx 0.0.1",
|
||||||
|
@ -1166,7 +1166,7 @@ name = "msg"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bitflags 0.3.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)",
|
"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 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)",
|
"heapsize_plugin 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
@ -1567,7 +1567,7 @@ dependencies = [
|
||||||
"canvas 0.0.1",
|
"canvas 0.0.1",
|
||||||
"canvas_traits 0.0.1",
|
"canvas_traits 0.0.1",
|
||||||
"caseless 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"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",
|
"devtools_traits 0.0.1",
|
||||||
"encoding 0.2.32 (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)",
|
"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"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bitflags 0.3.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)",
|
||||||
"fnv 1.0.0 (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 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)",
|
"heapsize_plugin 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
@ -1867,7 +1867,7 @@ version = "0.0.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"app_units 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
"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)",
|
"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)",
|
"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)",
|
"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)",
|
"fnv 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
@ -1894,7 +1894,7 @@ dependencies = [
|
||||||
name = "style_traits"
|
name = "style_traits"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
dependencies = [
|
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)",
|
"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 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)",
|
"heapsize_plugin 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
@ -2055,7 +2055,7 @@ version = "0.0.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"app_units 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
"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)",
|
"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)",
|
"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)",
|
"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)",
|
"getopts 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
|
12
ports/geckolib/Cargo.lock
generated
12
ports/geckolib/Cargo.lock
generated
|
@ -4,7 +4,7 @@ version = "0.0.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"app_units 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
"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)",
|
"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)",
|
"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 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)",
|
"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]]
|
[[package]]
|
||||||
name = "cssparser"
|
name = "cssparser"
|
||||||
version = "0.5.4"
|
version = "0.5.5"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"encoding 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)",
|
"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"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bitflags 0.3.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)",
|
||||||
"fnv 1.0.0 (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 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)",
|
"heapsize_plugin 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
@ -422,7 +422,7 @@ version = "0.0.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"app_units 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
"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)",
|
"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)",
|
"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)",
|
"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)",
|
"fnv 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
@ -449,7 +449,7 @@ dependencies = [
|
||||||
name = "style_traits"
|
name = "style_traits"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
dependencies = [
|
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)",
|
"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 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)",
|
"heapsize_plugin 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
@ -528,7 +528,7 @@ version = "0.0.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"app_units 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
"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)",
|
"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)",
|
"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)",
|
"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)",
|
"getopts 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
|
18
ports/gonk/Cargo.lock
generated
18
ports/gonk/Cargo.lock
generated
|
@ -154,7 +154,7 @@ name = "canvas_traits"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"azure 0.4.3 (git+https://github.com/servo/rust-azure)",
|
"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)",
|
"euclid 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"gfx_traits 0.0.1",
|
"gfx_traits 0.0.1",
|
||||||
"heapsize 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
"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]]
|
[[package]]
|
||||||
name = "cssparser"
|
name = "cssparser"
|
||||||
version = "0.5.4"
|
version = "0.5.5"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"encoding 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)",
|
"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)",
|
"bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"canvas 0.0.1",
|
"canvas 0.0.1",
|
||||||
"canvas_traits 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)",
|
"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)",
|
"fnv 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"gfx 0.0.1",
|
"gfx 0.0.1",
|
||||||
|
@ -1148,7 +1148,7 @@ name = "msg"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bitflags 0.3.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)",
|
"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 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)",
|
"heapsize_plugin 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
@ -1549,7 +1549,7 @@ dependencies = [
|
||||||
"canvas 0.0.1",
|
"canvas 0.0.1",
|
||||||
"canvas_traits 0.0.1",
|
"canvas_traits 0.0.1",
|
||||||
"caseless 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"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",
|
"devtools_traits 0.0.1",
|
||||||
"encoding 0.2.32 (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)",
|
"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"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bitflags 0.3.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)",
|
||||||
"fnv 1.0.0 (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 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)",
|
"heapsize_plugin 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
@ -1847,7 +1847,7 @@ version = "0.0.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"app_units 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
"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)",
|
"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)",
|
"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)",
|
"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)",
|
"fnv 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
@ -1874,7 +1874,7 @@ dependencies = [
|
||||||
name = "style_traits"
|
name = "style_traits"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
dependencies = [
|
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)",
|
"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 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)",
|
"heapsize_plugin 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
@ -2035,7 +2035,7 @@ version = "0.0.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"app_units 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
"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)",
|
"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)",
|
"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)",
|
"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)",
|
"getopts 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
|
|
@ -29,6 +29,7 @@ fn test_parse_stylesheet() {
|
||||||
assert_eq!(stylesheet, Stylesheet {
|
assert_eq!(stylesheet, Stylesheet {
|
||||||
origin: Origin::UserAgent,
|
origin: Origin::UserAgent,
|
||||||
media: None,
|
media: None,
|
||||||
|
dirty_on_viewport_size_change: false,
|
||||||
rules: vec![
|
rules: vec![
|
||||||
CSSRule::Namespace(None, ns!(html)),
|
CSSRule::Namespace(None, ns!(html)),
|
||||||
CSSRule::Style(StyleRule {
|
CSSRule::Style(StyleRule {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue