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

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: Addressed yosin's second comment 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
« no previous file with comments | « no previous file | Source/core/dom/DocumentMarkerController.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/DocumentMarkerController.h
diff --git a/Source/core/dom/DocumentMarkerController.h b/Source/core/dom/DocumentMarkerController.h
index c7f0e456b21235def99ddf076e5002f96baea5f6..d8e358541a046e92be1f01f3e29313203a16ebfa 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 {
+public:
+ MarkerRemoverPredicate(const Vector<String>& words);
+ bool operator()(const DocumentMarker& documentMarker,
+ const Text* textNode) const;
+private:
+ Vector<String> m_words;
yosin_UTC9 2014/08/13 01:29:52 My reasoning was |MarkRemovePredicate| is general
+};
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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698