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

Unified Diff: lib/dom/scripts/systemhtml.py

Issue 10696035: Extract common logic for element factory constructors generation. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 6 months 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 | lib/dom/scripts/systemnative.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/dom/scripts/systemhtml.py
diff --git a/lib/dom/scripts/systemhtml.py b/lib/dom/scripts/systemhtml.py
index 3800555967af8281bfe33f968fefdc57ef5d05f9..d019933407ff1c42c1d09990e783434b5345e74f 100644
--- a/lib/dom/scripts/systemhtml.py
+++ b/lib/dom/scripts/systemhtml.py
@@ -910,6 +910,14 @@ class HtmlDartInterfaceGenerator(BaseGenerator):
PARAMS=constructor_info.ParametersInterfaceDeclaration(
self._shared.DartType));
+ if infos:
+ EmitHtmlElementFactoryConstructors(
+ self._system._backend._EmitterForFactoryProviderBody(
+ infos[0].factory_provider_name),
+ infos,
+ self._html_interface_name,
+ self._backend.FactoryConstructorElementClassName())
+
element_type = MaybeTypedArrayElementTypeInHierarchy(
self._interface, self._system._database)
if element_type:
@@ -1047,6 +1055,9 @@ class HtmlFrogClassGenerator(FrogInterfaceGenerator):
self._html_interface_name = self._shared._HTMLInterfaceName(
self._interface.id)
+ def FactoryConstructorElementClassName(self):
Anton Muhin 2012/06/28 13:24:23 too long chain of nouns and I cannot decipher it,
podivilov 2012/06/29 13:53:39 Previously it was interface name in Dartium and im
+ return self._ImplClassName(self._html_interface_name)
+
def _ImplClassName(self, type_name):
return self._shared._ImplClassName(type_name)
@@ -1101,10 +1112,6 @@ class HtmlFrogClassGenerator(FrogInterfaceGenerator):
if constructor_info:
self._EmitFactoryProvider(constructor_info)
- infos = HtmlElementConstructorInfos(self._html_interface_name)
- if infos:
- self._EmitHtmlElementFactoryConstructors(infos)
-
emit_events, events = self._shared.GetEventAttributes(self._interface)
if not emit_events:
return
@@ -1135,13 +1142,6 @@ class HtmlFrogClassGenerator(FrogInterfaceGenerator):
NAMED_CONSTRUCTOR=constructor_info.name or self._html_interface_name,
ARGUMENTS=constructor_info.ParametersAsArgumentList())
- def _EmitHtmlElementFactoryConstructors(self, infos):
- EmitHtmlElementFactoryConstructors(
- self._system._EmitterForFactoryProviderBody(
- infos[0].factory_provider_name),
- infos,
- self._html_interface_name, self._class_name)
-
def AddIndexer(self, element_type):
"""Adds all the methods required to complete implementation of List."""
# We would like to simply inherit the implementation of everything except
« no previous file with comments | « no previous file | lib/dom/scripts/systemnative.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698