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

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

Issue 1310073003: Fix _first_enum_value usage on make_css_property_names.py (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 4 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
« no previous file with comments | « no previous file | Source/build/scripts/make_css_property_names.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/build/scripts/css_properties.py
diff --git a/Source/build/scripts/css_properties.py b/Source/build/scripts/css_properties.py
index 8b56877d4b39730f8ee0e1172cf53b0e73dc83ea..2f4ae99705ad51a300da03c7a86a76718caf0161 100755
--- a/Source/build/scripts/css_properties.py
+++ b/Source/build/scripts/css_properties.py
@@ -52,11 +52,12 @@ class CSSProperties(in_generator.Writer):
self._aliases = [property for property in properties if property['alias_for']]
properties = [property for property in properties if not property['alias_for']]
- # StylePropertyMetadata additionally assumes there are under 1024 properties.
- assert len(properties) < 512, 'Property aliasing expects there are under 512 properties.'
-
# We currently assign 0 to CSSPropertyInvalid
self._first_enum_value = 1
+
+ # StylePropertyMetadata additionally assumes there are under 1024 properties.
+ assert self._first_enum_value + len(properties) < 512, 'Property aliasing expects there are under 512 properties.'
+
for offset, property in enumerate(properties):
property['property_id'] = css_name_to_enum(property['name'])
property['upper_camel_name'] = camelcase_css_name(property['name'])
« no previous file with comments | « no previous file | Source/build/scripts/make_css_property_names.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698