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

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, 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
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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 kDoNotRemovePartiallyOverlappingMarker); 97 kDoNotRemovePartiallyOverlappingMarker);
97 98
98 void RemoveMarkers( 99 void RemoveMarkers(
99 DocumentMarker::MarkerTypes = DocumentMarker::AllMarkers()); 100 DocumentMarker::MarkerTypes = DocumentMarker::AllMarkers());
100 void RemoveMarkers( 101 void RemoveMarkers(
101 Node*, 102 Node*,
102 DocumentMarker::MarkerTypes = DocumentMarker::AllMarkers()); 103 DocumentMarker::MarkerTypes = DocumentMarker::AllMarkers());
103 void RemoveMarkers(const MarkerRemoverPredicate& should_remove_marker); 104 void RemoveMarkers(const MarkerRemoverPredicate& should_remove_marker);
104 void RepaintMarkers( 105 void RepaintMarkers(
105 DocumentMarker::MarkerTypes = DocumentMarker::AllMarkers()); 106 DocumentMarker::MarkerTypes = DocumentMarker::AllMarkers());
106 void ShiftMarkers(Node*, unsigned start_offset, int delta);
107 // Returns true if markers within a range are found. 107 // Returns true if markers within a range are found.
108 bool SetMarkersActive(const EphemeralRange&, bool); 108 bool SetMarkersActive(const EphemeralRange&, bool);
109 // Returns true if markers within a range defined by a node, |startOffset| and 109 // Returns true if markers within a range defined by a node, |startOffset| and
110 // |endOffset| are found. 110 // |endOffset| are found.
111 bool SetMarkersActive(Node*, 111 bool SetMarkersActive(Node*,
112 unsigned start_offset, 112 unsigned start_offset,
113 unsigned end_offset, 113 unsigned end_offset,
114 bool); 114 bool);
115 bool HasMarkers(Node* node) const { return markers_.Contains(node); } 115 bool HasMarkers(Node* node) const { return markers_.Contains(node); }
116 116
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 const Member<const Document> document_; 158 const Member<const Document> document_;
159 }; 159 };
160 160
161 } // namespace blink 161 } // namespace blink
162 162
163 #ifndef NDEBUG 163 #ifndef NDEBUG
164 void showDocumentMarkers(const blink::DocumentMarkerController*); 164 void showDocumentMarkers(const blink::DocumentMarkerController*);
165 #endif 165 #endif
166 166
167 #endif // DocumentMarkerController_h 167 #endif // DocumentMarkerController_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698