| Index: third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.h
|
| diff --git a/third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.h b/third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.h
|
| index 8a4ecdc4eaadabfe8eabb428b13a5cf62c0f0468..79e8be51c6bf8681b75f6f061c801025ee9510cb 100644
|
| --- a/third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.h
|
| +++ b/third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.h
|
| @@ -30,6 +30,8 @@
|
| #define DocumentMarkerController_h
|
|
|
| #include "core/CoreExport.h"
|
| +#include "core/editing/FrameSelection.h"
|
| +#include "core/editing/VisiblePosition.h"
|
| #include "core/editing/iterators/TextIterator.h"
|
| #include "core/editing/markers/DocumentMarker.h"
|
| #include "platform/geometry/IntRect.h"
|
| @@ -70,7 +72,13 @@ class CORE_EXPORT DocumentMarkerController final
|
| const Position& end,
|
| Color underlineColor,
|
| bool thick,
|
| - Color backgroundColor);
|
| + Color backgroundColor,
|
| + const std::vector<std::string>& suggestions);
|
| + void addSuggestionBackgroundHighlightMarker(const Position& start,
|
| + const Position& end,
|
| + Color underlineColor,
|
| + bool thick,
|
| + Color backgroundColor);
|
|
|
| void copyMarkers(Node* srcNode,
|
| unsigned startOffset,
|
| @@ -104,9 +112,13 @@ class CORE_EXPORT DocumentMarkerController final
|
| Node*,
|
| DocumentMarker::MarkerTypes = DocumentMarker::AllMarkers());
|
| void removeMarkers(const MarkerRemoverPredicate& shouldRemoveMarker);
|
| + void removeSuggestionMarkersByID(const Vector<int>& idsToRemove);
|
| + void removeMarkersForWordsAffectedByEditing(
|
| + DocumentMarker::MarkerTypes,
|
| + bool doNotRemoveIfSelectionAtWordBoundary);
|
| void repaintMarkers(
|
| DocumentMarker::MarkerTypes = DocumentMarker::AllMarkers());
|
| - void shiftMarkers(Node*, unsigned startOffset, int delta);
|
| + void shiftMarkers(Node*, int startOffset, int prevLength, int delta);
|
| // Returns true if markers within a range are found.
|
| bool setMarkersActive(const EphemeralRange&, bool);
|
| // Returns true if markers within a range defined by a node, |startOffset| and
|
| @@ -119,6 +131,8 @@ class CORE_EXPORT DocumentMarkerController final
|
| DocumentMarker::MarkerTypes = DocumentMarker::AllMarkers());
|
| DocumentMarkerVector markersInRange(const EphemeralRange&,
|
| DocumentMarker::MarkerTypes);
|
| + DocumentMarkerVector markersInRangeInclusive(const EphemeralRange&,
|
| + DocumentMarker::MarkerTypes);
|
| DocumentMarkerVector markers();
|
| Vector<IntRect> renderedRectsForMarkers(DocumentMarker::MarkerType);
|
| void updateMarkerRenderedRectIfNeeded(const Node&, RenderedDocumentMarker&);
|
| @@ -138,6 +152,10 @@ class CORE_EXPORT DocumentMarkerController final
|
| using MarkerLists =
|
| HeapVector<Member<MarkerList>, DocumentMarker::MarkerTypeIndexesCount>;
|
| using MarkerMap = HeapHashMap<WeakMember<const Node>, Member<MarkerLists>>;
|
| + DocumentMarkerVector markersInRangeInternal(
|
| + const EphemeralRange&,
|
| + DocumentMarker::MarkerTypes,
|
| + bool includeSpansTouchingEndpoints);
|
| void mergeOverlapping(MarkerList*, RenderedDocumentMarker*);
|
| bool possiblyHasMarkers(DocumentMarker::MarkerTypes);
|
| void removeMarkersFromList(MarkerMap::iterator, DocumentMarker::MarkerTypes);
|
| @@ -150,6 +168,7 @@ class CORE_EXPORT DocumentMarkerController final
|
| // without going through the map.
|
| DocumentMarker::MarkerTypes m_possiblyExistingMarkerTypes;
|
| const Member<const Document> m_document;
|
| + int m_nextSuggestionMarkerID;
|
| };
|
|
|
| } // namespace blink
|
|
|