Chromium Code Reviews| Index: third_party/WebKit/Source/core/editing/markers/DocumentMarkerListUtils.h |
| diff --git a/third_party/WebKit/Source/core/editing/markers/DocumentMarkerListUtils.h b/third_party/WebKit/Source/core/editing/markers/DocumentMarkerListUtils.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..cb9b009c4901782f10cf0d8a3c621d94f111f7bb |
| --- /dev/null |
| +++ b/third_party/WebKit/Source/core/editing/markers/DocumentMarkerListUtils.h |
| @@ -0,0 +1,64 @@ |
| +// 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 DocumentMarkerListUtils_h |
| +#define DocumentMarkerListUtils_h |
| + |
| +#include "core/editing/markers/DocumentMarkerList.h" |
| + |
| +namespace blink { |
| + |
| +class DocumentMarkerListUtils { |
|
yosin_UTC9
2017/04/07 03:16:22
Please avoid to use abbrev name, it should call |U
|
| + using MarkerList = HeapVector<Member<DocumentMarker>>; |
|
Xiaocheng
2017/04/07 00:06:33
This is the same as DocumentMarkerVector.
|
| + |
| + public: |
| + static DocumentMarkerList::iterator |
| + getPosOfFirstMarkerNotEndingBeforeInSortedList(MarkerList*, |
| + size_t startOffset); |
| + |
| + static void appendMarkersToInputList(const MarkerList*, |
| + DocumentMarkerVector* inputList); |
| + |
| + static DocumentMarkerList::DidCopyMarkerOrNot copyUnsortedMarkers( |
| + MarkerList*, |
| + unsigned startOffset, |
| + int length, |
| + DocumentMarkerList* dstList, |
| + int delta); |
| + static DocumentMarkerList::DidCopyMarkerOrNot copySortedMarkers( |
| + MarkerList*, |
| + unsigned startOffset, |
| + int length, |
| + DocumentMarkerList* dstList, |
| + int delta); |
| + |
| + static DocumentMarkerList::DidRemoveMarkerOrNot removeUnsortedMarkers( |
| + MarkerList*, |
| + unsigned startOffset, |
| + int length, |
| + bool shouldRemovePartiallyOverlappingMarkers); |
| + static DocumentMarkerList::DidRemoveMarkerOrNot removeSortedMarkers( |
| + MarkerList*, |
| + unsigned startOffset, |
| + int length, |
| + bool shouldRemovePartiallyOverlappingMarkers); |
| + |
| + static DocumentMarkerList::DidShiftMarkerOrNot shiftUnsortedMarkers( |
| + MarkerList*, |
| + unsigned offset, |
| + unsigned oldLength, |
| + unsigned newLength); |
| + static DocumentMarkerList::DidShiftMarkerOrNot shiftSortedMarkers( |
| + MarkerList*, |
| + unsigned offset, |
| + unsigned oldLength, |
| + unsigned newLength); |
| + |
| + private: |
| + DocumentMarkerListUtils(); |
| +}; |
| + |
| +} // namespace blink |
| + |
| +#endif // DocumentMarkerListUtils_h |