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

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

Issue 11187063: Generate contains() method for list mixin only if not already defined. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 2 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/html/dartium/html_dartium.dart ('k') | lib/html/scripts/systemnative.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/html/scripts/systemhtml.py
diff --git a/lib/html/scripts/systemhtml.py b/lib/html/scripts/systemhtml.py
index ec157338dbdc8476489cfc730e5eaba93705824a..697cbab8f6e4063dd49c8bb568e8a1750839888c 100644
--- a/lib/html/scripts/systemhtml.py
+++ b/lib/html/scripts/systemhtml.py
@@ -698,7 +698,10 @@ class Dart2JSBackend(object):
# TODO(sra): Use separate mixins for typed array implementations of List<T>.
if self._interface.id != 'NodeList':
template_file = 'immutable_list_mixin.darttemplate'
- template = self._template_loader.Load(template_file)
+ 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 AddAttribute(self, attribute, html_name, read_only):
« no previous file with comments | « lib/html/dartium/html_dartium.dart ('k') | lib/html/scripts/systemnative.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698