Bug 78887 - Node.cloneNode's deep parameter should default to true
: Node.cloneNode's deep parameter should default to true
Status: RESOLVED INVALID
: WebKit
HTML DOM
: 528+ (Nightly build)
: Unspecified Unspecified
: P2 Normal
Assigned To:
: http://dvcs.w3.org/hg/domcore/raw-fil...
:
:
:
  Show dependency treegraph
 
Reported: 2012-02-17 02:29 PST by
Modified: 2013-10-21 07:10 PST (History)


Attachments
proposed patch (4.44 KB, patch)
2012-02-17 02:34 PST, Vineet Chaudhary (vineetc)
abarth: review-
Review Patch | Details | Formatted Diff | Diff


Note

You need to log in before you can comment on or make changes to this bug.


------- Comment #1 From 2012-02-17 02:34:54 PST -------
Created an attachment (id=127561) [details]
proposed patch

Proposed patch.
------- Comment #2 From 2012-02-17 02:35:18 PST -------
See also : https://bugzilla.mozilla.org/show_bug.cgi?id=698381
------- Comment #3 From 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?
------- Comment #4 From 2012-02-17 10:49:13 PST -------
(From update of attachment 127561 [details])
We should ask for the spec to change to our existing behavior.
------- Comment #5 From 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.
------- Comment #6 From 2012-02-20 09:12:15 PST -------
Thank you. This renders the bug invalid.
------- Comment #7 From 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
------- Comment #8 From 2012-02-20 10:15:01 PST -------
Feedback sent. We should consider diverging from DOM 4 even if it ends up specifying different behavior.
------- Comment #9 From 2012-05-14 13:49:16 PST -------
*** Bug 86377 has been marked as a duplicate of this bug. ***
------- Comment #10 From 2013-07-18 21:03:56 PST -------
Blink changed its behavior in https://chromium.googlesource.com/chromium/blink/+/76c4cbdf9823988c787f3625365e2f25a325a172.
------- Comment #11 From 2013-07-19 09:36:34 PST -------
Crazy. What is the value of specs if they can be changed to no longer match implementations, all for purely aesthetic reasons?
------- Comment #12 From 2013-07-19 10:30:20 PST -------
(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.
------- Comment #13 From 2013-07-19 10:33:50 PST -------
It does now after a Firefox change. But WebKit was 100% compliant before, and Firefox wasn't compliant with either spec version.
------- Comment #14 From 2013-07-19 13:49:59 PST -------
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.
------- Comment #15 From 2013-07-19 13:58:56 PST -------
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.
------- Comment #16 From 2013-07-19 14:11:08 PST -------
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.
------- Comment #17 From 2013-10-21 07:10:08 PST -------
See https://github.com/whatwg/dom/commit/70fdc5f9030c22c5ceca9e875e06f8b305529ef8

Sadness.