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

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: Hack for XML prefix 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') | Source/core/dom/Element.h » ('J')
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 75cd7746b3f30f83b02ef86d713782dbe63af92e..2890ea6580649e29cd060e259d9c59afdeddfe94 100755
--- a/Source/build/scripts/make_element_factory.py
+++ b/Source/build/scripts/make_element_factory.py
@@ -28,6 +28,7 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import sys
+from collections import defaultdict
import in_generator
import template_expander
@@ -68,10 +69,16 @@ 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 = defaultdict(int)
+ 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)
+ interface_counts[tag['interface']] += 1
+
+ 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') | Source/core/dom/Element.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698