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

Unified Diff: dart/tools/dom/templates/html/impl/impl_HTMLSelectElement.darttemplate

Issue 12296011: Version 0.3.7.4 (Closed) Base URL: http://dart.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 10 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
Index: dart/tools/dom/templates/html/impl/impl_HTMLSelectElement.darttemplate
===================================================================
--- dart/tools/dom/templates/html/impl/impl_HTMLSelectElement.darttemplate (revision 18634)
+++ dart/tools/dom/templates/html/impl/impl_HTMLSelectElement.darttemplate (working copy)
@@ -11,16 +11,14 @@
// does not operate as a List.
List<OptionElement> get options {
var options = this.children.where((e) => e is OptionElement).toList();
- // TODO(floitsch): find better way to create a read-only list view.
- return options.take(options.length);
+ return new UnmodifiableListView<OptionElement>(options);
}
List<OptionElement> get selectedOptions {
// IE does not change the selected flag for single-selection items.
if (this.multiple) {
var options = this.options.where((o) => o.selected).toList();
- // TODO(floitsch): find better way to create a read-only list view.
- return options.take(options.length);
+ return new UnmodifiableListView<OptionElement>(options);
} else {
return [this.options[this.selectedIndex]];
}

Powered by Google App Engine
This is Rietveld 408576698