Bug 1298588 part 11. Pass through useful default styles to CascadePropertyFn. r=bholley

This commit is contained in:
Boris Zbarsky 2017-01-04 13:52:44 -05:00
parent c826b18f87
commit 8367c96c1b
2 changed files with 4 additions and 1 deletions

View file

@ -210,6 +210,7 @@
#[allow(unused_variables)]
pub fn cascade_property(declaration: &PropertyDeclaration,
inherited_style: &ComputedValues,
default_style: &Arc<ComputedValues>,
context: &mut computed::Context,
seen: &mut PropertyBitField,
cacheable: &mut bool,
@ -260,7 +261,7 @@
DeclaredValue::Initial => {
// We assume that it's faster to use copy_*_from rather than
// set_*(get_initial_value());
let initial_struct = ComputedValues::initial_values()
let initial_struct = default_style
.get_${data.current_style_struct.name_lower}();
context.mutate_style().mutate_${data.current_style_struct.name_lower}()
.copy_${property.ident}_from(initial_struct ${maybe_wm});