| 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..46fc78fb66ab92cfe9a7e313866f1e4251f3b857
|
| --- /dev/null
|
| +++ b/third_party/WebKit/Source/core/editing/markers/CompositionMarkerList.cpp
|
| @@ -0,0 +1,68 @@
|
| +// 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::allowedMarkerType() const {
|
| + return DocumentMarker::Composition;
|
| +}
|
| +
|
| +bool CompositionMarkerList::empty() const {
|
| + return m_markers.isEmpty();
|
| +}
|
| +
|
| +DocumentMarker* CompositionMarkerList::at(size_t index) {
|
| + return m_markers[index].get();
|
| +}
|
| +
|
| +void CompositionMarkerList::add(DocumentMarker* marker) {
|
| + m_markers.push_back(marker);
|
| +}
|
| +
|
| +void CompositionMarkerList::clear() {
|
| + m_markers.clear();
|
| +}
|
| +
|
| +void CompositionMarkerList::appendMarkersToInputList(
|
| + DocumentMarkerVector* list) const {
|
| + DocumentMarkerListEditor::appendMarkersToInputList(m_markers, list);
|
| +}
|
| +
|
| +DocumentMarkerList::DidCopyMarkerOrNot CompositionMarkerList::copyMarkers(
|
| + unsigned startOffset,
|
| + int length,
|
| + DocumentMarkerList* dstList,
|
| + int delta) {
|
| + return DocumentMarkerListEditor::copyUnsortedMarkers(&m_markers, startOffset,
|
| + length, dstList, delta);
|
| +}
|
| +
|
| +DocumentMarkerList::DidRemoveMarkerOrNot CompositionMarkerList::removeMarkers(
|
| + unsigned startOffset,
|
| + int length,
|
| + bool shouldRemovePartiallyOverlappingMarkers) {
|
| + return DocumentMarkerListEditor::removeUnsortedMarkers(
|
| + &m_markers, startOffset, length, shouldRemovePartiallyOverlappingMarkers);
|
| +}
|
| +
|
| +DocumentMarkerList::DidShiftMarkerOrNot CompositionMarkerList::shiftMarkers(
|
| + unsigned offset,
|
| + unsigned oldLength,
|
| + unsigned newLength) {
|
| + return DocumentMarkerListEditor::shiftUnsortedMarkers(&m_markers, offset,
|
| + oldLength, newLength);
|
| +}
|
| +
|
| +DEFINE_TRACE(CompositionMarkerList) {
|
| + visitor->trace(m_markers);
|
| + DocumentMarkerList::trace(visitor);
|
| +}
|
| +
|
| +} // namespace blink
|
|
|