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

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

Issue 2763893002: [WIP] Clean up DocumentMarkerController API (Closed)
Patch Set: Move CompositionMarkerList::at() into previous CL Created 3 years, 9 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.h
diff --git a/third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.h b/third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.h
index 8bcf1a07c617a9a7b9a7658e9a65da3c80f3d806..e1a99b4a41df48899746c6311809478b297ab73f 100644
--- a/third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.h
+++ b/third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.h
@@ -43,14 +43,6 @@ namespace blink {
class DocumentMarkerList;
class Node;
-class MarkerRemoverPredicate final {
- public:
- explicit MarkerRemoverPredicate(const Vector<String>& words);
- bool operator()(const DocumentMarker&, const Text&) const;
-
- Vector<String> m_words;
-};
-
class CORE_EXPORT DocumentMarkerController final
: public GarbageCollected<DocumentMarkerController>,
public SynchronousMutationObserver {
@@ -104,14 +96,17 @@ class CORE_EXPORT DocumentMarkerController final
void removeMarkers(
Node*,
DocumentMarker::MarkerTypes = DocumentMarker::AllMarkers());
- void removeMarkers(const MarkerRemoverPredicate& shouldRemoveMarker);
+ void removeSpellingMarkersForWords(const Vector<String>& words);
void repaintMarkers(
DocumentMarker::MarkerTypes = DocumentMarker::AllMarkers());
// Returns true if markers within a range are found.
- bool setMarkersActive(const EphemeralRange&, bool);
+ bool setTextMatchMarkersActive(const EphemeralRange&, bool);
// Returns true if markers within a range defined by a node, |startOffset| and
// |endOffset| are found.
- bool setMarkersActive(Node*, unsigned startOffset, unsigned endOffset, bool);
+ bool setTextMatchMarkersActive(Node*,
+ unsigned startOffset,
+ unsigned endOffset,
+ bool);
bool hasMarkers(Node*) const;
DocumentMarkerVector markersFor(
@@ -120,10 +115,10 @@ class CORE_EXPORT DocumentMarkerController final
DocumentMarkerVector markersInRange(const EphemeralRange&,
DocumentMarker::MarkerTypes);
DocumentMarkerVector markers();
- Vector<IntRect> renderedRectsForMarkers(DocumentMarker::MarkerType);
+ Vector<IntRect> renderedRectsForTextMatchMarkers();
- void invalidateRectsForAllMarkers();
- void invalidateRectsForMarkersInNode(Node&);
+ void invalidateRectsForAllTextMatchMarkers();
+ void invalidateRectsForTextMatchMarkersInNode(Node&);
DECLARE_TRACE();

Powered by Google App Engine
This is Rietveld 408576698