mirror of
https://github.com/servo/servo.git
synced 2025-08-05 05:30:08 +01:00
Fix alias handling in properties.mako
This commit is contained in:
parent
c784bc6944
commit
8af81682dc
1 changed files with 4 additions and 2 deletions
|
@ -759,7 +759,9 @@ impl PropertyId {
|
||||||
use gecko_bindings::structs::*;
|
use gecko_bindings::structs::*;
|
||||||
<%
|
<%
|
||||||
def alias_to_nscsspropertyid(alias):
|
def alias_to_nscsspropertyid(alias):
|
||||||
return "nsCSSPropertyID_eCSSPropertyAlias_%s" % to_camel_case(alias)
|
if alias == "word-wrap":
|
||||||
|
return "nsCSSPropertyID_eCSSPropertyAlias_WordWrap"
|
||||||
|
return "nsCSSPropertyID::eCSSPropertyAlias_%s" % to_camel_case(alias)
|
||||||
def to_nscsspropertyid(ident):
|
def to_nscsspropertyid(ident):
|
||||||
if ident == "float":
|
if ident == "float":
|
||||||
ident = "float_"
|
ident = "float_"
|
||||||
|
@ -782,7 +784,7 @@ impl PropertyId {
|
||||||
}
|
}
|
||||||
% for alias in property.alias:
|
% for alias in property.alias:
|
||||||
${alias_to_nscsspropertyid(alias)} => {
|
${alias_to_nscsspropertyid(alias)} => {
|
||||||
Ok(PropertyId::Longhand(LonghandId::${property.camel_case}))
|
Ok(PropertyId::Shorthand(ShorthandId::${property.camel_case}))
|
||||||
}
|
}
|
||||||
% endfor
|
% endfor
|
||||||
% endfor
|
% endfor
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue