| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |