Commit 15534cf3 authored by Yoichi Osato's avatar Yoichi Osato Committed by Commit Bot

Refactoring: Clarify...

Refactoring: Clarify DocumentMarkerController::InvalidateRectsForTextMatchMarkersInNode type to const Text&.

This patch refactors the function to receive only const Text& rather
than Node* because the function does only on text node.

Bug: 868229
Change-Id: I23b5d3c3accf721771d55ebbcf413dda33d71312
Reviewed-on: https://chromium-review.googlesource.com/c/1491167Reviewed-by: default avatarYoshifumi Inoue <yosin@chromium.org>
Commit-Queue: Yoichi Osato <yoichio@chromium.org>
Cr-Commit-Position: refs/heads/master@{#636726}
parent 135930e4
......@@ -713,11 +713,8 @@ static void InvalidatePaintForTickmarks(const Node& node) {
}
void DocumentMarkerController::InvalidateRectsForTextMatchMarkersInNode(
const Node& node) {
// TODO(yoichio): Make this function to take Text instead of Node.
if (!node.IsTextNode())
return;
MarkerLists* markers = markers_.at(&ToText(node));
const Text& node) {
MarkerLists* markers = markers_.at(&node);
const DocumentMarkerList* const marker_list =
ListForType(markers, DocumentMarker::kTextMatch);
......@@ -1021,7 +1018,7 @@ void DocumentMarkerController::DidUpdateCharacterData(CharacterData* node,
return;
if (!node->GetLayoutObject())
return;
InvalidateRectsForTextMatchMarkersInNode(*node);
InvalidateRectsForTextMatchMarkersInNode(ToText(*node));
InvalidatePaintForNode(*node);
}
......
......@@ -146,7 +146,7 @@ class CORE_EXPORT DocumentMarkerController final
Vector<IntRect> LayoutRectsForTextMatchMarkers();
void InvalidateRectsForAllTextMatchMarkers();
void InvalidateRectsForTextMatchMarkersInNode(const Node&);
void InvalidateRectsForTextMatchMarkersInNode(const Text&);
void Trace(blink::Visitor*) override;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment