mirror of
https://github.com/servo/servo.git
synced 2025-08-07 14:35:33 +01:00
style: Set writing mode dependency and uncacheable state only for non-inherited properties.
This commit is contained in:
parent
c34c92e904
commit
9230030daa
1 changed files with 4 additions and 2 deletions
|
@ -322,7 +322,7 @@
|
||||||
longhands::system_font::resolve_system_font(sf, context);
|
longhands::system_font::resolve_system_font(sf, context);
|
||||||
}
|
}
|
||||||
% endif
|
% endif
|
||||||
% if property.logical:
|
% if not property.style_struct.inherited and property.logical:
|
||||||
context.rule_cache_conditions.borrow_mut()
|
context.rule_cache_conditions.borrow_mut()
|
||||||
.set_writing_mode_dependency(context.builder.writing_mode);
|
.set_writing_mode_dependency(context.builder.writing_mode);
|
||||||
% endif
|
% endif
|
||||||
|
@ -367,7 +367,6 @@
|
||||||
CSSWideKeyword::Unset |
|
CSSWideKeyword::Unset |
|
||||||
% endif
|
% endif
|
||||||
CSSWideKeyword::Initial => {
|
CSSWideKeyword::Initial => {
|
||||||
context.rule_cache_conditions.borrow_mut().set_uncacheable();
|
|
||||||
% if property.ident == "font_size":
|
% if property.ident == "font_size":
|
||||||
longhands::font_size::cascade_initial_font_size(context);
|
longhands::font_size::cascade_initial_font_size(context);
|
||||||
% else:
|
% else:
|
||||||
|
@ -378,6 +377,9 @@
|
||||||
CSSWideKeyword::Unset |
|
CSSWideKeyword::Unset |
|
||||||
% endif
|
% endif
|
||||||
CSSWideKeyword::Inherit => {
|
CSSWideKeyword::Inherit => {
|
||||||
|
% if not property.style_struct.inherited:
|
||||||
|
context.rule_cache_conditions.borrow_mut().set_uncacheable();
|
||||||
|
% endif
|
||||||
% if property.ident == "font_size":
|
% if property.ident == "font_size":
|
||||||
longhands::font_size::cascade_inherit_font_size(context);
|
longhands::font_size::cascade_inherit_font_size(context);
|
||||||
% else:
|
% else:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue