[Webkit-unassigned] [Bug 126907] [GTK] Hardcoded text color in input fields

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed May 23 12:00:31 PDT 2018


https://bugs.webkit.org/show_bug.cgi?id=126907

--- Comment #41 from Michael Catanzaro <mcatanzaro at igalia.com> ---
Related, I found this code in Firefox: https://hg.mozilla.org/mozilla-central/file/50355ef2f138/widget/gtk/nsLookAndFeel.cpp#l823

    // Dark themes interacts poorly with widget styling (see bug 1216658).
    +
−// We disable dark themes by default for all processes (chrome, web content)
    // but allow user to overide it by prefs.
    const gchar* dark_setting = "gtk-application-prefer-dark-theme";
    gboolean darkThemeDefault;
    g_object_get(settings, dark_setting, &darkThemeDefault, nullptr);

    // To avoid triggering reload of theme settings unnecessarily, only set the
    // setting when necessary.
    if (darkThemeDefault) {
        bool allowDarkTheme;
        if (XRE_IsContentProcess()) {
            allowDarkTheme =
                mozilla::Preferences::GetBool("widget.content.allow-gtk-dark-theme",
                                              false);
        } else {
            allowDarkTheme = (PR_GetEnv("MOZ_ALLOW_GTK_DARK_THEME") != nullptr) ||
                mozilla::Preferences::GetBool("widget.chrome.allow-gtk-dark-theme",
                                              false);
        }
        if (!allowDarkTheme) {
            g_object_set(settings, dark_setting, FALSE, nullptr);
        }
    }

It's too complicated for us, and we would definitely not want to override the theme in the UI process. But maybe we should override it in the web process? That would give us a better chance of avoiding theme problems on websites, probably. It's really a totally separate change, though, and I don't know if we should: if you're able to get dark themes working well enough without it, maybe we don't need to.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20180523/79006747/attachment.html>


More information about the webkit-unassigned mailing list