| 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..a97fdf2c227d64b7e9c4ee6862d8fbd7a22c1f3a
|
| --- /dev/null
|
| +++ b/third_party/WebKit/Source/core/editing/markers/SpellCheckMarkerList.h
|
| @@ -0,0 +1,63 @@
|
| +// 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 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 allowedMarkerType() const final;
|
| +
|
| + bool empty() const final;
|
| + DocumentMarker* at(size_t index) final;
|
| +
|
| + void add(DocumentMarker*) final;
|
| + void clear() final;
|
| +
|
| + void appendMarkersToInputList(DocumentMarkerVector* list) const;
|
| +
|
| + DidCopyMarkerOrNot copyMarkers(unsigned startOffset,
|
| + int length,
|
| + DocumentMarkerList* dstList,
|
| + int delta) final;
|
| +
|
| + DidRemoveMarkerOrNot removeMarkers(
|
| + unsigned startOffset,
|
| + int length,
|
| + bool shouldRemovePartiallyOverlappingMarkers) final;
|
| +
|
| + DidShiftMarkerOrNot shiftMarkers(unsigned offset,
|
| + unsigned oldLength,
|
| + unsigned newLength) final;
|
| +
|
| + DECLARE_VIRTUAL_TRACE();
|
| +
|
| + // SpellCheckMarkerList-specific methods
|
| + void removeMarkersForWords(const String& nodeText,
|
| + const Vector<String>& words);
|
| +
|
| + private:
|
| + const DocumentMarker::MarkerType m_type;
|
| + HeapVector<Member<DocumentMarker>> m_markers;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(SpellCheckMarkerList);
|
| +};
|
| +
|
| +DEFINE_TYPE_CASTS(SpellCheckMarkerList,
|
| + DocumentMarkerList,
|
| + list,
|
| + list->allowedMarkerType() == DocumentMarker::Spelling ||
|
| + list->allowedMarkerType() == DocumentMarker::Grammar,
|
| + list.allowedMarkerType() == DocumentMarker::Spelling ||
|
| + list.allowedMarkerType() == DocumentMarker::Grammar);
|
| +
|
| +} // namespace blink
|
| +
|
| +#endif // SpellCheckMarkerList_h
|
|
|