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

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..ff6f4bab07613c919d28048ef5df9f1e3dc22097 100644
--- a/lib/dom/scripts/systemhtml.py
+++ b/lib/dom/scripts/systemhtml.py
@@ -271,7 +271,7 @@ _html_library_remove = set([
"Window.get:frameElement",
])
-_html_library_custom = set([
+_js_custom_members = set([
'IFrameElement.contentWindow',
'Window.document',
'Window.top',
@@ -1242,7 +1242,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 +1317,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 +1348,10 @@ class HtmlFrogClassGenerator(FrogInterfaceGenerator):
PARAMS=info.ParametersImplementationDeclaration(
lambda type_name: self._NarrowInputType(type_name)))
+ def _HasCustomImplementation(self, member_name):
+ member_name = '%s.%s' % (self._html_interface_name, member_name)
+ return member_name in _js_custom_members
+
# ------------------------------------------------------------------------------
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