[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.

Reviewed by Adam Barth.

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


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128409 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent a24f63bb
2012-09-12 Leandro Gracia Gil <leandrogracia@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.
Reviewed by Adam Barth.
* src/WebFrameImpl.cpp:
(WebKit::WebFrameImpl::scopeStringMatches):
(WebKit::WebFrameImpl::shouldScopeMatches):
2012-09-12 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r127876.
......
......@@ -1779,8 +1779,10 @@ void WebFrameImpl::scopeStringMatches(int identifier,
const WebFindOptions& options,
bool reset)
{
if (!shouldScopeMatches(searchText))
if (!shouldScopeMatches(searchText)) {
increaseMatchCount(0, identifier);
return;
}
WebFrameImpl* mainFrameImpl = viewImpl()->mainFrameImpl();
......@@ -2612,9 +2614,9 @@ int WebFrameImpl::ordinalOfFirstMatchForFrame(WebFrameImpl* frame) const
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());
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment