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

Side by Side Diff: Source/core/dom/DocumentMarkerController.h

Issue 1053123007: Invalidate paint of tickmarks on document change (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 8 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 | Annotate | Revision Log
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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 void setMarkersActive(Range*, bool); 84 void setMarkersActive(Range*, bool);
85 void setMarkersActive(Node*, unsigned startOffset, unsigned endOffset, bool) ; 85 void setMarkersActive(Node*, unsigned startOffset, unsigned endOffset, bool) ;
86 86
87 DocumentMarker* markerContainingPoint(const LayoutPoint&, DocumentMarker::Ma rkerType); 87 DocumentMarker* markerContainingPoint(const LayoutPoint&, DocumentMarker::Ma rkerType);
88 DocumentMarkerVector markersFor(Node*, DocumentMarker::MarkerTypes = Documen tMarker::AllMarkers()); 88 DocumentMarkerVector markersFor(Node*, DocumentMarker::MarkerTypes = Documen tMarker::AllMarkers());
89 DocumentMarkerVector markersInRange(Range*, DocumentMarker::MarkerTypes); 89 DocumentMarkerVector markersInRange(Range*, DocumentMarker::MarkerTypes);
90 DocumentMarkerVector markers(); 90 DocumentMarkerVector markers();
91 Vector<IntRect> renderedRectsForMarkers(DocumentMarker::MarkerType); 91 Vector<IntRect> renderedRectsForMarkers(DocumentMarker::MarkerType);
92 void updateRenderedRectsForMarkers(); 92 void updateRenderedRectsForMarkers();
93 93
94 bool textMatchMarkersRemovedOrChanged() const { return m_textMatchMarkersRem ovedOrChanged; }
95 void resetTextMatchMarkersRemovedOrChanged() { m_textMatchMarkersRemovedOrCh anged = false; }
96
94 DECLARE_TRACE(); 97 DECLARE_TRACE();
95 98
96 #ifndef NDEBUG 99 #ifndef NDEBUG
97 void showMarkers() const; 100 void showMarkers() const;
98 #endif 101 #endif
99 102
100 private: 103 private:
101 void addMarker(Node*, const DocumentMarker&); 104 void addMarker(Node*, const DocumentMarker&);
102 105
103 using MarkerList = WillBeHeapVector<OwnPtrWillBeMember<RenderedDocumentMarke r>>; 106 using MarkerList = WillBeHeapVector<OwnPtrWillBeMember<RenderedDocumentMarke r>>;
104 using MarkerLists = WillBeHeapVector<OwnPtrWillBeMember<MarkerList>, Documen tMarker::MarkerTypeIndexesCount>; 107 using MarkerLists = WillBeHeapVector<OwnPtrWillBeMember<MarkerList>, Documen tMarker::MarkerTypeIndexesCount>;
105 using MarkerMap = WillBeHeapHashMap<RawPtrWillBeWeakMember<const Node>, OwnP trWillBeMember<MarkerLists>>; 108 using MarkerMap = WillBeHeapHashMap<RawPtrWillBeWeakMember<const Node>, OwnP trWillBeMember<MarkerLists>>;
106 void mergeOverlapping(MarkerList*, PassOwnPtrWillBeRawPtr<RenderedDocumentMa rker>); 109 void mergeOverlapping(MarkerList*, PassOwnPtrWillBeRawPtr<RenderedDocumentMa rker>);
107 bool possiblyHasMarkers(DocumentMarker::MarkerTypes); 110 bool possiblyHasMarkers(DocumentMarker::MarkerTypes);
108 void removeMarkersFromList(MarkerMap::iterator, DocumentMarker::MarkerTypes) ; 111 void removeMarkersFromList(MarkerMap::iterator, DocumentMarker::MarkerTypes) ;
109 void removeMarkers(TextIterator&, DocumentMarker::MarkerTypes, RemovePartial lyOverlappingMarkerOrNot); 112 void removeMarkers(TextIterator&, DocumentMarker::MarkerTypes, RemovePartial lyOverlappingMarkerOrNot);
110 113
111 MarkerMap m_markers; 114 MarkerMap m_markers;
112 // Provide a quick way to determine whether a particular marker type is abse nt without going through the map. 115 // Provide a quick way to determine whether a particular marker type is abse nt without going through the map.
113 DocumentMarker::MarkerTypes m_possiblyExistingMarkerTypes; 116 DocumentMarker::MarkerTypes m_possiblyExistingMarkerTypes;
117
118 bool m_textMatchMarkersRemovedOrChanged;
114 }; 119 };
115 120
116 } // namespace blink 121 } // namespace blink
117 122
118 #ifndef NDEBUG 123 #ifndef NDEBUG
119 void showDocumentMarkers(const blink::DocumentMarkerController*); 124 void showDocumentMarkers(const blink::DocumentMarkerController*);
120 #endif 125 #endif
121 126
122 #endif // DocumentMarkerController_h 127 #endif // DocumentMarkerController_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698