Index: third_party/WebKit/Source/core/editing/markers/EditingMarkerList.h |
diff --git a/third_party/WebKit/Source/core/editing/markers/EditingMarkerList.h b/third_party/WebKit/Source/core/editing/markers/EditingMarkerList.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..f9a9a5612a8264d04680d6c0048fdd7fb9b61a8b |
--- /dev/null |
+++ b/third_party/WebKit/Source/core/editing/markers/EditingMarkerList.h |
@@ -0,0 +1,52 @@ |
+// 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 EditingMarkerList_h |
+#define EditingMarkerList_h |
+ |
+#include "core/editing/markers/DocumentMarkerList.h" |
+ |
+namespace blink { |
+ |
+class DocumentMarker; |
+ |
+class CORE_EXPORT EditingMarkerList : public DocumentMarkerList { |
+ public: |
+ explicit EditingMarkerList(DocumentMarkerController*); |
+ |
+ // DocumentMarkerList implementations |
+ bool isEditingMarkerList() const final; |
+ |
+ void clear() final; |
+ |
+ void removeMarkers(unsigned startOffset, |
+ int length, |
+ bool shouldRemovePartiallyOverlappingMarkers, |
+ bool* didRemoveMarker) final; |
+ bool shiftMarkers(unsigned offset, |
+ unsigned oldLength, |
+ unsigned newLength) final; |
+ |
+ // EditingMarkerList-specific |
+ virtual void insert(DocumentMarker*); |
+ |
+ DECLARE_VIRTUAL_TRACE(); |
+ |
+ protected: |
+ void sortMarkerList(); |
Xiaocheng
2017/03/24 03:57:47
Please do not introduce an unused function.
Inste
rlanday
2017/03/24 17:45:49
Ok
rlanday
2017/03/24 18:01:23
Oh, I know why I added this: I use it in SpellingM
|
+ |
+ bool m_markersAreSorted; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(EditingMarkerList); |
+}; |
+ |
+DEFINE_TYPE_CASTS(EditingMarkerList, |
+ DocumentMarkerList, |
+ list, |
+ list->isEditingMarkerList(), |
+ list.isEditingMarkerList()); |
+ |
+} // namespace blink |
+ |
+#endif // EditingMarkerList_h |