| 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 685 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 696 locating_active_rect_(false), | 696 locating_active_rect_(false), |
| 697 scoping_in_progress_(false), | 697 scoping_in_progress_(false), |
| 698 last_find_request_completed_with_no_matches_(false), | 698 last_find_request_completed_with_no_matches_(false), |
| 699 find_match_rects_are_valid_(false) {} | 699 find_match_rects_are_valid_(false) {} |
| 700 | 700 |
| 701 TextFinder::~TextFinder() {} | 701 TextFinder::~TextFinder() {} |
| 702 | 702 |
| 703 bool TextFinder::SetMarkerActive(Range* range, bool active) { | 703 bool TextFinder::SetMarkerActive(Range* range, bool active) { |
| 704 if (!range || range->collapsed()) | 704 if (!range || range->collapsed()) |
| 705 return false; | 705 return false; |
| 706 return OwnerFrame().GetFrame()->GetDocument()->Markers().SetMarkersActive( | 706 return OwnerFrame() |
| 707 EphemeralRange(range), active); | 707 .GetFrame() |
| 708 ->GetDocument() |
| 709 ->Markers() |
| 710 .SetTextMatchMarkersActive(EphemeralRange(range), active); |
| 708 } | 711 } |
| 709 | 712 |
| 710 void TextFinder::UnmarkAllTextMatches() { | 713 void TextFinder::UnmarkAllTextMatches() { |
| 711 LocalFrame* frame = OwnerFrame().GetFrame(); | 714 LocalFrame* frame = OwnerFrame().GetFrame(); |
| 712 if (frame && frame->GetPage() && | 715 if (frame && frame->GetPage() && |
| 713 frame->GetEditor().MarkedTextMatchesAreHighlighted()) { | 716 frame->GetEditor().MarkedTextMatchesAreHighlighted()) { |
| 714 frame->GetDocument()->Markers().RemoveMarkersOfTypes( | 717 frame->GetDocument()->Markers().RemoveMarkersOfTypes( |
| 715 DocumentMarker::kTextMatch); | 718 DocumentMarker::kTextMatch); |
| 716 } | 719 } |
| 717 } | 720 } |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 790 | 793 |
| 791 DEFINE_TRACE(TextFinder) { | 794 DEFINE_TRACE(TextFinder) { |
| 792 visitor->Trace(owner_frame_); | 795 visitor->Trace(owner_frame_); |
| 793 visitor->Trace(active_match_); | 796 visitor->Trace(active_match_); |
| 794 visitor->Trace(resume_scoping_from_range_); | 797 visitor->Trace(resume_scoping_from_range_); |
| 795 visitor->Trace(deferred_scoping_work_); | 798 visitor->Trace(deferred_scoping_work_); |
| 796 visitor->Trace(find_matches_cache_); | 799 visitor->Trace(find_matches_cache_); |
| 797 } | 800 } |
| 798 | 801 |
| 799 } // namespace blink | 802 } // namespace blink |
| OLD | NEW |