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

177 Коммитов

Автор SHA1 Сообщение Дата
Emilio Cobos Álvarez d0dc21c8aa Bug 1718934 - Parse -webkit-focus-ring-color (computing to black). r=mstange,geckoview-reviewers,aklotz
Some pages use this to hide the focus outline. On Blink it seems black,
WebKit uses it to expose the OS accent color. Make it black, which is
the default when the color isn't implemented on a given platform.

Differential Revision: https://phabricator.services.mozilla.com/D119036
2021-07-08 15:27:27 +00:00
Narcis Beleuzu 1b3ee0f17f Backed out changeset 66a484400799 (bug 1718934) for mochitest failures on test_value_computation.html . CLOSED TREE 2021-07-08 00:37:51 +03:00
Emilio Cobos Álvarez b63ea5363d Bug 1718934 - Parse -webkit-focus-ring-color (computing to black). r=mstange,geckoview-reviewers,aklotz
Some pages use this to hide the focus outline. On Blink it seems black,
WebKit uses it to expose the OS accent color. Make it black, which is
the default when the color isn't implemented on a given platform.

Differential Revision: https://phabricator.services.mozilla.com/D119036
2021-07-07 19:24:29 +00:00
Emilio Cobos Álvarez 416936b0eb Bug 1718748 - Ensure that changing browser.theme.toolbar-theme triggers an style/layout update. r=stransky
Otherwise nothing invalidates for the potential theme change that it
causes on GTK / macOS with dark-mode enabled.

Differential Revision: https://phabricator.services.mozilla.com/D119022
2021-07-02 07:55:24 +00:00
Emilio Cobos Álvarez 7c4a2436ac Bug 1713920 - Add some logging for native GTK colors. r=stransky
Let's see if that allows us to figure out what's going on here.

Differential Revision: https://phabricator.services.mozilla.com/D117893
2021-06-16 14:13:43 +00:00
Emilio Cobos Álvarez a8f090b432 Bug 1715748 - Add an internal -moz-system-color() function to expose both light and dark system colors. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D117416
2021-06-14 15:01:25 +00:00
Michelle Goossens e4e6b27045 Bug 1714349 - Remove browser.proton.modals.enabled pref r=mconley
Differential Revision: https://phabricator.services.mozilla.com/D116903
2021-06-11 18:14:26 +00:00
Emilio Cobos Álvarez 2a5c38d4f0 Bug 1707872 - Make GTK theme follow the firefox theme globally. r=stransky
This matches what macOS is doing in bug 1715145, and improves the
situation in the cases the user chooses a light Firefox theme, but a
dark GTK theme, or vice versa.

The nice thing of doing it globally is that we don't need to teach the
GTK code to paint with different color schemes in different windows,
which would be massively annoying.

This is expected to have an slight performance cost on startup for
light-theme users (as we need to read the dark gtk theme colors), but
it's hopefully ok.

Depends on D117227

Differential Revision: https://phabricator.services.mozilla.com/D117228
2021-06-10 11:43:00 +00:00
Dorel Luca 816a6098d2 Backed out 3 changesets (bug 1714349) for Browser-chrome failures in browser/components/places/tests/browser/browser_addBookmarkForFrame.js. CLOSED TREE
Backed out changeset 598f8e7d73ef (bug 1714349)
Backed out changeset cc7365aacdbb (bug 1714349)
Backed out changeset f0f942a93495 (bug 1714349)
2021-06-09 04:48:41 +03:00
Michelle Goossens 2548bdf8e1 Bug 1714349 - Remove browser.proton.modals.enabled pref r=mconley
Differential Revision: https://phabricator.services.mozilla.com/D116903
2021-06-08 22:16:33 +00:00
Markus Stange 4ad313f4ec Bug 1715145 - Rename widget.macos.respect-system-appearance to widget.macos.support-dark-appearance, and make the Firefox theme affect all windows if the pref is true. r=emilio
This patch also removes the pref widget.system-colors-follow-theme, which was
only true on macOS. System colors now follow the global Firefox theme.

Differential Revision: https://phabricator.services.mozilla.com/D117098
2021-06-08 02:01:10 +00:00
Michelle Goossens 1895a736f3 Bug 1714352 - Remove browser.proton.doorhangers.enabled pref r=emalysz
Differential Revision: https://phabricator.services.mozilla.com/D117091
2021-06-08 00:41:43 +00:00
Emilio Cobos Álvarez a92eb7c353 Bug 1714357 - Use a nicer media query for proton context menus. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D116736
2021-06-03 17:51:48 +00:00
Emilio Cobos Álvarez 9de60477e2 Bug 1710643 - Use titlebar colors when using CSD rather than -moz-menubartext. r=stransky
As the titlebar may be different when active / inactive, and have
other colors than a menubar.

