WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED CONFIGURATION CHANGED
Bug 224485
Web Inspector: Forced color scheme should reset on page refresh
https://bugs.webkit.org/show_bug.cgi?id=224485
Summary
Web Inspector: Forced color scheme should reset on page refresh
Razvan Caliman
Reported
2021-04-13 06:34:08 PDT
<
rdar://76227216
>
Attachments
Patch
(1.32 KB, patch)
2021-04-13 07:11 PDT
,
Razvan Caliman
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Razvan Caliman
Comment 1
2021-04-13 07:11:48 PDT
Created
attachment 425871
[details]
Patch
Blaze Burg
Comment 2
2021-04-13 12:38:05 PDT
Comment on
attachment 425871
[details]
Patch r=me
EWS
Comment 3
2021-04-13 13:09:41 PDT
Committed
r275904
(
236468@main
): <
https://commits.webkit.org/236468@main
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 425871
[details]
.
Yury Semikhatsky
Comment 4
2021-04-26 16:12:35 PDT
(In reply to EWS from
comment #3
)
> Committed
r275904
(
236468@main
): <
https://commits.webkit.org/236468@main
> >
This change regresses current behavior: there is no way to override color scheme preference in the early stage of page load as there is inherent delay between navigation commit and when the front-end can set the override back. Basically this code will always give wrong result if run early during page load: // Send Page.setForcedAppearance with "appearance":"Light" // navigate to a page with the following code in its inline script: console.log(matchMedia('(prefers-color-scheme: light)').matches);
Razvan Caliman
Comment 5
2023-06-07 03:44:15 PDT
(In reply to Yury Semikhatsky from
comment #4
)
> This change regresses current behavior: there is no way to override color > scheme preference in the early stage of page load as there is inherent delay > between navigation commit and when the front-end can set the override back. > Basically this code will always give wrong result if run early during page > load: > > // Send Page.setForcedAppearance with "appearance":"Light" > // navigate to a page with the following code in its inline script: > console.log(matchMedia('(prefers-color-scheme: light)').matches);
This has been addressed in the patch for
Bug 254457
. The color scheme override will persist on page refresh.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug