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

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

Issue 2611813002: Add support for persisting CompositionUnderlines in InputMethodController (Closed)
Patch Set: Try one more time Created 3 years, 12 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 cb57b3186901f06f3867a0a00d08deba963baf2a..8c3cccc88bef717367e83ab183fdc4e2cc9f9d3a 100644
--- a/third_party/WebKit/Source/core/paint/InlineTextBoxPainter.cpp
+++ b/third_party/WebKit/Source/core/paint/InlineTextBoxPainter.cpp
@@ -390,7 +390,9 @@ static bool paintsCompositionMarkers(const LayoutObject& layoutObject) {
return layoutObject.node() &&
layoutObject.document()
.markers()
- .markersFor(layoutObject.node(), DocumentMarker::Composition)
+ .markersFor(layoutObject.node(),
+ DocumentMarker::Composition |
+ DocumentMarker::PersistingComposition)
.size() > 0;
}
@@ -763,6 +765,7 @@ void InlineTextBoxPainter::paintDocumentMarkers(
break;
case DocumentMarker::TextMatch:
case DocumentMarker::Composition:
+ case DocumentMarker::PersistingComposition:
break;
default:
continue;
@@ -797,10 +800,12 @@ void InlineTextBoxPainter::paintDocumentMarkers(
m_inlineTextBox.paintTextMatchMarkerForeground(paintInfo, boxOrigin,
marker, style, font);
break;
- case DocumentMarker::Composition: {
- CompositionUnderline underline(marker.startOffset(), marker.endOffset(),
- marker.underlineColor(), marker.thick(),
- marker.backgroundColor());
+ case DocumentMarker::Composition:
+ case DocumentMarker::PersistingComposition: {
+ CompositionUnderline underline(
+ marker.startOffset(), marker.endOffset(), marker.underlineColor(),
+ marker.thick(), marker.backgroundColor(),
+ (marker.type() == DocumentMarker::PersistingComposition));
if (markerPaintPhase == DocumentMarkerPaintPhase::Background)
paintSingleCompositionBackgroundRun(
paintInfo.context, boxOrigin, style, font,

Powered by Google App Engine
This is Rietveld 408576698