Title: [128377] trunk/Source/WebKit/chromium
Revision
128377
Author
commit-qu...@webkit.org
Date
2012-09-12 16:10:11 -0700 (Wed, 12 Sep 2012)

Log Message

Unreviewed, rolling out r128351.
http://trac.webkit.org/changeset/128351
https://bugs.webkit.org/show_bug.cgi?id=96573

Broke FindInPage browser_tests (Requested by jamesr_ on
#webkit).

Patch by Sheriff Bot <webkit.review....@gmail.com> on 2012-09-12

* src/WebFrameImpl.cpp:
(WebKit::WebFrameImpl::scopeStringMatches):
(WebKit::WebFrameImpl::cancelPendingScopingEffort):
(WebKit::WebFrameImpl::setFindEndstateFocusAndSelection):
(WebKit::WebFrameImpl::shouldScopeMatches):

Modified Paths

Diff

Modified: trunk/Source/WebKit/chromium/ChangeLog (128376 => 128377)


--- trunk/Source/WebKit/chromium/ChangeLog	2012-09-12 22:56:47 UTC (rev 128376)
+++ trunk/Source/WebKit/chromium/ChangeLog	2012-09-12 23:10:11 UTC (rev 128377)
@@ -1,3 +1,18 @@
+2012-09-12  Sheriff Bot  <webkit.review....@gmail.com>
+
+        Unreviewed, rolling out r128351.
+        http://trac.webkit.org/changeset/128351
+        https://bugs.webkit.org/show_bug.cgi?id=96573
+
+        Broke FindInPage browser_tests (Requested by jamesr_ on
+        #webkit).
+
+        * src/WebFrameImpl.cpp:
+        (WebKit::WebFrameImpl::scopeStringMatches):
+        (WebKit::WebFrameImpl::cancelPendingScopingEffort):
+        (WebKit::WebFrameImpl::setFindEndstateFocusAndSelection):
+        (WebKit::WebFrameImpl::shouldScopeMatches):
+
 2012-09-12  Adrienne Walker  <e...@google.com>
 
         [chromium] Fix search tickmarks not disappearing when compositing is enabled

Modified: trunk/Source/WebKit/chromium/src/WebFrameImpl.cpp (128376 => 128377)


--- trunk/Source/WebKit/chromium/src/WebFrameImpl.cpp	2012-09-12 22:56:47 UTC (rev 128376)
+++ trunk/Source/WebKit/chromium/src/WebFrameImpl.cpp	2012-09-12 23:10:11 UTC (rev 128377)
@@ -1779,10 +1779,8 @@
                                       const WebFindOptions& options,
                                       bool reset)
 {
-    if (!shouldScopeMatches(searchText)) {
-        increaseMatchCount(0, identifier);
+    if (!shouldScopeMatches(searchText))
         return;
-    }
 
     WebFrameImpl* mainFrameImpl = viewImpl()->mainFrameImpl();
 
@@ -1959,14 +1957,6 @@
     deleteAllValues(m_deferredScopingWork);
     m_deferredScopingWork.clear();
 
-    // Clear the active match, for two reasons:
-    // We just finished the find 'session' and we don't want future (potentially
-    // unrelated) find 'sessions' operations to start at the same place.
-    // The WebFrameImpl could get reused and the m_activeMatch could end up pointing
-    // to a document that is no longer valid. Keeping an invalid reference around
-    // is just asking for trouble.
-    m_activeMatch = 0;
-
     m_activeMatchIndexInCurrentFrame = -1;
 }
 
@@ -2532,6 +2522,14 @@
         // a link focused, which is weird).
         frame()->selection()->setSelection(m_activeMatch.get());
         frame()->document()->setFocusedNode(0);
+
+        // Finally clear the active match, for two reasons:
+        // We just finished the find 'session' and we don't want future (potentially
+        // unrelated) find 'sessions' operations to start at the same place.
+        // The WebFrameImpl could get reused and the m_activeMatch could end up pointing
+        // to a document that is no longer valid. Keeping an invalid reference around
+        // is just asking for trouble.
+        m_activeMatch = 0;
     }
 }
 
@@ -2614,9 +2612,9 @@
 
 bool WebFrameImpl::shouldScopeMatches(const String& searchText)
 {
-    // Don't scope if we can't find a frame or a view.
+    // Don't scope if we can't find a frame or a view or if the frame is not visible.
     // The user may have closed the tab/application, so abort.
-    if (!frame() || !frame()->view())
+    if (!frame() || !frame()->view() || !hasVisibleContent())
         return false;
 
     ASSERT(frame()->document() && frame()->view());
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to