Bug 31779 - QWebPage::findText() does not clear selection when passed empty string
Summary: QWebPage::findText() does not clear selection when passed empty string
Status: CLOSED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Qt (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P3 Normal
Assignee: QtWebKit Unassigned
URL:
Keywords: Qt, QtTriaged
Depends on:
Blocks:
 
Reported: 2009-11-21 19:51 PST by Mark Turney
Modified: 2011-04-19 05:15 PDT (History)
10 users (show)

See Also:


Attachments
running example of the bug in question (708 bytes, text/x-c++src)
2009-11-21 19:51 PST, Mark Turney
no flags Details
proposed patch (2.66 KB, patch)
2010-06-08 12:50 PDT, Pierre Rossi
no flags Details | Formatted Diff | Diff
Argh, my Changelog really had no style at all! (2.67 KB, patch)
2010-06-08 12:57 PDT, Pierre Rossi
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Turney 2009-11-21 19:51:08 PST
Created attachment 43670 [details]
running example of the bug in question

The text within the Qt documentation for QWebPage::findText() states that "To clear the selection, just pass an empty string.".  When an empty string is passed into this method as demonstrated by the included cpp file, QWebPage::findText() fails to clear the selection.

This bug was tested in 4.6-RC1 on Linux64.
Comment 1 Rion 2010-01-13 14:28:41 PST
the same for 4.6.0 release.
Comment 2 Dawit A. 2010-03-03 15:12:52 PST
FYI... Clearing of the selection will work correctly for the text highlighted when the HighlightAllOccurrances flag is set so long as you specify this very same flag when you calling the function with an empty string...
Comment 3 Benjamin Poulain 2010-03-05 15:50:15 PST
Same with trunk.
Comment 4 Pierre Rossi 2010-06-08 12:50:45 PDT
Created attachment 58169 [details]
proposed patch
Comment 5 WebKit Review Bot 2010-06-08 12:52:40 PDT
Attachment 58169 [details] did not pass style-queue:

Failed to run "['WebKitTools/Scripts/check-webkit-style', '--no-squash']" exit_code: 1
WebKit/qt/ChangeLog:5:  Line contains tab character.  [whitespace/tab] [5]
WebKit/qt/ChangeLog:6:  Line contains tab character.  [whitespace/tab] [5]
WARNING: File exempt from style guide. Skipping: "WebKit/qt/Api/qwebpage.cpp"
WARNING: File exempt from style guide. Skipping: "WebKit/qt/tests/qwebpage/tst_qwebpage.cpp"
Total errors found: 2 in 3 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 6 Pierre Rossi 2010-06-08 12:57:51 PDT
Created attachment 58172 [details]
Argh, my Changelog really had no style at all!
Comment 7 WebKit Commit Bot 2010-06-09 21:39:50 PDT
Comment on attachment 58172 [details]
Argh, my Changelog really had no style at all!

Clearing flags on attachment: 58172

Committed r60935: <http://trac.webkit.org/changeset/60935>
Comment 8 WebKit Commit Bot 2010-06-09 21:39:59 PDT
All reviewed patches have been landed.  Closing bug.
Comment 9 Simon Hausmann 2010-06-13 14:12:02 PDT
Revision r60935 cherry-picked into qtwebkit-2.0 with commit 0f8941d0dd5f947530e1dc55b859d810bba14764