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

Unified Diff: pkg/third_party/html5lib/lib/parser.dart

Issue 268623002: [html5lib] implement querySelector/querySelectorAll (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/third_party/html5lib/lib/dom_parsing.dart ('k') | pkg/third_party/html5lib/lib/src/constants.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/third_party/html5lib/lib/parser.dart
diff --git a/pkg/third_party/html5lib/lib/parser.dart b/pkg/third_party/html5lib/lib/parser.dart
index 2d04f8e8abb41303f1e3199f345cd127b6bdfef2..721985abecf8e166d6a2e49695524af819f9a574 100644
--- a/pkg/third_party/html5lib/lib/parser.dart
+++ b/pkg/third_party/html5lib/lib/parser.dart
@@ -1313,8 +1313,8 @@ class InBodyPhase extends Phase {
tree.openElements[1].localName != "body")) {
assert(parser.innerHTMLMode);
} else if (parser.framesetOK) {
- if (tree.openElements[1].parent != null) {
- tree.openElements[1].parent.nodes.remove(tree.openElements[1]);
+ if (tree.openElements[1].parentNode != null) {
+ tree.openElements[1].parentNode.nodes.remove(tree.openElements[1]);
}
while (tree.openElements.last.localName != "html") {
tree.openElements.removeLast();
@@ -1840,7 +1840,7 @@ class InBodyPhase extends Phase {
}
// Step 6.5
//cite = node.parent
- var clone = node.clone();
+ var clone = node.clone(false);
// Replace node with clone
tree.activeFormattingElements[
tree.activeFormattingElements.indexOf(node)] = clone;
@@ -1849,8 +1849,8 @@ class InBodyPhase extends Phase {
// Step 6.6
// Remove lastNode from its parents, if any
- if (lastNode.parent != null) {
- lastNode.parent.nodes.remove(lastNode);
+ if (lastNode.parentNode != null) {
+ lastNode.parentNode.nodes.remove(lastNode);
}
node.nodes.add(lastNode);
// Step 7.7
@@ -1862,8 +1862,8 @@ class InBodyPhase extends Phase {
// Foster parent lastNode if commonAncestor is a
// table, tbody, tfoot, thead, or tr we need to foster parent the
// lastNode
- if (lastNode.parent != null) {
- lastNode.parent.nodes.remove(lastNode);
+ if (lastNode.parentNode != null) {
+ lastNode.parentNode.nodes.remove(lastNode);
}
if (const ["table", "tbody", "tfoot", "thead", "tr"].contains(
@@ -1875,7 +1875,7 @@ class InBodyPhase extends Phase {
}
// Step 8
- var clone = formattingElement.clone();
+ var clone = formattingElement.clone(false);
// Step 9
furthestBlock.reparentChildren(clone);
« no previous file with comments | « pkg/third_party/html5lib/lib/dom_parsing.dart ('k') | pkg/third_party/html5lib/lib/src/constants.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698