RESOLVED INVALID Bug 78887
Node.cloneNode's deep parameter should default to true
https://bugs.webkit.org/show_bug.cgi?id=78887
Summary Node.cloneNode's deep parameter should default to true
Vineet Chaudhary (vineetc)
Reported 2012-02-17 02:29:27 PST
Attachments
proposed patch (4.44 KB, patch)
2012-02-17 02:34 PST, Vineet Chaudhary (vineetc)
abarth: review-
Vineet Chaudhary (vineetc)
Comment 1 2012-02-17 02:34:54 PST
Created attachment 127561 [details] proposed patch Proposed patch.
Vineet Chaudhary (vineetc)
Comment 2 2012-02-17 02:35:18 PST
Alexey Proskuryakov
Comment 3 2012-02-17 09:28:55 PST
In WebKit, the argument is already optional, so the bug title is confusing. Is the part in parentheses what you are actually changing here? Unlike for Mozilla, defaulting to true changes behavior to exact opposite of what we had. Can the spec be fixed to match long-standing WebKit behavior instead?
Adam Barth
Comment 4 2012-02-17 10:49:13 PST
Comment on attachment 127561 [details] proposed patch We should ask for the spec to change to our existing behavior.
Aryeh Gregor
Comment 5 2012-02-20 09:07:13 PST
Testing: IE10 Developer Preview and Chrome 18 dev default to false. Firefox 13.0a1 and Opera Next 12.00 alpha throw exceptions due to too few arguments. So false is correct. I've updated the spec: http://dvcs.w3.org/hg/domcore/rev/f2d97e6f5cf1 Thanks for the feedback.
Alexey Proskuryakov
Comment 6 2012-02-20 09:12:15 PST
Thank you. This renders the bug invalid.
Aryeh Gregor
Comment 7 2012-02-20 09:40:43 PST
Anne and Ms2ger objected to my spec change, so I reverted it. I started a thread on www-dom. Implementer feedback would be highly appreciated: http://lists.w3.org/Archives/Public/www-dom/2012JanMar/0084.html
Alexey Proskuryakov
Comment 8 2012-02-20 10:15:01 PST
Feedback sent. We should consider diverging from DOM 4 even if it ends up specifying different behavior.
Alexey Proskuryakov
Comment 9 2012-05-14 13:49:16 PDT
*** Bug 86377 has been marked as a duplicate of this bug. ***
Ryosuke Niwa
Comment 10 2013-07-18 21:03:56 PDT
Alexey Proskuryakov
Comment 11 2013-07-19 09:36:34 PDT
Crazy. What is the value of specs if they can be changed to no longer match implementations, all for purely aesthetic reasons?
Ryosuke Niwa
Comment 12 2013-07-19 10:30:20 PDT
(In reply to comment #11) > Crazy. What is the value of specs if they can be changed to no longer match implementations, all for purely aesthetic reasons? Matches Firefox behavior now.
Alexey Proskuryakov
Comment 13 2013-07-19 10:33:50 PDT
It does now after a Firefox change. But WebKit was 100% compliant before, and Firefox wasn't compliant with either spec version.
Anne van Kesteren
Comment 14 2013-07-19 13:49:59 PDT
100% compliant seems dubious given that the argument was only recently made optional in the specification. That WebKit would simply use undefined as an implicit default everywhere was unfortunate, but given that nobody else did that I don't think we should have automatically accepted that as precedent as it's pretty bad API-wise.
Alexey Proskuryakov
Comment 15 2013-07-19 13:58:56 PDT
Anne, I think that you are talking about implementation details here. Observable behavior is that behavior of cloneNode() in WebKit was and remains compliant to DOM3, and DOM4 was written to specify something that did not match any browser.
Anne van Kesteren
Comment 16 2013-07-19 14:11:08 PDT
Whether your throw or not for omitted non-optional arguments is not an implementation detail. Before Web IDL bindings were badly defined, but that does not mean that how WebKit decided to the bindings needs to be the standard. If you think it should be, I hope you understand this is the wrong forum.
Anne van Kesteren
Comment 17 2013-10-21 07:10:08 PDT
Note You need to log in before you can comment on or make changes to this bug.