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

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

Issue 2953183004: Comment/test for DocumentMarkerList::MarkersIntersectingRange() with collapsed range (Closed)
Patch Set: Update comment, Empty => Collapsed Created 3 years, 6 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/markers/DocumentMarkerListEditorTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 DocumentMarkerList_h 5 #ifndef DocumentMarkerList_h
6 #define DocumentMarkerList_h 6 #define DocumentMarkerList_h
7 7
8 #include "core/CoreExport.h" 8 #include "core/CoreExport.h"
9 #include "core/editing/markers/DocumentMarker.h" 9 #include "core/editing/markers/DocumentMarker.h"
10 #include "platform/heap/Handle.h" 10 #include "platform/heap/Handle.h"
(...skipping 15 matching lines...) Expand all
26 // Returns the single marker type supported by the list implementation. 26 // Returns the single marker type supported by the list implementation.
27 virtual DocumentMarker::MarkerType MarkerType() const = 0; 27 virtual DocumentMarker::MarkerType MarkerType() const = 0;
28 28
29 virtual bool IsEmpty() const = 0; 29 virtual bool IsEmpty() const = 0;
30 30
31 virtual void Add(DocumentMarker*) = 0; 31 virtual void Add(DocumentMarker*) = 0;
32 virtual void Clear() = 0; 32 virtual void Clear() = 0;
33 33
34 // Returns all markers 34 // Returns all markers
35 virtual const HeapVector<Member<DocumentMarker>>& GetMarkers() const = 0; 35 virtual const HeapVector<Member<DocumentMarker>>& GetMarkers() const = 0;
36 // Returns markers that have non-empty overlap with the range 36 // Return markers whose interiors have non-empty overlap with the range
Xiaocheng 2017/06/23 21:40:32 nit: s/Return/Returns/ Sorry for my typo.
37 // [start_offset, end_offset] 37 // [start_offset, end_offset]. Note that the range can be collapsed, in which
38 // case markers containing the offset in their interiors are returned.
38 virtual HeapVector<Member<DocumentMarker>> MarkersIntersectingRange( 39 virtual HeapVector<Member<DocumentMarker>> MarkersIntersectingRange(
39 unsigned start_offset, 40 unsigned start_offset,
40 unsigned end_offset) const = 0; 41 unsigned end_offset) const = 0;
41 42
42 // Returns true if at least one marker is copied, false otherwise 43 // Returns true if at least one marker is copied, false otherwise
43 virtual bool MoveMarkers(int length, DocumentMarkerList* dst_list) = 0; 44 virtual bool MoveMarkers(int length, DocumentMarkerList* dst_list) = 0;
44 45
45 // Returns true if at least one marker is removed, false otherwise 46 // Returns true if at least one marker is removed, false otherwise
46 virtual bool RemoveMarkers(unsigned start_offset, int length) = 0; 47 virtual bool RemoveMarkers(unsigned start_offset, int length) = 0;
47 48
48 // Returns true if at least one marker is shifted or removed, false otherwise 49 // Returns true if at least one marker is shifted or removed, false otherwise
49 virtual bool ShiftMarkers(unsigned offset, 50 virtual bool ShiftMarkers(unsigned offset,
50 unsigned old_length, 51 unsigned old_length,
51 unsigned new_length) = 0; 52 unsigned new_length) = 0;
52 53
53 DEFINE_INLINE_VIRTUAL_TRACE() {} 54 DEFINE_INLINE_VIRTUAL_TRACE() {}
54 55
55 protected: 56 protected:
56 DocumentMarkerList(); 57 DocumentMarkerList();
57 58
58 private: 59 private:
59 DISALLOW_COPY_AND_ASSIGN(DocumentMarkerList); 60 DISALLOW_COPY_AND_ASSIGN(DocumentMarkerList);
60 }; 61 };
61 62
62 } // namespace blink 63 } // namespace blink
63 64
64 #endif // DocumentMarkerList_h 65 #endif // DocumentMarkerList_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/markers/DocumentMarkerListEditorTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698