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

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

Issue 10542036: Use original WebKit IDL database for dart:html 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 | « lib/dom/scripts/generator.py ('k') | lib/dom/scripts/systemhtml.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/dom/scripts/systemfrog.py
diff --git a/lib/dom/scripts/systemfrog.py b/lib/dom/scripts/systemfrog.py
index 15c67a6571f483e1fbc21d248781d8655302a669..21faff5e75fae7cbd1c764324c93372c400dd4e6 100644
--- a/lib/dom/scripts/systemfrog.py
+++ b/lib/dom/scripts/systemfrog.py
@@ -162,21 +162,26 @@ class FrogInterfaceGenerator(BaseGenerator):
NAMEDCONSTRUCTOR=constructor_info.name or interface_name,
ARGUMENTS=constructor_info.ParametersAsArgumentList())
- def _NarrowToImplementationType(self, type_name):
+ def _ShouldNarrowToImplementationType(self, type_name):
# TODO(sra): Move into the 'system' and cache the result.
if type_name == 'EventListener':
# Callbacks are typedef functions so don't have a class.
- return type_name
+ return False
if self._system._database.HasInterface(type_name):
interface = self._system._database.GetInterface(type_name)
if RecognizeCallback(interface):
# Callbacks are typedef functions so don't have a class.
- return type_name
+ return False
elif type_name == 'MediaQueryListListener':
# Somewhat like a callback. See Issue 3338.
- return type_name
+ return False
else:
- return self._ImplClassName(type_name)
+ return True
+ return False
+
+ def _NarrowToImplementationType(self, type_name):
+ if self._ShouldNarrowToImplementationType(type_name):
+ return self._ImplClassName(type_name)
return type_name
def _NarrowInputType(self, type_name):
« no previous file with comments | « lib/dom/scripts/generator.py ('k') | lib/dom/scripts/systemhtml.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698