Summary: | Web Inspector: Forced color scheme should reset on page refresh | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Razvan Caliman <rcaliman> | ||||
Component: | Web Inspector | Assignee: | Razvan Caliman <rcaliman> | ||||
Status: | RESOLVED CONFIGURATION CHANGED | ||||||
Severity: | Normal | CC: | bburg, inspector-bugzilla-changes, webkit-bug-importer, yurys | ||||
Priority: | P2 | Keywords: | InRadar | ||||
Version: | WebKit Nightly Build | ||||||
Hardware: | All | ||||||
OS: | All | ||||||
Attachments: |
|
Description
Razvan Caliman
2021-04-13 06:34:08 PDT
Created attachment 425871 [details]
Patch
Comment on attachment 425871 [details]
Patch
r=me
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]. (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); (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. |