From 9230030daaedb11d741d2a3398e4191767633ce4 Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Wed, 13 Sep 2017 15:58:49 +0800 Subject: [PATCH] style: Set writing mode dependency and uncacheable state only for non-inherited properties. --- components/style/properties/helpers.mako.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/components/style/properties/helpers.mako.rs b/components/style/properties/helpers.mako.rs index 4db6053375f..2b6218ee4fe 100644 --- a/components/style/properties/helpers.mako.rs +++ b/components/style/properties/helpers.mako.rs @@ -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: