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

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

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/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..e2c14cae2c435b66f7d0a309cd3f6ce75ea5d40e 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());
@@ -1194,6 +1201,9 @@ void InlineTextBoxPainter::paintCompositionUnderline(
unsigned paintEnd = underlinePaintEnd(underline);
DCHECK_LT(paintStart, paintEnd);
+ LOG(INFO) << "painting composition underline from " << paintStart << " to "
+ << paintEnd;
+
// start of line to draw
float start =
paintStart == m_inlineTextBox.start()

Powered by Google App Engine
This is Rietveld 408576698