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

Unified Diff: third_party/pkg/angular/lib/core_dom/node_cursor.dart

Issue 148453003: Updating Angular version (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 11 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: third_party/pkg/angular/lib/core_dom/node_cursor.dart
diff --git a/third_party/pkg/angular/lib/core_dom/node_cursor.dart b/third_party/pkg/angular/lib/core_dom/node_cursor.dart
index b95a2e81617da0b8b8345df4bb6d2d790ebd18e1..33fefd2d4f3353a5eac2e0d421636e4629095a48 100644
--- a/third_party/pkg/angular/lib/core_dom/node_cursor.dart
+++ b/third_party/pkg/angular/lib/core_dom/node_cursor.dart
@@ -3,7 +3,7 @@ part of angular.core.dom;
class NodeCursor {
List<dynamic> stack = [];
List<dom.Node> elements;
- num index;
+ int index;
NodeCursor(this.elements) : index = 0;
@@ -30,18 +30,12 @@ class NodeCursor {
nodeList() {
if (!isValid()) return []; // or should we return null?
- var nodes = [];
-
- for(var i = 0, ii = cursorSize(); i < ii; i++) {
- nodes.add(elements[index + i]);
- }
-
- return nodes;
+ return elements.sublist(index, index + cursorSize());
}
descend() {
var childNodes = elements[index].nodes;
- var hasChildren = !!(childNodes != null && childNodes.length > 0);
+ var hasChildren = childNodes != null && childNodes.length > 0;
if (hasChildren) {
stack.add(index);
« no previous file with comments | « third_party/pkg/angular/lib/core_dom/module.dart ('k') | third_party/pkg/angular/lib/core_dom/selector.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698