| Index: third_party/WebKit/Source/core/editing/markers/CompositionMarkerList.cpp
|
| diff --git a/third_party/WebKit/Source/core/editing/markers/CompositionMarkerList.cpp b/third_party/WebKit/Source/core/editing/markers/CompositionMarkerList.cpp
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..7d19df18b7b6cc7945bc107428fe025793cc3584
|
| --- /dev/null
|
| +++ b/third_party/WebKit/Source/core/editing/markers/CompositionMarkerList.cpp
|
| @@ -0,0 +1,65 @@
|
| +// 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/CompositionMarkerList.h"
|
| +
|
| +#include "core/editing/markers/DocumentMarkerListEditor.h"
|
| +
|
| +namespace blink {
|
| +
|
| +CompositionMarkerList::CompositionMarkerList() : DocumentMarkerList() {}
|
| +
|
| +DocumentMarker::MarkerType CompositionMarkerList::GetAllowedMarkerType() const {
|
| + return DocumentMarker::kComposition;
|
| +}
|
| +
|
| +bool CompositionMarkerList::Empty() const {
|
| + return markers_.IsEmpty();
|
| +}
|
| +
|
| +DocumentMarker* CompositionMarkerList::At(size_t index) {
|
| + return markers_[index].Get();
|
| +}
|
| +
|
| +void CompositionMarkerList::Add(DocumentMarker* marker) {
|
| + markers_.push_back(marker);
|
| +}
|
| +
|
| +void CompositionMarkerList::Clear() {
|
| + markers_.Clear();
|
| +}
|
| +
|
| +void CompositionMarkerList::AppendMarkersToInputList(
|
| + DocumentMarkerVector* list) const {
|
| + list->AppendVector(markers_);
|
| +}
|
| +
|
| +DocumentMarkerList::DidMoveMarkerOrNot CompositionMarkerList::MoveMarkers(
|
| + int length,
|
| + DocumentMarkerList* dst_list) {
|
| + return DocumentMarkerListEditor::MoveUnsortedMarkers(&markers_, length,
|
| + dst_list);
|
| +}
|
| +
|
| +DocumentMarkerList::DidRemoveMarkerOrNot CompositionMarkerList::RemoveMarkers(
|
| + unsigned start_offset,
|
| + int length) {
|
| + return DocumentMarkerListEditor::RemoveUnsortedMarkers(&markers_,
|
| + start_offset, length);
|
| +}
|
| +
|
| +DocumentMarkerList::DidShiftMarkerOrNot CompositionMarkerList::ShiftMarkers(
|
| + unsigned offset,
|
| + unsigned old_length,
|
| + unsigned new_length) {
|
| + return DocumentMarkerListEditor::ShiftUnsortedMarkers(&markers_, offset,
|
| + old_length, new_length);
|
| +}
|
| +
|
| +DEFINE_TRACE(CompositionMarkerList) {
|
| + visitor->Trace(markers_);
|
| + DocumentMarkerList::Trace(visitor);
|
| +}
|
| +
|
| +} // namespace blink
|
|
|