| Index: third_party/WebKit/Source/core/editing/markers/TextMatchMarkerList.h
|
| diff --git a/third_party/WebKit/Source/core/editing/markers/TextMatchMarkerList.h b/third_party/WebKit/Source/core/editing/markers/TextMatchMarkerList.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..dde629115c075d025d7e4b0bc27ffe85c46b611c
|
| --- /dev/null
|
| +++ b/third_party/WebKit/Source/core/editing/markers/TextMatchMarkerList.h
|
| @@ -0,0 +1,60 @@
|
| +// 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 TextMatchMarkerList_h
|
| +#define TextMatchMarkerList_h
|
| +
|
| +#include "core/editing/markers/DocumentMarkerList.h"
|
| +
|
| +#include "core/editing/markers/TextMatchMarker.h"
|
| +
|
| +namespace blink {
|
| +
|
| +class CORE_EXPORT TextMatchMarkerList final : public DocumentMarkerList {
|
| + public:
|
| + TextMatchMarkerList();
|
| +
|
| + DocumentMarker::MarkerType GetAllowedMarkerType() const final;
|
| +
|
| + bool Empty() const final;
|
| + TextMatchMarker* At(size_t index) final;
|
| +
|
| + void Add(DocumentMarker*) final;
|
| + void Clear() final;
|
| +
|
| + void AppendMarkersToInputList(DocumentMarkerVector* list) const;
|
| +
|
| + DidMoveMarkerOrNot MoveMarkers(int length, DocumentMarkerList* dst_list);
|
| +
|
| + DidRemoveMarkerOrNot RemoveMarkers(unsigned start_offset, int length);
|
| +
|
| + DidShiftMarkerOrNot ShiftMarkers(unsigned offset,
|
| + unsigned old_length,
|
| + unsigned new_length) final;
|
| +
|
| + DECLARE_VIRTUAL_TRACE();
|
| +
|
| + // TextMatchMarkerList-specific methods
|
| + void AppendRenderedRectsToInputList(const Node&,
|
| + Vector<IntRect>* result) const;
|
| + void InvalidateRects();
|
| + bool SetTextMatchMarkersActive(unsigned start_offset,
|
| + unsigned end_offset,
|
| + bool active);
|
| +
|
| + private:
|
| + HeapVector<Member<DocumentMarker>> markers_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(TextMatchMarkerList);
|
| +};
|
| +
|
| +DEFINE_TYPE_CASTS(TextMatchMarkerList,
|
| + DocumentMarkerList,
|
| + list,
|
| + list->GetAllowedMarkerType() == DocumentMarker::kTextMatch,
|
| + list.GetAllowedMarkerType() == DocumentMarker::kTextMatch);
|
| +
|
| +} // namespace blink
|
| +
|
| +#endif // TextMatchMarkerList_h
|
|
|