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 |
new file mode 100644 |
index 0000000000000000000000000000000000000000..587e67e74f607f166383a26bd66370935c324c11 |
--- /dev/null |
+++ b/third_party/WebKit/Source/core/editing/markers/GenericDocumentMarkerListImpl.cpp |
@@ -0,0 +1,59 @@ |
+// 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 { |
+ |
+bool GenericDocumentMarkerListImpl::IsEmpty() const { |
+ return markers_.IsEmpty(); |
+} |
+ |
+void GenericDocumentMarkerListImpl::Add(DocumentMarker* marker) { |
+ DocumentMarkerListEditor::AddMarker(&markers_, marker); |
+} |
+ |
+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::RemoveMarkersUnderWords( |
+ const String& node_text, |
+ const Vector<String>& words) { |
+ return DocumentMarkerListEditor::RemoveMarkersUnderWords(&markers_, node_text, |
+ words); |
+} |
+ |
+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 |