Differential Revision: https://phabricator.services.mozilla.com/D114875
2021-05-12 22:52:28 +00:00
Emilio Cobos Álvarez 0080b2b390 Bug 1710643 - Fix encoding of the theme change kind so it doesn't crash when getting converted to JS if non-zero.
MANUAL PUSH: Fixes orange in some tests that do restricted theme
changes CLOSED TREE.
2021-05-13 01:53:38 +02:00
Emilio Cobos Álvarez e2075d6bdd Bug 1710643 - Remove support for unused gtk infobar widget and colors. r=stransky
Presumably they were for notifications and now we use native notifications?

Differential Revision: https://phabricator.services.mozilla.com/D114874
2021-05-12 19:13:21 +00:00
Emilio Cobos Álvarez bb862cf713 Bug 1709647 - Use NS_SAME_AS_FOREGROUND_COLOR instead of NS_DONT_CHANGE_COLOR. r=jfkthame
I don't think they are meaningfully different.

Depends on D114390

Differential Revision: https://phabricator.services.mozilla.com/D114391
2021-05-06 09:57:19 +00:00
Emilio Cobos Álvarez 366c9f5ece Bug 1709647 - Remove unused NS_CHANGE_COLOR_IF_SAME_AS_BG. r=jfkthame
It was introduced in bug 1024930, but it is unused since.

Differential Revision: https://phabricator.services.mozilla.com/D114389
2021-05-06 09:57:19 +00:00
Emilio Cobos Álvarez 9ffb840117 Bug 1707957 - Extract both light and dark system colors in GTK. r=stransky
And add code to use the appropriate variant like we do in macOS with
respect-system-appearance (but this still needs more work as noted in
StaticPrefList.yaml).

Still, it cleans up a bunch, and allows to not depend on the content
process boundary to provide light system colors.

Depends on D113542

Differential Revision: https://phabricator.services.mozilla.com/D113543
2021-04-30 12:36:50 +00:00
Csoregi Natalia a76b78d543 Backed out changeset e01ec8694924 (bug 1700957) as requested. CLOSED TREE 2021-04-28 18:09:01 +03:00
Butkovits Atila 6e4df5e067 Backed out 2 changesets (bug 1707872, bug 1707957) for causing valgrind failures. CLOSED TREE
Backed out changeset 0fb0e3d056f8 (bug 1707957)
Backed out changeset 03767acc6135 (bug 1707872)
2021-04-28 07:46:21 +03:00
Emma Malysz ce84c86379 Bug 1700957, graduate browser.proton.doorhangers.enabled pref to main proton pref r=mconley
Differential Revision: https://phabricator.services.mozilla.com/D110135
2021-04-28 03:17:56 +00:00
Butkovits Atila 9597a30fbb Backed out changeset 1c362512f27b (bug 1700957) for causing failures at test_chrome_only_media_queries.html. CLOSED TREE 2021-04-28 05:55:14 +03:00
Emma Malysz a344c0fa4c Bug 1700957, graduate browser.proton.doorhangers.enabled pref to main proton pref r=mconley
Differential Revision: https://phabricator.services.mozilla.com/D110135
2021-04-28 00:29:45 +00:00
Emilio Cobos Álvarez 19af6bcbf4 Bug 1707957 - Extract both light and dark system colors in GTK. r=stransky
And add code to use the appropriate variant like we do in macOS with
respect-system-appearance (but this still needs more work as noted in
StaticPrefList.yaml).

Still, it cleans up a bunch, and allows to not depend on the content
process boundary to provide light system colors.

Depends on D113542

Differential Revision: https://phabricator.services.mozilla.com/D113543
2021-04-27 22:34:56 +00:00
Emilio Cobos Álvarez 9402e09c63 Bug 1707895 - Make the -moz-toolbar-prefers-color-scheme a tri-state. r=mstriemer
This will allow detecting the system theme, which allows fixing some of
the blocked bugs.

Note that when using the system theme we will still match light or dark
appropriately, so this shouldn't change behavior just yet.

Differential Revision: https://phabricator.services.mozilla.com/D113516
2021-04-27 16:20:35 +00:00
Mark Striemer 209f987106 Bug 1701691 - -moz-toolbar-prefers-color-scheme for dark theme detection r=desktop-theme-reviewers,emilio,harry
This adds a new @media query -moz-toolbar-prefers-color-scheme which works like
prefers-color-scheme but is set based on the browser theme rather than the OS
theme. The background colour of the toolbar is used to determine the theme
dark/light preference. This will be used for in-content common.css pages and
other UI elements that include that stylesheet in the browser-chrome through
shadow DOM.

The end result is that about: pages, infobars, and modals will now "match" the
browser theme (just light/dark mode, not LWT theming support).

Differential Revision: https://phabricator.services.mozilla.com/D111486
2021-04-18 22:22:49 +00:00
Noemi Erli f90389736b Backed out changeset 1c9943dacbdb (bug 1701691) for causing failures in browser_toolbar_prefers_color_scheme.js CLOSED TREE 2021-04-16 05:29:10 +03:00
Mark Striemer 53099a968e Bug 1701691 - -moz-toolbar-prefers-color-scheme for dark theme detection r=desktop-theme-reviewers,emilio,harry
This adds a new @media query -moz-toolbar-prefers-color-scheme which works like
prefers-color-scheme but is set based on the browser theme rather than the OS
theme. The background colour of the toolbar is used to determine the theme
dark/light preference. This will be used for in-content common.css pages and
other UI elements that include that stylesheet in the browser-chrome through
shadow DOM.

The end result is that about: pages, infobars, and modals will now "match" the
browser theme (just light/dark mode, not LWT theming support).

Differential Revision: https://phabricator.services.mozilla.com/D111486
2021-04-16 00:43:46 +00:00
Csoregi Natalia 5cfbff72cd Backed out changeset 79c1392f7c43 (bug 1701691) for failures on browser_toolbar_prefers_color_scheme.js. CLOSED TREE 2021-04-15 22:18:09 +03:00
Mark Striemer 67dde35bda Bug 1701691 - -moz-toolbar-prefers-color-scheme for dark theme detection r=desktop-theme-reviewers,emilio,harry
This adds a new @media query -moz-toolbar-prefers-color-scheme which works like
prefers-color-scheme but is set based on the browser theme rather than the OS
theme. The background colour of the toolbar is used to determine the theme
dark/light preference. This will be used for in-content common.css pages and
other UI elements that include that stylesheet in the browser-chrome through
shadow DOM.

The end result is that about: pages, infobars, and modals will now "match" the
browser theme (just light/dark mode, not LWT theming support).

Differential Revision: https://phabricator.services.mozilla.com/D111486
2021-04-15 18:17:07 +00:00
Mark Striemer fa48ebee58 Bug 1702330 - Remove -moz-proton-infobars media query support r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D110963
2021-04-11 17:28:02 +00:00
Marco Bonardo 2c982d3c01 Bug 1703274 - Enable Proton Urlbar. r=jaws,extension-reviewers,zombie,rpl
Differential Revision: https://phabricator.services.mozilla.com/D110998
2021-04-09 18:20:21 +00:00
Dorel Luca 7c6d9844e5 Backed out 8 changesets (bug 1702330)for Browser-chrome failures in est/popups/browser_popup_blocker.js. CLOSED TREE
Backed out changeset b81511f8e157 (bug 1702330)
Backed out changeset 15f60f1d3f14 (bug 1702330)
Backed out changeset 809af1f94b4b (bug 1702330)
Backed out changeset 63cec3eadb4f (bug 1702330)
Backed out changeset b9964fb4dd70 (bug 1702330)
Backed out changeset 1e5ccb47056e (bug 1702330)
Backed out changeset 65faaeeb2339 (bug 1702330)
Backed out changeset e72fb8b52609 (bug 1702330)
2021-04-09 20:21:35 +03:00
Mark Striemer 7f49e59cfb Bug 1702330 - Remove -moz-proton-infobars media query support r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D110963
2021-04-09 15:26:25 +00:00
Cosmin Sabou 13826a4c50 Backed out changeset bd396182f84a (bug 1703274) for causing wpt failures on shape-outside-shape-arguments-000.html. CLOSED TREE 2021-04-09 17:51:48 +03:00
Marco Bonardo af19ef5dc4 Bug 1703274 - Enable Proton Urlbar. r=jaws,extension-reviewers,zombie,rpl
Differential Revision: https://phabricator.services.mozilla.com/D110998
2021-04-09 11:05:17 +00:00
Alexandru Michis b40e464292 Backed out 5 changesets (bug 1702330) for causing failures in browser_aboutNewTab_defaultBrowserNotification.js
CLOSED TREE

Backed out changeset 365fd1bb6dde (bug 1702330)
Backed out changeset eba73c72be18 (bug 1702330)
Backed out changeset e1277c21543f (bug 1702330)
Backed out changeset 907e4fcda266 (bug 1702330)
Backed out changeset eb2a8569ed02 (bug 1702330)
2021-04-09 03:34:23 +03:00
Mark Striemer 77be5a8d55 Bug 1702330 - Remove -moz-proton-infobars media query support r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D110963
2021-04-08 22:25:05 +00:00
Emilio Cobos Álvarez ed779cb1e2 Bug 1703222 - Make sure to set gfxFontStyle::systemFont in LookAndFeelFontToStyle. r=jfkthame
All NativeGetFont implementations do, so child processes see something
different from parent processes which is pretty unfortunate, and isn't
the goal of RemoteLookAndFeel.

