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

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 comments 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..a13e5508c7efe0e275185bea60fbad8e022c2976 100644
--- a/Source/core/dom/DocumentMarkerController.h
+++ b/Source/core/dom/DocumentMarkerController.h
@@ -35,12 +35,23 @@
namespace blink {
+class Document;
class LayoutPoint;
class LayoutRect;
class Node;
class Range;
class RenderedDocumentMarker;
+class MarkerRemoverPredicate {
+public:
+ MarkerRemoverPredicate(Document&, const Vector<String>& words);
+ bool operator()(const DocumentMarker& documentMarker,
+ const Node* node) const;
+private:
+ Document& m_document;
+ Vector<String> m_words;
+};
+
class DocumentMarkerController FINAL : public NoBaseWillBeGarbageCollected<DocumentMarkerController> {
WTF_MAKE_NONCOPYABLE(DocumentMarkerController); WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED;
DECLARE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(DocumentMarkerController);
@@ -67,6 +78,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