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

Side by Side Diff: utils/apidoc/mdn/extract.dart

Issue 14022007: Move Iterable implementation to collection. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Merge to head. Created 7 years, 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tests/language/factory3_test.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file.
4
5 import "dart:collection";
1 import 'dart:html'; 6 import 'dart:html';
2 import 'dart:json' as json; 7 import 'dart:json' as json;
3 8
4 // Workaround for HTML lib missing feature. 9 // Workaround for HTML lib missing feature.
5 Range newRange() { 10 Range newRange() {
6 return document.createRange(); 11 return document.createRange();
7 } 12 }
8 13
9 // Temporary range object to optimize performance computing client rects 14 // Temporary range object to optimize performance computing client rects
10 // from text nodes. 15 // from text nodes.
(...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after
470 } 475 }
471 476
472 static Node _leftMostDescendent(Node n) { 477 static Node _leftMostDescendent(Node n) {
473 while (n.nodes.length > 0) { 478 while (n.nodes.length > 0) {
474 n = n.nodes.first; 479 n = n.nodes.first;
475 } 480 }
476 return n; 481 return n;
477 } 482 }
478 } 483 }
479 484
480 class PostOrderTraversal extends Iterable<Node> { 485 class PostOrderTraversal extends IterableBase<Node> {
481 final Node _node; 486 final Node _node;
482 PostOrderTraversal(this._node); 487 PostOrderTraversal(this._node);
483 488
484 Iterator<Node> get iterator => new PostOrderTraversalIterator(_node); 489 Iterator<Node> get iterator => new PostOrderTraversalIterator(_node);
485 } 490 }
486 491
487 /** 492 /**
488 * Estimate what content represents the first line of text within the [section] 493 * Estimate what content represents the first line of text within the [section]
489 * range returning null if there isn't a plausible first line of text that 494 * range returning null if there isn't a plausible first line of text that
490 * contains the string [prop]. We measure the actual rendered client rectangle 495 * contains the string [prop]. We measure the actual rendered client rectangle
(...skipping 816 matching lines...) Expand 10 before | Expand all | Expand 10 after
1307 } 1312 }
1308 1313
1309 void documentLoaded(event) { 1314 void documentLoaded(event) {
1310 // Load the database of expected methods and properties with an HttpRequest. 1315 // Load the database of expected methods and properties with an HttpRequest.
1311 new HttpRequest.get('${window.location}.json', (req) { 1316 new HttpRequest.get('${window.location}.json', (req) {
1312 data = json.parse(req.responseText); 1317 data = json.parse(req.responseText);
1313 dbEntry = {'members': [], 'srcUrl': pageUrl}; 1318 dbEntry = {'members': [], 'srcUrl': pageUrl};
1314 run(); 1319 run();
1315 }); 1320 });
1316 } 1321 }
OLDNEW
« no previous file with comments | « tests/language/factory3_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698