WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
4568
DOM tests expect hierarchy exception adding wrong types of nodes to parents
https://bugs.webkit.org/show_bug.cgi?id=4568
Summary
DOM tests expect hierarchy exception adding wrong types of nodes to parents
Darin Adler
Reported
2005-08-21 17:25:51 PDT
There are 4 tests in the W3C DOM Level 1 Core suite that are failing because we allow any node to have any parent: hc_attrappendchild2 hc_nodeappendchildinvalidnodetype hc_nodeinsertbeforeinvalidnodetype hc_nodereplacechildinvalidnodetype In the past I have been under the impression that any node could be put anywhere, mimicing the fact that XML allows any node to be anywhere. But the standard disagrees. We need to look into behavior of other browsers to see if we can implement this behavior without hurting anything. I think there's a chance that we might need to change the test for at least the attrappendchild2 test, which also fails in Firefox (the other tests succeed in Firefox, so it must be doing at least some checking of this type).
Attachments
Add attachment
proposed patch, testcase, etc.
Darin Adler
Comment 1
2005-08-30 21:53:16 PDT
Curt, do you have any insight into this issue?
Curt Arnold
Comment 2
2005-08-31 20:24:32 PDT
Section 1.1.1 of the DOM Core recommendation (
http://www.w3.org/TR/1998/REC-DOM
- Level-1-19981001/level-one-core.html#ID-1590626202) explicitly specifies the structure model and addresses both HTML and XML documents. XML does not allow any node to be anywhere. There is no means in XML to author a well-formed document where an attribute has a element as a child as is attempted in hc_attrappendchild2. The recommendation could have been written to allow infeasible structures and throw exception when attempting to serialize or other action that required a feasible document structure. However, section 1.1.1 and the definition and usage of HIERARCHY_REQUEST_ERR within the recommendation seem fairly clear that attempts to create a structurally infeasible document should result in an exception. I am overdue in preparing an updated test results matrix so that you can compare Safari's results with a large number of other implementations. I hope I can get to that tomorrow.
Vicki Murley
Comment 3
2005-10-05 15:46:21 PDT
<
rdar://problem/4288276
>
Vicki Murley
Comment 4
2005-10-25 13:50:13 PDT
Fixed.
Lucas Forschler
Comment 5
2019-02-06 09:03:22 PST
Mass moving XML DOM bugs to the "DOM" Component.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug