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

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

Issue 2650113004: [WIP] Add support for Android SuggestionSpans when editing text (Closed)
Patch Set: Remove logging statements, fix copyright years in new files 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/paint/InlineTextBoxPainter.cpp
diff --git a/third_party/WebKit/Source/core/paint/InlineTextBoxPainter.cpp b/third_party/WebKit/Source/core/paint/InlineTextBoxPainter.cpp
index 8c70b95917bb916ec38519d7cb0dd72303491171..5b61b356960f8c1732d1909b180676d7d696a454 100644
--- a/third_party/WebKit/Source/core/paint/InlineTextBoxPainter.cpp
+++ b/third_party/WebKit/Source/core/paint/InlineTextBoxPainter.cpp
@@ -429,7 +429,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::SuggestionBackgroundHighlight)
.size() > 0;
}
@@ -810,6 +813,8 @@ void InlineTextBoxPainter::paintDocumentMarkers(
break;
case DocumentMarker::TextMatch:
case DocumentMarker::Composition:
+ case DocumentMarker::Suggestion:
+ case DocumentMarker::SuggestionBackgroundHighlight:
break;
default:
continue;
@@ -844,7 +849,9 @@ void InlineTextBoxPainter::paintDocumentMarkers(
m_inlineTextBox.paintTextMatchMarkerForeground(paintInfo, boxOrigin,
marker, style, font);
break;
- case DocumentMarker::Composition: {
+ case DocumentMarker::Composition:
+ case DocumentMarker::Suggestion:
+ case DocumentMarker::SuggestionBackgroundHighlight: {
CompositionUnderline underline(marker.startOffset(), marker.endOffset(),
marker.underlineColor(), marker.thick(),
marker.backgroundColor());

Powered by Google App Engine
This is Rietveld 408576698