| Index: Source/core/scripts/make_style_shorthands.py
|
| diff --git a/Source/core/scripts/make_style_shorthands.py b/Source/core/scripts/make_style_shorthands.py
|
| index db5d1880e61962098d58283f14eae65e094cc2f2..c73de2fc7adb30edcf2963118c210e95129bc40d 100644
|
| --- a/Source/core/scripts/make_style_shorthands.py
|
| +++ b/Source/core/scripts/make_style_shorthands.py
|
| @@ -40,6 +40,7 @@ class StylePropertyShorthandWriter(in_generator.Writer):
|
|
|
| defaults = {
|
| 'longhands': "",
|
| + 'runtimeEnabledShorthand': None,
|
| }
|
|
|
| def __init__(self, in_files, enabled_conditions):
|
| @@ -61,6 +62,9 @@ class StylePropertyShorthandWriter(in_generator.Writer):
|
| longhand = self._create_css_property_name_enum_value(longhand)
|
| property["camel_case_longhands"].append(longhand)
|
| self._longhand_dictionary[longhand].append(property)
|
| + if property["runtimeEnabledShorthand"] is not None:
|
| + lowerFirstConditional = self._lower_first(property["runtimeEnabledShorthand"])
|
| + property["runtime_conditional_getter"] = "%sEnabled" % lowerFirstConditional
|
| self._properties = dict((property["property_id"], property) for property in self._properties)
|
|
|
| # FIXME: some of these might be better in a utils file
|
| @@ -70,6 +74,11 @@ class StylePropertyShorthandWriter(in_generator.Writer):
|
| def _create_css_property_name_enum_value(self, property_name):
|
| return "CSSProperty" + property_name
|
|
|
| + def _lower_first(self, string):
|
| + lowered = string[0].lower() + string[1:]
|
| + lowered = lowered.replace("cSS", "css")
|
| + return lowered
|
| +
|
| @template_expander.use_jinja("StylePropertyShorthand.cpp.tmpl")
|
| def generate_style_property_shorthand_cpp(self):
|
| return {
|
|
|