| Index: third_party/WebKit/Source/build/scripts/make_cssom_types.py
|
| diff --git a/third_party/WebKit/Source/build/scripts/make_cssom_types.py b/third_party/WebKit/Source/build/scripts/make_cssom_types.py
|
| index ee57c747ad5afd23d0b43b66c68b4b95296a3db4..d62cbcb759972a2053c30142c2dc4e319ff18c02 100755
|
| --- a/third_party/WebKit/Source/build/scripts/make_cssom_types.py
|
| +++ b/third_party/WebKit/Source/build/scripts/make_cssom_types.py
|
| @@ -11,6 +11,18 @@ from name_utilities import enum_for_css_keyword
|
| import template_expander
|
|
|
|
|
| +def number_metadata(number_type):
|
| + result = {}
|
| + result['integer'] = 'false'
|
| + result['allow_negative'] = 'true'
|
| + if number_type == 'Integer' or number_type == 'PositiveInteger':
|
| + result['integer'] = 'true'
|
| + if (number_type == 'PositiveInteger' or
|
| + number_type == 'PositiveNumber'):
|
| + result['allow_negative'] = 'false'
|
| + return result
|
| +
|
| +
|
| class CSSOMTypesWriter(css_properties.CSSProperties):
|
| def __init__(self, in_file_path):
|
| super(CSSOMTypesWriter, self).__init__(in_file_path)
|
| @@ -24,6 +36,13 @@ class CSSOMTypesWriter(css_properties.CSSProperties):
|
| types.append('CalcLength')
|
| elif singleType == 'Image':
|
| types.append('URLImage')
|
| + elif (singleType == 'Integer' or
|
| + singleType == 'PositiveInteger' or
|
| + singleType == 'PositiveNumber' or
|
| + singleType == 'Number'):
|
| + # Numbers are a special case since they
|
| + # require further validation.
|
| + property['number_metadata'] = number_metadata(singleType)
|
| else:
|
| types.append(singleType)
|
| property['typedom_types'] = types
|
|
|