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

Unified Diff: third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.h

Issue 2948133004: [MarkersIntersectingRange #2] Add DocumentMarkerController::MarkersIntersectingRange() (Closed)
Patch Set: Remove logging code (call to ShowMarkers()) 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.h
diff --git a/third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.h b/third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.h
index 64d9ebdb2ac32b413c008162d48ba1d76fef6fc3..21fcd9d19da5e13118e0d3d941038d7aab6eef1f 100644
--- a/third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.h
+++ b/third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.h
@@ -94,6 +94,15 @@ class CORE_EXPORT DocumentMarkerController final
// Position in its interior (not at an endpoint), if one exists.
DocumentMarker* MarkerAtPosition(const Position&,
DocumentMarker::MarkerTypes);
+ // Return all markers of the specified types whose interiors have non-empty
+ // overlap with the range [start_offset, end_offset]. Note that the range can
+ // be collapsed, in which case markers containing the offset in their
+ // interiors are returned.
+ HeapVector<std::pair<Member<Node>, Member<DocumentMarker>>>
+ MarkersIntersectingRange(const EphemeralRange&, DocumentMarker::MarkerTypes);
+ HeapVector<std::pair<Member<Node>, Member<DocumentMarker>>>
+ MarkersIntersectingRange(const EphemeralRangeInFlatTree&,
+ DocumentMarker::MarkerTypes);
DocumentMarkerVector MarkersFor(
Node*,
DocumentMarker::MarkerTypes = DocumentMarker::AllMarkers());
@@ -125,6 +134,10 @@ class CORE_EXPORT DocumentMarkerController final
using MarkerMap = HeapHashMap<WeakMember<const Node>, Member<MarkerLists>>;
static Member<DocumentMarkerList>& ListForType(MarkerLists*,
DocumentMarker::MarkerType);
+ template <typename Strategy>
+ HeapVector<std::pair<Member<Node>, Member<DocumentMarker>>>
+ MarkersIntersectingRangeHelper(const EphemeralRangeTemplate<Strategy>&,
yosin_UTC9 2017/07/05 04:51:36 Can we have flat tree version only? I think we don
+ DocumentMarker::MarkerTypes);
bool PossiblyHasMarkers(DocumentMarker::MarkerTypes);
void RemoveMarkersFromList(MarkerMap::iterator, DocumentMarker::MarkerTypes);
void RemoveMarkers(TextIterator&, DocumentMarker::MarkerTypes);
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698