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

Side by Side Diff: packages/html/lib/dom_parsing.dart

Issue 1400473008: Roll Observatory packages and add a roll script (Closed) Base URL: git@github.com:dart-lang/observatory_pub_packages.git@master
Patch Set: Created 5 years, 2 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 | « packages/html/lib/dom.dart ('k') | packages/html/lib/parser.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 /// This library contains extra APIs that aren't in the DOM, but are useful 1 /// This library contains extra APIs that aren't in the DOM, but are useful
2 /// when interacting with the parse tree. 2 /// when interacting with the parse tree.
3 library dom_parsing; 3 library dom_parsing;
4 4
5 import 'dom.dart'; 5 import 'dom.dart';
6 import 'src/constants.dart' show rcdataElements; 6 import 'src/constants.dart' show rcdataElements;
7 7
8 /// A simple tree visitor for the DOM nodes. 8 /// A simple tree visitor for the DOM nodes.
9 class TreeVisitor { 9 class TreeVisitor {
10 visit(Node node) { 10 visit(Node node) {
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 final parent = node.parentNode; 194 final parent = node.parentNode;
195 if (parent is Element) { 195 if (parent is Element) {
196 var tag = parent.localName; 196 var tag = parent.localName;
197 if (rcdataElements.contains(tag) || tag == 'plaintext') { 197 if (rcdataElements.contains(tag) || tag == 'plaintext') {
198 str.write(node.data); 198 str.write(node.data);
199 return; 199 return;
200 } 200 }
201 } 201 }
202 str.write(htmlSerializeEscape(node.data)); 202 str.write(htmlSerializeEscape(node.data));
203 } 203 }
OLDNEW
« no previous file with comments | « packages/html/lib/dom.dart ('k') | packages/html/lib/parser.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698