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

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

Issue 2868413002: [DMC #5.55] Add DocumentMarkerList::MarkerType() (Closed)
Patch Set: Fix mistake in comment 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/GenericDocumentMarkerListImpl.h" 5 #include "core/editing/markers/GenericDocumentMarkerListImpl.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 GenericDocumentMarkerListImpl::GenericDocumentMarkerListImpl(
13 DocumentMarker::MarkerType marker_type)
14 : marker_type_(marker_type) {}
15
16 DocumentMarker::MarkerType GenericDocumentMarkerListImpl::MarkerType() const {
17 return marker_type_;
18 }
19
12 bool GenericDocumentMarkerListImpl::IsEmpty() const { 20 bool GenericDocumentMarkerListImpl::IsEmpty() const {
13 return markers_.IsEmpty(); 21 return markers_.IsEmpty();
14 } 22 }
15 23
16 void GenericDocumentMarkerListImpl::Add(DocumentMarker* marker) { 24 void GenericDocumentMarkerListImpl::Add(DocumentMarker* marker) {
17 switch (marker->GetType()) { 25 switch (marker->GetType()) {
18 case DocumentMarker::kSpelling: 26 case DocumentMarker::kSpelling:
19 case DocumentMarker::kGrammar: 27 case DocumentMarker::kGrammar:
20 NOTREACHED(); 28 NOTREACHED();
21 case DocumentMarker::kTextMatch: 29 case DocumentMarker::kTextMatch:
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 return DocumentMarkerListEditor::ShiftMarkers(&markers_, offset, old_length, 71 return DocumentMarkerListEditor::ShiftMarkers(&markers_, offset, old_length,
64 new_length); 72 new_length);
65 } 73 }
66 74
67 DEFINE_TRACE(GenericDocumentMarkerListImpl) { 75 DEFINE_TRACE(GenericDocumentMarkerListImpl) {
68 visitor->Trace(markers_); 76 visitor->Trace(markers_);
69 DocumentMarkerList::Trace(visitor); 77 DocumentMarkerList::Trace(visitor);
70 } 78 }
71 79
72 } // namespace blink 80 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698