| Index: third_party/WebKit/Source/core/editing/markers/DocumentMarkerListEditor.h
|
| diff --git a/third_party/WebKit/Source/core/editing/markers/DocumentMarkerListEditor.h b/third_party/WebKit/Source/core/editing/markers/DocumentMarkerListEditor.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..9f4189b7724bbd51dfdb3b23f009d18a1d3d4f20
|
| --- /dev/null
|
| +++ b/third_party/WebKit/Source/core/editing/markers/DocumentMarkerListEditor.h
|
| @@ -0,0 +1,53 @@
|
| +// 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.
|
| +
|
| +#ifndef DocumentMarkerListEditor_h
|
| +#define DocumentMarkerListEditor_h
|
| +
|
| +#include "core/editing/markers/DocumentMarkerList.h"
|
| +
|
| +namespace blink {
|
| +
|
| +class CORE_EXPORT DocumentMarkerListEditor {
|
| + public:
|
| + static DocumentMarkerVector::iterator
|
| + GetPosOfFirstMarkerNotEndingBeforeInSortedList(
|
| + DocumentMarkerVector* marker_list,
|
| + size_t start_offset);
|
| +
|
| + static bool MoveUnsortedMarkers(DocumentMarkerVector* marker_list,
|
| + int length,
|
| + DocumentMarkerList* dst_list);
|
| + static bool MoveSortedMarkers(DocumentMarkerVector* marker_list,
|
| + int length,
|
| + DocumentMarkerList* dst_list);
|
| +
|
| + static bool RemoveUnsortedMarkers(DocumentMarkerVector* marker_list,
|
| + unsigned start_offset,
|
| + int length);
|
| + static bool RemoveSortedMarkers(DocumentMarkerVector* marker_list,
|
| + unsigned start_offset,
|
| + int length);
|
| +
|
| + static bool ShiftUnsortedMarkers(DocumentMarkerVector* marker_list,
|
| + unsigned offset,
|
| + unsigned old_length,
|
| + unsigned new_length);
|
| + static bool ShiftSortedMarkers(DocumentMarkerVector* marker_list,
|
| + unsigned offset,
|
| + unsigned old_length,
|
| + unsigned new_length);
|
| +
|
| + private:
|
| + DocumentMarkerListEditor();
|
| +
|
| + static bool MoveMarkersHelper(DocumentMarkerVector* marker_list,
|
| + int length,
|
| + DocumentMarkerList* dst_list,
|
| + bool is_sorted);
|
| +};
|
| +
|
| +} // namespace blink
|
| +
|
| +#endif // DocumentMarkerListEditor_h
|
|
|