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

28 Коммитов

Автор SHA1 Сообщение Дата
Hiroyuki Ikezoe 21a5133d31 Bug 1606503 - Get the value for prefers-reduced-motion via LookAndFeelInt. r=geckoview-reviewers,snorp
With this change we have the same setup for prefers-reduced-motion so that
we can change the value with the same manner in automated tests.

Differential Revision: https://phabricator.services.mozilla.com/D59023

--HG--
extra : moz-landing-system : lando
2020-01-14 05:51:06 +00:00
Hiroyuki Ikezoe e538eea4dc Bug 1606503 - Move prefers-reduced-motion bits for testing into LookAndFeel. r=emilio
Now both of GTK and MacOSX backends use the same machinery, LookAndFeelInt, for
prefers-reduced-motion. And we are going to use it on Android as well so it'd
make sense to move the code into there.

On Windows we can also use the same LookAndFeelInt machinery and probably
all we have to do is to call SendNotifyMessage with SPI_SETCLIENTAREAANIMATION
in SetPrefersReducedMotionOverrideForTest.

Differential Revision: https://phabricator.services.mozilla.com/D59022

--HG--
extra : moz-landing-system : lando
2020-01-14 05:50:53 +00:00
shindli c03a2cf53a Backed out 3 changesets (bug 1606503) for causing bustages in nsXPLookAndFeel.cpp CLOSED TREE
Backed out changeset 7e9d421335e0 (bug 1606503)
Backed out changeset 371f74475fb9 (bug 1606503)
Backed out changeset 8aada655d8bc (bug 1606503)
2020-01-14 05:07:14 +02:00
Hiroyuki Ikezoe f2fbae5d7d Bug 1606503 - Get the value for prefers-reduced-motion via LookAndFeelInt. r=geckoview-reviewers,snorp
With this change we have the same setup for prefers-reduced-motion so that
we can change the value with the same manner in automated tests.

Differential Revision: https://phabricator.services.mozilla.com/D59023

--HG--
extra : moz-landing-system : lando
2020-01-14 02:34:45 +00:00
Hiroyuki Ikezoe 37f0cf306c Bug 1606503 - Move prefers-reduced-motion bits for testing into LookAndFeel. r=emilio
Now both of GTK and MacOSX backends use the same machinery, LookAndFeelInt, for
prefers-reduced-motion. And we are going to use it on Android as well so it'd
make sense to move the code into there.

On Windows we can also use the same LookAndFeelInt machinery and probably
all we have to do is to call SendNotifyMessage with SPI_SETCLIENTAREAANIMATION
in SetPrefersReducedMotionOverrideForTest.

Differential Revision: https://phabricator.services.mozilla.com/D59022

--HG--
extra : moz-landing-system : lando
2020-01-14 02:17:47 +00:00
Cameron McCormack c6ae607f04 Bug 1601846 - Record telemetry for whether the user has a dark mode OS theme. r=jmathies
Differential Revision: https://phabricator.services.mozilla.com/D56130

--HG--
extra : moz-landing-system : lando
2019-12-20 19:05:12 +00:00
Adam Gashlin 7f498141e7 Bug 1561546 Part 2 - Update theme when nsXPLookAndFeel prefs change. r=dholbert,jmathies
Also causes removing a pref to take effect immediately, and prevents
losing all color pref overrides when the theme changes.

Differential Revision: https://phabricator.services.mozilla.com/D44416

--HG--
extra : moz-landing-system : lando
2019-09-19 19:05:01 +00:00
shindli ce58db2119 Backed out changeset 9ef1dd77e6b2 (bug 1561546) for causing frequent failures in dom/animation/test/mozilla/test_restyles.html CLOSED TREE 2019-09-11 23:21:46 +03:00
Adam Gashlin 28fa13a2e5 Bug 1561546 - Update theme when nsXPLookAndFeel prefs change. r=dholbert,jmathies
Also causes removing a pref to take effect immediately, and prevents
losing all color pref overrides when the theme changes.

Differential Revision: https://phabricator.services.mozilla.com/D44416

--HG--
extra : moz-landing-system : lando
2019-09-11 18:35:44 +00:00
Kristen Wright 8d6b5f31a4 Bug 1573992 - Convert findbar.modalHighlight to static pref. r=njn
Converts findbar.modalHighlight to a static pref and updates its usages.

Differential Revision: https://phabricator.services.mozilla.com/D43522

--HG--
extra : moz-landing-system : lando
2019-08-27 00:09:29 +00:00
Kristen Wright f25c87b636 Bug 1573992 - Convert ui.use_native_colors to static pref. r=njn
Converts ui.use_native_colors to a static pref and updates its usages.

