RESOLVED FIXED 60000
WebKit allows selection that crosses the shadow boundary of a readonly input element
https://bugs.webkit.org/show_bug.cgi?id=60000
Summary WebKit allows selection that crosses the shadow boundary of a readonly input ...
Ryosuke Niwa
Reported Tuesday, May 3, 2011 2:31:18 AM UTC
In the attached document, you can create a selection starting inside an input element and ending outside of the input element by a mouse drag.
Attachments
demo (90 bytes, text/html)
2011-05-02 18:31 PDT, Ryosuke Niwa
no flags
DRT test (3.54 KB, text/html)
2011-05-02 22:14 PDT, Ryosuke Niwa
no flags
fixes the bug (218.61 KB, patch)
2011-05-02 22:43 PDT, Ryosuke Niwa
no flags
fixed select-across-readonly-input-5.html (218.90 KB, patch)
2011-05-02 22:48 PDT, Ryosuke Niwa
no flags
Ryosuke Niwa
Comment 1 Tuesday, May 3, 2011 2:31:39 AM UTC
Alexey Proskuryakov
Comment 2 Tuesday, May 3, 2011 5:27:51 AM UTC
This is not a regression from Safari 5. I actually wonder if it's a bug or intended behavior.
Ryosuke Niwa
Comment 3 Tuesday, May 3, 2011 5:34:23 AM UTC
(In reply to comment #2) > This is not a regression from Safari 5. I actually wonder if it's a bug or intended behavior. I don't think this can be an intended behavior. SelectionController has a selection that crosses the shadow boundary.
Ryosuke Niwa
Comment 4 Tuesday, May 3, 2011 5:36:20 AM UTC
For what's worth, window.getSelection().toString() returns "" and baseNode and extentExtent of DOMSelection report incorrect nodes.
Alexey Proskuryakov
Comment 5 Tuesday, May 3, 2011 5:54:33 AM UTC
See also: bug 7275 (not very closely related).
Ryosuke Niwa
Comment 6 Tuesday, May 3, 2011 6:14:59 AM UTC
Created attachment 92046 [details] DRT test Here's a half-baked DRT test. I'm going to abandon this test and write a bunch of pixel tests because it can only indirectly check the behavior and it's not suitable as a regression test.
Ryosuke Niwa
Comment 7 Tuesday, May 3, 2011 6:43:46 AM UTC
Created attachment 92049 [details] fixes the bug
Ryosuke Niwa
Comment 8 Tuesday, May 3, 2011 6:48:16 AM UTC
Created attachment 92050 [details] fixed select-across-readonly-input-5.html
WebKit Commit Bot
Comment 9 Tuesday, May 3, 2011 11:12:31 PM UTC
The commit-queue encountered the following flaky tests while processing attachment 92050 [details]: http/tests/xmlhttprequest/cross-origin-authorization.html bug 52398 (author: ap@webkit.org) The commit-queue is continuing to process your patch.
WebKit Commit Bot
Comment 10 Tuesday, May 3, 2011 11:14:58 PM UTC
Comment on attachment 92050 [details] fixed select-across-readonly-input-5.html Clearing flags on attachment: 92050 Committed r85669: <http://trac.webkit.org/changeset/85669>
WebKit Commit Bot
Comment 11 Tuesday, May 3, 2011 11:15:05 PM UTC
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.