OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
200 m_activeMatchIndex = 0; | 200 m_activeMatchIndex = 0; |
201 else if (m_activeMatchIndex < 0) | 201 else if (m_activeMatchIndex < 0) |
202 m_activeMatchIndex = m_lastMatchCount - 1; | 202 m_activeMatchIndex = m_lastMatchCount - 1; |
203 } | 203 } |
204 WebRect selectionRect = ownerFrame().frameView()->contentsToRootFrame( | 204 WebRect selectionRect = ownerFrame().frameView()->contentsToRootFrame( |
205 m_activeMatch->boundingBox()); | 205 m_activeMatch->boundingBox()); |
206 reportFindInPageSelection(selectionRect, m_activeMatchIndex + 1, | 206 reportFindInPageSelection(selectionRect, m_activeMatchIndex + 1, |
207 identifier); | 207 identifier); |
208 } | 208 } |
209 | 209 |
| 210 // We found something, so the result of the previous scoping may be outdated. |
| 211 m_lastFindRequestCompletedWithNoMatches = false; |
| 212 |
210 return true; | 213 return true; |
211 } | 214 } |
212 | 215 |
213 void TextFinder::clearActiveFindMatch() { | 216 void TextFinder::clearActiveFindMatch() { |
214 m_currentActiveMatchFrame = false; | 217 m_currentActiveMatchFrame = false; |
215 setMarkerActive(m_activeMatch.get(), false); | 218 setMarkerActive(m_activeMatch.get(), false); |
216 resetActiveMatch(); | 219 resetActiveMatch(); |
217 } | 220 } |
218 | 221 |
219 void TextFinder::stopFindingAndClearSelection() { | 222 void TextFinder::stopFindingAndClearSelection() { |
(...skipping 546 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
766 | 769 |
767 DEFINE_TRACE(TextFinder) { | 770 DEFINE_TRACE(TextFinder) { |
768 visitor->trace(m_ownerFrame); | 771 visitor->trace(m_ownerFrame); |
769 visitor->trace(m_activeMatch); | 772 visitor->trace(m_activeMatch); |
770 visitor->trace(m_resumeScopingFromRange); | 773 visitor->trace(m_resumeScopingFromRange); |
771 visitor->trace(m_deferredScopingWork); | 774 visitor->trace(m_deferredScopingWork); |
772 visitor->trace(m_findMatchesCache); | 775 visitor->trace(m_findMatchesCache); |
773 } | 776 } |
774 | 777 |
775 } // namespace blink | 778 } // namespace blink |
OLD | NEW |