Changeset 150770 in webkit
- Timestamp:
- May 27, 2013 12:27:06 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/blackberry/Api/WebPage.cpp
r150760 r150770 4709 4709 } 4710 4710 4711 bool WebPage::findNextString(const char* text, bool forward, bool caseSensitive, bool wrap, bool highlightAllMatches )4711 bool WebPage::findNextString(const char* text, bool forward, bool caseSensitive, bool wrap, bool highlightAllMatches, bool selectActiveMatchOnClear) 4712 4712 { 4713 4713 WebCore::FindOptions findOptions = WebCore::StartInSelection; … … 4720 4720 // within the current frame as opposed to the entire Document, so we have to 4721 4721 // provide our own wrapping code to wrap at the whole Document level. 4722 return d->m_inPageSearchManager->findNextString(String::fromUTF8(text), findOptions, wrap, highlightAllMatches );4722 return d->m_inPageSearchManager->findNextString(String::fromUTF8(text), findOptions, wrap, highlightAllMatches, selectActiveMatchOnClear); 4723 4723 } 4724 4724 -
trunk/Source/WebKit/blackberry/Api/WebPage.h
r150756 r150770 231 231 // Find the next utf8 string in the given direction. 232 232 // Case sensitivity, wrapping, and highlighting all matches are also toggleable. 233 bool findNextString(const char*, bool forward, bool caseSensitive, bool wrap, bool highlightAllMatches );233 bool findNextString(const char*, bool forward, bool caseSensitive, bool wrap, bool highlightAllMatches, bool selectActiveMatchOnClear); 234 234 235 235 JSGlobalContextRef globalContext() const; -
trunk/Source/WebKit/blackberry/ChangeLog
r150766 r150770 1 2013-05-27 Andy Chen <andchen@blackberry.com> 2 3 [BlackBerry] Find-on-page should be able to convert the active match to selection when clearing all matches 4 https://bugs.webkit.org/show_bug.cgi?id=116837 5 6 Reviewed by Rob Buis. 7 8 PR 291903 9 Internally reviewed by Mike Fenton. 10 11 * Api/WebPage.cpp: 12 (BlackBerry::WebKit::WebPage::findNextString): 13 * Api/WebPage.h: 14 * WebKitSupport/InPageSearchManager.cpp: 15 (BlackBerry::WebKit::InPageSearchManager::findNextString): 16 (BlackBerry::WebKit::InPageSearchManager::clearTextMatches): 17 * WebKitSupport/InPageSearchManager.h: 18 (InPageSearchManager): 19 1 20 2013-05-27 Eli Fidler <efidler@rim.com> 2 21 -
trunk/Source/WebKit/blackberry/WebKitSupport/InPageSearchManager.cpp
r150140 r150770 85 85 } 86 86 87 bool InPageSearchManager::findNextString(const String& text, FindOptions findOptions, bool wrap, bool highlightAllMatches )87 bool InPageSearchManager::findNextString(const String& text, FindOptions findOptions, bool wrap, bool highlightAllMatches, bool selectActiveMatchOnClear) 88 88 { 89 89 bool highlightAllMatchesStateChanged = m_highlightAllMatches != highlightAllMatches; … … 91 91 92 92 if (!text.length()) { 93 clearTextMatches( );93 clearTextMatches(selectActiveMatchOnClear); 94 94 cancelPendingScopingEffort(); 95 95 m_activeSearchString = String(); … … 232 232 } 233 233 234 void InPageSearchManager::clearTextMatches() 235 { 234 void InPageSearchManager::clearTextMatches(bool selectActiveMatchOnClear) 235 { 236 if (selectActiveMatchOnClear && m_activeMatch.get()) { 237 VisibleSelection selection(m_activeMatch.get()); 238 m_activeMatch->ownerDocument()->frame()->selection()->setSelection(selection); 239 } 236 240 m_webPage->m_page->unmarkAllTextMatches(); 237 241 m_activeMatch = 0; -
trunk/Source/WebKit/blackberry/WebKitSupport/InPageSearchManager.h
r127594 r150770 40 40 ~InPageSearchManager(); 41 41 42 bool findNextString(const String&, WebCore::FindOptions, bool wrap, bool highlightAllMatches );42 bool findNextString(const String&, WebCore::FindOptions, bool wrap, bool highlightAllMatches, bool selectActiveMatchOnClear); 43 43 void frameUnloaded(const WebCore::Frame*); 44 44 … … 47 47 friend class DeferredScopeStringMatches; 48 48 49 void clearTextMatches( );49 void clearTextMatches(bool selectActiveMatchOnClear = false); 50 50 void setActiveMatchAndMarker(PassRefPtr<WebCore::Range>); 51 51 bool findAndMarkText(const String&, WebCore::Range*, WebCore::Frame*, const WebCore::FindOptions&, bool /* isNewSearch */, bool /* startFromSelection */); -
trunk/Tools/DumpRenderTree/blackberry/TestRunnerBlackBerry.cpp
r150007 r150770 618 618 // Our layout tests assume find will wrap and highlight all matches. 619 619 BlackBerry::WebKit::DumpRenderTree::currentInstance()->page()->findNextString(nameStr.utf8().data(), 620 !(options & WebCore::Backwards), !(options & WebCore::CaseInsensitive), true /* wrap */, true /* highlightAllMatches */ );620 !(options & WebCore::Backwards), !(options & WebCore::CaseInsensitive), true /* wrap */, true /* highlightAllMatches */, false /* selectActiveMatchOnClear */); 621 621 622 622 return mainFrame->page()->findString(nameStr, options);
Note: See TracChangeset
for help on using the changeset viewer.