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

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

Issue 23493006: Remove dart:utf in third_party. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Forgot to update pubspec. Created 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | pkg/third_party/html5lib/lib/src/char_encodings.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 * This library contains extra APIs that aren't in the DOM, but are useful 2 * This library contains extra APIs that aren't in the DOM, but are useful
3 * when interacting with the parse tree. 3 * when interacting with the parse tree.
4 */ 4 */
5 library dom_parsing; 5 library dom_parsing;
6 6
7 import 'dart:math'; 7 import 'dart:math';
8 import 'dart:utf' show codepointsToString; 8 import 'package:utf/utf.dart' show codepointsToString;
9 import 'dom.dart'; 9 import 'dom.dart';
10 10
11 /** A simple tree visitor for the DOM nodes. */ 11 /** A simple tree visitor for the DOM nodes. */
12 class TreeVisitor { 12 class TreeVisitor {
13 visit(Node node) { 13 visit(Node node) {
14 switch (node.nodeType) { 14 switch (node.nodeType) {
15 case Node.ELEMENT_NODE: return visitElement(node); 15 case Node.ELEMENT_NODE: return visitElement(node);
16 case Node.TEXT_NODE: return visitText(node); 16 case Node.TEXT_NODE: return visitText(node);
17 case Node.COMMENT_NODE: return visitComment(node); 17 case Node.COMMENT_NODE: return visitComment(node);
18 case Node.DOCUMENT_FRAGMENT_NODE: return visitDocumentFragment(node); 18 case Node.DOCUMENT_FRAGMENT_NODE: return visitDocumentFragment(node);
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 bool isVoidElement(String tagName) { 167 bool isVoidElement(String tagName) {
168 switch (tagName) { 168 switch (tagName) {
169 case "area": case "base": case "br": case "col": case "command": 169 case "area": case "base": case "br": case "col": case "command":
170 case "embed": case "hr": case "img": case "input": case "keygen": 170 case "embed": case "hr": case "img": case "input": case "keygen":
171 case "link": case "meta": case "param": case "source": case "track": 171 case "link": case "meta": case "param": case "source": case "track":
172 case "wbr": 172 case "wbr":
173 return true; 173 return true;
174 } 174 }
175 return false; 175 return false;
176 } 176 }
OLDNEW
« no previous file with comments | « no previous file | pkg/third_party/html5lib/lib/src/char_encodings.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698