Differential Revision: https://phabricator.services.mozilla.com/D43521

--HG--
extra : moz-landing-system : lando
2019-08-27 00:07:34 +00:00
Emilio Cobos Álvarez 810916db16 Bug 1554433 - Move system colors to values::specified::color. r=xidorn
This should be an idempotent patch. The way to come up with this patch has been:

 * Run the first script attached to the bug and pipe it to xclip, then paste it
   in color.rs
 * Add the relevant #[derive] annotations and remove the color.mako.rs
   definition.
 * Reorder the values to match the ColorID definition, on which some widget
   prefs and caching stuff relies on.
 * Manually port some documentation from nsLookAndFeel.h
 * Run `rg 'eColorID_' | cut -d : -f 1 | sort | uniq >files`
 * Run the second script attached to the bug.
 * Manually fix usage of `LAST_COLOR` (adding the `End` variant), and adding
   casts to integer as needed.
 * Add an static assert so that people remember to update the prefs, rather than
   a comment on the definition :)

Differential Revision: https://phabricator.services.mozilla.com/D32610

--HG--
extra : moz-landing-system : lando
2019-05-26 13:10:00 +00:00
Emilio Cobos Álvarez 323b5be77a Bug 1526294 - Should not need a pres context to get a system font. r=jfkthame
The only caller wants CSS pixels, no need to go back and forth.

This is the last dependency on the pres context, I think, from the style system
font code.

Differential Revision: https://phabricator.services.mozilla.com/D19147
2019-02-15 01:35:13 +01:00
Liang-Heng Chen bd2504a471 Bug 1485266 - Use stand-ins for native colors when RFP is enabled r=heycam
Differential Revision: https://phabricator.services.mozilla.com/D17755

--HG--
extra : moz-landing-system : lando
2019-02-06 08:45:44 +00:00
Hiroyuki Ikezoe b8cb200990 Bug 1523692 - Set the prefers-reduce-motion value for test to the instance of nsLookAndFeel in child processes. r=snorp
So that we can query the test value in the child process properly.

Note that the APIs used for setting the prefers-reduced-motion value for testing
are only used on Android and MacOSX.  As for MacOSX we have a different
machinery (see bug 1486971) to deliver the test value without spinning native
event loop in the child process so the change here is valid only for Android.

Differential Revision: https://phabricator.services.mozilla.com/D18311

--HG--
extra : moz-landing-system : lando
2019-02-01 22:07:26 +00:00
Sylvestre Ledru 265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Hiroyuki Ikezoe 5f958f80c7 Bug 1486971 - Test for dynamically change of the prefers-reduced-motion setting on MacOSX. r=froydnj,mstange
The framework to simulate the setting change works as following;

 - nsIDOMWindowUtils.setPrefersReducedMotion() calls an IPC function which ends
   up calling nsChildView::SetPrefersReducedMotion() in the parent process

 - nsChildView::SetPrefersReducedMotion() sets the given value into
   nsLookAndFeel::mPrefersReducedMotionCached just like we set the value queried
   via NSWorkspace.accessibilityDisplayShouldReduceMotion in the parent process
   and send a notification which is the same notification MacOSX sends when the
   system setting changed

 - Normally the cached value is cleared before quering new values since the
   cache value is stale, but in this case the value is up-to-date one, so
   nsChildView::SetPrefersReducedMotion() tells that we don't need to clear the
   cache, and nsIDOMWindowUtils.resetPrefersReducedMotion() resets that state
   of 'we don't need to clear the cache'

There are two test cases with the framework in this commit, one is just setting
the value and checking the value queried by window.matchMedia.  The other one is
receiving 'change' event and checking the value of the event target.

Note that to make this test works the patch for bug 1478212 is necessary since
the test runs in an iframe.

Depends on D5003

Differential Revision: https://phabricator.services.mozilla.com/D5004

