style: Kill SharedStyleContext::default_computed_values.

Now that cascade() gets a Device, we can use the default computed values from
there to avoid propagating that state all over the place.

Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
This commit is contained in:
Emilio Cobos Álvarez 2017-03-13 22:50:43 +01:00
parent 16e318d055
commit eaf27ccfa0
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
14 changed files with 41 additions and 47 deletions

View file

@ -407,7 +407,6 @@ pub trait ThreadSafeLayoutElement: Clone + Copy + Sized + Debug +
context.stylist.precomputed_values_for_pseudo(
&style_pseudo,
Some(data.styles().primary.values()),
&context.default_computed_values,
CascadeFlags::empty());
data.styles_mut().pseudos
.insert(style_pseudo.clone(), new_style);
@ -424,8 +423,7 @@ pub trait ThreadSafeLayoutElement: Clone + Copy + Sized + Debug +
.lazily_compute_pseudo_element_style(
unsafe { &self.unsafe_get() },
&style_pseudo,
data.styles().primary.values(),
&context.default_computed_values);
data.styles().primary.values());
data.styles_mut().pseudos
.insert(style_pseudo.clone(), new_style.unwrap());
}