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

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

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

Powered by Google App Engine
This is Rietveld 408576698