--HG--
extra : moz-landing-system : lando
2018-09-15 01:00:07 +00:00
Markus Stange 0704012f36 Bug 1387594 - Add system colors for use in conjunction with -moz-font-smoothing-background-color and vibrant -moz-appearances. r=dbaron
MozReview-Commit-ID: IxXZwONxy41
2017-09-14 23:09:48 +02:00
Manish Goregaokar b74c4d0f69 Bug 1386915 - Add nsLookAndFeel::NativeInit() virtual call for initializing native-side state; r=jfkthame
MozReview-Commit-ID: 8XKSC1AOI0N
2017-08-06 15:41:08 -07:00
Brendan Dahl a1f2e12af8 Bug 1338004 - Add headless browser mode. r=jrmuizel, r=ted
Supports creating a windowless browser on Linux without an X server. Most of the
changes are just adding branches to avoid calls in to GTK which calls
into X. Some of the bigger additions were adding a separate headless widget
which implements just enough to render a page. A headless look and
feel were also added since there are many calls into GTK in the platform
specific one.
2017-04-04 10:22:00 -04:00
Mike de Boer 6a8dc01ced Bug 384458 - part 1: make the background color of the SELECTION_ATTENTION range fully transparent when modal highlighting is on. r=masayuki 2016-06-09 13:30:44 +02:00
Wes Kocher 0adc8ded6e Backed out 6 changesets (bug 384458) for frequent browser_FinderHighlighter.js failures
Backed out changeset ded915ec401f (bug 384458)
Backed out changeset 63ec66da50fa (bug 384458)
Backed out changeset ae71396d3be0 (bug 384458)
Backed out changeset 3b025cbfbe3c (bug 384458)
Backed out changeset 091c5465acf7 (bug 384458)
Backed out changeset 5eabde153def (bug 384458)
2016-06-08 14:53:57 -07:00
Mike de Boer 5414d108b5 Bug 384458 - part 1: make the background color of the SELECTION_ATTENTION range fully transparent when modal highlighting is on. r=masayuki 2016-06-08 19:54:05 +02:00
Kathy Brade 61c6a3b383 Bug 232227 - Do not expose system colors to CSS or canvas. r=jmuizelaar r=enndeakin tor-r=arthuredelstein
--HG--
extra : rebase_source : 54498135a11fb7d7e9f4154ad5d5bfbf87a927bd
2015-09-25 00:59:00 +02:00
Mike Conley 409016f0e7 Bug 1096093 - Add infrastructure for LookAndFeel metric caching, and allowing the parent process to send down cache to content process. r=jimm.
--HG--
extra : rebase_source : 884abfaaa9882c7ae69c0f54a3951dfac16036d6
extra : source : 5f9c7cd773a5826d2621601e4f4ee3581d656764
2015-04-22 10:58:15 -04:00
Carsten "Tomcat" Book 9ef77a396d Backed out changeset 5f9c7cd773a5 (bug 1096093) for bustage on a CLOSED TREE 2015-04-23 17:18:52 +02:00
Mike Conley b81c35afce Bug 1096093 - Add infrastructure for LookAndFeel metric caching, and allowing the parent process to send down cache to content process. r=jimm.
--HG--
extra : rebase_source : 0b7f90741063b98d941febc12f6c882ff2414e86
2015-04-22 10:58:15 -04:00
Mason Chang 8180f9229c Bug 1085696. Part 1 Move widget/xpwidget to /widget. r=roc
--HG--
rename : widget/xpwidgets/ContentHelper.cpp => widget/ContentHelper.cpp
rename : widget/xpwidgets/ContentHelper.h => widget/ContentHelper.h
rename : widget/xpwidgets/GfxDriverInfo.cpp => widget/GfxDriverInfo.cpp
rename : widget/xpwidgets/GfxDriverInfo.h => widget/GfxDriverInfo.h
rename : widget/xpwidgets/GfxInfoBase.cpp => widget/GfxInfoBase.cpp
rename : widget/xpwidgets/GfxInfoBase.h => widget/GfxInfoBase.h
rename : widget/xpwidgets/GfxInfoCollector.cpp => widget/GfxInfoCollector.cpp
rename : widget/xpwidgets/GfxInfoCollector.h => widget/GfxInfoCollector.h
rename : widget/xpwidgets/GfxInfoWebGL.cpp => widget/GfxInfoWebGL.cpp
rename : widget/xpwidgets/GfxInfoWebGL.h => widget/GfxInfoWebGL.h
rename : widget/xpwidgets/GfxInfoX11.cpp => widget/GfxInfoX11.cpp
rename : widget/xpwidgets/GfxInfoX11.h => widget/GfxInfoX11.h
rename : widget/xpwidgets/InputData.cpp => widget/InputData.cpp
rename : widget/xpwidgets/PuppetWidget.cpp => widget/PuppetWidget.cpp
rename : widget/xpwidgets/PuppetWidget.h => widget/PuppetWidget.h
rename : widget/xpwidgets/ScreenProxy.cpp => widget/ScreenProxy.cpp
rename : widget/xpwidgets/ScreenProxy.h => widget/ScreenProxy.h
rename : widget/shared/SharedWidgetUtils.cpp => widget/SharedWidgetUtils.cpp
rename : widget/xpwidgets/WidgetUtils.cpp => widget/WidgetUtils.cpp
rename : widget/xpwidgets/nsAppShellSingleton.h => widget/nsAppShellSingleton.h
rename : widget/xpwidgets/nsBaseAppShell.cpp => widget/nsBaseAppShell.cpp
rename : widget/xpwidgets/nsBaseAppShell.h => widget/nsBaseAppShell.h
rename : widget/xpwidgets/nsBaseClipboard.cpp => widget/nsBaseClipboard.cpp
rename : widget/xpwidgets/nsBaseClipboard.h => widget/nsBaseClipboard.h
rename : widget/xpwidgets/nsBaseDragService.cpp => widget/nsBaseDragService.cpp
rename : widget/xpwidgets/nsBaseDragService.h => widget/nsBaseDragService.h
rename : widget/xpwidgets/nsBaseFilePicker.cpp => widget/nsBaseFilePicker.cpp
rename : widget/xpwidgets/nsBaseFilePicker.h => widget/nsBaseFilePicker.h
rename : widget/xpwidgets/nsBaseScreen.cpp => widget/nsBaseScreen.cpp
rename : widget/xpwidgets/nsBaseScreen.h => widget/nsBaseScreen.h
rename : widget/xpwidgets/nsBaseWidget.cpp => widget/nsBaseWidget.cpp
rename : widget/xpwidgets/nsBaseWidget.h => widget/nsBaseWidget.h
rename : widget/xpwidgets/nsClipboardHelper.cpp => widget/nsClipboardHelper.cpp
rename : widget/xpwidgets/nsClipboardHelper.h => widget/nsClipboardHelper.h
rename : widget/xpwidgets/nsClipboardProxy.cpp => widget/nsClipboardProxy.cpp
rename : widget/xpwidgets/nsClipboardProxy.h => widget/nsClipboardProxy.h
rename : widget/xpwidgets/nsColorPickerProxy.cpp => widget/nsColorPickerProxy.cpp
rename : widget/xpwidgets/nsColorPickerProxy.h => widget/nsColorPickerProxy.h
rename : widget/xpwidgets/nsContentProcessWidgetFactory.cpp => widget/nsContentProcessWidgetFactory.cpp
rename : widget/xpwidgets/nsFilePickerProxy.cpp => widget/nsFilePickerProxy.cpp
rename : widget/xpwidgets/nsFilePickerProxy.h => widget/nsFilePickerProxy.h
rename : widget/xpwidgets/nsHTMLFormatConverter.cpp => widget/nsHTMLFormatConverter.cpp
rename : widget/xpwidgets/nsHTMLFormatConverter.h => widget/nsHTMLFormatConverter.h
rename : widget/xpwidgets/nsIWidgetListener.cpp => widget/nsIWidgetListener.cpp
rename : widget/xpwidgets/nsIdleService.cpp => widget/nsIdleService.cpp
rename : widget/xpwidgets/nsIdleService.h => widget/nsIdleService.h
rename : widget/xpwidgets/nsNativeTheme.cpp => widget/nsNativeTheme.cpp
rename : widget/xpwidgets/nsNativeTheme.h => widget/nsNativeTheme.h
rename : widget/xpwidgets/nsPrimitiveHelpers.cpp => widget/nsPrimitiveHelpers.cpp
rename : widget/xpwidgets/nsPrimitiveHelpers.h => widget/nsPrimitiveHelpers.h
rename : widget/xpwidgets/nsPrintOptionsImpl.cpp => widget/nsPrintOptionsImpl.cpp
rename : widget/xpwidgets/nsPrintOptionsImpl.h => widget/nsPrintOptionsImpl.h
rename : widget/xpwidgets/nsPrintSession.cpp => widget/nsPrintSession.cpp
rename : widget/xpwidgets/nsPrintSession.h => widget/nsPrintSession.h
rename : widget/xpwidgets/nsPrintSettingsImpl.cpp => widget/nsPrintSettingsImpl.cpp
rename : widget/xpwidgets/nsPrintSettingsImpl.h => widget/nsPrintSettingsImpl.h
rename : widget/xpwidgets/nsScreenManagerProxy.cpp => widget/nsScreenManagerProxy.cpp
rename : widget/xpwidgets/nsScreenManagerProxy.h => widget/nsScreenManagerProxy.h
rename : widget/xpwidgets/nsTransferable.cpp => widget/nsTransferable.cpp
rename : widget/xpwidgets/nsTransferable.h => widget/nsTransferable.h
rename : widget/xpwidgets/nsXPLookAndFeel.cpp => widget/nsXPLookAndFeel.cpp
rename : widget/xpwidgets/nsXPLookAndFeel.h => widget/nsXPLookAndFeel.h
2014-10-23 10:16:45 -07:00