RESOLVED FIXED 149490
Range's setStartBefore() / setStartAfter() / setEndBefore() / setEndAfter() do not match the specification
https://bugs.webkit.org/show_bug.cgi?id=149490
Summary Range's setStartBefore() / setStartAfter() / setEndBefore() / setEndAfter() d...
Chris Dumez
Reported 2015-09-22 20:51:57 PDT
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.
Attachments
Patch (26.91 KB, patch)
2015-09-22 20:58 PDT, Chris Dumez
no flags
Chris Dumez
Comment 1 2015-09-22 20:58:47 PDT
Andreas Kling
Comment 2 2015-09-23 04:27:30 PDT
Comment on attachment 261792 [details] Patch r=me
WebKit Commit Bot
Comment 3 2015-09-23 09:21:54 PDT
Comment on attachment 261792 [details] Patch Clearing flags on attachment: 261792 Committed r190174: <http://trac.webkit.org/changeset/190174>
WebKit Commit Bot
Comment 4 2015-09-23 09:21:59 PDT
All reviewed patches have been landed. Closing bug.
Chris Dumez
Comment 5 2015-09-24 16:58:59 PDT
*** Bug 148767 has been marked as a duplicate of this bug. ***
Radar WebKit Bug Importer
Comment 6 2015-09-28 11:41:09 PDT
Note You need to log in before you can comment on or make changes to this bug.