Changeset 109228 in webkit
- Timestamp:
- Feb 29, 2012 10:15:32 AM (12 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r109222 r109228 1 2012-02-29 Sergio Villar Senin <svillar@igalia.com> 2 3 DidFindString should be emitted even if FindOptionsShowOverlay is not enabled 4 https://bugs.webkit.org/show_bug.cgi?id=76522 5 6 Reviewed by Darin Adler. 7 8 DidFindString message should be issued always even if neither 9 FindOptionsShowOverlay or FindOptionsShowHighlight are 10 provided. The difference is that if any of those flags are present 11 the find operation will look for all the appearances of the text 12 in the web view, otherwise it will just look and report the next 13 occurrence. 14 15 This patch removes the temporary workaround added in r109222 to 16 the WebKitFindController unit tests. 17 18 * UIProcess/API/gtk/tests/TestWebKitFindController.cpp: 19 * WebProcess/WebPage/FindController.cpp: 20 (WebKit::FindController::findString): 21 1 22 2012-01-19 Sergio Villar Senin <svillar@igalia.com> 2 23 -
trunk/Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitFindController.cpp
r109222 r109228 46 46 void find(const char* searchText, guint32 findOptions, guint maxMatchCount) 47 47 { 48 // Due to http://weakit.org/b/76522 we have to artificially49 // add here the show overlay option (that we do not even50 // expose in the API) to get the DidFindString messsage51 // issued. Remove this once 76522 is fixed.52 findOptions = findOptions | 1 << 5;53 54 48 g_signal_connect(m_findController.get(), "found-text", G_CALLBACK(foundTextCallback), this); 55 49 g_signal_connect(m_findController.get(), "failed-to-find-text", G_CALLBACK(failedToFindTextCallback), this); -
trunk/Source/WebKit2/WebProcess/WebPage/FindController.cpp
r105855 r109228 110 110 } else { 111 111 shouldShowOverlay = options & FindOptionsShowOverlay; 112 113 if (shouldShowOverlay) { 114 bool shouldShowHighlight = options & FindOptionsShowHighlight; 112 bool shouldShowHighlight = options & FindOptionsShowHighlight; 113 unsigned matchCount = 1; 114 115 if (shouldShowOverlay || shouldShowHighlight) { 115 116 116 117 if (maxMatchCount == numeric_limits<unsigned>::max()) 117 118 --maxMatchCount; 118 119 unsignedmatchCount = m_webPage->corePage()->markAllMatchesForText(string, core(options), shouldShowHighlight, maxMatchCount + 1);119 120 matchCount = m_webPage->corePage()->markAllMatchesForText(string, core(options), shouldShowHighlight, maxMatchCount + 1); 120 121 121 122 // Check if we have more matches than allowed. … … 124 125 matchCount = static_cast<unsigned>(kWKMoreThanMaximumMatchCount); 125 126 } 126 127 m_webPage->send(Messages::WebPageProxy::DidFindString(string, matchCount)); 128 }127 } 128 129 m_webPage->send(Messages::WebPageProxy::DidFindString(string, matchCount)); 129 130 130 131 if (!(options & FindOptionsShowFindIndicator) || !updateFindIndicator(selectedFrame, shouldShowOverlay)) {
Note: See TracChangeset
for help on using the changeset viewer.