Changeset 69877 in webkit
- Timestamp:
- Oct 15, 2010, 2:05:20 PM (15 years ago)
- Location:
- trunk/WebKit2
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKit2/ChangeLog
r69871 r69877 1 2010-10-15 Anders Carlsson <andersca@apple.com> 2 3 Reviewed by Sam Weinig. 4 5 Hide the find indicator/overlay when necessary 6 https://bugs.webkit.org/show_bug.cgi?id=47737 7 8 * WebProcess/WebCoreSupport/WebChromeClient.cpp: 9 (WebKit::WebChromeClient::invalidateContentsForSlowScroll): 10 Hide the find indicator. 11 12 (WebKit::WebChromeClient::scroll): 13 Ditto. 14 15 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: 16 (WebKit::WebFrameLoaderClient::dispatchDidStartProvisionalLoad): 17 Hide the find indicator and the find overlay. 18 19 * WebProcess/WebPage/FindController.cpp: 20 (WebKit::FindController::findString): 21 Always hide all previous find matches. Only clear the selection if the string 22 not found wasn't empty. 23 24 (WebKit::FindController::hideFindUI): 25 Uninstall the page overlay and hide the find indicator. 26 27 (WebKit::FindController::hideFindIndicator): 28 Rename resetFindIndicator to hideFindIndicator. 29 30 * WebProcess/WebPage/WebPage.cpp: 31 (WebKit::WebPage::uninstallPageOverlay): 32 Invalidate the entire page. 33 1 34 2010-10-15 Anders Carlsson <andersca@apple.com> 2 35 -
trunk/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp
r69491 r69877 323 323 void WebChromeClient::invalidateContentsForSlowScroll(const IntRect& rect, bool immediate) 324 324 { 325 // Hide the find indicator. 326 m_page->findController().hideFindIndicator(); 327 325 328 m_page->drawingArea()->invalidateContentsForSlowScroll(rect, immediate); 326 329 } … … 328 331 void WebChromeClient::scroll(const IntSize& scrollDelta, const IntRect& rectToScroll, const IntRect& clipRect) 329 332 { 333 // Hide the find indicator. 334 m_page->findController().hideFindIndicator(); 335 330 336 m_page->drawingArea()->scroll(scrollDelta, rectToScroll, clipRect); 331 337 } -
trunk/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp
r69688 r69877 290 290 return; 291 291 292 webPage->findController().hideFindUI(); 293 292 294 DocumentLoader* provisionalLoader = m_frame->coreFrame()->loader()->provisionalDocumentLoader(); 293 295 const String& url = provisionalLoader->url().string(); -
trunk/WebKit2/WebProcess/WebPage/FindController.cpp
r69862 r69877 59 59 void FindController::findString(const String& string, FindDirection findDirection, FindOptions findOptions, unsigned maxNumMatches) 60 60 { 61 m_webPage->corePage()->unmarkAllTextMatches(); 62 61 63 TextCaseSensitivity caseSensitivity = findOptions & FindOptionsCaseInsensitive ? TextCaseInsensitive : TextCaseSensitive; 62 64 bool found = m_webPage->corePage()->findString(string, caseSensitivity, … … 69 71 70 72 if (!found) { 71 // We didn't find the string, clear all text matches.72 m_webPage->corePage()->unmarkAllTextMatches();73 74 73 // And clear the selection. 75 if ( selectedFrame)74 if (!string.isEmpty() && selectedFrame) 76 75 selectedFrame->selection()->clear(); 77 76 78 resetFindIndicator();77 hideFindIndicator(); 79 78 } else { 80 79 shouldShowOverlay = findOptions & FindOptionsShowOverlay; … … 90 89 if (!(findOptions & FindOptionsShowFindIndicator) || !updateFindIndicator(selectedFrame, shouldShowOverlay)) { 91 90 // Either we shouldn't show the find indicator, or we couldn't update it. 92 resetFindIndicator();91 hideFindIndicator(); 93 92 } 94 93 } … … 116 115 void FindController::hideFindUI() 117 116 { 118 // FIXME: Implement. 117 if (m_findPageOverlay) 118 m_webPage->uninstallPageOverlay(); 119 120 hideFindIndicator(); 119 121 } 120 122 … … 169 171 } 170 172 171 void FindController:: resetFindIndicator()173 void FindController::hideFindIndicator() 172 174 { 173 175 if (!m_isShowingFindIndicator) -
trunk/WebKit2/WebProcess/WebPage/FindController.h
r69862 r69877 51 51 void findPageOverlayDestroyed(); 52 52 53 void hideFindIndicator(); 54 53 55 private: 54 56 bool updateFindIndicator(WebCore::Frame* selectedFrame, bool isShowingOverlay); 55 void resetFindIndicator();56 57 57 58 WebPage* m_webPage; -
trunk/WebKit2/WebProcess/WebPage/WebPage.cpp
r69826 r69877 425 425 { 426 426 m_pageOverlay = 0; 427 m_drawingArea->setNeedsDisplay(IntRect(IntPoint(0, 0), m_viewSize)); 427 428 } 428 429 -
trunk/WebKit2/WebProcess/WebPage/WebPage.h
r69826 r69877 164 164 static const WebEvent* currentEvent(); 165 165 166 FindController& findController() { return m_findController; } 167 166 168 private: 167 169 WebPage(uint64_t pageID, const WebPageCreationParameters&);
Note:
See TracChangeset
for help on using the changeset viewer.