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

@ -662,8 +662,8 @@ impl<'a, ConcreteThreadSafeLayoutNode: ThreadSafeLayoutNode>
if node_is_input_or_text_area {
style = self.style_context()
.stylist
.style_for_anonymous_box(&PseudoElement::ServoInputText, &style,
&self.style_context().default_computed_values)
.style_for_anonymous_box(&PseudoElement::ServoInputText,
&style)
}
self.create_fragments_for_node_text_content(&mut initial_fragments, node, &style)
@ -1100,7 +1100,7 @@ impl<'a, ConcreteThreadSafeLayoutNode: ThreadSafeLayoutNode>
let wrapper_style = self.style_context()
.stylist
.style_for_anonymous_box(&PseudoElement::ServoTableWrapper,
&table_style, &self.style_context().default_computed_values);
&table_style);
let wrapper_fragment =
Fragment::from_opaque_node_and_style(node.opaque(),
PseudoElementType::Normal,
@ -2080,7 +2080,8 @@ impl Legalizer {
let reference_block = reference.as_block();
let mut new_style = reference_block.fragment.style.clone();
for pseudo in pseudos {
new_style = context.stylist.style_for_anonymous_box(pseudo, &new_style, &context.default_computed_values)
new_style = context.stylist.style_for_anonymous_box(pseudo,
&new_style)
}
let fragment = reference_block.fragment
.create_similar_anonymous_fragment(new_style,