These are only used for frameset painting and the non-e10s <select>
dropdown focus codepath. We have other more appropriate standard
colors for this.
Differential Revision: https://phabricator.services.mozilla.com/D129992
And remove the autofill.background pref for 95 (or 96, depending on
when this lands) assuming nothing terrible causes us to turn it off on
94.
Differential Revision: https://phabricator.services.mozilla.com/D129988
To more properly support Linux having a different default at runtime.
Expose the resolved value in appinfo for convenience, and use it in the
front-end as needed.
Differential Revision: https://phabricator.services.mozilla.com/D129004
We use "is-in-chrome-docshell" rather than "is a chrome doc" so that about:
pages that are loaded in the content area (like about:addons etc) follow the
general content theme as well.
Cache the relevant color schemes since having that many branches on the default
system theme made me a bit uncomfortable, and this code can be called quite a
lot... Though it probably isn't such a huge deal. This makes us initialize the
theme right away, so make sure subclasses do the right thing. This in practice
was only an issue for GTK, which does cache the "system theme is dark" bit.
Differential Revision: https://phabricator.services.mozilla.com/D128674
We always use alpha visual for WebRender, and appearance: none is
unnecessary (root element has no intrinsic appearance).
Differential Revision: https://phabricator.services.mozilla.com/D128682
Remove the follow-firefox-theme pref as now that's default everywhere,
and document better the behavior of the color-scheme property by
reworking and commenting the logic on it a bit.
Differential Revision: https://phabricator.services.mozilla.com/D128610
We know how to paint dark stuff now. Change the tests so that we use a
light color-scheme on chrome documents that we compare against content
documents, and simplify some code now that the non-native theme is
everywhere.
Differential Revision: https://phabricator.services.mozilla.com/D128485
We have JS listeners that are expected to run once the LookAndFeel
caches have been cleared and such, so split the look-and-feel-changed
notification into an internal and external notification.
Differential Revision: https://phabricator.services.mozilla.com/D128097
Apparently ActiveCaption/CaptionText/InactiveCaption/InactiveCaptionText
are supposed to be used for titlebars, so implement them properly and
remove the GTK-specific colors.
Differential Revision: https://phabricator.services.mozilla.com/D128028
Now that windows is going to support dark colors, we want to make it
behave like other platforms in this regard.
Having a single pref for this seems better.
Differential Revision: https://phabricator.services.mozilla.com/D127624
For that:
* Tweak the standin system colors to match the non-native theme.
* Use those system colors for button and field backgrounds.
* Rename the "should use system colors" bit to "is high contrast",
which is what it really is (specially now that we use system colors
also in non-high-contrast).
Border colors and other colors like the <input type=range> and such
might need some extra tweaking perhaps, but this is a decent start and
looks good in https://crisal.io/tmp/form-controls.html afaict (dark mode
toggle needs the color-scheme pref enabled of course).
Differential Revision: https://phabricator.services.mozilla.com/D127533
This exposes the system colors that were unexposed in bug 1733354, but
builds up on top of bug 1733569 to get buttons and richlistboxes working
properly.
This causes windows dialogs to be dark in dark mode, etc.
To be landed after the freeze, since it likely has some UI fallout that
I missed.
Differential Revision: https://phabricator.services.mozilla.com/D127260
In the future we need to remove this patch, implement dark form
controls, and probably make those tests pass some other way (like
forcing the chrome color-scheme to match content for those tests or
something). Otherwise they are really expected to fail on a Firefox dark
theme.
But this is a somewhat-easy fix for now.
Differential Revision: https://phabricator.services.mozilla.com/D127473
This patch does three things:
* Unifies mac and gtk's buttonactivetext system colors (unships mac's from
content, but it was never meant to be exposed).
* Simplifies the forms.css rules, since <input type=color>'s color property
value doesn't affect its rendering in any meaningful way.
* Adds a buttonactiveface color, which we'll use to provide dark backgrounds
for buttons in Windows dark mode (and is good practice, since generally
every text system color should have a corresponding background).
So as-is it shouldn't change content-exposed behavior (except we stop exposing
the -moz-mac-buttonactivetext to content), but it's a worthy cleanup.
Depends on D127246
Differential Revision: https://phabricator.services.mozilla.com/D127259
This effectively reverts part of the regressing bug
(bug 1731678) temporarily.
The right fix is described in a comment:
* Make the native Windows theme play well with dark system colors, or
* Stop using the native Windows theme in the UI (like other browsers), or
* Detect properly (rather than via ifdef) whether the native theme is used on
callers to GenericDarkColor (so that we can eventually expose the colors in
nsNativeBasicThemeWin-using documents, but not in nsThemeWin-using
documents).
In any case, that seems at least post-freeze material, and the remaining colors
we expose still allows us to fix bug 1731678.
Differential Revision: https://phabricator.services.mozilla.com/D127246
This does the same as Android and macOS (using a semi-transparent
highlight background, and currentColor for the foreground).
This is really sort of a theming issue (where the theme
mixes system colors with theme colors).
But leaving the existing selection color is prettier
even in the dark theme, so let's do that.
Differential Revision: https://phabricator.services.mozilla.com/D127241
Eventually we should support all of them, but for now they are only used
by native code (unless you enable the color-scheme pref) and these will
be enough.
Differential Revision: https://phabricator.services.mozilla.com/D126737
We need to use standins for CSS-accesible colors in high contrast mode
(when appropriate) so that the CSS color matches the one in forms.css.
But this is not needed for e.g. scrollbar colors, which are not
CSS-accessible. So shuffle around the checks so that we account for
that as we should.
Differential Revision: https://phabricator.services.mozilla.com/D125830
And make sure the caret ends up being visible, rather than _not_
visible.
This should be implementable on windows as well. It seems macOS doesn't
have a timeout thing.
Differential Revision: https://phabricator.services.mozilla.com/D122132
Add initial support for the color-scheme CSS property, allowing pages to
choose between light and dark system colors per-element, and such.
Things that are left to do so that this can be enabled by default:
* Dark system colors on Windows / Android / Standins.
* Dark Canvas/CanvasText/Link visited colors (which right now are set
via PreferenceSheet).
* Dark form controls in nsNativeBasicTheme.
* Processing the color-scheme meta tag to fill-in
Document::mColorSchemeBits.
But this seems like enough progress to be landable on its own.
Differential Revision: https://phabricator.services.mozilla.com/D120843
It probably did something more useful in the past, but right now it's
only used to avoid throttling some overflow-causing animations.
It returns 0 everywhere except on Android (for some reason?), but in any
case it doesn't seem this would need to be a LookAndFeel integer, it
could just be a regular pref that we turn on for tests.
However the tests pass with this patch locally, so for now I'm not
adding a pref to replace it.
Differential Revision: https://phabricator.services.mozilla.com/D120871
Instead, use default colors.
Testing this properly requires writing test infrastructure for paged tests with
"print backgrounds" settings turned off, not sure if worth it.
Depends on D120679
Differential Revision: https://phabricator.services.mozilla.com/D120680
I'm not sure what information would be useful in other OSes, so ifdef
the row for GTK for now, but I made this trivial to show in Windows /
macOS / Android as soon as they return useful information.
Differential Revision: https://phabricator.services.mozilla.com/D120331