| Index: third_party/WebKit/Source/core/editing/markers/DocumentMarkerListUtils.cpp
|
| diff --git a/third_party/WebKit/Source/core/editing/markers/DocumentMarkerListUtils.cpp b/third_party/WebKit/Source/core/editing/markers/DocumentMarkerListUtils.cpp
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..2ee7e43ee285c8dccac0d8874e67598bd744e9ed
|
| --- /dev/null
|
| +++ b/third_party/WebKit/Source/core/editing/markers/DocumentMarkerListUtils.cpp
|
| @@ -0,0 +1,84 @@
|
| +// 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/DocumentMarkerListUtils.h"
|
| +
|
| +namespace blink {
|
| +
|
| +DocumentMarkerList::iterator
|
| +DocumentMarkerListUtils::getPosOfFirstMarkerNotEndingBeforeInSortedList(
|
| + MarkerList* markerList,
|
| + size_t startOffset) {
|
| + return std::upper_bound(
|
| + markerList->begin(), markerList->end(), startOffset,
|
| + [](size_t startOffset, const Member<DocumentMarker>& rhv) -> bool {
|
| + return startOffset < rhv->endOffset();
|
| + });
|
| +}
|
| +
|
| +void DocumentMarkerListUtils::appendMarkersToInputList(
|
| + const MarkerList*,
|
| + DocumentMarkerVector* inputList) {
|
| + // TODO(rlanday): actually implement
|
| +}
|
| +
|
| +DocumentMarkerList::DidCopyMarkerOrNot
|
| +DocumentMarkerListUtils::copyUnsortedMarkers(MarkerList*,
|
| + unsigned startOffset,
|
| + int length,
|
| + DocumentMarkerList* dstList,
|
| + int delta) {
|
| + // TODO(rlanday): actually implement
|
| + return DocumentMarkerList::DidCopyMarkerOrNot::DidCopyMarker;
|
| +}
|
| +
|
| +DocumentMarkerList::DidCopyMarkerOrNot
|
| +DocumentMarkerListUtils::copySortedMarkers(MarkerList*,
|
| + unsigned startOffset,
|
| + int length,
|
| + DocumentMarkerList* dstList,
|
| + int delta) {
|
| + // TODO(rlanday): actually implement
|
| + return DocumentMarkerList::DidCopyMarkerOrNot::DidCopyMarker;
|
| +}
|
| +
|
| +DocumentMarkerList::DidRemoveMarkerOrNot
|
| +DocumentMarkerListUtils::removeUnsortedMarkers(
|
| + MarkerList*,
|
| + unsigned startOffset,
|
| + int length,
|
| + bool shouldRemovePartiallyOverlappingMarkers) {
|
| + // TODO(rlanday): actually implement
|
| + return DocumentMarkerList::DidRemoveMarkerOrNot::DidRemoveMarker;
|
| +}
|
| +
|
| +DocumentMarkerList::DidRemoveMarkerOrNot
|
| +DocumentMarkerListUtils::removeSortedMarkers(
|
| + MarkerList*,
|
| + unsigned startOffset,
|
| + int length,
|
| + bool shouldRemovePartiallyOverlappingMarkers) {
|
| + // TODO(rlanday): actually implement
|
| + return DocumentMarkerList::DidRemoveMarkerOrNot::DidRemoveMarker;
|
| +}
|
| +
|
| +DocumentMarkerList::DidShiftMarkerOrNot
|
| +DocumentMarkerListUtils::shiftUnsortedMarkers(MarkerList*,
|
| + unsigned offset,
|
| + unsigned oldLength,
|
| + unsigned newLength) {
|
| + // TODO(rlanday): actually implement
|
| + return DocumentMarkerList::DidShiftMarkerOrNot::DidShiftMarker;
|
| +}
|
| +
|
| +DocumentMarkerList::DidShiftMarkerOrNot
|
| +DocumentMarkerListUtils::shiftSortedMarkers(MarkerList*,
|
| + unsigned offset,
|
| + unsigned oldLength,
|
| + unsigned newLength) {
|
| + // TODO(rlanday): actually implement
|
| + return DocumentMarkerList::DidShiftMarkerOrNot::DidShiftMarker;
|
| +}
|
| +
|
| +} // namespace blink
|
|
|