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

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: Fix 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/markers/TextMatchMarkerListImpl.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.cpp
diff --git a/third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.cpp b/third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.cpp
index e600ded01547177b7675c048a34b62a7fe884ad0..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,23 +415,6 @@ Vector<IntRect> DocumentMarkerController::RenderedRectsForTextMatchMarkers() {
return result;
}
-// TODO(rlanday): move this to TextMatchMarkerListImpl.cpp
-Vector<IntRect> TextMatchMarkerListImpl::RenderedRects(const Node& node) const {
- Vector<IntRect> result;
-
- for (DocumentMarker* marker : markers_) {
- RenderedDocumentMarker* const rendered_marker =
- ToRenderedDocumentMarker(marker);
- if (!rendered_marker->IsValid())
- UpdateMarkerRenderedRect(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();
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/markers/TextMatchMarkerListImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698