Bug 40361 - Frame::findString does nothing on pages that prevent selection
Summary: Frame::findString does nothing on pages that prevent selection
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL: http://m.cnn.com
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2010-06-09 07:04 PDT by Mike Fenton
Modified: 2013-05-22 15:52 PDT (History)
7 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Fenton 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.
Comment 1 Alexey Proskuryakov 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.
Comment 2 Alexey Proskuryakov 2010-06-09 13:35:30 PDT
<rdar://problem/8076589>
Comment 3 Martin Kosiba 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.
Comment 4 Ryosuke Niwa 2011-11-14 10:54:40 PST
I think we should fix findString to handle this case as well.
Comment 5 Darin Adler 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.
Comment 6 Martin Kosiba 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.
Comment 7 Ryosuke Niwa 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.