gecko-dev/dom
Emilio Cobos Álvarez 1421e7f545 Bug 1525107 - Make Canvas/CanvasText and Link colors color-scheme-aware. r=dholbert
For that, add `.dark` version of the browser.display* prefs that control
the light version of these colors.

The default for background/foreground colors are taken from the
GenericDarkColors used in LookAndFeel.

The defaults for links are based on this discussion:

  https://github.com/whatwg/html/issues/5426#issuecomment-904021675

(So they effectively match Chrome).

Whether the dark colors should be exposed in about:preferences (like the
light colors are) is TBD.

With this patch, we pass all the tests in:

  /html/semantics/document-metadata/the-meta-element/color-scheme/

Use the colors to paint the default canvas background and the default
colors.

There are three "regressions", though they are really progressions: we
now render the reference as the test expects (before we rendered a light
canvas background even for the reference).

Apart of these iframe tests (which we should look into, I filed
https://bugzilla.mozilla.org/show_bug.cgi?id=1738380), there are three
remaining test failures.

Two of them are due to `color: initial` not changing based on the
color-scheme. Safari also fails these tests, and the thing they're
really testing is whether system colors are preserved at computed-value
time:

  https://github.com/w3c/csswg-drafts/issues/3847

Regarding that change, I'm not so sure the trade-offs there are worth
it, as that not only complicates interpolation (we wouldn't be able to
use system colors in color-mix among others, see
https://github.com/w3c/csswg-drafts/issues/5780) plus it changes
inheritance behavior in sorta unexpected ways, see:

  https://github.com/w3c/csswg-drafts/issues/6773

Which I just filed because apparently no browser implements this
correctly. So for now will punt on those (keep matching Safari).

There's an svg-as-image test:

  https://searchfox.org/mozilla-central/rev/f8576fec48d866c5f988baaf1fa8d2f8cce2a82f/testing/web-platform/tests/css/css-color-adjust/rendering/dark-color-scheme/svg-as-image.html

Which isn't using the feature at all and I'm not sure why is it supposed
to pass (why prefers-color-scheme: dark is supposed to match that SVG
image). This test fails in all browsers apparently:

  https://wpt.fyi/results/css/css-color-adjust/rendering/dark-color-scheme/svg-as-image.html?label=master&label=experimental&aligned

I sent https://github.com/web-platform-tests/wpt/pull/31407 to remove
it and hopefully get it reviewed by some Chromium folks.

Differential Revision: https://phabricator.services.mozilla.com/D129746
2021-10-29 19:58:25 +00:00
..
abort Bug 1576768 - Automatically format .sjs files using prettier. r=Standard8,agi,zombie,extension-reviewers 2021-10-18 09:26:33 +00:00
animation Bug 1735697 - Remove profiler_can_accept_markers(), use profiler_thread_is_being_profiled() instead - r=florian 2021-10-18 23:11:30 +00:00
audiochannel
base Bug 1525107 - Make Canvas/CanvasText and Link colors color-scheme-aware. r=dholbert 2021-10-29 19:58:25 +00:00
battery
bindings Bug 1737000 - fix lint failure in dom/bindings/Codegen.py. a=lint-fix CLOSED TREE 2021-10-21 19:32:45 +03:00
broadcastchannel Bug 1736563 - Part 4: Remove redundant BFCache includes r=smaug 2021-10-28 22:20:01 +00:00
browser-element Bug 1676216 - Remove unused checkbox on promptAuth and similar. r=dimi,owlish,necko-reviewers,kershaw 2021-09-01 23:42:25 +00:00
cache Bug 1731546 - Replace existing ToResultGet uses with MOZ_TO_RESULT_GET_TYPED; r=dom-storage-reviewers,jstutte,jari 2021-10-11 06:00:15 +00:00
canvas Backed out 3 changesets (bug 1736066) for causing webgl failures in gfx/2d/Logging. CLOSED TREE 2021-10-28 22:10:39 +03:00
chrome-webidl Bug 1636629 - Log a more explicit error message on invalid redirects. r=asuth,mixedpuppy 2021-10-26 16:44:10 +00:00
clients Backed out 2 changesets (bug 1731597) for causing multiple wpt failures. CLOSED TREE 2021-10-29 05:32:59 +03:00
commandhandler
console Bug 1733034 - Fix unreachable-code-return warnings in dom. r=smaug 2021-09-29 21:44:51 +00:00
credentialmanagement Bug 1727778 - Split DOM: Device Interfaces ownership. r=dragana,dveditz 2021-09-01 09:32:18 +00:00
crypto Bug 1718899 - webcrypto: handle the 'alg' field in ECDSA JWK keys r=rmf 2021-10-12 20:35:07 +00:00
debugger
docs Bug 1736855 - Add IOUtils Migration Guide to source docs r=Gijs DONTBUILD 2021-10-21 15:44:59 +00:00
encoding Bug 1626517 - Replaced mozilla::Unused with mozilla::Ignore in mozilla::Decoder/mozilla::Encoder calls. r=m_kato 2021-10-25 12:31:41 +00:00
events Bug 1737501 - Allow contextmenu option on Windows SystemStatusBar r=mconley 2021-10-28 16:07:31 +00:00
fetch Bug 1545131 - compress wasm alt data entries (r=jandem) 2021-10-21 22:08:14 +00:00
file Bug 1730126 - Enable ESLint rule no-loss-of-precision. r=Standard8 2021-10-29 08:29:26 +00:00
filehandle Bug 1731564: Use motivated SpinEventLoopUntil inside dom/*. r=smaug 2021-10-07 08:06:11 +00:00
filesystem
flex
gamepad
geolocation
grid
html Bug 1525107 - Implement <meta name=color-scheme>. r=dholbert 2021-10-29 19:58:24 +00:00
imptests
indexedDB Bug 1736563 - Part 4: Remove redundant BFCache includes r=smaug 2021-10-28 22:20:01 +00:00
interfaces Bug 1731613 - Move GetProcessSwitchBehavior method to C++, r=nika 2021-10-19 18:46:46 +00:00
ipc Backed out 2 changesets (bug 1731597) for causing multiple wpt failures. CLOSED TREE 2021-10-29 05:32:59 +03:00
jsurl
l10n Bug 1642415 - Update existing tests to pass metasource into createMock; r=platform-i18n-reviewers,gregtatum 2021-09-22 18:16:07 +00:00
locales Bug 1737032 - Removed traces of "remote XUL". r=Gijs,fluent-reviewers 2021-10-25 11:00:47 +00:00
localstorage Backed out 11 changesets (bug 1731982, bug 1736401) for causing crashes in mozilla::dom::ClientHandle::Control. a=backout 2021-10-19 22:23:12 +03:00
locks Bug 1736563 - Part 3: Prevent bfcache when active lock request exists r=smaug 2021-10-28 22:20:00 +00:00
manifest Bug 1576768 [eslint] Turn on JavaScript linting and formatting rules for .sjs files. r=Standard8 2021-10-25 11:12:41 +00:00
mathml Bug 1732845 - Add `nsINode::IsInDesignMode()` to check whether the node is directly in design mode r=smaug 2021-10-12 03:14:43 +00:00
media Backed out 3 changesets (bug 1721443) for causing bustages on TestVideoFrameConverter.cpp. CLOSED TREE 2021-10-28 19:00:35 +03:00
messagechannel Bug 1736563 - Part 4: Remove redundant BFCache includes r=smaug 2021-10-28 22:20:01 +00:00
midi
network Bug 1736508 - Make TCPSocket work with ipv6 address again. r=valentin 2021-10-20 08:15:58 +00:00
notification Bug 1731994: part 8) Rename `nsIContentPermissionRequest`'s `isHandlingUserInput` to `hasValidTransientUserGestureActivation`. r=edgar 2021-10-04 12:16:00 +00:00
offline Bug 1730595: Remove unused constants from nsDOMOfflineResourceList.cpp. r=mccr8 2021-09-13 23:38:57 +00:00
payments Backed out 9 changesets (bug 1736017) for causing bustages in nsLineBreaker.cpp 2021-10-28 00:06:35 +03:00
performance Bug 1735697 - Remove profiler_can_accept_markers(), use profiler_thread_is_being_profiled() instead - r=florian 2021-10-18 23:11:30 +00:00
permission
plugins Bug 1576768 - Automatically format .sjs files using prettier. r=Standard8,agi,zombie,extension-reviewers 2021-10-18 09:26:33 +00:00
power
prio
promise Bug 1545131 - compress wasm alt data entries (r=jandem) 2021-10-21 22:08:14 +00:00
prototype Bug 1718481 - Use stencil in nsXULPrototypeCache. r=tcampbell,kmag 2021-09-21 03:18:02 +00:00
push Bug 1627379 - disable test_unregister_invalid_json.js on Win_QR for frequent failures. r=intermittent-reviewers,MasterWayZ DONTBUILD 2021-10-07 15:21:17 +00:00
quota Bug 1726711 - Replace NS_ERROR with QM_TRY and return immediately in case of shutdown re-entrance; r=jstutte,dom-storage-reviewers 2021-10-27 15:18:22 +00:00
reporting Bug 1576768 - Automatically format .sjs files using prettier. r=Standard8,agi,zombie,extension-reviewers 2021-10-18 09:26:33 +00:00
res
script Bug 1736057 - Enable off thread full parsing by default for external JS scripts r=smaug,bas 2021-10-25 14:54:26 +00:00
security Bug 1576768 [eslint] Turn on JavaScript linting and formatting rules for .sjs files. r=Standard8 2021-10-25 11:12:41 +00:00
serializers Bug 1736938 Part 2 - Make all LineBreaker's methods static, and adapt the callers. r=jfkthame 2021-10-25 19:00:22 +00:00
serviceworkers Bug 1576768 [eslint] Turn on JavaScript linting and formatting rules for .sjs files. r=Standard8 2021-10-25 11:12:41 +00:00
simpledb Bug 1728267 - Remove implicit ToResult from QM_TRY when no extra argument is passed in dom/simpledb; r=dom-storage-reviewers,jstutte,jari 2021-09-24 13:08:30 +00:00
smil
storage Bug 1731564: Use motivated SpinEventLoopUntil inside dom/*. r=smaug 2021-10-07 08:06:11 +00:00
streams Bug 1735334 - Remove obsolete promise wrapping code r=smaug 2021-10-22 13:24:57 +00:00
svg Bug 1576768 - Automatically format .sjs files using prettier. r=Standard8,agi,zombie,extension-reviewers 2021-10-18 09:26:33 +00:00
system Bug 1734700 - Use the IO event queue for IOUtils background tasks, r=KrisWright 2021-10-18 19:34:59 +00:00
tests Bug 1727943 - turn on mochitest* tests that were skipped on win10-ccov and now pass. r=MasterWayZ 2021-10-19 20:01:29 +00:00
u2f Bug 1436085 - Web Authentication - Remove remains of hard-coded support for U2F Google Accounts. r=smaug 2021-09-29 21:51:54 +00:00
url Bug 1724319 - Stop this test from depending on the download modal for starting a download. r=mtigley 2021-10-04 19:28:49 +00:00
vr Bug 1616390 - Validate that poses may be reported for GetPose and GetViewerPose. r=emilio 2021-10-20 16:38:37 +00:00
webauthn Bug 1732245 - Silence the unused-but-set-variable warning in dom/webauthn. r=keeler 2021-09-27 23:43:16 +00:00
webbrowserpersist
webgpu Bug 1728903 - Remove plumbing for CanvasLayer and ImageLayer. r=mattwoodrow 2021-09-18 11:44:51 +00:00
webidl Bug 1556352 - Part 2: Implement formAssociatedCallback; r=smaug 2021-10-28 10:29:38 +00:00
webshare
websocket Bug 1729897 - CSP Upgrade-insecure-requests is upgrading localhost websocket r=necko-reviewers,dragana 2021-09-15 11:28:13 +00:00
workers Bug 1730126 - Enable ESLint rule no-loss-of-precision. r=Standard8 2021-10-29 08:29:26 +00:00
worklet Bug 1576768 - Automatically format .sjs files using prettier. r=Standard8,agi,zombie,extension-reviewers 2021-10-18 09:26:33 +00:00
xhr Bug 1626517 - Replaced mozilla::Unused with mozilla::Ignore in mozilla::Decoder/mozilla::Encoder calls. r=m_kato 2021-10-25 12:31:41 +00:00
xml Bug 1736707, part 1 - Get rid of nsContentUtils::NameSpaceManager(). r=peterv 2021-10-22 16:15:57 +00:00
xslt Bug 1719542 - Part 3: Unify IndexedDB key. r=platform-i18n-reviewers,gregtatum 2021-10-25 18:23:11 +00:00
xul Bug 1726498 - Add JS::DecodeOptions. r=tcampbell 2021-10-21 21:48:48 +00:00
jar.mn
moz.build Bug 1730589 - Initial Implementation of ReadableStreams using WebIDL and DOM technologies r=smaug 2021-10-06 18:43:01 +00:00