| 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..f41907cee207badda861c235886f4f8515d25bcf
|
| --- /dev/null
|
| +++ b/third_party/WebKit/Source/core/editing/markers/DocumentMarkerListEditor.h
|
| @@ -0,0 +1,41 @@
|
| +// 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 "platform/heap/Handle.h"
|
| +
|
| +namespace blink {
|
| +
|
| +class DocumentMarker;
|
| +class RenderedDocumentMarker;
|
| +
|
| +class DocumentMarkerListEditor {
|
| + public:
|
| + using MarkerList = HeapVector<Member<RenderedDocumentMarker>>;
|
| +
|
| + static void AddMarker(MarkerList*, const DocumentMarker*);
|
| +
|
| + // Returns true if a marker was moved, false otherwise.
|
| + static bool MoveMarkers(MarkerList* src_list,
|
| + int length,
|
| + MarkerList* dst_list);
|
| +
|
| + // Returns true if a marker was removed, false otherwise.
|
| + static bool RemoveMarkers(MarkerList*, unsigned start_offset, int length);
|
| +
|
| + // Returns true if a marker was shifted or removed, false otherwise.
|
| + static bool ShiftMarkers(MarkerList*,
|
| + unsigned offset,
|
| + unsigned old_length,
|
| + unsigned new_length);
|
| +
|
| + private:
|
| + static void MergeOverlapping(MarkerList*, RenderedDocumentMarker* to_insert);
|
| +};
|
| +
|
| +} // namespace blink
|
| +
|
| +#endif // DocumentMarkerListEditor_h
|
|
|