summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPeter Varga <pvarga@inf.u-szeged.hu>2017-04-19 13:45:18 +0200
committerAlexandru Croitor <alexandru.croitor@qt.io>2017-04-21 11:10:09 +0000
commitd08524fbfbb78eca09bbab58d5a9840387d2d0e7 (patch)
treec725315a27f2f77967f5f24eb9b507f3f1c06f9f /src
parentf162e81aef78e3f339cf95d12ebc15de0c41fc27 (diff)
Disable setting background color in QInputMethodEvent
IME managers may set background and foreground color of the composition string. Since there is no Chromium API for setting the foreground color, changing the background color to black may produce "black-on-black" text. Chromium locks the background color to transparent thus we do the same in this fix. Task-number: QTBUG-58362 Task-number: QTBUG-60031 Change-Id: I939c8aaaa847de191890d6924ba3c7652465f8a0 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/core/render_widget_host_view_qt.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/core/render_widget_host_view_qt.cpp b/src/core/render_widget_host_view_qt.cpp
index 96cddfb4..332be89f 100644
--- a/src/core/render_widget_host_view_qt.cpp
+++ b/src/core/render_widget_host_view_qt.cpp
@@ -1149,11 +1149,7 @@ void RenderWidgetHostViewQt::handleInputMethodEvent(QInputMethodEvent *ev)
if (format.underlineStyle() != QTextCharFormat::NoUnderline)
underlineColor = format.underlineColor();
- QColor backgroundColor(0, 0, 0, 0);
- if (format.background().style() != Qt::NoBrush)
- backgroundColor = format.background().color();
-
- underlines.push_back(blink::WebCompositionUnderline(start, end, toSk(underlineColor), /*thick*/ false, toSk(backgroundColor)));
+ underlines.push_back(blink::WebCompositionUnderline(start, end, toSk(underlineColor), /*thick*/ false, SK_ColorTRANSPARENT));
break;
}
case QInputMethodEvent::Cursor: