Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(145)

Unified Diff: third_party/WebKit/Source/build/scripts/css_properties.py

Issue 2620233002: Add 'priority' key to CSSProperties.in (Closed)
Patch Set: There goes most of my patch ;) Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/build/scripts/css_properties.py
diff --git a/third_party/WebKit/Source/build/scripts/css_properties.py b/third_party/WebKit/Source/build/scripts/css_properties.py
index e2015500bbda2b7e01bd2eb0e91e28829791579a..66069fc5652a3716afafa4abf46089f6dd24d327 100755
--- a/third_party/WebKit/Source/build/scripts/css_properties.py
+++ b/third_party/WebKit/Source/build/scripts/css_properties.py
@@ -31,6 +31,7 @@ class CSSProperties(in_generator.Writer):
'custom_value': False,
'builder_skip': False,
'direction_aware': False,
+ 'priority': 2,
'api_class': None,
# Generated ComputedStyle annotations.
'field_storage_type': None,
@@ -62,6 +63,10 @@ class CSSProperties(in_generator.Writer):
in_generator.Writer.__init__(self, file_paths)
properties = self.in_file.name_dictionaries
+
+ # Sort properties by priority, then alphabetically.
+ properties.sort(key=lambda p: (int(p['priority']), name_utilities.strip_webkit_prefix(p['name'])))
alancutter (OOO until 2018) 2017/01/11 03:24:20 This sorting key has collisions between different
sashab 2017/01/11 03:57:44 Done. Added check for sorting key collisions.
+
self._aliases = [property for property in properties if property['alias_for']]
properties = [property for property in properties if not property['alias_for']]

Powered by Google App Engine
This is Rietveld 408576698