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 415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
426 | 426 |
427 if (timedOut) { | 427 if (timedOut) { |
428 // If we found anything during this pass, we should redraw. However, we | 428 // If we found anything during this pass, we should redraw. However, we |
429 // don't want to spam too much if the page is extremely long, so if we | 429 // don't want to spam too much if the page is extremely long, so if we |
430 // reach a certain point we start throttling the redraw requests. | 430 // reach a certain point we start throttling the redraw requests. |
431 if (matchCount > 0) | 431 if (matchCount > 0) |
432 invalidateIfNecessary(); | 432 invalidateIfNecessary(); |
433 | 433 |
434 // Scoping effort ran out of time, lets ask for another time-slice. | 434 // Scoping effort ran out of time, lets ask for another time-slice. |
435 scopeStringMatchesSoon(identifier, searchText, options); | 435 scopeStringMatchesSoon(identifier, searchText, options); |
436 return; // Done for now, resume work later. | 436 return; // Done for now, resume work later. |
437 } | 437 } |
438 | 438 |
439 finishCurrentScopingEffort(identifier); | 439 finishCurrentScopingEffort(identifier); |
440 } | 440 } |
441 | 441 |
442 void TextFinder::flushCurrentScopingEffort(int identifier) { | 442 void TextFinder::flushCurrentScopingEffort(int identifier) { |
443 if (!ownerFrame().frame() || !ownerFrame().frame()->page()) | 443 if (!ownerFrame().frame() || !ownerFrame().frame()->page()) |
444 return; | 444 return; |
445 | 445 |
446 m_frameScoping = false; | 446 m_frameScoping = false; |
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
773 | 773 |
774 DEFINE_TRACE(TextFinder) { | 774 DEFINE_TRACE(TextFinder) { |
775 visitor->trace(m_ownerFrame); | 775 visitor->trace(m_ownerFrame); |
776 visitor->trace(m_activeMatch); | 776 visitor->trace(m_activeMatch); |
777 visitor->trace(m_resumeScopingFromRange); | 777 visitor->trace(m_resumeScopingFromRange); |
778 visitor->trace(m_deferredScopingWork); | 778 visitor->trace(m_deferredScopingWork); |
779 visitor->trace(m_findMatchesCache); | 779 visitor->trace(m_findMatchesCache); |
780 } | 780 } |
781 | 781 |
782 } // namespace blink | 782 } // namespace blink |
OLD | NEW |