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

Side by Side Diff: third_party/WebKit/Source/core/editing/markers/ActiveSuggestionMarkerListImpl.cpp

Issue 2923033002: [ActiveSuggestionMarker #2] Add ActiveSuggestionMarker (Closed)
Patch Set: Update comment on ActiveSuggestionMarker.h 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "core/editing/markers/ActiveSuggestionMarkerListImpl.h"
6
7 #include "core/editing/markers/DocumentMarkerListEditor.h"
8
9 namespace blink {
10
11 DocumentMarker::MarkerType ActiveSuggestionMarkerListImpl::MarkerType() const {
12 return DocumentMarker::kActiveSuggestion;
13 }
14
15 bool ActiveSuggestionMarkerListImpl::IsEmpty() const {
16 return markers_.IsEmpty();
17 }
18
19 void ActiveSuggestionMarkerListImpl::Add(DocumentMarker* marker) {
20 DocumentMarkerListEditor::AddMarkerWithoutMergingOverlapping(&markers_,
21 marker);
22 }
23
24 void ActiveSuggestionMarkerListImpl::Clear() {
25 markers_.clear();
26 }
27
28 const HeapVector<Member<DocumentMarker>>&
29 ActiveSuggestionMarkerListImpl::GetMarkers() const {
30 return markers_;
31 }
32
33 bool ActiveSuggestionMarkerListImpl::MoveMarkers(
34 int length,
35 DocumentMarkerList* dst_markers_) {
36 return DocumentMarkerListEditor::MoveMarkers(&markers_, length, dst_markers_);
37 }
38
39 bool ActiveSuggestionMarkerListImpl::RemoveMarkers(unsigned start_offset,
40 int length) {
41 return DocumentMarkerListEditor::RemoveMarkers(&markers_, start_offset,
42 length);
43 }
44
45 bool ActiveSuggestionMarkerListImpl::ShiftMarkers(unsigned offset,
46 unsigned old_length,
47 unsigned new_length) {
48 return DocumentMarkerListEditor::ShiftMarkersContentIndependent(
49 &markers_, offset, old_length, new_length);
50 }
51
52 DEFINE_TRACE(ActiveSuggestionMarkerListImpl) {
53 visitor->Trace(markers_);
54 DocumentMarkerList::Trace(visitor);
55 }
56
57 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698