style: Record the property we are computing on computed::Context, if it's a non-inherited one.

This commit is contained in:
Cameron McCormack 2017-09-13 16:03:24 +08:00
parent 9230030daa
commit 1cde26eacb
7 changed files with 19 additions and 1 deletions

View file

@ -314,6 +314,13 @@
_ => panic!("entered the wrong cascade_property() implementation"),
};
context.for_non_inherited_property =
% if property.style_struct.inherited:
None;
% else:
Some(LonghandId::${property.camel_case});
% endif
% if not property.derived_from:
match value {
DeclaredValue::Value(specified_value) => {

View file

@ -3199,6 +3199,7 @@ where
cached_system_font: None,
in_media_query: false,
for_smil_animation: false,
for_non_inherited_property: None,
font_metrics_provider,
quirks_mode,
rule_cache_conditions: RefCell::new(rule_cache_conditions),