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

Side by Side Diff: third_party/WebKit/Source/core/editing/markers/TextMatchMarkerListImpl.cpp

Issue 2909553002: [DMC #20] Remove DocumentMarker::IsActiveMatch() and SetIsActiveMatch() methods (Closed)
Patch Set: Rebase Created 3 years, 6 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
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/editing/markers/TextMatchMarkerListImpl.h" 5 #include "core/editing/markers/TextMatchMarkerListImpl.h"
6 6
7 #include "core/dom/Node.h" 7 #include "core/dom/Node.h"
8 #include "core/dom/Range.h" 8 #include "core/dom/Range.h"
9 #include "core/editing/EphemeralRange.h" 9 #include "core/editing/EphemeralRange.h"
10 #include "core/editing/markers/DocumentMarkerListEditor.h" 10 #include "core/editing/markers/DocumentMarkerListEditor.h"
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 markers_.begin(), markers_.end(), start_offset, 88 markers_.begin(), markers_.end(), start_offset,
89 [](size_t start_offset, const Member<DocumentMarker>& marker) { 89 [](size_t start_offset, const Member<DocumentMarker>& marker) {
90 return start_offset < marker->EndOffset(); 90 return start_offset < marker->EndOffset();
91 }); 91 });
92 for (auto it = start; it != markers_.end(); ++it) { 92 for (auto it = start; it != markers_.end(); ++it) {
93 DocumentMarker& marker = **it; 93 DocumentMarker& marker = **it;
94 // Markers are returned in order, so stop if we are now past the specified 94 // Markers are returned in order, so stop if we are now past the specified
95 // range. 95 // range.
96 if (marker.StartOffset() >= end_offset) 96 if (marker.StartOffset() >= end_offset)
97 break; 97 break;
98 marker.SetIsActiveMatch(active); 98 ToTextMatchMarker(marker).SetIsActiveMatch(active);
99 doc_dirty = true; 99 doc_dirty = true;
100 } 100 }
101 return doc_dirty; 101 return doc_dirty;
102 } 102 }
103 103
104 } // namespace blink 104 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698