Changeset 128351 in webkit
- Timestamp:
- Sep 12, 2012 1:02:25 PM (12 years ago)
- Location:
- trunk/Source/WebKit/chromium
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/chromium/ChangeLog
r128347 r128351 1 2012-09-12 Leandro Gracia Gil <leandrogracia@chromium.org> 2 3 [Chromium] Fix cases where find-in-page doesn't send a final update 4 https://bugs.webkit.org/show_bug.cgi?id=96402 5 6 Fix some issues in the WebKit implementation that prevented to send a final 7 reportFindInPageMatchCount message. Also, fix a buggy reset of the active match 8 when calling the stopFinding method. 9 10 Reviewed by Adam Barth. 11 12 * src/WebFrameImpl.cpp: 13 (WebKit::WebFrameImpl::scopeStringMatches): 14 (WebKit::WebFrameImpl::cancelPendingScopingEffort): 15 (WebKit::WebFrameImpl::setFindEndstateFocusAndSelection): 16 (WebKit::WebFrameImpl::shouldScopeMatches): 17 1 18 2012-09-12 Sami Kyostila <skyostil@google.com> 2 19 -
trunk/Source/WebKit/chromium/src/WebFrameImpl.cpp
r128123 r128351 1780 1780 bool reset) 1781 1781 { 1782 if (!shouldScopeMatches(searchText)) 1782 if (!shouldScopeMatches(searchText)) { 1783 increaseMatchCount(0, identifier); 1783 1784 return; 1785 } 1784 1786 1785 1787 WebFrameImpl* mainFrameImpl = viewImpl()->mainFrameImpl(); … … 1957 1959 deleteAllValues(m_deferredScopingWork); 1958 1960 m_deferredScopingWork.clear(); 1961 1962 // Clear the active match, for two reasons: 1963 // We just finished the find 'session' and we don't want future (potentially 1964 // unrelated) find 'sessions' operations to start at the same place. 1965 // The WebFrameImpl could get reused and the m_activeMatch could end up pointing 1966 // to a document that is no longer valid. Keeping an invalid reference around 1967 // is just asking for trouble. 1968 m_activeMatch = 0; 1959 1969 1960 1970 m_activeMatchIndexInCurrentFrame = -1; … … 2523 2533 frame()->selection()->setSelection(m_activeMatch.get()); 2524 2534 frame()->document()->setFocusedNode(0); 2525 2526 // Finally clear the active match, for two reasons:2527 // We just finished the find 'session' and we don't want future (potentially2528 // unrelated) find 'sessions' operations to start at the same place.2529 // The WebFrameImpl could get reused and the m_activeMatch could end up pointing2530 // to a document that is no longer valid. Keeping an invalid reference around2531 // is just asking for trouble.2532 m_activeMatch = 0;2533 2535 } 2534 2536 } … … 2613 2615 bool WebFrameImpl::shouldScopeMatches(const String& searchText) 2614 2616 { 2615 // Don't scope if we can't find a frame or a view or if the frame is not visible.2617 // Don't scope if we can't find a frame or a view. 2616 2618 // The user may have closed the tab/application, so abort. 2617 if (!frame() || !frame()->view() || !hasVisibleContent())2619 if (!frame() || !frame()->view()) 2618 2620 return false; 2619 2621
Note: See TracChangeset
for help on using the changeset viewer.