I found this by code inspection. Seems this is mostly used for debugging
etc?

Differential Revision: https://phabricator.services.mozilla.com/D110914
2021-04-06 13:42:57 +00:00
Emilio Cobos Álvarez 5ddee7313f Bug 1698132 - Convert proton pref checks from @supports rules to media features. r=Gijs
This means that dynamic changes will be handled correctly, we can use
StaticPrefs, etc.

Differential Revision: https://phabricator.services.mozilla.com/D110816
2021-04-05 20:48:05 +00:00
Markus Stange c9a43eb1f1 Bug 1702879 - Add LookAndFeel::ColorSchemeForDocument so that it can be called from nsNativeThemeCocoa. r=emilio
Depends on D110764

Differential Revision: https://phabricator.services.mozilla.com/D110765
2021-04-04 15:48:02 +00:00
Emilio Cobos Álvarez cb042c2f1c Bug 1700294 - For chrome documents, base system colors off the lwtheme if appropriate, and force light for content. r=mstange
The first part fixes the bookmarks sidebars etc when in a light theme.

The second fixes too-light selection colors in websites.

Differential Revision: https://phabricator.services.mozilla.com/D110729
2021-04-03 01:17:00 +00:00
Emilio Cobos Álvarez d3f4f81c53 Bug 1702765 - Plumb ColorScheme through nsXPLookAndFeel. r=mstange
After this patch, there are two remaining pieces to fix bug 1700294:

 * macOS nsLookAndFeel needs to return the right colors for light / dark
   appearance.

 * We need to return ColorScheme::Dark for the right documents in
   ColorSchemeForDocument.

Both of those should be straight-forward.

Differential Revision: https://phabricator.services.mozilla.com/D110680
2021-04-02 22:17:55 +00:00
Emilio Cobos Álvarez 58ffc3930e Bug 1702756 - Allow color prefs to read more colors. r=mstange
This is just a minor thing, but it simplifies the code and should be
strictly better.

Differential Revision: https://phabricator.services.mozilla.com/D110679
2021-04-02 17:43:08 +00:00
Emilio Cobos Álvarez a37b56a98d Bug 1702756 - Refactor nsXPLookAndFeel's caching setup to be more consistent. r=mstange
We also cache everywhere whether getting the int/float/color failed, for
example, and do the pref lookup on demand. Seems a bit nicer. We could insert
the pref values on the cache directly on Refresh(), that's another alternative,
but I don't think it matters much either way.

Differential Revision: https://phabricator.services.mozilla.com/D110675
2021-04-02 16:34:35 +00:00
Emilio Cobos Álvarez 9e4fe964d6 Bug 1702756 - Move some hardcoded colors out of native code. r=mstange
No reason that code needs to be there. The findbar modal highlight stuff is not
being worked on and it was unclear to me why it needed a fission check, so I
removed that special case. The findbar code can customize the colors with
Selection.setColors anyways, which is a better fix.

Depends on D110673

Differential Revision: https://phabricator.services.mozilla.com/D110674
2021-04-02 16:34:34 +00:00
Emilio Cobos Álvarez 883276f35f Bug 1702756 - Lift a standins-related check to the caller. r=mstange
Depends on D110672

Differential Revision: https://phabricator.services.mozilla.com/D110673
2021-04-02 16:34:34 +00:00
Emilio Cobos Álvarez 390c6943fe Bug 1702676 - Change public LookAndFeel API to accept a color scheme. r=mstange
This shouldn't change behavior, but is the biggest cross-platform part
of the change so I'd like to get it landed sooner rather than later.

The two calls like:

  GetColor(ColorID::TextSelectBackground, color);
  if (color == 0x000000) {
    mColorTextSelectForeground = NS_RGB(0xff, 0xff, 0xff);
  } else {
    mColorTextSelectForeground = NS_DONT_CHANGE_COLOR;
  }

that I'm removing are just broken. They were calling the version of
GetColor the function that took a default value when the color wasn't
available, not the version of the color with the outparam.

To prevent such mistakes, add two signatures, GetColor(), returning a
Maybe<nscolor> and Color(), returning a color with a fallback.

Differential Revision: https://phabricator.services.mozilla.com/D110651
2021-04-02 12:22:14 +00:00
Narcis Beleuzu e9fb777466 Backed out changeset 597b9606c3ca (bug 1702676) for reftest failures on mq_prefers_reduced_motion_reduce.html CLOSED TREE 2021-04-02 09:34:53 +03:00