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

Unified Diff: sdk/lib/html/scripts/systemhtml.py

Issue 11413053: Remove _NodeListWrapper, make NodeList less special. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 1 month 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
Index: sdk/lib/html/scripts/systemhtml.py
diff --git a/sdk/lib/html/scripts/systemhtml.py b/sdk/lib/html/scripts/systemhtml.py
index 4f8600176e5c392c1dfe7a5b6a9b4c9217a116a4..8e2a2f19ecf598e3809fed9073232600599afd35 100644
--- a/sdk/lib/html/scripts/systemhtml.py
+++ b/sdk/lib/html/scripts/systemhtml.py
@@ -486,26 +486,21 @@ class Dart2JSBackend(HtmlDartGenerator):
' JS("void", "#[#] = #", this, index, value);\n',
TYPE=self._NarrowInputType(element_type))
else:
- # The HTML library implementation of NodeList has a custom indexed setter
- # implementation that uses the parent node the NodeList is associated
- # with if one is available.
- if self._interface.id != 'NodeList':
- self._members_emitter.Emit(
- '\n'
- ' void operator[]=(int index, $TYPE value) {\n'
- ' throw new UnsupportedError("Cannot assign element of immutable List.");\n'
- ' }\n',
- TYPE=self._NarrowInputType(element_type))
+ self._members_emitter.Emit(
+ '\n'
+ ' void operator[]=(int index, $TYPE value) {\n'
+ ' throw new UnsupportedError("Cannot assign element of immutable List.");\n'
+ ' }\n',
+ TYPE=self._NarrowInputType(element_type))
# TODO(sra): Use separate mixins for mutable implementations of List<T>.
# TODO(sra): Use separate mixins for typed array implementations of List<T>.
- if self._interface.id != 'NodeList':
- template_file = 'immutable_list_mixin.darttemplate'
- has_contains = any(op.id == 'contains' for op in self._interface.operations)
- template = self._template_loader.Load(
- template_file,
- {'DEFINE_CONTAINS': not has_contains})
- self._members_emitter.Emit(template, E=self._DartType(element_type))
+ template_file = 'immutable_list_mixin.darttemplate'
+ has_contains = any(op.id == 'contains' for op in self._interface.operations)
+ template = self._template_loader.Load(
+ template_file,
+ {'DEFINE_CONTAINS': not has_contains})
+ self._members_emitter.Emit(template, E=self._DartType(element_type))
def EmitAttribute(self, attribute, html_name, read_only):
if self._HasCustomImplementation(attribute.id):

Powered by Google App Engine
This is Rietveld 408576698