| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |