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

Side by Side Diff: lib/src/treebuilder.dart

Issue 1312363005: Add Element.endSourceSpan (Closed) Base URL: https://github.com/dart-lang/html@master
Patch Set: Created 5 years, 3 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
« no previous file with comments | « lib/parser.dart ('k') | test/parser_feature_test.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 /// Internals to the tree builders. 1 /// Internals to the tree builders.
2 library treebuilder; 2 library treebuilder;
3 3
4 import 'dart:collection'; 4 import 'dart:collection';
5 import 'package:html/dom.dart'; 5 import 'package:html/dom.dart';
6 import 'package:html/parser.dart' show getElementNameTuple; 6 import 'package:html/parser.dart' show getElementNameTuple;
7 import 'package:source_span/source_span.dart'; 7 import 'package:source_span/source_span.dart';
8 import 'constants.dart'; 8 import 'constants.dart';
9 import 'list_proxy.dart'; 9 import 'list_proxy.dart';
10 import 'token.dart'; 10 import 'token.dart';
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 final String defaultNamespace; 71 final String defaultNamespace;
72 72
73 Document document; 73 Document document;
74 74
75 final List<Element> openElements = <Element>[]; 75 final List<Element> openElements = <Element>[];
76 76
77 final activeFormattingElements = new ActiveFormattingElements(); 77 final activeFormattingElements = new ActiveFormattingElements();
78 78
79 Node headPointer; 79 Node headPointer;
80 80
81 Node formPointer; 81 Element formPointer;
82 82
83 /// Switch the function used to insert an element from the 83 /// Switch the function used to insert an element from the
84 /// normal one to the misnested table one and back again 84 /// normal one to the misnested table one and back again
85 bool insertFromTable; 85 bool insertFromTable;
86 86
87 TreeBuilder(bool namespaceHTMLElements) 87 TreeBuilder(bool namespaceHTMLElements)
88 : defaultNamespace = namespaceHTMLElements ? Namespaces.html : null { 88 : defaultNamespace = namespaceHTMLElements ? Namespaces.html : null {
89 reset(); 89 reset();
90 } 90 }
91 91
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
399 Document getDocument() => document; 399 Document getDocument() => document;
400 400
401 /// Return the final fragment. 401 /// Return the final fragment.
402 DocumentFragment getFragment() { 402 DocumentFragment getFragment() {
403 //XXX assert innerHTML 403 //XXX assert innerHTML
404 var fragment = new DocumentFragment(); 404 var fragment = new DocumentFragment();
405 openElements[0].reparentChildren(fragment); 405 openElements[0].reparentChildren(fragment);
406 return fragment; 406 return fragment;
407 } 407 }
408 } 408 }
OLDNEW
« no previous file with comments | « lib/parser.dart ('k') | test/parser_feature_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698