-
Notifications
You must be signed in to change notification settings - Fork 689
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[css-color-adjust] about:blank causes undesired flickering with dark color scheme. #9624
Comments
I'm not sure how and, if so, where <html><head></head><body></body></html> Are you effectively proposing the user agent stylesheet for It would definitely not be web-compatible to make this the default for |
Correct, it'd be just about:blank, and potentially only the "initial about blank" (I think the html spec has a concept for that, but on my phone; gecko definitely has a bit for that), and it doesn't need to have all the side effects of the color-scheme: property, just not applying that "draw an opaque canvas" bit from the spec. |
I don't know much about about:blank except that it's weird and often has bizarre compat constraints, but your suggestion seems reasonable to me, particularly your (1). |
…ll loaded. r=devtools-reviewers,nchevobbe Much like we we do here: https://searchfox.org/mozilla-central/rev/d7f837add602d270f2b2958b3ab5206dc85965c0/devtools/client/framework/toolbox.js#2605 This is not an ideal fix but it fixes the immediate flicker. The real fix would be addressing w3c/csswg-drafts#9624 Depends on D194395 Differential Revision: https://phabricator.services.mozilla.com/D194396
…ll loaded. r=devtools-reviewers,nchevobbe Much like we we do here: https://searchfox.org/mozilla-central/rev/d7f837add602d270f2b2958b3ab5206dc85965c0/devtools/client/framework/toolbox.js#2605 This is not an ideal fix but it fixes the immediate flicker. The real fix would be addressing w3c/csswg-drafts#9624 Depends on D194395 Differential Revision: https://phabricator.services.mozilla.com/D194396
…shells. This implements the proposed fix to w3c/csswg-drafts#9624, and adds a tentative test for it. Differential Revision: https://phabricator.services.mozilla.com/D194751 bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1866738 gecko-commit: 1dcc9b5526c21fb2c7cc5ff2e5aaebdaf3a0648c gecko-reviewers: jwatt
…in content docshells. r=jwatt This implements the proposed fix to w3c/csswg-drafts#9624, and adds a tentative test for it. Differential Revision: https://phabricator.services.mozilla.com/D194751
…shells. This implements the proposed fix to w3c/csswg-drafts#9624, and adds a tentative test for it. Differential Revision: https://phabricator.services.mozilla.com/D194751 bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1866738 gecko-commit: 1dcc9b5526c21fb2c7cc5ff2e5aaebdaf3a0648c gecko-reviewers: jwatt
…in content docshells. r=jwatt This implements the proposed fix to w3c/csswg-drafts#9624, and adds a tentative test for it. Differential Revision: https://phabricator.services.mozilla.com/D194751
…ll loaded. r=devtools-reviewers,nchevobbe Much like we we do here: https://searchfox.org/mozilla-central/rev/d7f837add602d270f2b2958b3ab5206dc85965c0/devtools/client/framework/toolbox.js#2605 This is not an ideal fix but it fixes the immediate flicker. The real fix would be addressing w3c/csswg-drafts#9624 Depends on D194395 Differential Revision: https://phabricator.services.mozilla.com/D194396 UltraBlame original commit: 8de13ec9dc9397cb816d233753e77ac5c3f94f9f
…in content docshells. r=jwatt This implements the proposed fix to w3c/csswg-drafts#9624, and adds a tentative test for it. Differential Revision: https://phabricator.services.mozilla.com/D194751 UltraBlame original commit: 1dcc9b5526c21fb2c7cc5ff2e5aaebdaf3a0648c
…ll loaded. r=devtools-reviewers,nchevobbe Much like we we do here: https://searchfox.org/mozilla-central/rev/d7f837add602d270f2b2958b3ab5206dc85965c0/devtools/client/framework/toolbox.js#2605 This is not an ideal fix but it fixes the immediate flicker. The real fix would be addressing w3c/csswg-drafts#9624 Depends on D194395 Differential Revision: https://phabricator.services.mozilla.com/D194396 UltraBlame original commit: 8de13ec9dc9397cb816d233753e77ac5c3f94f9f
…in content docshells. r=jwatt This implements the proposed fix to w3c/csswg-drafts#9624, and adds a tentative test for it. Differential Revision: https://phabricator.services.mozilla.com/D194751 UltraBlame original commit: 1dcc9b5526c21fb2c7cc5ff2e5aaebdaf3a0648c
…ll loaded. r=devtools-reviewers,nchevobbe Much like we we do here: https://searchfox.org/mozilla-central/rev/d7f837add602d270f2b2958b3ab5206dc85965c0/devtools/client/framework/toolbox.js#2605 This is not an ideal fix but it fixes the immediate flicker. The real fix would be addressing w3c/csswg-drafts#9624 Depends on D194395 Differential Revision: https://phabricator.services.mozilla.com/D194396 UltraBlame original commit: 8de13ec9dc9397cb816d233753e77ac5c3f94f9f
…in content docshells. r=jwatt This implements the proposed fix to w3c/csswg-drafts#9624, and adds a tentative test for it. Differential Revision: https://phabricator.services.mozilla.com/D194751 UltraBlame original commit: 1dcc9b5526c21fb2c7cc5ff2e5aaebdaf3a0648c
The CSS Working Group just discussed
The full IRC log of that discussion<fantasai> emilio: This is about the inital `about: blank` page being light by default<fantasai> emilio: since loads are async, if you have a testcase like in the issue, you see white flickering <fantasai> emilio: This is due to color-adjust. <iframe> is usually transparent, but to fix some contrast issues, if you have light iframe in dark page, then we would paint an opaque canvase <fantasai> emilio: My proposal is to not do that for `about:blank` <fantasai> emilio: because authors have no control over it <fantasai> emilio: and it just causes that kind of flickering <fantasai> emilio: initial about:blank vs all about:blank <fantasai> emilio: initial seems safer <fantasai> PROPOSED: initial about:blank iframes are always transparent <fantasai> RESOLVED: initial about:blank iframes are always transparent <oriol> https://html.spec.whatwg.org/#is-initial-about:blank |
See the test-case here, with dark mode enabled. This happens across browsers, and per spec, and seems pretty unfortunate to me. For reference:
The issue is that the initial
about:blank
document, which can get rendered for a split second, but maybe more if the real iframe takes longer to load, or maybe forever if you just have an<iframe></iframe>
and the website injects content, matches this condition in the spec:Authors can work around it for iframes injected dynamically via
visibility
or so, but that's a bit of a hack.There ways to fix this like:
about:blank
document, assume something equivalent to<meta name="color-scheme" content="light dark">
. This could in theory break some pages that are doing<iframe></iframe>
and then appending stuff to thecontentDocument
, so it might not be super-web-compatible, but it's not so risky with [css-color-adjust-1]color-scheme
should affect embedded iframes #4772 since for pages not usingcolor-scheme
, the iframe will get a preferred scheme of light...I think the first suggestion is likely to be web compatible and is the simplest, but let me know if you have other ideas, or somehow this doesn't seem worth fixing or what not.
cc @lilles @tabatkins @smfr @tomayac
The text was updated successfully, but these errors were encountered: