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 419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
430 | 430 |
431 if (timed_out) { | 431 if (timed_out) { |
432 // If we found anything during this pass, we should redraw. However, we | 432 // If we found anything during this pass, we should redraw. However, we |
433 // don't want to spam too much if the page is extremely long, so if we | 433 // don't want to spam too much if the page is extremely long, so if we |
434 // reach a certain point we start throttling the redraw requests. | 434 // reach a certain point we start throttling the redraw requests. |
435 if (match_count > 0) | 435 if (match_count > 0) |
436 InvalidateIfNecessary(); | 436 InvalidateIfNecessary(); |
437 | 437 |
438 // Scoping effort ran out of time, lets ask for another time-slice. | 438 // Scoping effort ran out of time, lets ask for another time-slice. |
439 ScopeStringMatchesSoon(identifier, search_text, options); | 439 ScopeStringMatchesSoon(identifier, search_text, options); |
440 return; // Done for now, resume work later. | 440 return; // Done for now, resume work later. |
441 } | 441 } |
442 | 442 |
443 FinishCurrentScopingEffort(identifier); | 443 FinishCurrentScopingEffort(identifier); |
444 } | 444 } |
445 | 445 |
446 void TextFinder::FlushCurrentScopingEffort(int identifier) { | 446 void TextFinder::FlushCurrentScopingEffort(int identifier) { |
447 if (!OwnerFrame().GetFrame() || !OwnerFrame().GetFrame()->GetPage()) | 447 if (!OwnerFrame().GetFrame() || !OwnerFrame().GetFrame()->GetPage()) |
448 return; | 448 return; |
449 | 449 |
450 frame_scoping_ = false; | 450 frame_scoping_ = false; |
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
787 | 787 |
788 DEFINE_TRACE(TextFinder) { | 788 DEFINE_TRACE(TextFinder) { |
789 visitor->Trace(owner_frame_); | 789 visitor->Trace(owner_frame_); |
790 visitor->Trace(active_match_); | 790 visitor->Trace(active_match_); |
791 visitor->Trace(resume_scoping_from_range_); | 791 visitor->Trace(resume_scoping_from_range_); |
792 visitor->Trace(deferred_scoping_work_); | 792 visitor->Trace(deferred_scoping_work_); |
793 visitor->Trace(find_matches_cache_); | 793 visitor->Trace(find_matches_cache_); |
794 } | 794 } |
795 | 795 |
796 } // namespace blink | 796 } // namespace blink |
OLD | NEW |