gecko-dev/widget/gtk/mozgtk
Masayuki Nakano 9092695677 Bug 1461307 - Overwrite selection colors of widget which may be referred by IME via IM context with selection colors of GtkTextView r=karlt
IME (e.g., fcitx) may refer selection colors of widget under window which
is associated with IM context to support any colored widget.  So, IME
expects good selection colors which have sufficient contrast between
foreground and background, and also selection background color and
widget background color like GtkTextView.  However, some desktop themes
set our widget to different selection colors from GtkTextView which may
be unreadable.

nsTextFrame (which paints composition string) expects that composition
string colors coming from IME are sufficiently readable and background
color of composition string and background color of our editor's default
style (coming from LookAndFeel) have sufficient contrast because
nsTextFrame assmes that composition string colors coming from IME are
decided for the default style.

Therefore, this patch creates SelectionStyleProvider which overwrites
selection style of our widget with selection style of GtkTextView so
that IME can refer selection colors of GtkTextView via our widget.

MozReview-Commit-ID: 5vdcSgoEYv0

--HG--
extra : rebase_source : edf375ac393a72d3e44839a76d5c44b6db12dc63
2018-07-13 18:12:53 +09:00
..
gtk2 Bug 1286877 - do not set c-basic-offset for python-mode; r=gps 2016-07-14 10:16:42 -06:00
gtk3 Bug 1286877 - do not set c-basic-offset for python-mode; r=gps 2016-07-14 10:16:42 -06:00
stub Bug 1286877 - do not set c-basic-offset for python-mode; r=gps 2016-07-14 10:16:42 -06:00
moz.build Bug 1286877 - do not set c-basic-offset for python-mode; r=gps 2016-07-14 10:16:42 -06:00
mozgtk.c Bug 1461307 - Overwrite selection colors of widget which may be referred by IME via IM context with selection colors of GtkTextView r=karlt 2018-07-13 18:12:53 +09:00