[Webkit-unassigned] [Bug 73737] HIERARCHY_REQUEST_ERR check in checkAcceptChild should be optimized for newChild without children
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Dec 2 23:32:37 PST 2011
https://bugs.webkit.org/show_bug.cgi?id=73737
--- Comment #1 from Ryosuke Niwa <rniwa at webkit.org> 2011-12-02 23:32:37 PST ---
Diff I used to collect statistics for completeness:
Index: Source/WebCore/dom/Node.cpp
===================================================================
--- Source/WebCore/dom/Node.cpp (revision 101848)
+++ Source/WebCore/dom/Node.cpp (working copy)
@@ -1309,6 +1309,15 @@
// HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not allow children of the type of the
// newChild node, or if the node to append is one of this node's ancestors.
+ {
+ unsigned i = 0;
+ for (Node* node = newChild; node && i < 100; node = node->traverseNextNode(newChild))
+ i++;
+ if (i < 100)
+ fprintf(stderr, "inserting child with %d nodes\n", i);
+ else
+ fprintf(stderr, "inserting child with 100+ nodes\n");
+ }
if (newChild == newParent || newParent->isDescendantOf(newChild)) {
ec = HIERARCHY_REQUEST_ERR;
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list