| Index: third_party/WebKit/Source/core/editing/markers/SpellCheckMarkerList.h
|
| diff --git a/third_party/WebKit/Source/core/editing/markers/SpellCheckMarkerList.h b/third_party/WebKit/Source/core/editing/markers/SpellCheckMarkerList.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..8acf7848f05005a1a6ee08f7a844ec9c667f09fe
|
| --- /dev/null
|
| +++ b/third_party/WebKit/Source/core/editing/markers/SpellCheckMarkerList.h
|
| @@ -0,0 +1,57 @@
|
| +// Moveright 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 SpellCheckMarkerList_h
|
| +#define SpellCheckMarkerList_h
|
| +
|
| +#include "core/editing/markers/DocumentMarkerList.h"
|
| +
|
| +namespace blink {
|
| +
|
| +class CORE_EXPORT SpellCheckMarkerList final : public DocumentMarkerList {
|
| + public:
|
| + SpellCheckMarkerList(DocumentMarker::MarkerType);
|
| +
|
| + DocumentMarker::MarkerType GetAllowedMarkerType() const final;
|
| +
|
| + bool Empty() const final;
|
| + DocumentMarker* At(size_t index) final;
|
| +
|
| + void Add(DocumentMarker*) final;
|
| + void Clear() final;
|
| +
|
| + void AppendMarkersToInputList(DocumentMarkerVector* list) const;
|
| +
|
| + DidMoveMarkerOrNot MoveMarkers(int length, DocumentMarkerList* dstList) final;
|
| +
|
| + DidRemoveMarkerOrNot RemoveMarkers(unsigned start_offset, int length) final;
|
| +
|
| + DidShiftMarkerOrNot ShiftMarkers(unsigned offset,
|
| + unsigned old_length,
|
| + unsigned new_length) final;
|
| +
|
| + DECLARE_VIRTUAL_TRACE();
|
| +
|
| + // SpellCheckMarkerList-specific methods
|
| + void RemoveMarkersForWords(const String& node_text,
|
| + const Vector<String>& words);
|
| +
|
| + private:
|
| + const DocumentMarker::MarkerType type_;
|
| + HeapVector<Member<DocumentMarker>> markers_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(SpellCheckMarkerList);
|
| +};
|
| +
|
| +DEFINE_TYPE_CASTS(SpellCheckMarkerList,
|
| + DocumentMarkerList,
|
| + list,
|
| + list->GetAllowedMarkerType() == DocumentMarker::kSpelling ||
|
| + list->GetAllowedMarkerType() == DocumentMarker::kGrammar,
|
| + list.GetAllowedMarkerType() == DocumentMarker::kSpelling ||
|
| + list.GetAllowedMarkerType() == DocumentMarker::kGrammar);
|
| +
|
| +} // namespace blink
|
| +
|
| +#endif // SpellCheckMarkerList_h
|
|
|