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

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

Issue 10700112: _html_library_custom members are only custom in frog. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 5 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 | no next file » | 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 bceccb307a775356a10d7df559d1a8c9cf61853c..f3aec0ced4d1b4ed2306b31b2109d79337d3a1c1 100644
--- a/lib/dom/scripts/systemhtml.py
+++ b/lib/dom/scripts/systemhtml.py
@@ -271,15 +271,6 @@ _html_library_remove = set([
"Window.get:frameElement",
])
-_html_library_custom = set([
- 'IFrameElement.contentWindow',
- 'Window.document',
- 'Window.top',
- 'Window.location',
- 'Window.open',
- 'IDBDatabase.transaction',
- ])
-
# This map controls merging of interfaces in dart:html library.
# All constants, attributes, and operations of merged interface (key) are
# added to target interface (value). All references to the merged interface
@@ -1242,7 +1233,7 @@ class HtmlFrogClassGenerator(FrogInterfaceGenerator):
self._members_emitter.Emit(template, E=self._shared.DartType(element_type))
def AddAttribute(self, attribute, html_name, read_only):
- if self._shared.IsCustomInHtmlLibrary(self._interface, attribute.id):
+ if self._HasCustomImplementation(attribute.id):
return
if attribute.id != html_name:
@@ -1317,7 +1308,7 @@ class HtmlFrogClassGenerator(FrogInterfaceGenerator):
Arguments:
info: An OperationInfo object.
"""
- if self._shared.IsCustomInHtmlLibrary(self._interface, info.name):
+ if self._HasCustomImplementation(info.name):
return
html_name = self._shared.RenameInHtmlLibrary(
@@ -1348,6 +1339,18 @@ class HtmlFrogClassGenerator(FrogInterfaceGenerator):
PARAMS=info.ParametersImplementationDeclaration(
lambda type_name: self._NarrowInputType(type_name)))
+ def _HasCustomImplementation(self, member_name):
+ return '%s.%s' % (self._html_interface_name, member_name) in self._custom_members
Anton Muhin 2012/07/05 16:00:15 nit: class name instead of self should be preferre
+
+ _custom_members = set([
sra1 2012/07/06 07:20:11 Please keep these tables at the top of the file.
podivilov 2012/07/06 16:18:19 Done.
+ 'IFrameElement.contentWindow',
+ 'Window.document',
+ 'Window.top',
+ 'Window.location',
+ 'Window.open',
+ 'IDBDatabase.transaction',
+ ])
+
# ------------------------------------------------------------------------------
class HtmlFrogSystem(HtmlSystem):
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698