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

Side by Side Diff: third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.h

Issue 2755013004: Improve how DocumentMarkerController updates markers in response to text edits (Closed)
Patch Set: Rebase Created 3 years, 9 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 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights
7 * reserved. 7 * reserved.
8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved.
9 * (http://www.torchmobile.com/) 9 * (http://www.torchmobile.com/)
10 * Copyright (C) Research In Motion Limited 2010. All rights reserved. 10 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
(...skipping 12 matching lines...) Expand all
23 * along with this library; see the file COPYING.LIB. If not, write to 23 * along with this library; see the file COPYING.LIB. If not, write to
24 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 24 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
25 * Boston, MA 02110-1301, USA. 25 * Boston, MA 02110-1301, USA.
26 * 26 *
27 */ 27 */
28 28
29 #ifndef DocumentMarkerController_h 29 #ifndef DocumentMarkerController_h
30 #define DocumentMarkerController_h 30 #define DocumentMarkerController_h
31 31
32 #include "core/CoreExport.h" 32 #include "core/CoreExport.h"
33 #include "core/dom/SynchronousMutationObserver.h"
33 #include "core/editing/iterators/TextIterator.h" 34 #include "core/editing/iterators/TextIterator.h"
34 #include "core/editing/markers/DocumentMarker.h" 35 #include "core/editing/markers/DocumentMarker.h"
35 #include "platform/geometry/IntRect.h" 36 #include "platform/geometry/IntRect.h"
36 #include "platform/heap/Handle.h" 37 #include "platform/heap/Handle.h"
37 #include "wtf/HashMap.h" 38 #include "wtf/HashMap.h"
38 #include "wtf/Vector.h" 39 #include "wtf/Vector.h"
39 40
40 namespace blink { 41 namespace blink {
41 42
42 class Node; 43 class Node;
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 DoNotRemovePartiallyOverlappingMarker); 101 DoNotRemovePartiallyOverlappingMarker);
101 102
102 void removeMarkers( 103 void removeMarkers(
103 DocumentMarker::MarkerTypes = DocumentMarker::AllMarkers()); 104 DocumentMarker::MarkerTypes = DocumentMarker::AllMarkers());
104 void removeMarkers( 105 void removeMarkers(
105 Node*, 106 Node*,
106 DocumentMarker::MarkerTypes = DocumentMarker::AllMarkers()); 107 DocumentMarker::MarkerTypes = DocumentMarker::AllMarkers());
107 void removeMarkers(const MarkerRemoverPredicate& shouldRemoveMarker); 108 void removeMarkers(const MarkerRemoverPredicate& shouldRemoveMarker);
108 void repaintMarkers( 109 void repaintMarkers(
109 DocumentMarker::MarkerTypes = DocumentMarker::AllMarkers()); 110 DocumentMarker::MarkerTypes = DocumentMarker::AllMarkers());
110 void shiftMarkers(Node*, unsigned startOffset, int delta);
111 // Returns true if markers within a range are found. 111 // Returns true if markers within a range are found.
112 bool setMarkersActive(const EphemeralRange&, bool); 112 bool setMarkersActive(const EphemeralRange&, bool);
113 // Returns true if markers within a range defined by a node, |startOffset| and 113 // Returns true if markers within a range defined by a node, |startOffset| and
114 // |endOffset| are found. 114 // |endOffset| are found.
115 bool setMarkersActive(Node*, unsigned startOffset, unsigned endOffset, bool); 115 bool setMarkersActive(Node*, unsigned startOffset, unsigned endOffset, bool);
116 bool hasMarkers(Node* node) const { return m_markers.contains(node); } 116 bool hasMarkers(Node* node) const { return m_markers.contains(node); }
117 117
118 DocumentMarkerVector markersFor( 118 DocumentMarkerVector markersFor(
119 Node*, 119 Node*,
120 DocumentMarker::MarkerTypes = DocumentMarker::AllMarkers()); 120 DocumentMarker::MarkerTypes = DocumentMarker::AllMarkers());
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 const Member<const Document> m_document; 159 const Member<const Document> m_document;
160 }; 160 };
161 161
162 } // namespace blink 162 } // namespace blink
163 163
164 #ifndef NDEBUG 164 #ifndef NDEBUG
165 void showDocumentMarkers(const blink::DocumentMarkerController*); 165 void showDocumentMarkers(const blink::DocumentMarkerController*);
166 #endif 166 #endif
167 167
168 #endif // DocumentMarkerController_h 168 #endif // DocumentMarkerController_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698