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

Side by Side Diff: pkg/third_party/html5lib/lib/src/tokenizer.dart

Issue 178303009: [html5lib] api updates: localName (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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
OLDNEW
1 library tokenizer; 1 library tokenizer;
2 2
3 import 'dart:collection'; 3 import 'dart:collection';
4 import 'package:html5lib/parser.dart' show HtmlParser; 4 import 'package:html5lib/parser.dart' show HtmlParser;
5 import 'package:source_maps/span.dart' show Span, FileSpan; 5 import 'package:source_maps/span.dart' show Span, FileSpan;
6 import 'constants.dart'; 6 import 'constants.dart';
7 import 'inputstream.dart'; 7 import 'inputstream.dart';
8 import 'token.dart'; 8 import 'token.dart';
9 import 'utils.dart'; 9 import 'utils.dart';
10 10
(...skipping 1269 matching lines...) Expand 10 before | Expand all | Expand 10 after
1280 break; 1280 break;
1281 } 1281 }
1282 } 1282 }
1283 if (matched) { 1283 if (matched) {
1284 currentToken = new DoctypeToken(correct: true); 1284 currentToken = new DoctypeToken(correct: true);
1285 state = doctypeState; 1285 state = doctypeState;
1286 return true; 1286 return true;
1287 } 1287 }
1288 } else if (charStack.last == "[" && 1288 } else if (charStack.last == "[" &&
1289 parser != null && parser.tree.openElements.length > 0 && 1289 parser != null && parser.tree.openElements.length > 0 &&
1290 parser.tree.openElements.last.namespace 1290 parser.tree.openElements.last.namespaceUri
1291 != parser.tree.defaultNamespace) { 1291 != parser.tree.defaultNamespace) {
1292 var matched = true; 1292 var matched = true;
1293 for (var expected in const ["C", "D", "A", "T", "A", "["]) { 1293 for (var expected in const ["C", "D", "A", "T", "A", "["]) {
1294 charStack.add(stream.char()); 1294 charStack.add(stream.char());
1295 if (charStack.last != expected) { 1295 if (charStack.last != expected) {
1296 matched = false; 1296 matched = false;
1297 break; 1297 break;
1298 } 1298 }
1299 } 1299 }
1300 if (matched) { 1300 if (matched) {
(...skipping 577 matching lines...) Expand 10 before | Expand all | Expand 10 after
1878 } 1878 }
1879 1879
1880 if (data.length > 0) { 1880 if (data.length > 0) {
1881 _addToken(new CharactersToken(data.join())); 1881 _addToken(new CharactersToken(data.join()));
1882 } 1882 }
1883 state = dataState; 1883 state = dataState;
1884 return true; 1884 return true;
1885 } 1885 }
1886 } 1886 }
1887 1887
OLDNEW
« no previous file with comments | « pkg/third_party/html5lib/lib/parser.dart ('k') | pkg/third_party/html5lib/lib/src/treebuilder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698