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

Unified Diff: Source/core/dom/ContainerNode.cpp

Issue 307243004: Avoid calling slower Node::firstChild() / Node::lastChild() when possible (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 years, 6 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 | « no previous file | Source/core/dom/Node.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/ContainerNode.cpp
diff --git a/Source/core/dom/ContainerNode.cpp b/Source/core/dom/ContainerNode.cpp
index 16fc8bbcc342218fdf62f180eb325aa58ee22ec4..1a262c6e33b69273817bfa6d08822030f05932e6 100644
--- a/Source/core/dom/ContainerNode.cpp
+++ b/Source/core/dom/ContainerNode.cpp
@@ -108,7 +108,7 @@ bool ContainerNode::isChildTypeAllowed(const Node& child) const
if (!child.isDocumentFragment())
return childTypeAllowed(child.nodeType());
- for (Node* node = child.firstChild(); node; node = node->nextSibling()) {
+ for (Node* node = toDocumentFragment(child).firstChild(); node; node = node->nextSibling()) {
if (!childTypeAllowed(node->nodeType()))
return false;
}
« no previous file with comments | « no previous file | Source/core/dom/Node.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698