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

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

Issue 2857173003: Remove DocumentMarkerController::MarkersInRange() (Closed)
Patch Set: Remove MarkersInRange() Created 3 years, 7 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
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 dc2881b92fbe6d4cfae34626bc7e712bcfb6ae0e..261266cd9e2dd8d76667a0095d4a75319f3471db 100644
--- a/third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.cpp
+++ b/third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.cpp
@@ -367,37 +367,6 @@ DocumentMarkerVector DocumentMarkerController::Markers() {
return result;
}
-DocumentMarkerVector DocumentMarkerController::MarkersInRange(
- const EphemeralRange& range,
- DocumentMarker::MarkerTypes marker_types) {
- if (!PossiblyHasMarkers(marker_types))
- return DocumentMarkerVector();
-
- DocumentMarkerVector found_markers;
-
- Node* start_container = range.StartPosition().ComputeContainerNode();
- DCHECK(start_container);
- unsigned start_offset = static_cast<unsigned>(
- range.StartPosition().ComputeOffsetInContainerNode());
- Node* end_container = range.EndPosition().ComputeContainerNode();
- DCHECK(end_container);
- unsigned end_offset =
- static_cast<unsigned>(range.EndPosition().ComputeOffsetInContainerNode());
-
- for (Node& node : range.Nodes()) {
- for (DocumentMarker* marker : MarkersFor(&node)) {
- if (!marker_types.Contains(marker->GetType()))
- continue;
- if (node == start_container && marker->EndOffset() <= start_offset)
- continue;
- if (node == end_container && marker->StartOffset() >= end_offset)
- continue;
- found_markers.push_back(marker);
- }
- }
- return found_markers;
-}
-
Vector<IntRect> DocumentMarkerController::RenderedRectsForMarkers(
DocumentMarker::MarkerType marker_type) {
Vector<IntRect> result;

Powered by Google App Engine
This is Rietveld 408576698