[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
Sun May 14 17:28:03 PDT 2006


darin at apple.com changed:

           What    |Removed                     |Added
   Attachment #8310|review?                     |review-
               Flag|                            |

------- Comment #4 from darin at apple.com  2006-05-14 17:28 PDT -------
(From update of attachment 8310)
Despite its name, I don't think it's good to reuse the parsing function,
childAllowed, for uses other than in the parser.

This change alone would leave the code in a very confused state about when
childAllowed is called, when checkAddChild is called, and when childTypeAllowed
is called.

For clarity we should probably rename at least some of the three functions.

On the other hand, the code in Document::childAllowed is clearly good to run
even when not parsing. If we decide we want that logic all the time, then we
should change that logic to be type-based and move it into
Document::childTypeAllowed. Since all the code does is check if the new child
is an element, and then if its type is DOCUMENT_TYPE_NODE, I think the code
could be adapted that way.

Also need a layout test, of course, and some documentation about what WinIE and
Firefox do in these cases.

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