style: Set writing mode dependency and uncacheable state only for non-inherited properties.

This commit is contained in:
Cameron McCormack 2017-09-13 15:58:49 +08:00
parent c34c92e904
commit 9230030daa

View file

@ -322,7 +322,7 @@
longhands::system_font::resolve_system_font(sf, context);
}
% endif
% if property.logical:
% if not property.style_struct.inherited and property.logical:
context.rule_cache_conditions.borrow_mut()
.set_writing_mode_dependency(context.builder.writing_mode);
% endif
@ -367,7 +367,6 @@
CSSWideKeyword::Unset |
% endif
CSSWideKeyword::Initial => {
context.rule_cache_conditions.borrow_mut().set_uncacheable();
% if property.ident == "font_size":
longhands::font_size::cascade_initial_font_size(context);
% else:
@ -378,6 +377,9 @@
CSSWideKeyword::Unset |
% endif
CSSWideKeyword::Inherit => {
% if not property.style_struct.inherited:
context.rule_cache_conditions.borrow_mut().set_uncacheable();
% endif
% if property.ident == "font_size":
longhands::font_size::cascade_inherit_font_size(context);
% else: