Range's setStartBefore() / setStartAfter() / setEndBefore() / setEndAfter() do not match the specification: - https://dom.spec.whatwg.org/#dom-range-setstartbefore - https://dom.spec.whatwg.org/#dom-range-setstartafter - https://dom.spec.whatwg.org/#dom-range-setendbefore - https://dom.spec.whatwg.org/#dom-range-setendafter In particular, instead of step 2: "If parent is null, throw an InvalidNodeTypeError exception." Our implementation does more checks and throws exceptions in cases that the specification does not say we should. Firefox's behavior matches the specification.
Created attachment 261792 [details] Patch
Comment on attachment 261792 [details] Patch r=me
Comment on attachment 261792 [details] Patch Clearing flags on attachment: 261792 Committed r190174: <http://trac.webkit.org/changeset/190174>
All reviewed patches have been landed. Closing bug.
*** Bug 148767 has been marked as a duplicate of this bug. ***
<rdar://problem/22882522>