| 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 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 396 locating_active_rect_ = false; | 396 locating_active_rect_ = false; |
| 397 | 397 |
| 398 // Notify browser of new location for the selected rectangle. | 398 // Notify browser of new location for the selected rectangle. |
| 399 ReportFindInPageSelection( | 399 ReportFindInPageSelection( |
| 400 OwnerFrame().GetFrameView()->ContentsToRootFrame(result_bounds), | 400 OwnerFrame().GetFrameView()->ContentsToRootFrame(result_bounds), |
| 401 active_match_index_ + 1, identifier); | 401 active_match_index_ + 1, identifier); |
| 402 } | 402 } |
| 403 | 403 |
| 404 OwnerFrame().GetFrame()->GetDocument()->Markers().AddTextMatchMarker( | 404 OwnerFrame().GetFrame()->GetDocument()->Markers().AddTextMatchMarker( |
| 405 EphemeralRange(result_range), | 405 EphemeralRange(result_range), |
| 406 found_active_match ? DocumentMarker::MatchStatus::kActive | 406 found_active_match ? TextMatchMarker::MatchStatus::kActive |
| 407 : DocumentMarker::MatchStatus::kInactive); | 407 : TextMatchMarker::MatchStatus::kInactive); |
| 408 | 408 |
| 409 find_matches_cache_.push_back( | 409 find_matches_cache_.push_back( |
| 410 FindMatch(result_range, last_match_count_ + match_count)); | 410 FindMatch(result_range, last_match_count_ + match_count)); |
| 411 | 411 |
| 412 // Set the new start for the search range to be the end of the previous | 412 // Set the new start for the search range to be the end of the previous |
| 413 // result range. There is no need to use a VisiblePosition here, | 413 // result range. There is no need to use a VisiblePosition here, |
| 414 // since findPlainText will use a TextIterator to go over the visible | 414 // since findPlainText will use a TextIterator to go over the visible |
| 415 // text nodes. | 415 // text nodes. |
| 416 search_start = result.EndPosition(); | 416 search_start = result.EndPosition(); |
| 417 | 417 |
| (...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 794 | 794 |
| 795 DEFINE_TRACE(TextFinder) { | 795 DEFINE_TRACE(TextFinder) { |
| 796 visitor->Trace(owner_frame_); | 796 visitor->Trace(owner_frame_); |
| 797 visitor->Trace(active_match_); | 797 visitor->Trace(active_match_); |
| 798 visitor->Trace(resume_scoping_from_range_); | 798 visitor->Trace(resume_scoping_from_range_); |
| 799 visitor->Trace(deferred_scoping_work_); | 799 visitor->Trace(deferred_scoping_work_); |
| 800 visitor->Trace(find_matches_cache_); | 800 visitor->Trace(find_matches_cache_); |
| 801 } | 801 } |
| 802 | 802 |
| 803 } // namespace blink | 803 } // namespace blink |
| OLD | NEW |