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

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

Issue 2820633002: [DMC #2] Add DocumentMarkerList interface and GenericDocumentMarkerListImpl (Closed)
Patch Set: Fix nit 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
« no previous file with comments | « third_party/WebKit/Source/core/editing/markers/GenericDocumentMarkerListImpl.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/GenericDocumentMarkerListImpl.h"
6
7 #include "core/editing/markers/DocumentMarkerListEditor.h"
8 #include "core/editing/markers/RenderedDocumentMarker.h"
9
10 namespace blink {
11
12 bool GenericDocumentMarkerListImpl::IsEmpty() const {
13 return markers_.IsEmpty();
14 }
15
16 void GenericDocumentMarkerListImpl::Add(DocumentMarker* marker) {
17 DocumentMarkerListEditor::AddMarker(&markers_, marker);
18 }
19
20 void GenericDocumentMarkerListImpl::Clear() {
21 markers_.clear();
22 }
23
24 const HeapVector<Member<RenderedDocumentMarker>>&
25 GenericDocumentMarkerListImpl::GetMarkers() const {
26 return markers_;
27 }
28
29 bool GenericDocumentMarkerListImpl::MoveMarkers(int length,
30 DocumentMarkerList* dst_list) {
31 return DocumentMarkerListEditor::MoveMarkers(&markers_, length, dst_list);
32 }
33
34 bool GenericDocumentMarkerListImpl::RemoveMarkers(unsigned start_offset,
35 int length) {
36 return DocumentMarkerListEditor::RemoveMarkers(&markers_, start_offset,
37 length);
38 }
39
40 bool GenericDocumentMarkerListImpl::RemoveMarkersUnderWords(
41 const String& node_text,
42 const Vector<String>& words) {
43 return DocumentMarkerListEditor::RemoveMarkersUnderWords(&markers_, node_text,
44 words);
45 }
46
47 bool GenericDocumentMarkerListImpl::ShiftMarkers(unsigned offset,
48 unsigned old_length,
49 unsigned new_length) {
50 return DocumentMarkerListEditor::ShiftMarkers(&markers_, offset, old_length,
51 new_length);
52 }
53
54 DEFINE_TRACE(GenericDocumentMarkerListImpl) {
55 visitor->Trace(markers_);
56 DocumentMarkerList::Trace(visitor);
57 }
58
59 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/editing/markers/GenericDocumentMarkerListImpl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698