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

Side by Side Diff: pkg/third_party/html5lib/lib/dom.dart

Issue 157983005: pkg/third_party/html5lib: lots of cleanup (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: const Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | pkg/third_party/html5lib/lib/dom_parsing.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /** 1 /**
2 * A simple tree API that results from parsing html. Intended to be compatible 2 * A simple tree API that results from parsing html. Intended to be compatible
3 * with dart:html, but right now it resembles the classic JS DOM. 3 * with dart:html, but right now it resembles the classic JS DOM.
4 */ 4 */
5 library dom; 5 library dom;
6 6
7 import 'dart:collection'; 7 import 'dart:collection';
8 import 'package:source_maps/span.dart' show FileSpan; 8 import 'package:source_maps/span.dart' show FileSpan;
9 9
10 import 'src/constants.dart'; 10 import 'src/constants.dart';
11 import 'src/list_proxy.dart'; 11 import 'src/list_proxy.dart';
12 import 'src/token.dart'; 12 import 'src/token.dart';
13 import 'src/tokenizer.dart'; 13 import 'src/tokenizer.dart';
14 import 'src/treebuilder.dart';
15 import 'src/utils.dart'; 14 import 'src/utils.dart';
16 import 'dom_parsing.dart'; 15 import 'dom_parsing.dart';
17 import 'parser.dart'; 16 import 'parser.dart';
18 17
19 // TODO(jmesserly): this needs to be replaced by an AttributeMap for attributes 18 // TODO(jmesserly): this needs to be replaced by an AttributeMap for attributes
20 // that exposes namespace info. 19 // that exposes namespace info.
21 class AttributeName implements Comparable { 20 class AttributeName implements Comparable {
22 /** The namespace prefix, e.g. `xlink`. */ 21 /** The namespace prefix, e.g. `xlink`. */
23 final String prefix; 22 final String prefix;
24 23
(...skipping 839 matching lines...) Expand 10 before | Expand all | Expand 10 after
864 if (start == null) start = length - 1; 863 if (start == null) start = length - 1;
865 return _filtered.lastIndexOf(element, start); 864 return _filtered.lastIndexOf(element, start);
866 } 865 }
867 866
868 Element get first => _filtered.first; 867 Element get first => _filtered.first;
869 868
870 Element get last => _filtered.last; 869 Element get last => _filtered.last;
871 870
872 Element get single => _filtered.single; 871 Element get single => _filtered.single;
873 } 872 }
OLDNEW
« no previous file with comments | « no previous file | pkg/third_party/html5lib/lib/dom_parsing.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698