Title: [149534] trunk/Source/WebKit2
Revision
149534
Author
[email protected]
Date
2013-05-03 13:55:53 -0700 (Fri, 03 May 2013)

Log Message

Remove some "what" comments from FindController
https://bugs.webkit.org/show_bug.cgi?id=115546

Reviewed by Andreas Kling.

* WebProcess/WebPage/FindController.cpp:
(WebKit::FindController::countStringMatches):
(WebKit::FindController::updateFindUIAfterPageScroll):
(WebKit::FindController::willMoveToWebPage):
(WebKit::FindController::mouseEvent):
Remove or reword some comments.

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (149533 => 149534)


--- trunk/Source/WebKit2/ChangeLog	2013-05-03 20:48:00 UTC (rev 149533)
+++ trunk/Source/WebKit2/ChangeLog	2013-05-03 20:55:53 UTC (rev 149534)
@@ -1,3 +1,17 @@
+2013-05-03  Tim Horton  <[email protected]>
+
+        Remove some "what" comments from FindController
+        https://bugs.webkit.org/show_bug.cgi?id=115546
+
+        Reviewed by Andreas Kling.
+
+        * WebProcess/WebPage/FindController.cpp:
+        (WebKit::FindController::countStringMatches):
+        (WebKit::FindController::updateFindUIAfterPageScroll):
+        (WebKit::FindController::willMoveToWebPage):
+        (WebKit::FindController::mouseEvent):
+        Remove or reword some comments.
+
 2013-05-02  Andy Estes  <[email protected]>
 
         [WK2][CustomProtocols] NSURLProtocolClient methods should be dispatched on NSURLConnection's resource loader run loop

Modified: trunk/Source/WebKit2/WebProcess/WebPage/FindController.cpp (149533 => 149534)


--- trunk/Source/WebKit2/WebProcess/WebPage/FindController.cpp	2013-05-03 20:48:00 UTC (rev 149533)
+++ trunk/Source/WebKit2/WebProcess/WebPage/FindController.cpp	2013-05-03 20:55:53 UTC (rev 149534)
@@ -91,7 +91,6 @@
         m_webPage->corePage()->unmarkAllTextMatches();
     }
 
-    // Check if we have more matches than allowed.
     if (matchCount > maxMatchCount)
         matchCount = static_cast<unsigned>(kWKMoreThanMaximumMatchCount);
     
@@ -120,7 +119,6 @@
         if (!pluginView)
             m_webPage->corePage()->unmarkAllTextMatches();
 
-        // Clear the selection.
         if (selectedFrame)
             selectedFrame->selection()->clear();
 
@@ -145,7 +143,7 @@
                 matchCount = m_webPage->corePage()->markAllMatchesForText(string, core(options), shouldShowHighlight, maxMatchCount + 1);
             }
 
-            // Check if we have more matches than allowed.
+            // If we have a large number of matches, we don't want to take the time to paint the overlay.
             if (matchCount > maxMatchCount) {
                 shouldShowOverlay = false;
                 matchCount = static_cast<unsigned>(kWKMoreThanMaximumMatchCount);
@@ -154,17 +152,13 @@
 
         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.
+        if (!(options & FindOptionsShowFindIndicator) || !updateFindIndicator(selectedFrame, shouldShowOverlay))
             hideFindIndicator();
-        }
     }
 
     if (!shouldShowOverlay) {
-        if (m_findPageOverlay) {
-            // Get rid of the overlay.
+        if (m_findPageOverlay)
             m_webPage->uninstallPageOverlay(m_findPageOverlay, true);
-        }        
     } else {
         if (!m_findPageOverlay) {
             RefPtr<PageOverlay> findPageOverlay = PageOverlay::create(this);
@@ -384,7 +378,6 @@
     if (webPage)
         return;
 
-    // The page overlay is moving away from the web page, reset it.
     ASSERT(m_findPageOverlay);
     m_findPageOverlay = 0;
 }
@@ -461,11 +454,8 @@
 
 bool FindController::mouseEvent(PageOverlay*, const WebMouseEvent& mouseEvent)
 {
-    // If we get a mouse down event inside the page overlay we should hide the find UI.
-    if (mouseEvent.type() == WebEvent::MouseDown) {
-        // Dismiss the overlay.
+    if (mouseEvent.type() == WebEvent::MouseDown)
         hideFindUI();
-    }
 
     return false;
 }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to