Delegate logical bitfield setters to physical to fix cascade (fixes #14222)

This commit is contained in:
Manish Goregaokar 2016-11-14 23:53:14 -08:00
parent 3b2e3dcfb9
commit 3cab0e6919
2 changed files with 27 additions and 5 deletions

View file

@ -207,11 +207,17 @@
}
_ => panic!("entered the wrong cascade_property() implementation"),
};
% if property.logical:
let wm = context.style.writing_mode;
% endif
<% maybe_wm = "wm" if property.logical else "" %>
<% maybe_physical = "_physical" if property.logical else "" %>
% if not property.derived_from:
if seen.get_${property.ident}() {
if seen.get${maybe_physical}_${property.ident}(${maybe_wm}) {
return
}
seen.set_${property.ident}();
seen.set${maybe_physical}_${property.ident}(${maybe_wm});
{
let custom_props = context.style().custom_properties();
::properties::substitute_variables_${property.ident}(
@ -221,9 +227,6 @@
cascade_info.on_cascade_property(&declaration,
&value);
}
% if property.logical:
let wm = context.style.writing_mode;
% endif
<% maybe_wm = ", wm" if property.logical else "" %>
match *value {
DeclaredValue::Value(ref specified_value) => {