WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED INVALID
17091
doctype.ownerDocument is null after creation (Acid3 bug)
https://bugs.webkit.org/show_bug.cgi?id=17091
Summary
doctype.ownerDocument is null after creation (Acid3 bug)
Eric Seidel (no email)
Reported
2008-01-30 00:53:21 PST
doctype.ownerDocument is null after creation (Acid3 bug) This should be an easy fix. Test 98: expected: [object HTMLDocument], got: null - doctype's ownerDocument was wrong after creation function () { // test 98: XHTML and the DOM // (special test) var doctype = document.implementation.createDocumentType("html", "-//W3C//DTD XHTML 1.0 Strict//EN", "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd
"); assertEquals(doctype.ownerDocument, document, "doctype's ownerDocument was wrong after creation"); var doc = document.implementation.createDocument("
http://www.w3.org/1999/xhtml
", "html", doctype); doc.documentElement.appendChild(doc.createElementNS("
http://www.w3.org/1999/xhtml
", "head")); doc.documentElement.appendChild(doc.createElementNS("
http://www.w3.org/1999/xhtml
", "body")); var t = doc.createElementNS("
http://www.w3.org/1999/xhtml
", "title"); doc.documentElement.firstChild.appendChild(t); // ok we have a conforming XHTML1 doc in |doc| now. assertEquals(doctype.ownerDocument, doc, "doctype's ownerDocument didn't change when it was assigned to another document"); assertEquals(doc.title, "", "document had unexpected title"); t.textContent = "Sparrow"; assertEquals(doc.title, "Sparrow", "document.title did not update dynamically"); doc.body.appendChild(doc.createElementNS("
http://www.w3.org/1999/xhtml
", "form")); assertEquals(doc.forms.length, 1, "document.forms not updated after inserting a form"); return 7; },
Attachments
Add attachment
proposed patch, testcase, etc.
Eric Seidel (no email)
Comment 1
2008-01-30 01:00:26 PST
Hum... // Returns the DOM ownerDocument attribute. This method never returns NULL, except in the case // of (1) a Document node or (2) a DocumentType node that is not used with any Document yet. virtual Document* ownerDocument() const;
Eric Seidel (no email)
Comment 2
2008-01-30 01:05:58 PST
This test is clearly wrong according to the DOM Level 2 Core spec:
http://www.w3.org/TR/DOM-Level-2-Core/core.html#Level-2-Core-DOM-createDocType
Ian, if you agree (and plan to change the test) feel free to close this INVALID.
Ian 'Hixie' Hickson
Comment 3
2008-01-30 11:44:40 PST
I fixed this yesterday, shortly after adding the test. Sorry for the confusion.
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