Title: [109332] releases/WebKitGTK/webkit-1.8/Source/WebKit2
Diff
Modified: releases/WebKitGTK/webkit-1.8/Source/WebKit2/ChangeLog (109331 => 109332)
--- releases/WebKitGTK/webkit-1.8/Source/WebKit2/ChangeLog 2012-03-01 11:43:31 UTC (rev 109331)
+++ releases/WebKitGTK/webkit-1.8/Source/WebKit2/ChangeLog 2012-03-01 11:43:41 UTC (rev 109332)
@@ -1,3 +1,24 @@
+2012-02-29 Sergio Villar Senin <[email protected]>
+
+ DidFindString should be emitted even if FindOptionsShowOverlay is not enabled
+ https://bugs.webkit.org/show_bug.cgi?id=76522
+
+ Reviewed by Darin Adler.
+
+ DidFindString message should be issued always even if neither
+ FindOptionsShowOverlay or FindOptionsShowHighlight are
+ provided. The difference is that if any of those flags are present
+ the find operation will look for all the appearances of the text
+ in the web view, otherwise it will just look and report the next
+ occurrence.
+
+ This patch removes the temporary workaround added in r109222 to
+ the WebKitFindController unit tests.
+
+ * UIProcess/API/gtk/tests/TestWebKitFindController.cpp:
+ * WebProcess/WebPage/FindController.cpp:
+ (WebKit::FindController::findString):
+
2012-01-19 Sergio Villar Senin <[email protected]>
[GTK] [WK2] Add Find API
Modified: releases/WebKitGTK/webkit-1.8/Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitFindController.cpp (109331 => 109332)
--- releases/WebKitGTK/webkit-1.8/Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitFindController.cpp 2012-03-01 11:43:31 UTC (rev 109331)
+++ releases/WebKitGTK/webkit-1.8/Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitFindController.cpp 2012-03-01 11:43:41 UTC (rev 109332)
@@ -45,12 +45,6 @@
void find(const char* searchText, guint32 findOptions, guint maxMatchCount)
{
- // Due to http://weakit.org/b/76522 we have to artificially
- // add here the show overlay option (that we do not even
- // expose in the API) to get the DidFindString messsage
- // issued. Remove this once 76522 is fixed.
- findOptions = findOptions | 1 << 5;
-
g_signal_connect(m_findController.get(), "found-text", G_CALLBACK(foundTextCallback), this);
g_signal_connect(m_findController.get(), "failed-to-find-text", G_CALLBACK(failedToFindTextCallback), this);
webkit_find_controller_search(m_findController.get(), searchText, findOptions, maxMatchCount);
Modified: releases/WebKitGTK/webkit-1.8/Source/WebKit2/WebProcess/WebPage/FindController.cpp (109331 => 109332)
--- releases/WebKitGTK/webkit-1.8/Source/WebKit2/WebProcess/WebPage/FindController.cpp 2012-03-01 11:43:31 UTC (rev 109331)
+++ releases/WebKitGTK/webkit-1.8/Source/WebKit2/WebProcess/WebPage/FindController.cpp 2012-03-01 11:43:41 UTC (rev 109332)
@@ -109,24 +109,25 @@
m_webPage->send(Messages::WebPageProxy::DidFailToFindString(string));
} else {
shouldShowOverlay = options & FindOptionsShowOverlay;
+ bool shouldShowHighlight = options & FindOptionsShowHighlight;
+ unsigned matchCount = 1;
- if (shouldShowOverlay) {
- bool shouldShowHighlight = options & FindOptionsShowHighlight;
+ if (shouldShowOverlay || shouldShowHighlight) {
if (maxMatchCount == numeric_limits<unsigned>::max())
--maxMatchCount;
-
- unsigned matchCount = m_webPage->corePage()->markAllMatchesForText(string, core(options), shouldShowHighlight, maxMatchCount + 1);
+ matchCount = m_webPage->corePage()->markAllMatchesForText(string, core(options), shouldShowHighlight, maxMatchCount + 1);
+
// Check if we have more matches than allowed.
if (matchCount > maxMatchCount) {
shouldShowOverlay = false;
matchCount = static_cast<unsigned>(kWKMoreThanMaximumMatchCount);
}
-
- m_webPage->send(Messages::WebPageProxy::DidFindString(string, matchCount));
}
+ m_webPage->send(Messages::WebPageProxy::DidFindString(string, matchCount));
+
if (!(options & FindOptionsShowFindIndicator) || !updateFindIndicator(selectedFrame, shouldShowOverlay)) {
// Either we shouldn't show the find indicator, or we couldn't update it.
hideFindIndicator();
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes