| Index: third_party/WebKit/Source/core/editing/markers/DocumentMarkerList.h
|
| diff --git a/third_party/WebKit/Source/core/editing/markers/DocumentMarkerList.h b/third_party/WebKit/Source/core/editing/markers/DocumentMarkerList.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..91fd7f3d69e4d731b7b447e3ea4338c7fc5472e3
|
| --- /dev/null
|
| +++ b/third_party/WebKit/Source/core/editing/markers/DocumentMarkerList.h
|
| @@ -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.
|
| +
|
| +#ifndef DocumentMarkerList_h
|
| +#define DocumentMarkerList_h
|
| +
|
| +#include "core/editing/markers/DocumentMarker.h"
|
| +#include "platform/heap/Handle.h"
|
| +
|
| +namespace blink {
|
| +
|
| +class DocumentMarkerController;
|
| +
|
| +class DocumentMarkerList : public GarbageCollected<DocumentMarkerList> {
|
| + public:
|
| + explicit DocumentMarkerList(DocumentMarkerController*);
|
| + using iterator = Member<DocumentMarker>*;
|
| + using const_iterator = const Member<DocumentMarker>*;
|
| +
|
| + virtual DocumentMarker::MarkerType allowedMarkerType() const = 0;
|
| +
|
| + size_t size() const;
|
| + bool empty() const;
|
| + virtual DocumentMarker* at(size_t index);
|
| +
|
| + virtual void clear() = 0;
|
| +
|
| + iterator begin();
|
| + iterator end();
|
| + const_iterator begin() const;
|
| + const_iterator end() const;
|
| +
|
| + void appendMarkersToInputList(DocumentMarkerVector* list) const;
|
| +
|
| + virtual bool copyMarkers(unsigned startOffset,
|
| + int length,
|
| + Node* dstNode,
|
| + int delta) const = 0;
|
| + virtual void removeMarkers(unsigned startOffset,
|
| + int length,
|
| + bool shouldRemovePartiallyOverlappingMarkers,
|
| + bool* didRemoveMarker) = 0;
|
| + virtual bool shiftMarkers(unsigned offset,
|
| + unsigned oldLength,
|
| + unsigned newLength) = 0;
|
| +
|
| + DECLARE_VIRTUAL_TRACE();
|
| +
|
| + protected:
|
| + HeapVector<Member<DocumentMarker>>::iterator
|
| + getPosOfFirstMarkerNotEndingBefore(size_t startOffset);
|
| +
|
| + Member<DocumentMarkerController> m_documentMarkerController;
|
| + HeapVector<Member<DocumentMarker>> m_markers;
|
| +
|
| + private:
|
| + static bool endsBefore(size_t startOffset, const Member<DocumentMarker>& rhv);
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(DocumentMarkerList);
|
| +};
|
| +
|
| +} // namespace blink
|
| +
|
| +#endif // DocumentMarkerList_h
|
|
|