Make use of Node::ownerDocument a compile time error
The Node::document function is the one we should be using. Node::ownerDocument is only there to be part of the exported DOM binding for JavaScript.
Created attachment 209048 [details] Patch
Comment on attachment 209048 [details] Patch Clearing flags on attachment: 209048 Committed r154264: <http://trac.webkit.org/changeset/154264>
All reviewed patches have been landed. Closing bug.
View in context: https://bugs.webkit.org/attachment.cgi?id=209048&action=review > Source/WebCore/ChangeLog:27 > + Did not remove the null check at this time, although I'm pretty sure it's bogus. We can > + fix that when/if we change the return type of Element::document to a reference. Document& document()! That would be great, and propagates nicely to the rendering code, too.
(In reply to comment #5) > View in context: https://bugs.webkit.org/attachment.cgi?id=209048&action=review > > > Source/WebCore/ChangeLog:27 > > + Did not remove the null check at this time, although I'm pretty sure it's bogus. We can > > + fix that when/if we change the return type of Element::document to a reference. > > Document& document()! That would be great, and propagates nicely to the rendering code, too. Node::document() can’t return a reference because DocumentType objects don’t necessarily have a document. But any derived classes that are not base classes of DocumentType can change the function to return a reference.
Mass moving XML DOM bugs to the "DOM" Component.