Chromium Code Reviews| Index: third_party/WebKit/Source/build/scripts/make_computed_style_base.py |
| diff --git a/third_party/WebKit/Source/build/scripts/make_computed_style_base.py b/third_party/WebKit/Source/build/scripts/make_computed_style_base.py |
| index 4c8b27ced7a3fddc5c0501bb3344a28959ebb64d..6182207b1c3bc0ae8ecdffa1f663e2445d4e6290 100755 |
| --- a/third_party/WebKit/Source/build/scripts/make_computed_style_base.py |
| +++ b/third_party/WebKit/Source/build/scripts/make_computed_style_base.py |
| @@ -88,6 +88,14 @@ def _create_enums(properties): |
| enum_name = property_['type_name'] |
| # From the Blink style guide: Enum members should use InterCaps with an initial capital letter. [names-enum-members] |
| enum_values = [('k' + camel_case(k)) for k in property_['keywords']] |
| + |
| + if enum_name in enums: |
| + # There's an enum with the same name, check if the enum values are the same |
| + assert set(enums[enum_name]) == set(enum_values), \ |
| + ("'{}' can't have type_name '{}' ".format(property_['name'], enum_name) + |
|
sashab
2017/02/07 02:59:27
Can you just use + property['name'] and + enum_nam
shend
2017/02/07 21:44:02
done.
|
| + "because it was used by a previous property, but with a different set of keywords. " |
| + "Either give it a different name or ensure the keywords are the same.") |
| + |
| enums[enum_name] = enum_values |
| return enums |