[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
kocienda
kocienda at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 08:48:56 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 01c7cfca153e301046cafc02b30bfdd3a7372273
Author: kocienda <kocienda at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Jul 6 22:07:11 2004 +0000
Reviewed by Hyatt
Fix for this bug:
<rdar://problem/3672377> assertion failure in AppendNodeCommandImpl::doApply
due to non-0 exception code trying to insert a DIV markup string
The solution was to revert to the code that was rolled out, and removing
the child checks from NodeImpl::checkAddChild. However, this time, I added
code very similar to this check into the code that runs while HTML is
being parsed to build up tables. This code relies on child-add failure
to ensure the proper construction of well-formed tables (as gross as that
sounds), so the check needs to be retained there. No other code seems to
be so affected. Layout tests are unchanged by this patch.
* khtml/html/html_tableimpl.cpp:
(HTMLTableElementImpl::addChild):
* khtml/xml/dom_nodeimpl.cpp:
(NodeImpl::checkAddChild):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@6966 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 7496d72..e189257 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,5 +1,27 @@
2004-07-06 Ken Kocienda <kocienda at apple.com>
+ Reviewed by Hyatt
+
+ Fix for this bug:
+
+ <rdar://problem/3672377> assertion failure in AppendNodeCommandImpl::doApply
+ due to non-0 exception code trying to insert a DIV markup string
+
+ The solution was to revert to the code that was rolled out, and removing
+ the child checks from NodeImpl::checkAddChild. However, this time, I added
+ code very similar to this check into the code that runs while HTML is
+ being parsed to build up tables. This code relies on child-add failure
+ to ensure the proper construction of well-formed tables (as gross as that
+ sounds), so the check needs to be retained there. No other code seems to
+ be so affected. Layout tests are unchanged by this patch.
+
+ * khtml/html/html_tableimpl.cpp:
+ (HTMLTableElementImpl::addChild):
+ * khtml/xml/dom_nodeimpl.cpp:
+ (NodeImpl::checkAddChild):
+
+2004-07-06 Ken Kocienda <kocienda at apple.com>
+
Reviewed by John
Simple change. I switched the arguments of the appendNode helper function
diff --git a/WebCore/khtml/html/html_tableimpl.cpp b/WebCore/khtml/html/html_tableimpl.cpp
index bac182c..42e03bd 100644
--- a/WebCore/khtml/html/html_tableimpl.cpp
+++ b/WebCore/khtml/html/html_tableimpl.cpp
@@ -316,6 +316,18 @@ NodeImpl *HTMLTableElementImpl::addChild(NodeImpl *child)
return this;
}
+ // check node allowed
+ if (child->nodeType() == Node::DOCUMENT_FRAGMENT_NODE) {
+ // child is a DocumentFragment... check all its children instead of child itself
+ for (NodeImpl *c = child->firstChild(); c; c = c->nextSibling())
+ if (!childAllowed(c))
+ return 0;
+ }
+ else if (!childAllowed(child)) {
+ // child is not a DocumentFragment... check if it's allowed directly
+ return 0;
+ }
+
int exceptioncode = 0;
NodeImpl *retval = appendChild( child, exceptioncode );
if ( retval ) {
diff --git a/WebCore/khtml/xml/dom_nodeimpl.cpp b/WebCore/khtml/xml/dom_nodeimpl.cpp
index 5eac558..a2a3488 100644
--- a/WebCore/khtml/xml/dom_nodeimpl.cpp
+++ b/WebCore/khtml/xml/dom_nodeimpl.cpp
@@ -1026,25 +1026,6 @@ void NodeImpl::checkAddChild(NodeImpl *newChild, int &exceptioncode)
return;
}
- // check node allowed
- if (newChild->nodeType() == Node::DOCUMENT_FRAGMENT_NODE) {
- // newChild is a DocumentFragment... check all it's children instead of newChild itself
- NodeImpl *child;
- for (child = newChild->firstChild(); child; child = child->nextSibling()) {
- if (!childAllowed(child)) {
- exceptioncode = DOMException::HIERARCHY_REQUEST_ERR;
- return;
- }
- }
- }
- else {
- // newChild is not a DocumentFragment... check if it's allowed directly
- if(!childAllowed(newChild)) {
- exceptioncode = DOMException::HIERARCHY_REQUEST_ERR;
- return;
- }
- }
-
// only do this once we know there won't be an exception
if (shouldAdoptChild) {
KJS::ScriptInterpreter::updateDOMObjectDocument(newChild, newChild->getDocument(), getDocument());
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list