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

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

Issue 2836183002: [DMC #6] Add TextMatchMarkerListImpl (Closed)
Patch Set: final 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/editing/markers/GenericDocumentMarkerListImpl.cpp
diff --git a/third_party/WebKit/Source/core/editing/markers/GenericDocumentMarkerListImpl.cpp b/third_party/WebKit/Source/core/editing/markers/GenericDocumentMarkerListImpl.cpp
deleted file mode 100644
index 246cf12308b4b0f37c568e6b39749e2e8088e90d..0000000000000000000000000000000000000000
--- a/third_party/WebKit/Source/core/editing/markers/GenericDocumentMarkerListImpl.cpp
+++ /dev/null
@@ -1,73 +0,0 @@
-// Copyright 2017 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "core/editing/markers/GenericDocumentMarkerListImpl.h"
-
-#include "core/editing/markers/DocumentMarkerListEditor.h"
-#include "core/editing/markers/RenderedDocumentMarker.h"
-
-namespace blink {
-
-GenericDocumentMarkerListImpl::GenericDocumentMarkerListImpl(
- DocumentMarker::MarkerType marker_type)
- : marker_type_(marker_type) {}
-
-DocumentMarker::MarkerType GenericDocumentMarkerListImpl::MarkerType() const {
- return marker_type_;
-}
-
-bool GenericDocumentMarkerListImpl::IsEmpty() const {
- return markers_.IsEmpty();
-}
-
-void GenericDocumentMarkerListImpl::Add(DocumentMarker* marker) {
- switch (marker->GetType()) {
- case DocumentMarker::kSpelling:
- case DocumentMarker::kGrammar:
- NOTREACHED();
- case DocumentMarker::kTextMatch:
- DocumentMarkerListEditor::AddMarkerWithoutMergingOverlapping(&markers_,
- marker);
- return;
- case DocumentMarker::kComposition:
- NOTREACHED();
- }
-
- NOTREACHED() << "Unhanded marker type: " << marker->GetType();
- return;
-}
-
-void GenericDocumentMarkerListImpl::Clear() {
- markers_.clear();
-}
-
-const HeapVector<Member<RenderedDocumentMarker>>&
-GenericDocumentMarkerListImpl::GetMarkers() const {
- return markers_;
-}
-
-bool GenericDocumentMarkerListImpl::MoveMarkers(int length,
- DocumentMarkerList* dst_list) {
- return DocumentMarkerListEditor::MoveMarkers(&markers_, length, dst_list);
-}
-
-bool GenericDocumentMarkerListImpl::RemoveMarkers(unsigned start_offset,
- int length) {
- return DocumentMarkerListEditor::RemoveMarkers(&markers_, start_offset,
- length);
-}
-
-bool GenericDocumentMarkerListImpl::ShiftMarkers(unsigned offset,
- unsigned old_length,
- unsigned new_length) {
- return DocumentMarkerListEditor::ShiftMarkers(&markers_, offset, old_length,
- new_length);
-}
-
-DEFINE_TRACE(GenericDocumentMarkerListImpl) {
- visitor->Trace(markers_);
- DocumentMarkerList::Trace(visitor);
-}
-
-} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698