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

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

Issue 2829543002: [DMC #5] Add SpellCheckMarkerListImpl (Closed)
Patch Set: Remove comment about RemoveMarkersUnderWords() being SpellCheckMarkerListImpl-specific (it's not ye… Created 3 years, 7 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 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef DocumentMarkerListEditor_h 5 #ifndef DocumentMarkerListEditor_h
6 #define DocumentMarkerListEditor_h 6 #define DocumentMarkerListEditor_h
7 7
8 #include "core/editing/markers/DocumentMarkerList.h" 8 #include "core/editing/markers/DocumentMarkerList.h"
9 #include "platform/heap/Handle.h" 9 #include "platform/heap/Handle.h"
10 10
11 namespace blink { 11 namespace blink {
12 12
13 class DocumentMarker; 13 class DocumentMarker;
14 class RenderedDocumentMarker; 14 class RenderedDocumentMarker;
15 15
16 class DocumentMarkerListEditor { 16 class DocumentMarkerListEditor {
17 public: 17 public:
18 using MarkerList = HeapVector<Member<RenderedDocumentMarker>>; 18 using MarkerList = HeapVector<Member<RenderedDocumentMarker>>;
19 19
20 static void AddMarkerAndMergeOverlapping(MarkerList*, const DocumentMarker*);
21 static void AddMarkerWithoutMergingOverlapping(MarkerList*, 20 static void AddMarkerWithoutMergingOverlapping(MarkerList*,
22 const DocumentMarker*); 21 const DocumentMarker*);
23 22
24 // Returns true if a marker was moved, false otherwise. 23 // Returns true if a marker was moved, false otherwise.
25 static bool MoveMarkers(MarkerList* src_list, 24 static bool MoveMarkers(MarkerList* src_list,
26 int length, 25 int length,
27 DocumentMarkerList* dst_list); 26 DocumentMarkerList* dst_list);
28 27
29 // Returns true if a marker was removed, false otherwise. 28 // Returns true if a marker was removed, false otherwise.
30 static bool RemoveMarkers(MarkerList*, unsigned start_offset, int length); 29 static bool RemoveMarkers(MarkerList*, unsigned start_offset, int length);
31 30
32 // Returns true if a marker was removed, false otherwise. 31 // Returns true if a marker was removed, false otherwise.
33 static bool RemoveMarkersUnderWords(MarkerList*, 32 static bool RemoveMarkersUnderWords(MarkerList*,
34 const String& node_text, 33 const String& node_text,
35 const Vector<String>& words); 34 const Vector<String>& words);
36 35
37 // Returns true if a marker was shifted or removed, false otherwise. 36 // Returns true if a marker was shifted or removed, false otherwise.
38 static bool ShiftMarkers(MarkerList*, 37 static bool ShiftMarkers(MarkerList*,
39 unsigned offset, 38 unsigned offset,
40 unsigned old_length, 39 unsigned old_length,
41 unsigned new_length); 40 unsigned new_length);
42 }; 41 };
43 42
44 } // namespace blink 43 } // namespace blink
45 44
46 #endif // DocumentMarkerListEditor_h 45 #endif // DocumentMarkerListEditor_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698