Bug 1298588 part 9, servo piece. Pass through useful default styles to cascade(). r=bholley

This commit is contained in:
Boris Zbarsky 2017-01-04 13:48:23 -05:00
parent 09c74190b9
commit 61f6025dc3
6 changed files with 22 additions and 10 deletions

View file

@ -661,7 +661,8 @@ impl<'a, ConcreteThreadSafeLayoutNode: ThreadSafeLayoutNode>
if node_is_input_or_text_area {
style = self.style_context()
.stylist
.style_for_anonymous_box(&PseudoElement::ServoInputText, &style)
.style_for_anonymous_box(&PseudoElement::ServoInputText, &style,
&self.style_context().default_computed_values)
}
self.create_fragments_for_node_text_content(&mut initial_fragments, node, &style)
@ -1093,7 +1094,7 @@ impl<'a, ConcreteThreadSafeLayoutNode: ThreadSafeLayoutNode>
let wrapper_style = self.style_context()
.stylist
.style_for_anonymous_box(&PseudoElement::ServoTableWrapper,
&table_style);
&table_style, &self.style_context().default_computed_values);
let wrapper_fragment =
Fragment::from_opaque_node_and_style(node.opaque(),
PseudoElementType::Normal,
@ -2064,7 +2065,7 @@ 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)
new_style = context.stylist.style_for_anonymous_box(pseudo, &new_style, &context.default_computed_values)
}
let fragment = reference_block.fragment
.create_similar_anonymous_fragment(new_style,