[Webkit-unassigned] [Bug 5264] document.createElementNS() should not allow to insert a second <html> element
bugzilla-daemon at opendarwin.org
bugzilla-daemon at opendarwin.org
Tue May 16 10:12:17 PDT 2006
http://bugzilla.opendarwin.org/show_bug.cgi?id=5264
darin at apple.com changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #8349|review? |review-
Flag| |
------- Comment #8 from darin at apple.com 2006-05-16 10:12 PDT -------
(From update of attachment 8349)
Getting better!
ChangeLog for LayoutTests needs to mention changes to test results, not just
newly added tests. Patch should include expected results for new tests as well
as the tests themselves.
And as long as I'm looking at this code for the third time, I suggest
tightening it a tiny bit:
+ case ELEMENT_NODE: {
+ // Documents may contain a maximum of one Element child
+ Node *c;
+ for (c = firstChild(); c; c = c->nextSibling()) {
+ if (c->isElementNode())
+ return false;
+ }
+ return true;
+ }
+ case DOCUMENT_TYPE_NODE: {
+ // Documents may contain a maximum of one DocumentType child
+ Node *c;
+ for (c = firstChild(); c; c = c->nextSibling()) {
+ if (c->nodeType() == DOCUMENT_TYPE_NODE)
+ return false;
+ }
+ return true;
+ }
Like this:
case DOCUMENT_TYPE_NODE:
case ELEMENT_NODE:
// Documents may contain a maximum of one child of each of these
types.
// (One Element child and one DocumentType child.)
for (Node* c = firstChild(); c; c = c->nextSibling())
if (c->nodeType() == type)
return false;
return true;
--
Configure bugmail: http://bugzilla.opendarwin.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the webkit-unassigned
mailing list