mirror of
https://github.com/servo/servo.git
synced 2025-08-05 05:30:08 +01:00
Iterate through properties in priority order when computing keyframes
This is largely just a translation of Gecko's PropertyPriorityIterator[1] into rust with the exception that IDL sort order is only defined for shorthands since that's all we currently require. [1] http://searchfox.org/mozilla-central/rev/3a3af33f513071ea829debdfbc628caebcdf6996/dom/animation/KeyframeUtils.cpp#151
This commit is contained in:
parent
46ffcbaf7b
commit
8e7011da8a
3 changed files with 112 additions and 5 deletions
|
@ -46,6 +46,11 @@ def to_camel_case_lower(ident):
|
|||
return camel[0].lower() + camel[1:]
|
||||
|
||||
|
||||
# https://drafts.csswg.org/cssom/#css-property-to-idl-attribute
|
||||
def to_idl_name(ident):
|
||||
return re.sub("-([a-z])", lambda m: m.group(1).upper(), ident)
|
||||
|
||||
|
||||
def parse_aliases(value):
|
||||
aliases = {}
|
||||
for pair in value.split():
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue