Add support for non-standard -moz color keyword values.

Closes #15928
This commit is contained in:
Matt Brubeck 2017-03-08 10:17:44 -08:00 committed by Emilio Cobos Álvarez
parent 35028f8f60
commit 16e318d055
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
20 changed files with 188 additions and 58 deletions

View file

@ -29,7 +29,7 @@ pub struct Device {
/// NB: The pres context lifetime is tied to the styleset, who owns the
/// stylist, and thus the `Device`, so having a raw pres context pointer
/// here is fine.
pres_context: RawGeckoPresContextOwned,
pub pres_context: RawGeckoPresContextOwned,
default_values: Arc<ComputedValues>,
viewport_override: Option<ViewportConstraints>,
}
@ -497,13 +497,13 @@ impl Expression {
// em units are relative to the initial font-size.
let context = computed::Context {
is_root_element: false,
viewport_size: device.au_viewport_size(),
device: device,
inherited_style: default_values,
layout_parent_style: default_values,
// This cloning business is kind of dumb.... It's because Context
// insists on having an actual ComputedValues inside itself.
style: default_values.clone(),
font_metrics_provider: None
font_metrics_provider: None,
};
let required_value = match self.value {