Closed Bug 1211894 Opened 9 years ago Closed 8 years ago

Throw on range.insertNode(range.startContainer)

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla51
Tracking Status
firefox51 --- fixed

People

(Reporter: ayg, Assigned: ayg)

Details

Attachments

(1 file)

See discussion at <https://github.com/whatwg/dom/issues/63>. The spec was just updated <https://github.com/whatwg/dom/commit/abad55d6bd76eda7b765a1eb5f6572e7a8af92dc> to change the behavior here, and a test update upstream is pending <https://github.com/w3c/web-platform-tests/pull/2227>. We should change to match the spec. The updated spec matches Chrome, so no compat issues are expected.
Try is green except for unexpected passes (fixed locally).
(need to review the spec change. not yet convinced it is a good change.)
Comment on attachment 8670262 [details] [diff] [review] Patch I disagree with the spec change.
Attachment #8670262 - Flags: review?(bugs)
I understand you disagree, but I think the exact behavior here is less important than getting to interop. IE has said they want to change, and WebKit/Blink already behave this way, so if we change we'll converge on common behavior. If we don't change then we have to persuade IE, WebKit, and Blink to match us, which doesn't seem like it's worth the effort. So could we please just follow the majority here and match the current spec even if you don't like it as much?
Flags: needinfo?(bugs)
Has Edge or IE changed the behavior? If not, we should push for the better and consistent API and not do this change.
Flags: needinfo?(bugs)
But if Edge has already changed the behavior, then fine, let's follow others.
these tests currently fail in Edge, so apparently the behaviour has not yet changed: http://w3c-test.org/dom/ranges/Range-insertNode.html example: http://i.imgur.com/d4yu2Bd.png
Olli, given <https://github.com/whatwg/dom/issues/63#issuecomment-238285079>, do you think we should change our behavior here?
Flags: needinfo?(bugs)
I can live with the change, and MS hasn't indicated they wouldn't change the behavior at some point.
Flags: needinfo?(bugs)
Attachment #8670262 - Flags: review?(bugs) → review+
Pushed by ayg@aryeh.name: https://hg.mozilla.org/integration/mozilla-inbound/rev/c11b9ebe7a2e Throw on range.insertNode(range.startContainer); r=smaug
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla51
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: