Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(217)

Side by Side Diff: third_party/WebKit/Source/web/TextFinder.cpp

Issue 2763893002: [WIP] Clean up DocumentMarkerController API (Closed)
Patch Set: Move CompositionMarkerList::at() into previous CL Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/core/testing/Internals.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/testing/Internals.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698