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

Unified Diff: tools/dom/templates/html/impl/impl_Node.darttemplate

Issue 12817003: Change getRange to sublist. Make getRange deprecated. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed review comments Created 7 years, 9 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: tools/dom/templates/html/impl/impl_Node.darttemplate
diff --git a/tools/dom/templates/html/impl/impl_Node.darttemplate b/tools/dom/templates/html/impl/impl_Node.darttemplate
index ad6c2db606631fed1e92e30c1182017ce2cab760..8f091cc460d3d8c943822ad5de59a35f8935040a 100644
--- a/tools/dom/templates/html/impl/impl_Node.darttemplate
+++ b/tools/dom/templates/html/impl/impl_Node.darttemplate
@@ -244,8 +244,13 @@ $endif
throw new UnsupportedError(
"Cannot insertRange on immutable List.");
}
+ List<Node> sublist(int start, [int end]) {
+ if (end == null) end == length;
+ return Lists.getRange(this, start, end, <Node>[]);
+ }
+
List<Node> getRange(int start, int rangeLength) =>
- Lists.getRange(this, start, rangeLength, <Node>[]);
+ sublist(start, start + rangeLength);
// -- end List<Node> mixins.

Powered by Google App Engine
This is Rietveld 408576698