| Index: third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.cpp
|
| diff --git a/third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.cpp b/third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.cpp
|
| index 761cea8414dce75c79056d74110aa1d42f2e80fb..ab1dfbf7ff92fbaf4ebe1720e1615827ac9de419 100644
|
| --- a/third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.cpp
|
| +++ b/third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.cpp
|
| @@ -398,6 +398,32 @@ DocumentMarker* DocumentMarkerController::MarkerAtPosition(
|
| return nullptr;
|
| }
|
|
|
| +DocumentMarker* DocumentMarkerController::FirstMarkerIntersectingOffsetRange(
|
| + const Text& node,
|
| + unsigned start_offset,
|
| + unsigned end_offset,
|
| + DocumentMarker::MarkerTypes types) {
|
| + if (!PossiblyHasMarkers(types))
|
| + return nullptr;
|
| +
|
| + MarkerLists* const markers = markers_.at(&node);
|
| + if (!markers)
|
| + return nullptr;
|
| +
|
| + for (DocumentMarker::MarkerType type : types) {
|
| + const DocumentMarkerList* const list = ListForType(markers, type);
|
| + if (!list)
|
| + continue;
|
| +
|
| + DocumentMarker* found_marker =
|
| + list->FirstMarkerIntersectingRange(start_offset, end_offset);
|
| + if (found_marker)
|
| + return found_marker;
|
| + }
|
| +
|
| + return nullptr;
|
| +}
|
| +
|
| DocumentMarkerVector DocumentMarkerController::MarkersFor(
|
| Node* node,
|
| DocumentMarker::MarkerTypes marker_types) {
|
|
|