Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(369)

Side by Side Diff: Source/build/scripts/make_element_factory.py

Issue 60763002: Never create HTMLTrackElement when VideoTrack is not enabled (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: consistency Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | Source/build/scripts/templates/ElementFactory.cpp.tmpl » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (C) 2013 Google Inc. All rights reserved. 2 # Copyright (C) 2013 Google Inc. All rights reserved.
3 # 3 #
4 # Redistribution and use in source and binary forms, with or without 4 # Redistribution and use in source and binary forms, with or without
5 # modification, are permitted provided that the following conditions are 5 # modification, are permitted provided that the following conditions are
6 # met: 6 # met:
7 # 7 #
8 # * Redistributions of source code must retain the above copyright 8 # * Redistributions of source code must retain the above copyright
9 # notice, this list of conditions and the following disclaimer. 9 # notice, this list of conditions and the following disclaimer.
10 # * Redistributions in binary form must reproduce the above 10 # * Redistributions in binary form must reproduce the above
(...skipping 27 matching lines...) Expand all
38 38
39 class MakeElementFactoryWriter(MakeQualifiedNamesWriter): 39 class MakeElementFactoryWriter(MakeQualifiedNamesWriter):
40 defaults = dict(MakeQualifiedNamesWriter.default_parameters, **{ 40 defaults = dict(MakeQualifiedNamesWriter.default_parameters, **{
41 'JSInterfaceName': None, 41 'JSInterfaceName': None,
42 'constructorNeedsCreatedByParser': None, 42 'constructorNeedsCreatedByParser': None,
43 'constructorNeedsFormElement': None, 43 'constructorNeedsFormElement': None,
44 'contextConditional': None, 44 'contextConditional': None,
45 'interfaceName': None, 45 'interfaceName': None,
46 'mapToTagName': None, 46 'mapToTagName': None,
47 'noConstructor': None, 47 'noConstructor': None,
48 'wrapperOnlyIfMediaIsAvailable': None, 48 'runtimeEnabled': None,
49 }) 49 })
50 default_parameters = dict(MakeQualifiedNamesWriter.default_parameters, **{ 50 default_parameters = dict(MakeQualifiedNamesWriter.default_parameters, **{
51 'fallbackInterfaceName': '', 51 'fallbackInterfaceName': '',
52 'fallbackJSInterfaceName': '', 52 'fallbackJSInterfaceName': '',
53 }) 53 })
54 filters = MakeQualifiedNamesWriter.filters 54 filters = MakeQualifiedNamesWriter.filters
55 55
56 def __init__(self, in_file_paths, enabled_conditions): 56 def __init__(self, in_file_paths, enabled_conditions):
57 super(MakeElementFactoryWriter, self).__init__(in_file_paths, enabled_co nditions) 57 super(MakeElementFactoryWriter, self).__init__(in_file_paths, enabled_co nditions)
58 58
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 if tag['JSInterfaceName']: 112 if tag['JSInterfaceName']:
113 return tag['JSInterfaceName'] 113 return tag['JSInterfaceName']
114 return self._interface(tag) 114 return self._interface(tag)
115 115
116 def _has_js_interface(self, tag): 116 def _has_js_interface(self, tag):
117 return not tag['mapToTagName'] and not tag['noConstructor'] and self._js _interface(tag) != ('%sElement' % self.namespace) 117 return not tag['mapToTagName'] and not tag['noConstructor'] and self._js _interface(tag) != ('%sElement' % self.namespace)
118 118
119 119
120 if __name__ == "__main__": 120 if __name__ == "__main__":
121 in_generator.Maker(MakeElementFactoryWriter).main(sys.argv) 121 in_generator.Maker(MakeElementFactoryWriter).main(sys.argv)
OLDNEW
« no previous file with comments | « no previous file | Source/build/scripts/templates/ElementFactory.cpp.tmpl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698