NEW 40361
Frame::findString does nothing on pages that prevent selection
https://bugs.webkit.org/show_bug.cgi?id=40361
Summary Frame::findString does nothing on pages that prevent selection
Mike Fenton
Reported 2010-06-09 07:04:31 PDT
On pages that prevent selection, such as m.cnn.com, any calls to Frame::findString fail to mark any matches because the markers are tied directly to selection which is prevented. An alternate method for marking found text (perhaps using a document marker) should be used for all non-editable text.
Attachments
Alexey Proskuryakov
Comment 1 2010-06-09 13:35:03 PDT
Testing Cmd+F behavior on this page: Mac Safari 4.0.5: nothing is found. Mac Safari 5: all matches are found, but current match isn't highlighted, and Cmd+G is broken. Mac Safari 4.0.5 + ToT WebKit: Same as Safari 5.
Alexey Proskuryakov
Comment 2 2010-06-09 13:35:30 PDT
Martin Kosiba
Comment 3 2011-11-14 09:35:06 PST
You could use rangeOfString (which is what findString uses under the covers) as I've demonstrated here: https://bugs.webkit.org/show_bug.cgi?id=72281.
Ryosuke Niwa
Comment 4 2011-11-14 10:54:40 PST
I think we should fix findString to handle this case as well.
Darin Adler
Comment 5 2011-11-14 15:02:41 PST
Fixing Safari’s command-F behavior will be mostly Safari code changes. I don’t think this can be done as a pure WebKit fix.
Martin Kosiba
Comment 6 2011-11-15 03:53:47 PST
The most I can do is wrap up the "find and display results using markers" functionality to make the issue simpler to fix in other ports.
Ryosuke Niwa
Comment 7 2013-05-22 15:52:09 PDT
editing/text-iterator/findString-selection-disabled.html passes now. I'm not sure if we should also close this bug or not.
Note You need to log in before you can comment on or make changes to this bug.