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

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

Issue 2925543003: [ActiveSuggestionMarker #3] Add painting for ActiveSuggestionMarker (Closed)
Patch Set: Add expected behavior for tests Created 3 years, 6 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 601fda49a22b29c64bdd7affdbb77d53729a0e94..9741699a27cca18368ed2001133722ffe75e96e2 100644
--- a/third_party/WebKit/Source/core/paint/InlineTextBoxPainter.cpp
+++ b/third_party/WebKit/Source/core/paint/InlineTextBoxPainter.cpp
@@ -641,9 +641,8 @@ void InlineTextBoxPainter::PaintDocumentMarkers(
break;
case DocumentMarker::kTextMatch:
case DocumentMarker::kComposition:
+ case DocumentMarker::kActiveSuggestion:
break;
- default:
- continue;
}
if (marker.EndOffset() <= inline_text_box_.Start()) {
@@ -676,13 +675,16 @@ void InlineTextBoxPainter::PaintDocumentMarkers(
paint_info, box_origin, ToTextMatchMarker(marker), style, font);
}
break;
- case DocumentMarker::kComposition: {
- const CompositionMarker& composition_marker =
- ToCompositionMarker(marker);
+ case DocumentMarker::kComposition:
+ case DocumentMarker::kActiveSuggestion: {
+ const StyleableMarker& marker_with_formatting =
yosin_UTC9 2017/06/06 01:31:22 Is it better to use |stylable_marker| instead of |
+ ToStyleableMarker(marker);
CompositionUnderline underline(
- composition_marker.StartOffset(), composition_marker.EndOffset(),
- composition_marker.UnderlineColor(), composition_marker.IsThick(),
- composition_marker.BackgroundColor());
+ marker_with_formatting.StartOffset(),
+ marker_with_formatting.EndOffset(),
+ marker_with_formatting.UnderlineColor(),
+ marker_with_formatting.IsThick(),
+ marker_with_formatting.BackgroundColor());
if (marker_paint_phase == DocumentMarkerPaintPhase::kBackground)
PaintSingleCompositionBackgroundRun(
paint_info.context, box_origin, style, font,

Powered by Google App Engine
This is Rietveld 408576698