RESOLVED FIXED 44598
DOM Selection: collapseToStart() and collapseToEnd() should throw INVALID_STATE_ERR if there's no selection
https://bugs.webkit.org/show_bug.cgi?id=44598
Summary DOM Selection: collapseToStart() and collapseToEnd() should throw INVALID_STA...
Andreas Kling
Reported 2010-08-25 03:39:03 PDT
Selection.collapseToStart() and Selection.collapseToEnd() should throw INVALID_STATE_ERR if no selection is made. This would cause us to pass the following test on IE Test Center: http://samples.msdn.microsoft.com/ietestcenter/html5/selection/emptyselection_invalidStateErr.htm Spec links: http://www.whatwg.org/specs/web-apps/current-work/#dom-selection-collapsetostart http://www.whatwg.org/specs/web-apps/current-work/#dom-selection-collapsetoend
Attachments
Proposed patch (6.58 KB, patch)
2010-08-25 03:42 PDT, Andreas Kling
no flags
Andreas Kling
Comment 1 2010-08-25 03:42:31 PDT
Created attachment 65396 [details] Proposed patch
Alexey Proskuryakov
Comment 2 2010-08-25 09:57:03 PDT
Do these raise an exception in Firefox? Raising exceptions where we didn't use to can be a significant compatibility issue, because if any page depended on the old behavior, it often stops working completely.
Andreas Kling
Comment 3 2010-08-25 10:03:02 PDT
(In reply to comment #2) > Do these raise an exception in Firefox? No, only IE9 implements this behavior so far AFAIK.
Andreas Kling
Comment 4 2010-09-01 03:23:30 PDT
Comment on attachment 65396 [details] Proposed patch Clearing flags on attachment: 65396 Committed r66590: <http://trac.webkit.org/changeset/66590>
Andreas Kling
Comment 5 2010-09-01 03:23:40 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.