Граф коммитов

227 Коммитов

Автор SHA1 Сообщение Дата
Emilio Cobos Álvarez c308704902 Bug 1738614 - Remove other Widget* colors. r=mstange
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
2021-11-02 18:08:07 +00:00
Emilio Cobos Álvarez 923cf5df84 Bug 1738614 - Remove TextForeground/Background system colors. r=mstange
Same thing, there's nor reason these should be different from other
CSS-exposed colors.

Differential Revision: https://phabricator.services.mozilla.com/D129991
2021-11-02 18:08:07 +00:00
Emilio Cobos Álvarez ac14d7e42d Bug 1738614 - Remove WindowBackground/Foreground system colors. r=mstange
There's no reason for these to be different to the CSS-exposed
Window/WindowText.

Differential Revision: https://phabricator.services.mozilla.com/D129990
2021-11-02 18:08:07 +00:00
Emilio Cobos Álvarez 88397b3a00 Bug 1738613 - Provide generic dark hyperlink system colors. r=dholbert
This will make sure they're used on Windows for the dark color scheme.

Differential Revision: https://phabricator.services.mozilla.com/D129993
2021-11-02 10:45:04 +00:00
Emilio Cobos Álvarez 71e6f9ec23 Bug 1738616 - Enable color-scheme for nightly and early beta. r=hiro
Differential Revision: https://phabricator.services.mozilla.com/D129995
2021-11-01 10:53:36 +00:00
Emilio Cobos Álvarez e09c109ab2 Bug 1738608 - Allow customizing dark system colors by pref as well. r=mstange
Just noticed we don't quite have that capability, but it seems useful.

Differential Revision: https://phabricator.services.mozilla.com/D129989
2021-10-31 21:29:21 +00:00
Emilio Cobos Álvarez 69eeb9cb6c Bug 1738608 - Make autofill background configurable via system color prefs. r=mstange
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
2021-10-31 21:28:58 +00:00
Jonathan Kew 2a3d097e41 Bug 1737751 - Account for macOS cursor scaling. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D129521
2021-10-28 12:25:23 +00:00
Emilio Cobos Álvarez 5b31eea4fd Bug 1737676 - Use GTK menu radius on native context menus and panels. r=stransky
Differential Revision: https://phabricator.services.mozilla.com/D129439
2021-10-28 10:52:31 +00:00
Emilio Cobos Álvarez f317384568 Bug 1736518 - Make browser.tabs.drawInTitlebar a tri-state. r=stransky,Gijs
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
2021-10-21 09:07:12 +00:00
stransky aecdcaacb9 Bug 1736795 [Linux] Export titlebar radius as int from LookAndFeel, r=emilio
Titlebar radius is exported as integer from Gtk so there's no need to use floats here.

Differential Revision: https://phabricator.services.mozilla.com/D128993
2021-10-20 18:01:02 +00:00
Emilio Cobos Álvarez 736cd85309 Bug 1736141 - Derive a content theme from newtab page background, and use it for non-chrome docshells. r=mstange,dao
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
2021-10-20 08:25:57 +00:00
Emilio Cobos Álvarez 2cdb78d6a6 Bug 1509931 - Remove -moz-gtk-csd-transparent-background. r=stransky,desktop-theme-reviewers,dao
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
2021-10-18 18:51:41 +00:00
Emilio Cobos Álvarez b742f680db Bug 1509931 - Expose titlebar radius as a chrome-only CSS environment variable. r=stransky
Mostly plumbing.

Differential Revision: https://phabricator.services.mozilla.com/D128680
2021-10-18 16:22:13 +00:00
Emilio Cobos Álvarez 5122357c49 Bug 1736163 - layout.css.prefers-color-scheme.content-override should trigger a look and feel update.
MANUAL PUSH: Trivial orange fix CLOSED TREE
2021-10-17 15:32:02 +02:00
Emilio Cobos Álvarez fb8e2b5796 Bug 1736038 - Simplify some color-scheme handling in core. r=mstange
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
2021-10-15 16:53:08 +00:00
Emilio Cobos Álvarez 0b7cfe2afa Bug 1735800 - Undo the workaround from bug 1733413 (and simplify relevant tests). r=mstange
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
2021-10-14 17:13:15 +00:00
Emilio Cobos Álvarez b2699f72ee Bug 1670480 - Ensure look-and-feel-changed listeners can rely on LookAndFeel values returning updated styles. r=jwatt
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
2021-10-12 09:22:49 +00:00
Emilio Cobos Álvarez ca970e3818 Bug 1735083 - Clean up GTK titlebar colors. r=desktop-theme-reviewers,dao
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
2021-10-11 22:16:58 +00:00
Emilio Cobos Alvarez 067255ed45 Bug 1735078 - Clean up some unused LookAndFeel code on Windows. r=mhowell
Differential Revision: https://phabricator.services.mozilla.com/D128025
2021-10-11 17:11:27 +00:00
Emilio Cobos Alvarez c52ad152f4 Bug 1734658 - Implement some tree dark theme colors for Windows. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D127888
2021-10-08 10:53:12 +00:00
Emilio Cobos Alvarez 51b1017370 Bug 1734226 - Use a single pref to determine whether system colors follow the Firefox theme. r=desktop-theme-reviewers,dao
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
2021-10-06 15:29:59 +00:00
Emilio Cobos Álvarez e50c80851e Bug 1734115 - Add basic support for dark form controls to nsNativeBasicTheme. r=mstange
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
2021-10-05 14:40:52 +00:00
Emilio Cobos Alvarez 90e406a7d1 Bug 1733569 - Improve windows OS dark mode support. r=dholbert,dao
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
2021-10-04 18:57:55 +00:00
Emilio Cobos Álvarez 046514dd62 Bug 1733413 - Force light color-scheme for non-native-theme docs for now. r=mstange
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
2021-10-04 18:39:37 +00:00
Emilio Cobos Alvarez 21a3f0049f Bug 1733565 - Clean up button active system colors. r=mstange,desktop-theme-reviewers,dao
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
2021-10-01 19:42:16 +00:00
Emilio Cobos Alvarez c7fd83f7d9 Bug 1733354 - Expose less dark system colors on Windows for now. r=dholbert,layout-reviewers
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
2021-10-01 19:27:17 +00:00
Emilio Cobos Alvarez 389ea3b113 Bug 1733398 - Use subtler dark selection colors. r=mstange
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
2021-10-01 16:23:13 +00:00
Emilio Cobos Álvarez d10188f9b4 Bug 1731678 - Add some generic dark system colors for Windows/Android/standins. r=dholbert
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
2021-09-29 10:20:56 +00:00
Stephen A Pohl 87f63ab1b8 Bug 1633860: Place window control buttons on the right side on macOS when using an RTL system locale, regardless of the Firefox locale. r=mstange,emilio,harry
Differential Revision: https://phabricator.services.mozilla.com/D116921
2021-09-22 18:51:20 +00:00
Csoregi Natalia 5232f16dc4 Backed out changeset 5523334143d9 (bug 1719938) for failures on browser_parsable_css.js. CLOSED TREE 2021-09-21 02:39:55 +03:00
lamoure6 5c23ae0374 Bug 1719938 - Removed remaining (non-negated) -moz-proton media queries. r=mhowell,mtigley,emilio
Differential Revision: https://phabricator.services.mozilla.com/D125328
2021-09-20 22:40:42 +00:00
Csoregi Natalia 592741b7e0 Backed out changeset 0711ae54877b (bug 1719938) for bustages on media_features.rs. CLOSED TREE 2021-09-20 23:29:05 +03:00
lamoure6 a4e720c69d Bug 1719938 - Removed remaining (non-negated) -moz-proton media queries. r=mhowell,mtigley,emilio
Differential Revision: https://phabricator.services.mozilla.com/D125328
2021-09-20 19:21:50 +00:00
Emilio Cobos Álvarez c18dd9edcd Bug 1731052 - Consider whether the color is CSS accessible to decide whether to use standins in nsNativeBasicTheme. r=mstange
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
2021-09-16 19:06:09 +00:00
Emilio Cobos Álvarez 8b10d3a89d Bug 1693222 - Implement SelectedItem and SelectedItemText system colors. r=mstange
Since Highlight / HighlightText are now equivalent to the text selection
ones, remove those too.

Differential Revision: https://phabricator.services.mozilla.com/D123964
2021-09-02 11:38:01 +00:00
Narcis Beleuzu 92fc260af2 Backed out changeset 28a0487d0291 (bug 1693222) for reftest failure on themed-widget.html. CLOSED TREE 2021-09-02 02:26:12 +03:00
Emilio Cobos Álvarez c3eb845bbf Bug 1693222 - Implement SelectedItem and SelectedItemText system colors. r=mstange
Since Highlight / HighlightText are now equivalent to the text selection
ones, remove those too.

Differential Revision: https://phabricator.services.mozilla.com/D123964
2021-09-01 18:21:57 +00:00
Bob Owen 8434181376 Bug 1701796: Move IsTouchDeviceSupportPresent to LookAndFeel remoting to prevent win32k usage in the content process. r=emilio,geckoview-reviewers,owlish
Differential Revision: https://phabricator.services.mozilla.com/D123497
2021-08-25 14:32:13 +00:00
Karl Tomlinson 33a62f48af Bug 1725917 use the same logic for chrome ColorScheme in MatchFirefoxThemeIfNeeded() as in ColorSchemeForDocument() r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D122807
2021-08-18 07:45:15 +00:00
Iulian Moraru d56b6f5b06 Backed out changeset e40234e5ffde (bug 1725917) for causing linux build bustages on nsLookAndFeel.cpp. CLOSED TREE 2021-08-18 09:52:04 +03:00
Karl Tomlinson 3c44e06310 Bug 1725917 use the same logic for chrome ColorScheme in MatchFirefoxThemeIfNeeded() as in ColorSchemeForDocument() r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D122807
2021-08-18 00:58:57 +00:00
Emilio Cobos Álvarez 624584c368 Bug 1724405 - Make ui.caretBlinkCount a proper widget int, and make it respect GTK settings. r=stransky
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
2021-08-10 14:39:27 +00:00
Morgan Reschenberg 72570f3a98 Bug 1720792: Add MozNativevisitedhyperlinktext color, use it to style visited links r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D120657
2021-07-28 17:25:58 +00:00
Emilio Cobos Álvarez e584d51e3a Bug 1721359 - With allow-gtk-dark-theme, keep content pages using system color scheme. r=stransky
Differential Revision: https://phabricator.services.mozilla.com/D120824
2021-07-28 10:34:02 +00:00
Alexandru Michis 9734c4f0c2 Backed out changeset d06a9296cfab (bug 1718934) for not fixing Bug 1718934 in its entirety. 2021-07-27 20:27:46 +03:00
Emilio Cobos Álvarez 02bbf0389a Bug 1722299 - Initial support for the color-scheme CSS property. r=mstange
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
2021-07-27 15:50:48 +00:00
Emilio Cobos Álvarez ebffc1928f Bug 1722359 - Remove ui.showHideScrollbars. r=mstange
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
2021-07-26 18:42:36 +00:00
Emilio Cobos Álvarez 5512bfda91 Bug 1717873 - Print documents shouldn't use system colors when in hcm. r=morgan
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
2021-07-24 21:10:44 +00:00
Emilio Cobos Álvarez 08dccdd536 Bug 1721347 - Add OS theme info to about:support. r=Gijs,fluent-reviewers
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
2021-07-20 20:09:09 +00:00