Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(373)

Unified Diff: third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.h

Issue 2650113004: [WIP] Add support for Android SuggestionSpans when editing text (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..2b0b0064f205070889f19fea391b61435c4a2099 100644
--- a/third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.h
+++ b/third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.h
@@ -70,7 +70,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 +110,10 @@ class CORE_EXPORT DocumentMarkerController final
Node*,
DocumentMarker::MarkerTypes = DocumentMarker::AllMarkers());
void removeMarkers(const MarkerRemoverPredicate& shouldRemoveMarker);
+ void removeSuggestionMarkersByID(const Vector<int>& idsToRemove);
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
@@ -150,6 +157,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

Powered by Google App Engine
This is Rietveld 408576698