Index: Source/build/scripts/css_properties.py |
diff --git a/Source/build/scripts/css_properties.py b/Source/build/scripts/css_properties.py |
index 83f2196354da92aabd215692ec1fcef6216ec9e5..a500f400d1acff61fc7f372dd8204e5e0c8e0b6d 100755 |
--- a/Source/build/scripts/css_properties.py |
+++ b/Source/build/scripts/css_properties.py |
@@ -9,6 +9,7 @@ from name_utilities import lower_first |
class CSSProperties(in_generator.Writer): |
defaults = { |
+ 'alias_for': None, |
'longhands': '', |
'font': False, |
'svg': False, |
@@ -24,6 +25,7 @@ class CSSProperties(in_generator.Writer): |
'custom_inherit': False, |
'custom_value': False, |
'builder_skip': False, |
+ 'builder_unreachable': False, |
alancutter (OOO until 2018)
2014/08/11 05:02:22
Unused flag.
Timothy Loh
2014/08/12 01:49:42
Done.
|
'direction_aware': False, |
} |
@@ -35,6 +37,7 @@ class CSSProperties(in_generator.Writer): |
'custom_inherit': (True, False), |
'custom_value': (True, False), |
'builder_skip': (True, False), |
+ 'builder_unreachable': (True, False), |
'direction_aware': (True, False), |
} |
@@ -43,10 +46,18 @@ class CSSProperties(in_generator.Writer): |
properties = self.in_file.name_dictionaries |
- for property in properties: |
+ self._aliases = {property['name']: property['alias_for'] for property in properties if property['alias_for']} |
+ properties = [property for property in properties if not property['alias_for']] |
+ |
+ assert len(properties) <= 1024, 'There are more than 1024 CSS Properties, you need to update CSSProperty.h/StylePropertyMetadata m_propertyID accordingly.' |
+ # We currently assign 0 to CSSPropertyInvalid |
+ self._first_enum_value = 1 |
+ for offset, property in enumerate(properties): |
property['property_id'] = css_name_to_enum(property['name']) |
property['upper_camel_name'] = camelcase_css_name(property['name']) |
property['lower_camel_name'] = lower_first(property['upper_camel_name']) |
+ property['enum_value'] = self._first_enum_value + offset |
+ property['is_internal'] = property['name'].startswith('-internal-') |
self._properties_list = properties |
self._properties = {property['property_id']: property for property in properties} |