Title: [128351] trunk/Source/WebKit/chromium
- Revision
- 128351
- Author
- leandrogra...@chromium.org
- Date
- 2012-09-12 13:02:25 -0700 (Wed, 12 Sep 2012)
Log Message
[Chromium] Fix cases where find-in-page doesn't send a final update
https://bugs.webkit.org/show_bug.cgi?id=96402
Fix some issues in the WebKit implementation that prevented to send a final
reportFindInPageMatchCount message. Also, fix a buggy reset of the active match
when calling the stopFinding method.
Reviewed by Adam Barth.
* src/WebFrameImpl.cpp:
(WebKit::WebFrameImpl::scopeStringMatches):
(WebKit::WebFrameImpl::cancelPendingScopingEffort):
(WebKit::WebFrameImpl::setFindEndstateFocusAndSelection):
(WebKit::WebFrameImpl::shouldScopeMatches):
Modified Paths
Diff
Modified: trunk/Source/WebKit/chromium/ChangeLog (128350 => 128351)
--- trunk/Source/WebKit/chromium/ChangeLog 2012-09-12 19:41:46 UTC (rev 128350)
+++ trunk/Source/WebKit/chromium/ChangeLog 2012-09-12 20:02:25 UTC (rev 128351)
@@ -1,3 +1,20 @@
+2012-09-12 Leandro Gracia Gil <leandrogra...@chromium.org>
+
+ [Chromium] Fix cases where find-in-page doesn't send a final update
+ https://bugs.webkit.org/show_bug.cgi?id=96402
+
+ Fix some issues in the WebKit implementation that prevented to send a final
+ reportFindInPageMatchCount message. Also, fix a buggy reset of the active match
+ when calling the stopFinding method.
+
+ Reviewed by Adam Barth.
+
+ * src/WebFrameImpl.cpp:
+ (WebKit::WebFrameImpl::scopeStringMatches):
+ (WebKit::WebFrameImpl::cancelPendingScopingEffort):
+ (WebKit::WebFrameImpl::setFindEndstateFocusAndSelection):
+ (WebKit::WebFrameImpl::shouldScopeMatches):
+
2012-09-12 Sami Kyostila <skyos...@google.com>
Rename OVERFLOW_SCROLLING as ACCELERATED_OVERFLOW_SCROLLING
Modified: trunk/Source/WebKit/chromium/src/WebFrameImpl.cpp (128350 => 128351)
--- trunk/Source/WebKit/chromium/src/WebFrameImpl.cpp 2012-09-12 19:41:46 UTC (rev 128350)
+++ trunk/Source/WebKit/chromium/src/WebFrameImpl.cpp 2012-09-12 20:02:25 UTC (rev 128351)
@@ -1779,8 +1779,10 @@
const WebFindOptions& options,
bool reset)
{
- if (!shouldScopeMatches(searchText))
+ if (!shouldScopeMatches(searchText)) {
+ increaseMatchCount(0, identifier);
return;
+ }
WebFrameImpl* mainFrameImpl = viewImpl()->mainFrameImpl();
@@ -1957,6 +1959,14 @@
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;
}
@@ -2522,14 +2532,6 @@
// 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;
}
}
@@ -2612,9 +2614,9 @@
bool WebFrameImpl::shouldScopeMatches(const String& searchText)
{
- // Don't scope if we can't find a frame or a view or if the frame is not visible.
+ // Don't scope if we can't find a frame or a view.
// The user may have closed the tab/application, so abort.
- if (!frame() || !frame()->view() || !hasVisibleContent())
+ if (!frame() || !frame()->view())
return false;
ASSERT(frame()->document() && frame()->view());
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes