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

Side by Side 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: Removed the removeSpellingMarkersUnderWords method from WebRemoteFrameImpl 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved.
7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
8 * Copyright (C) Research In Motion Limited 2010. All rights reserved. 8 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 void repaintMarkers(DocumentMarker::MarkerTypes = DocumentMarker::AllMarkers ()); 70 void repaintMarkers(DocumentMarker::MarkerTypes = DocumentMarker::AllMarkers ());
71 void invalidateRenderedRectsForMarkersInRect(const LayoutRect&); 71 void invalidateRenderedRectsForMarkersInRect(const LayoutRect&);
72 void shiftMarkers(Node*, unsigned startOffset, int delta); 72 void shiftMarkers(Node*, unsigned startOffset, int delta);
73 void setMarkersActive(Range*, bool); 73 void setMarkersActive(Range*, bool);
74 void setMarkersActive(Node*, unsigned startOffset, unsigned endOffset, bool) ; 74 void setMarkersActive(Node*, unsigned startOffset, unsigned endOffset, bool) ;
75 75
76 DocumentMarker* markerContainingPoint(const LayoutPoint&, DocumentMarker::Ma rkerType); 76 DocumentMarker* markerContainingPoint(const LayoutPoint&, DocumentMarker::Ma rkerType);
77 DocumentMarkerVector markersFor(Node*, DocumentMarker::MarkerTypes = Documen tMarker::AllMarkers()); 77 DocumentMarkerVector markersFor(Node*, DocumentMarker::MarkerTypes = Documen tMarker::AllMarkers());
78 DocumentMarkerVector markersInRange(Range*, DocumentMarker::MarkerTypes); 78 DocumentMarkerVector markersInRange(Range*, DocumentMarker::MarkerTypes);
79 DocumentMarkerVector markers(); 79 DocumentMarkerVector markers();
80 DocumentMarkerAndNodeVector markerNodePairs();
80 Vector<IntRect> renderedRectsForMarkers(DocumentMarker::MarkerType); 81 Vector<IntRect> renderedRectsForMarkers(DocumentMarker::MarkerType);
81 82
82 void trace(Visitor*); 83 void trace(Visitor*);
83 84
84 #ifndef NDEBUG 85 #ifndef NDEBUG
85 void showMarkers() const; 86 void showMarkers() const;
86 #endif 87 #endif
87 88
88 private: 89 private:
89 void addMarker(Node*, const DocumentMarker&); 90 void addMarker(Node*, const DocumentMarker&);
90 91
91 typedef WillBeHeapVector<OwnPtrWillBeMember<RenderedDocumentMarker> > Marker List; 92 typedef WillBeHeapVector<OwnPtrWillBeMember<RenderedDocumentMarker> > Marker List;
92 typedef WillBeHeapVector<OwnPtrWillBeMember<MarkerList>, DocumentMarker::Mar kerTypeIndexesCount> MarkerLists; 93 typedef WillBeHeapVector<OwnPtrWillBeMember<MarkerList>, DocumentMarker::Mar kerTypeIndexesCount> MarkerLists;
93 typedef WillBeHeapHashMap<RawPtrWillBeWeakMember<const Node>, OwnPtrWillBeMe mber<MarkerLists> > MarkerMap; 94 typedef WillBeHeapHashMap<RawPtrWillBeWeakMember<const Node>, OwnPtrWillBeMe mber<MarkerLists> > MarkerMap;
95
94 void mergeOverlapping(MarkerList*, DocumentMarker&); 96 void mergeOverlapping(MarkerList*, DocumentMarker&);
95 bool possiblyHasMarkers(DocumentMarker::MarkerTypes); 97 bool possiblyHasMarkers(DocumentMarker::MarkerTypes);
96 void removeMarkersFromList(MarkerMap::iterator, DocumentMarker::MarkerTypes) ; 98 void removeMarkersFromList(MarkerMap::iterator, DocumentMarker::MarkerTypes) ;
97 99
98 MarkerMap m_markers; 100 MarkerMap m_markers;
99 // Provide a quick way to determine whether a particular marker type is abse nt without going through the map. 101 // Provide a quick way to determine whether a particular marker type is abse nt without going through the map.
100 DocumentMarker::MarkerTypes m_possiblyExistingMarkerTypes; 102 DocumentMarker::MarkerTypes m_possiblyExistingMarkerTypes;
101 }; 103 };
102 104
103 } // namespace blink 105 } // namespace blink
104 106
105 #ifndef NDEBUG 107 #ifndef NDEBUG
106 void showDocumentMarkers(const blink::DocumentMarkerController*); 108 void showDocumentMarkers(const blink::DocumentMarkerController*);
107 #endif 109 #endif
108 110
109 #endif // DocumentMarkerController_h 111 #endif // DocumentMarkerController_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698