[webkit-dev] [DOMHTMLDocument doctype] always returning nil.

Matt Gough devlists at softchaos.com
Fri Apr 21 08:10:23 PDT 2006


Sometime since 418, the implementation of HTMLDocument::doctype was  
changed to:

DocumentType *HTMLDocument::doctype() const
{
     // According to a comment in dom_doc.cpp, doctype is null for  
HTML documents.
     return 0;
}


Firstly, where is dom_doc.cpp? It doesn't seem a part of WebKit/Core.

What is the comment and why is it deemed correct that doctype should  
be null for HTML documents?

Why do I care:

Well, I am writing some code to take a DOM (or portions thereof) and  
convert it back into a fairly self-contained HTML file. Without being  
able to reconstitute the correct <!DOCTYPE ...> I have no way of  
ensuring that quirks mode is set correctly when displaying the  
resulting html.

Is there any other way to determine this?

Matt Gough



More information about the webkit-dev mailing list