Chromium Code Reviews| 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): |