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

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

Issue 2900573002: [DMC #12] Move some method impls from DocumentMarkerController.cpp to final place (Closed)
Patch Set: Rebase 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 5964f741ce826879a2248416ae36eee25e356d8e..2d2935103f047ef19e08f38e60197555f39aae63 100644
--- a/third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.cpp
+++ b/third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.cpp
@@ -31,7 +31,6 @@
#include <algorithm>
#include "core/dom/Node.h"
#include "core/dom/NodeTraversal.h"
-#include "core/dom/Range.h"
#include "core/dom/Text.h"
#include "core/editing/VisibleUnits.h"
#include "core/editing/iterators/TextIterator.h"
@@ -200,14 +199,6 @@ void DocumentMarkerController::RemoveMarkersInRange(
DocumentMarkerController::RemoveMarkers(marked_text, marker_types);
}
-static void UpdateMarkerRenderedRect(const Node& node,
- RenderedDocumentMarker& marker) {
- const Position startPosition(&const_cast<Node&>(node), marker.StartOffset());
- const Position endPostion(&const_cast<Node&>(node), marker.EndOffset());
- EphemeralRange range(startPosition, endPostion);
- marker.SetRenderedRect(LayoutRect(ComputeTextRect(range)));
-}
-
// Markers are stored in order sorted by their start offset.
// Markers of the same type do not overlap each other.
@@ -424,35 +415,11 @@ Vector<IntRect> DocumentMarkerController::RenderedRectsForTextMatchMarkers() {
return result;
}
-// TODO(rlanday): move this to TextMatchMarkerListImpl.cpp
-Vector<IntRect> TextMatchMarkerListImpl::RenderedRects(const Node& node) {
- Vector<IntRect> result;
-
- for (DocumentMarker* marker : markers_) {
- RenderedDocumentMarker* const rendered_marker =
- ToRenderedDocumentMarker(marker);
- UpdateMarkerRenderedRectIfNeeded(node, *rendered_marker);
- if (!rendered_marker->IsRendered())
- continue;
- result.push_back(rendered_marker->RenderedRect());
- }
-
- return result;
-}
-
static void InvalidatePaintForTickmarks(const Node& node) {
if (FrameView* frame_view = node.GetDocument().View())
frame_view->InvalidatePaintForTickmarks();
}
-// TODO(rlanday): move this to TextMatchMarkerListImpl.cpp
-void TextMatchMarkerListImpl::UpdateMarkerRenderedRectIfNeeded(
- const Node& node,
- RenderedDocumentMarker& marker) {
- if (!marker.IsValid())
- UpdateMarkerRenderedRect(node, marker);
-}
-
void DocumentMarkerController::InvalidateRectsForTextMatchMarkersInNode(
const Node& node) {
MarkerLists* markers = markers_.at(&node);

Powered by Google App Engine
This is Rietveld 408576698