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

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

Issue 2896273003: Show selection highlight even if we have a composition underline (Closed)
Patch Set: Add test case baselines Created 3 years, 7 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 2e4a3b60265dfc4c9c2035f08501a625fb8ba4c3..029f81ac30cb848fac02279a39ec5336ba0ec0bd 100644
--- a/third_party/WebKit/Source/core/paint/InlineTextBoxPainter.cpp
+++ b/third_party/WebKit/Source/core/paint/InlineTextBoxPainter.cpp
@@ -151,15 +151,6 @@ bool InlineTextBoxPainter::PaintsMarkerHighlights(
layout_object.GetNode());
}
-static bool PaintsCompositionMarkers(const LayoutObject& layout_object) {
- return layout_object.GetNode() &&
- layout_object.GetDocument()
- .Markers()
- .MarkersFor(layout_object.GetNode(),
- DocumentMarker::kComposition)
- .size() > 0;
-}
-
static void PrepareContextForDecoration(
GraphicsContext& context,
GraphicsContextStateSaver& state_saver,
@@ -399,9 +390,7 @@ void InlineTextBoxPainter::Paint(const PaintInfo& paint_info,
paint_info.phase != kPaintPhaseTextClip && !is_printing) {
PaintDocumentMarkers(paint_info, box_origin, style_to_use, font,
DocumentMarkerPaintPhase::kBackground);
-
- const LayoutObject& text_box_layout_object = InlineLayoutObject();
- if (have_selection && !PaintsCompositionMarkers(text_box_layout_object)) {
+ if (have_selection) {
if (combined_text)
PaintSelection<InlineTextBoxPainter::PaintOptions::kCombinedText>(
context, box_rect, style_to_use, font, selection_style.fill_color,

Powered by Google App Engine
This is Rietveld 408576698