wpt
wpt copied to clipboard
[Gecko Bug 1787127] Use used color-scheme (not preferred) to determine canvas background adjustments.
As per spec, see https://drafts.csswg.org/css-color-adjust/#color-scheme-effect:
In order to preserve expected color contrasts, in the case of embedded documents typically rendered over a transparent canvas (such as provided via an HTML iframe element), if the used color scheme of the element and the used color scheme of the embedded document’s root element do not match, then the UA must use an opaque canvas of the Canvas color appropriate to the embedded document’s used color scheme instead of a transparent canvas.
After bug 1782596 we were using the preferred rather than used color-scheme, which is the right thing to do for prefers-color-scheme, but not for the canvas background.
Differential Revision: https://phabricator.services.mozilla.com/D155831
bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1787127 gecko-commit: 56e3b846f3f118f0c07336ec134ca8d9c50411d5 gecko-reviewers: tnikkel