Use PropertyId in per-property CSSStyleDeclaration accessors.

This commit is contained in:
Simon Sapin 2016-12-09 10:47:35 -10:00
parent 433c33c4df
commit dbc9fcc2de
2 changed files with 85 additions and 79 deletions

View file

@ -1985,17 +1985,17 @@ pub fn modify_style_for_inline_absolute_hypothetical_fragment(style: &mut Arc<Co
macro_rules! css_properties_accessors {
($macro_name: ident) => {
$macro_name! {
% for property in data.shorthands + data.longhands:
% if not property.derived_from and not property.internal:
% if '-' in property.name:
[${property.ident.capitalize()}, Set${property.ident.capitalize()}, "${property.name}"],
% for kind, props in [("Longhand", data.longhands), ("Shorthand", data.shorthands)]:
% for property in props:
% if not property.derived_from and not property.internal:
% if '-' in property.name:
[${property.ident.capitalize()}, Set${property.ident.capitalize()},
PropertyId::${kind}(${kind}Id::${property.camel_case})],
% endif
[${property.camel_case}, Set${property.camel_case},
PropertyId::${kind}(${kind}Id::${property.camel_case})],
% endif
% if property != data.longhands[-1]:
[${property.camel_case}, Set${property.camel_case}, "${property.name}"],
% else:
[${property.camel_case}, Set${property.camel_case}, "${property.name}"]
% endif
% endif
% endfor
% endfor
}
}