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

Unified Diff: third_party/WebKit/Source/core/paint/InlineTextBoxPainter.cpp

Issue 2650113004: [WIP] Add support for Android SuggestionSpans when editing text (Closed)
Patch Set: Uploading the latest version from my repo so I can reference it Created 3 years, 8 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/paint/InlineTextBoxPainter.cpp
diff --git a/third_party/WebKit/Source/core/paint/InlineTextBoxPainter.cpp b/third_party/WebKit/Source/core/paint/InlineTextBoxPainter.cpp
index c39849d7873813a96d987d364e2f390d1fbb6d97..01b0b6c25b59ac3edafbd7c93b7a60284978fb7f 100644
--- a/third_party/WebKit/Source/core/paint/InlineTextBoxPainter.cpp
+++ b/third_party/WebKit/Source/core/paint/InlineTextBoxPainter.cpp
@@ -461,7 +461,10 @@ static bool paintsCompositionMarkers(const LayoutObject& layoutObject) {
return layoutObject.node() &&
layoutObject.document()
.markers()
- .markersFor(layoutObject.node(), DocumentMarker::Composition)
+ .markersFor(layoutObject.node(),
+ DocumentMarker::Composition |
+ DocumentMarker::Suggestion |
+ DocumentMarker::SuggestionHighlight)
.size() > 0;
}
@@ -831,6 +834,8 @@ void InlineTextBoxPainter::paintDocumentMarkers(
break;
case DocumentMarker::TextMatch:
case DocumentMarker::Composition:
+ case DocumentMarker::Suggestion:
+ case DocumentMarker::SuggestionHighlight:
break;
default:
continue;
@@ -866,13 +871,13 @@ void InlineTextBoxPainter::paintDocumentMarkers(
paintInfo, boxOrigin, toTextMatchMarker(marker), style, font);
}
break;
- case DocumentMarker::Composition: {
- const CompositionMarker& compositionMarker =
- toCompositionMarker(marker);
- CompositionUnderline underline(
- compositionMarker.startOffset(), compositionMarker.endOffset(),
- compositionMarker.underlineColor(), compositionMarker.thick(),
- compositionMarker.backgroundColor());
+ case DocumentMarker::Composition:
+ case DocumentMarker::Suggestion:
+ case DocumentMarker::SuggestionHighlight: {
+ const MarkerWithFormatting& markerWithFormatting = toMarkerWithFormatting(marker);
+ CompositionUnderline underline(markerWithFormatting.startOffset(), markerWithFormatting.endOffset(),
+ markerWithFormatting.underlineColor(), markerWithFormatting.thick(),
+ markerWithFormatting.backgroundColor());
if (markerPaintPhase == DocumentMarkerPaintPhase::Background)
paintSingleCompositionBackgroundRun(
paintInfo.context, boxOrigin, style, font,
« no previous file with comments | « third_party/WebKit/Source/core/page/ChromeClient.h ('k') | third_party/WebKit/Source/modules/ModulesInitializer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698