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

Unified Diff: Source/build/scripts/make_element_factory.py

Issue 66643004: Remove QualifiedName argument from most HTMLElement::create functions (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Source/build/scripts/templates/ElementFactory.cpp.tmpl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/build/scripts/make_element_factory.py
diff --git a/Source/build/scripts/make_element_factory.py b/Source/build/scripts/make_element_factory.py
index 017e47d0aaaefb53343f44445f0cce0fa5baaf11..4ca2fc10c4b81d16a92799999d0792e5b1e313ee 100755
--- a/Source/build/scripts/make_element_factory.py
+++ b/Source/build/scripts/make_element_factory.py
@@ -69,10 +69,19 @@ class MakeElementFactoryWriter(MakeQualifiedNamesWriter):
fallback_interface = self.tags_in_file.parameters['fallbackInterfaceName'].strip('"')
fallback_js_interface = self.tags_in_file.parameters['fallbackJSInterfaceName'].strip('"') or fallback_interface
- for tag in self._template_context['tags']:
+ interface_counts = {}
+ tags = self._template_context['tags']
+ for tag in tags:
tag['has_js_interface'] = self._has_js_interface(tag)
tag['js_interface'] = self._js_interface(tag)
tag['interface'] = self._interface(tag)
+ if tag['interface'] not in interface_counts:
+ interface_counts[tag['interface']] = 1
+ else:
+ interface_counts[tag['interface']] += 1
abarth-chromium 2013/11/09 01:54:50 There's some fancier Pythony way of doing this.
adamk 2013/11/11 20:33:28 Found two ways to do this. defaultdict seems to be
+
+ for tag in tags:
+ tag['multipleTagNames'] = interface_counts[tag['interface']] > 1
self._template_context.update({
'fallback_interface': fallback_interface,
« 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