[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

andersca at apple.com andersca at apple.com
Wed Dec 22 14:41:02 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 13100aa23c5d484e7174cfb9b3e07b9675bac922
Author: andersca at apple.com <andersca at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Oct 15 21:05:20 2010 +0000

    Hide the find indicator/overlay when necessary
    https://bugs.webkit.org/show_bug.cgi?id=47737
    
    Reviewed by Sam Weinig.
    
    * WebProcess/WebCoreSupport/WebChromeClient.cpp:
    (WebKit::WebChromeClient::invalidateContentsForSlowScroll):
    Hide the find indicator.
    
    (WebKit::WebChromeClient::scroll):
    Ditto.
    
    * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
    (WebKit::WebFrameLoaderClient::dispatchDidStartProvisionalLoad):
    Hide the find indicator and the find overlay.
    
    * WebProcess/WebPage/FindController.cpp:
    (WebKit::FindController::findString):
    Always hide all previous find matches. Only clear the selection if the string
    not found wasn't empty.
    
    (WebKit::FindController::hideFindUI):
    Uninstall the page overlay and hide the find indicator.
    
    (WebKit::FindController::hideFindIndicator):
    Rename resetFindIndicator to hideFindIndicator.
    
    * WebProcess/WebPage/WebPage.cpp:
    (WebKit::WebPage::uninstallPageOverlay):
    Invalidate the entire page.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@69877 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit2/ChangeLog b/WebKit2/ChangeLog
index 8a62b66..f23762f 100644
--- a/WebKit2/ChangeLog
+++ b/WebKit2/ChangeLog
@@ -2,6 +2,39 @@
 
         Reviewed by Sam Weinig.
 
+        Hide the find indicator/overlay when necessary
+        https://bugs.webkit.org/show_bug.cgi?id=47737
+
+        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
+        (WebKit::WebChromeClient::invalidateContentsForSlowScroll):
+        Hide the find indicator.
+
+        (WebKit::WebChromeClient::scroll):
+        Ditto.
+
+        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
+        (WebKit::WebFrameLoaderClient::dispatchDidStartProvisionalLoad):
+        Hide the find indicator and the find overlay.
+
+        * WebProcess/WebPage/FindController.cpp:
+        (WebKit::FindController::findString):
+        Always hide all previous find matches. Only clear the selection if the string
+        not found wasn't empty.
+
+        (WebKit::FindController::hideFindUI):
+        Uninstall the page overlay and hide the find indicator.
+
+        (WebKit::FindController::hideFindIndicator):
+        Rename resetFindIndicator to hideFindIndicator.
+
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::WebPage::uninstallPageOverlay):
+        Invalidate the entire page.
+
+2010-10-15  Anders Carlsson  <andersca at apple.com>
+
+        Reviewed by Sam Weinig.
+
         Add FindIndicatorWindow class
         https://bugs.webkit.org/show_bug.cgi?id=47731
 
