Commit e5cb6961 authored by jochen@chromium.org's avatar jochen@chromium.org

Introduce new runtime feature state "deprecated" and use it for showModalDialog

The state is an alias for testing, however, it makes it easier to see
that the feature is slated for removal, not launch.

BUG=345831
R=abarth@chromium.org,eseidel@chromium.org,jamesr@chromium.org,atwilson@chromium.org

Review URL: https://codereview.chromium.org/335453007

git-svn-id: svn://svn.chromium.org/blink/trunk@176540 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent b312644a
...@@ -43,7 +43,7 @@ class RuntimeFeatureWriter(in_generator.Writer): ...@@ -43,7 +43,7 @@ class RuntimeFeatureWriter(in_generator.Writer):
# FIXME: valid_values and defaults should probably roll into one object. # FIXME: valid_values and defaults should probably roll into one object.
valid_values = { valid_values = {
'status': ['stable', 'experimental', 'test'], 'status': ['stable', 'experimental', 'test', 'deprecated'],
} }
defaults = { defaults = {
'condition' : None, 'condition' : None,
...@@ -52,6 +52,10 @@ class RuntimeFeatureWriter(in_generator.Writer): ...@@ -52,6 +52,10 @@ class RuntimeFeatureWriter(in_generator.Writer):
'status': None, 'status': None,
} }
_status_aliases = {
'deprecated': 'test',
}
def __init__(self, in_file_path): def __init__(self, in_file_path):
super(RuntimeFeatureWriter, self).__init__(in_file_path) super(RuntimeFeatureWriter, self).__init__(in_file_path)
self._outputs = {(self.class_name + '.h'): self.generate_header, self._outputs = {(self.class_name + '.h'): self.generate_header,
...@@ -62,6 +66,7 @@ class RuntimeFeatureWriter(in_generator.Writer): ...@@ -62,6 +66,7 @@ class RuntimeFeatureWriter(in_generator.Writer):
# Make sure the resulting dictionaries have all the keys we expect. # Make sure the resulting dictionaries have all the keys we expect.
for feature in self._features: for feature in self._features:
feature['first_lowered_name'] = lower_first(feature['name']) feature['first_lowered_name'] = lower_first(feature['name'])
feature['status'] = self._status_aliases.get(feature['status'], feature['status'])
# Most features just check their isFooEnabled bool # Most features just check their isFooEnabled bool
# but some depend on more than one bool. # but some depend on more than one bool.
enabled_condition = 'is%sEnabled' % feature['name'] enabled_condition = 'is%sEnabled' % feature['name']
...@@ -73,7 +78,7 @@ class RuntimeFeatureWriter(in_generator.Writer): ...@@ -73,7 +78,7 @@ class RuntimeFeatureWriter(in_generator.Writer):
def _feature_sets(self): def _feature_sets(self):
# Another way to think of the status levels is as "sets of features" # Another way to think of the status levels is as "sets of features"
# which is how we're referring to them in this generator. # which is how we're referring to them in this generator.
return self.valid_values['status'] return [status for status in self.valid_values['status'] if status not in self._status_aliases]
@template_expander.use_jinja(class_name + '.h.tmpl', filters=filters) @template_expander.use_jinja(class_name + '.h.tmpl', filters=filters)
def generate_header(self): def generate_header(self):
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
// status=stable -> Enable this in all Blink configurations. We are committed to these APIs indefinitely. // status=stable -> Enable this in all Blink configurations. We are committed to these APIs indefinitely.
// status=experimental -> In-progress features, Web Developers might play with, but are not on by default in stable. // status=experimental -> In-progress features, Web Developers might play with, but are not on by default in stable.
// status=test -> Enabled in ContentShell for testing, otherwise off. // status=test -> Enabled in ContentShell for testing, otherwise off.
// status=deprecated -> Alias for "test", will be removed at some point.
// Features without a status are not enabled anywhere by default. // Features without a status are not enabled anywhere by default.
// //
// "stable" features listed here should be rare, as anything which we've shipped stable // "stable" features listed here should be rare, as anything which we've shipped stable
...@@ -120,9 +121,8 @@ SharedWorker status=stable ...@@ -120,9 +121,8 @@ SharedWorker status=stable
PictureSizes status=experimental PictureSizes status=experimental
Picture status=experimental Picture status=experimental
// window.showModalDialog is deprecated and slated for removal from M36 // window.showModalDialog is deprecated and slated for removal. crbug.com/345831
// Once this ships to stable supporting code can be removed.crbug.com/345831 ShowModalDialog status=deprecated
ShowModalDialog status=stable
SpeechSynthesis status=stable SpeechSynthesis status=stable
Stream status=experimental Stream status=experimental
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment