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

Unified Diff: sdk/lib/html/html_common/filtered_element_list.dart

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: sdk/lib/html/html_common/filtered_element_list.dart
diff --git a/sdk/lib/html/html_common/filtered_element_list.dart b/sdk/lib/html/html_common/filtered_element_list.dart
index d1d516c938230c5c16d32f3fbf65cc86a94dc274..5c07fe12f6c4341af501a6b554a550f73dd50afb 100644
--- a/sdk/lib/html/html_common/filtered_element_list.dart
+++ b/sdk/lib/html/html_common/filtered_element_list.dart
@@ -80,7 +80,7 @@ class FilteredElementList implements List {
}
void removeRange(int start, int rangeLength) {
- _filtered.getRange(start, rangeLength).forEach((el) => el.remove());
+ _filtered.sublist(start, start + rangeLength).forEach((el) => el.remove());
}
void insertRange(int start, int rangeLength, [initialValue = null]) {
@@ -174,8 +174,10 @@ class FilteredElementList implements List {
int get length => _filtered.length;
Element operator [](int index) => _filtered[index];
Iterator<Element> get iterator => _filtered.iterator;
+ List<Element> sublist(int start, [int end]) =>
+ _filtered.sublist(start, end);
List<Element> getRange(int start, int rangeLength) =>
- _filtered.getRange(start, rangeLength);
+ sublist(start, start + rangeLength);
int indexOf(Element element, [int start = 0]) =>
_filtered.indexOf(element, start);

Powered by Google App Engine
This is Rietveld 408576698