diff --git a/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp b/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp
index 099ec4e..e4ff00c 100644
--- a/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp
+++ b/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp
@@ -322,11 +322,17 @@ void WebChromeClient::invalidateContentsAndWindow(const IntRect& rect, bool imme
 
 void WebChromeClient::invalidateContentsForSlowScroll(const IntRect& rect, bool immediate)
 {
+    // Hide the find indicator.
+    m_page->findController().hideFindIndicator();
+
     m_page->drawingArea()->invalidateContentsForSlowScroll(rect, immediate);
 }
 
 void WebChromeClient::scroll(const IntSize& scrollDelta, const IntRect& rectToScroll, const IntRect& clipRect)
 {
+    // Hide the find indicator.
+    m_page->findController().hideFindIndicator();
+
     m_page->drawingArea()->scroll(scrollDelta, rectToScroll, clipRect);
 }
 
diff --git a/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp b/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp
index afe0075..0ccddc8 100644
--- a/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp
+++ b/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp
@@ -289,6 +289,8 @@ void WebFrameLoaderClient::dispatchDidStartProvisionalLoad()
     if (!webPage)
         return;
 
+    webPage->findController().hideFindUI();
+    
     DocumentLoader* provisionalLoader = m_frame->coreFrame()->loader()->provisionalDocumentLoader();
     const String& url = provisionalLoader->url().string();
     RefPtr<APIObject> userData;
diff --git a/WebKit2/WebProcess/WebPage/FindController.cpp b/WebKit2/WebProcess/WebPage/FindController.cpp
index 33fcac9..e36a447 100644
--- a/WebKit2/WebProcess/WebPage/FindController.cpp
+++ b/WebKit2/WebProcess/WebPage/FindController.cpp
@@ -58,6 +58,8 @@ static Frame* frameWithSelection(Page* page)
 
 void FindController::findString(const String& string, FindDirection findDirection, FindOptions findOptions, unsigned maxNumMatches)
 {
+    m_webPage->corePage()->unmarkAllTextMatches();
+
     TextCaseSensitivity caseSensitivity = findOptions & FindOptionsCaseInsensitive ? TextCaseInsensitive : TextCaseSensitive;
     bool found = m_webPage->corePage()->findString(string, caseSensitivity,
                                                    findDirection == FindDirectionForward ? WebCore::FindDirectionForward : WebCore::FindDirectionBackward,
@@ -68,14 +70,11 @@ void FindController::findString(const String& string, FindDirection findDirectio
     bool shouldShowOverlay = false;
 
     if (!found) {
-        // We didn't find the string, clear all text matches.
-        m_webPage->corePage()->unmarkAllTextMatches();
-
         // And clear the selection.
-        if (selectedFrame)
+        if (!string.isEmpty() && selectedFrame)
             selectedFrame->selection()->clear();
 
-        resetFindIndicator();
+        hideFindIndicator();
     } else {
         shouldShowOverlay = findOptions & FindOptionsShowOverlay;
 
@@ -89,7 +88,7 @@ void FindController::findString(const String& string, FindDirection findDirectio
 
         if (!(findOptions & FindOptionsShowFindIndicator) || !updateFindIndicator(selectedFrame, shouldShowOverlay)) {
             // Either we shouldn't show the find indicator, or we couldn't update it.
-            resetFindIndicator();
+            hideFindIndicator();
         }
     }
 
@@ -115,7 +114,10 @@ void FindController::findString(const String& string, FindDirection findDirectio
 
 void FindController::hideFindUI()
 {
-    // FIXME: Implement.
+    if (m_findPageOverlay)
+        m_webPage->uninstallPageOverlay();
+
+    hideFindIndicator();
 }
 
 void FindController::findPageOverlayDestroyed()
@@ -168,7 +170,7 @@ bool FindController::updateFindIndicator(Frame* selectedFrame, bool isShowingOve
     return true;
 }
 
-void FindController::resetFindIndicator()
+void FindController::hideFindIndicator()
 {
     if (!m_isShowingFindIndicator)
         return;
diff --git a/WebKit2/WebProcess/WebPage/FindController.h b/WebKit2/WebProcess/WebPage/FindController.h
index 5ab3226..3aa8b10 100644
--- a/WebKit2/WebProcess/WebPage/FindController.h
+++ b/WebKit2/WebProcess/WebPage/FindController.h
@@ -50,9 +50,10 @@ public:
 
     void findPageOverlayDestroyed();
 
+    void hideFindIndicator();
+
 private:
     bool updateFindIndicator(WebCore::Frame* selectedFrame, bool isShowingOverlay);
-    void resetFindIndicator();
     
     WebPage* m_webPage;
     FindPageOverlay* m_findPageOverlay;
diff --git a/WebKit2/WebProcess/WebPage/WebPage.cpp b/WebKit2/WebProcess/WebPage/WebPage.cpp
index 60a218c..9e52d48 100644
--- a/WebKit2/WebProcess/WebPage/WebPage.cpp
+++ b/WebKit2/WebProcess/WebPage/WebPage.cpp
@@ -424,6 +424,7 @@ void WebPage::installPageOverlay(PassOwnPtr<PageOverlay> pageOverlay)
 void WebPage::uninstallPageOverlay()
 {
     m_pageOverlay = 0;
+    m_drawingArea->setNeedsDisplay(IntRect(IntPoint(0, 0), m_viewSize));
 }
 
 // Events 
diff --git a/WebKit2/WebProcess/WebPage/WebPage.h b/WebKit2/WebProcess/WebPage/WebPage.h
index 5c2bf19..9be272a 100644
--- a/WebKit2/WebProcess/WebPage/WebPage.h
+++ b/WebKit2/WebProcess/WebPage/WebPage.h
@@ -163,6 +163,8 @@ public:
 
     static const WebEvent* currentEvent();
 
+    FindController& findController() { return m_findController; }
+
 private:
     WebPage(uint64_t pageID, const WebPageCreationParameters&);
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list