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

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

Issue 1984163002: Fix up CSSStyleDeclaration::cssText serialization (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@border
Patch Set: Created 4 years, 7 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/make_style_shorthands.py
diff --git a/third_party/WebKit/Source/build/scripts/make_style_shorthands.py b/third_party/WebKit/Source/build/scripts/make_style_shorthands.py
index 46d7fc78b82df05d481f68ba69749531bcc689d0..db13d4791b9940253c4e1ab48c541d1d9a7c6b53 100755
--- a/third_party/WebKit/Source/build/scripts/make_style_shorthands.py
+++ b/third_party/WebKit/Source/build/scripts/make_style_shorthands.py
@@ -54,6 +54,11 @@ class StylePropertyShorthandWriter(css_properties.CSSProperties):
property['longhand_property_ids'] = map(enum_for_css_property, property['longhands'].split(';'))
for longhand in property['longhand_property_ids']:
self._longhand_dictionary[longhand].append(property)
+ for longhands in self._longhand_dictionary.values():
+ # Sort first by number of longhands in decreasing order, then alphabetically
+ longhands.sort(
+ key=lambda property: (-len(property['longhand_property_ids']), property['name'])
+ )
@template_expander.use_jinja('StylePropertyShorthand.cpp.tmpl')
def generate_style_property_shorthand_cpp(self):

Powered by Google App Engine
This is Rietveld 408576698