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

Unified Diff: Source/core/dom/DocumentMarkerController.h

Issue 419563003: Adding a word to dictionary should remove spelling markers (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebased to a newer master Created 6 years, 4 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: Source/core/dom/DocumentMarkerController.h
diff --git a/Source/core/dom/DocumentMarkerController.h b/Source/core/dom/DocumentMarkerController.h
index c7f0e456b21235def99ddf076e5002f96baea5f6..c771ce59f821ca534b70cdbc8dd20e23ceb75911 100644
--- a/Source/core/dom/DocumentMarkerController.h
+++ b/Source/core/dom/DocumentMarkerController.h
@@ -40,6 +40,16 @@ class LayoutRect;
class Node;
class Range;
class RenderedDocumentMarker;
+class Text;
+
+class MarkerRemoverPredicate FINAL {
+public:
+ explicit MarkerRemoverPredicate(const Vector<String>& words);
+ bool operator()(const DocumentMarker&, const Text&) const;
+
+private:
+ Vector<String> m_words;
+};
class DocumentMarkerController FINAL : public NoBaseWillBeGarbageCollected<DocumentMarkerController> {
WTF_MAKE_NONCOPYABLE(DocumentMarkerController); WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED;
@@ -67,6 +77,7 @@ public:
void removeMarkers(DocumentMarker::MarkerTypes = DocumentMarker::AllMarkers());
void removeMarkers(Node*, DocumentMarker::MarkerTypes = DocumentMarker::AllMarkers());
+ void removeMarkers(const MarkerRemoverPredicate& shouldRemoveMarker);
void repaintMarkers(DocumentMarker::MarkerTypes = DocumentMarker::AllMarkers());
void invalidateRenderedRectsForMarkersInRect(const LayoutRect&);
void shiftMarkers(Node*, unsigned startOffset, int delta);
« no previous file with comments | « no previous file | Source/core/dom/DocumentMarkerController.cpp » ('j') | Source/core/dom/DocumentMarkerController.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698