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 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
367 | 367 |
368 // Remember what we search for last time, so we can skip searching if more | 368 // Remember what we search for last time, so we can skip searching if more |
369 // letters are added to the search string (and last outcome was 0). | 369 // letters are added to the search string (and last outcome was 0). |
370 m_lastSearchString = searchText; | 370 m_lastSearchString = searchText; |
371 | 371 |
372 if (matchCount > 0) { | 372 if (matchCount > 0) { |
373 ownerFrame().frame()->editor().setMarkedTextMatchesAreHighlighted(true); | 373 ownerFrame().frame()->editor().setMarkedTextMatchesAreHighlighted(true); |
374 | 374 |
375 m_lastMatchCount += matchCount; | 375 m_lastMatchCount += matchCount; |
376 | 376 |
| 377 ownerFrame().client()->reportFindInFrameMatchCount(identifier, m_lastMat
chCount, false); |
| 378 |
377 // Let the mainframe know how much we found during this pass. | 379 // Let the mainframe know how much we found during this pass. |
378 mainFrameImpl->increaseMatchCount(matchCount, identifier); | 380 mainFrameImpl->increaseMatchCount(matchCount, identifier); |
379 } | 381 } |
380 | 382 |
381 if (timedOut) { | 383 if (timedOut) { |
382 // If we found anything during this pass, we should redraw. However, we | 384 // If we found anything during this pass, we should redraw. However, we |
383 // don't want to spam too much if the page is extremely long, so if we | 385 // don't want to spam too much if the page is extremely long, so if we |
384 // reach a certain point we start throttling the redraw requests. | 386 // reach a certain point we start throttling the redraw requests. |
385 if (matchCount > 0) | 387 if (matchCount > 0) |
386 invalidateIfNecessary(); | 388 invalidateIfNecessary(); |
(...skipping 26 matching lines...) Expand all Loading... |
413 mainFrameImpl->ensureTextFinder().decrementFramesScopingCount(identifier); | 415 mainFrameImpl->ensureTextFinder().decrementFramesScopingCount(identifier); |
414 } | 416 } |
415 | 417 |
416 void TextFinder::finishCurrentScopingEffort(int identifier) | 418 void TextFinder::finishCurrentScopingEffort(int identifier) |
417 { | 419 { |
418 flushCurrentScopingEffort(identifier); | 420 flushCurrentScopingEffort(identifier); |
419 | 421 |
420 m_scopingInProgress = false; | 422 m_scopingInProgress = false; |
421 m_lastFindRequestCompletedWithNoMatches = !m_lastMatchCount; | 423 m_lastFindRequestCompletedWithNoMatches = !m_lastMatchCount; |
422 | 424 |
| 425 ownerFrame().client()->reportFindInFrameMatchCount(identifier, m_lastMatchCo
unt, true); |
| 426 |
423 // This frame is done, so show any scrollbar tickmarks we haven't drawn yet. | 427 // This frame is done, so show any scrollbar tickmarks we haven't drawn yet. |
424 ownerFrame().frameView()->invalidatePaintForTickmarks(); | 428 ownerFrame().frameView()->invalidatePaintForTickmarks(); |
425 } | 429 } |
426 | 430 |
427 void TextFinder::cancelPendingScopingEffort() | 431 void TextFinder::cancelPendingScopingEffort() |
428 { | 432 { |
429 #if ENABLE(OILPAN) | 433 #if ENABLE(OILPAN) |
430 for (DeferredScopeStringMatches* deferredWork : m_deferredScopingWork) | 434 for (DeferredScopeStringMatches* deferredWork : m_deferredScopingWork) |
431 deferredWork->dispose(); | 435 deferredWork->dispose(); |
432 #endif | 436 #endif |
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
802 visitor->trace(m_ownerFrame); | 806 visitor->trace(m_ownerFrame); |
803 visitor->trace(m_currentActiveMatchFrame); | 807 visitor->trace(m_currentActiveMatchFrame); |
804 visitor->trace(m_activeMatch); | 808 visitor->trace(m_activeMatch); |
805 visitor->trace(m_resumeScopingFromRange); | 809 visitor->trace(m_resumeScopingFromRange); |
806 visitor->trace(m_deferredScopingWork); | 810 visitor->trace(m_deferredScopingWork); |
807 visitor->trace(m_findMatchesCache); | 811 visitor->trace(m_findMatchesCache); |
808 #endif | 812 #endif |
809 } | 813 } |
810 | 814 |
811 } // namespace blink | 815 } // namespace blink |
OLD | NEW |