WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
99244
According to DOM4, all DocType nodes should have a document
https://bugs.webkit.org/show_bug.cgi?id=99244
Summary
According to DOM4, all DocType nodes should have a document
Adam Barth
Reported
2012-10-13 01:12:29 PDT
According to DOM4, all DocType nodes should have a document
Attachments
Work in progress
(2.99 KB, patch)
2012-10-13 01:12 PDT
,
Adam Barth
no flags
Details
Formatted Diff
Diff
Patch
(20.60 KB, patch)
2013-08-29 11:59 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Adam Barth
Comment 1
2012-10-13 01:12:44 PDT
Created
attachment 168546
[details]
Work in progress
Adam Barth
Comment 2
2012-10-13 01:13:28 PDT
Once this lands, this will simply a ton of special cases related to DocType nodes throughout WebCore.
Alexey Proskuryakov
Comment 3
2012-10-13 12:29:34 PDT
I suggest waiting until (and if) DOM 4 gains any official capacity. This is a direct violation of each and every official specification, and a working draft cannot override that.
Alexey Proskuryakov
Comment 4
2013-08-28 11:50:09 PDT
***
Bug 120425
has been marked as a duplicate of this bug. ***
Chris Dumez
Comment 5
2013-08-28 12:50:43 PDT
Alexey, based on your comment in the duplicate bug, I assume you are still not in favor of making this change?
Alexey Proskuryakov
Comment 6
2013-08-28 12:58:58 PDT
I think that it's crazy and destructive to change specs like this. I don't have much of an opinion on whether WebKit should accept this change at this point in time.
Darin Adler
Comment 7
2013-08-28 18:15:14 PDT
We can easily remove the tons of special cases in WebCore another way. There’s no harm in having the DocumentType have a document that is not visible to the web through the ownerDocument attribute. And document() can return that document.
Antti Koivisto
Comment 8
2013-08-29 05:36:04 PDT
We should do this. It fixes a hole in platform consistency and is obscure enough that it has virtually zero probability of breaking anything.
Chris Dumez
Comment 9
2013-08-29 05:39:33 PDT
I would be happy to port my Blink patch if the approach (same as DOM4) is accepted for WebKit:
https://src.chromium.org/viewvc/blink?revision=156581&view=revision
Let me know. I haven't done so yet because of Darin and Alexey's comments.
Chris Dumez
Comment 10
2013-08-29 05:44:13 PDT
(In reply to
comment #9
)
> I would be happy to port my Blink patch if the approach (same as DOM4) is accepted for WebKit: >
https://src.chromium.org/viewvc/blink?revision=156581&view=revision
> > Let me know. > I haven't done so yet because of Darin and Alexey's comments.
As explained in my duplicate bug, Firefox stable already ships with the behavior specified in DOM4.
Andreas Kling
Comment 11
2013-08-29 05:44:31 PDT
I think we should make this change. The invariant of every Node always has a Document is very valuable, and like Antti, I doubt anyone relies on this quirk. In fact, even if DOM4 hadn't changed, I *still* think we should be making the change.
Darin Adler
Comment 12
2013-08-29 10:28:22 PDT
Yes, I think fixing this DocumentType silliness is helpful and highly unlikely to be a compatibility problem despite the years of having a standard clearly stating it should work that way.
Darin Adler
Comment 13
2013-08-29 10:28:40 PDT
Don’t let my comment stand in your way!
Chris Dumez
Comment 14
2013-08-29 11:59:59 PDT
Created
attachment 210010
[details]
Patch
Chris Dumez
Comment 15
2013-08-29 12:17:50 PDT
Comment on
attachment 210010
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=210010&action=review
> Source/WebCore/dom/Node.h:404 > Document* document() const
I guess it would be nice to return a reference now. I would be happy to do that in a follow-up patch unless someone knows of a reason why we shouldn't.
Andreas Kling
Comment 16
2013-08-29 12:19:38 PDT
(In reply to
comment #15
)
> (From update of
attachment 210010
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=210010&action=review
> > > Source/WebCore/dom/Node.h:404 > > Document* document() const > > I guess it would be nice to return a reference now. I would be happy to do that in a follow-up patch unless someone knows of a reason why we shouldn't.
I already have a draft monster patch for doing this (it'll be >1MB) so you shouldn't waste your time doing the same thing. :)
Chris Dumez
Comment 17
2013-08-29 13:23:17 PDT
Comment on
attachment 210010
[details]
Patch Thanks for reviewing.
WebKit Commit Bot
Comment 18
2013-08-29 13:47:12 PDT
Comment on
attachment 210010
[details]
Patch Clearing flags on attachment: 210010 Committed
r154840
: <
http://trac.webkit.org/changeset/154840
>
WebKit Commit Bot
Comment 19
2013-08-29 13:47:16 PDT
All reviewed patches have been landed. Closing bug.
Lucas Forschler
Comment 20
2019-02-06 09:02:30 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