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 676 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
687 m_locatingActiveRect(false), | 687 m_locatingActiveRect(false), |
688 m_scopingInProgress(false), | 688 m_scopingInProgress(false), |
689 m_lastFindRequestCompletedWithNoMatches(false), | 689 m_lastFindRequestCompletedWithNoMatches(false), |
690 m_findMatchRectsAreValid(false) {} | 690 m_findMatchRectsAreValid(false) {} |
691 | 691 |
692 TextFinder::~TextFinder() {} | 692 TextFinder::~TextFinder() {} |
693 | 693 |
694 bool TextFinder::setMarkerActive(Range* range, bool active) { | 694 bool TextFinder::setMarkerActive(Range* range, bool active) { |
695 if (!range || range->collapsed()) | 695 if (!range || range->collapsed()) |
696 return false; | 696 return false; |
697 return ownerFrame().frame()->document()->markers().setMarkersActive( | 697 return ownerFrame().frame()->document()->markers().setTextMatchMarkersActive( |
698 EphemeralRange(range), active); | 698 EphemeralRange(range), active); |
699 } | 699 } |
700 | 700 |
701 void TextFinder::unmarkAllTextMatches() { | 701 void TextFinder::unmarkAllTextMatches() { |
702 LocalFrame* frame = ownerFrame().frame(); | 702 LocalFrame* frame = ownerFrame().frame(); |
703 if (frame && frame->page() && | 703 if (frame && frame->page() && |
704 frame->editor().markedTextMatchesAreHighlighted()) | 704 frame->editor().markedTextMatchesAreHighlighted()) |
705 frame->document()->markers().removeMarkers(DocumentMarker::TextMatch); | 705 frame->document()->markers().removeMarkers(DocumentMarker::TextMatch); |
706 } | 706 } |
707 | 707 |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
779 | 779 |
780 DEFINE_TRACE(TextFinder) { | 780 DEFINE_TRACE(TextFinder) { |
781 visitor->trace(m_ownerFrame); | 781 visitor->trace(m_ownerFrame); |
782 visitor->trace(m_activeMatch); | 782 visitor->trace(m_activeMatch); |
783 visitor->trace(m_resumeScopingFromRange); | 783 visitor->trace(m_resumeScopingFromRange); |
784 visitor->trace(m_deferredScopingWork); | 784 visitor->trace(m_deferredScopingWork); |
785 visitor->trace(m_findMatchesCache); | 785 visitor->trace(m_findMatchesCache); |
786 } | 786 } |
787 | 787 |
788 } // namespace blink | 788 } // namespace blink |
OLD | NEW |