Bug 254457

Summary: Web Inspector: REGRESSION(257744@main): Dark Mode simulation isn't maintained on page change, but remains selected in the UI
Product: WebKit Reporter: novov <anon185441>
Component: Web InspectorAssignee: Devin Rousso <hi>
Status: RESOLVED FIXED    
Severity: Minor CC: hi, inspector-bugzilla-changes, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Safari Technology Preview   
Hardware: All   
OS: macOS 13   
Bug Depends on: 248393    
Bug Blocks:    
Attachments:
Description Flags
"Color scheme: Dark" was selected on a previous page. It remains selected here, despite (prefers-color-scheme:dark) not taking effect on this site, which has a dark theme. none

Description novov 2023-03-25 02:57:36 PDT
Created attachment 465585 [details]
"Color scheme: Dark" was selected on a previous page. It remains selected here, despite (prefers-color-scheme:dark) not taking effect on this site, which has a dark theme.

When using Web Inspector, one can use a popover in the Elements tab to simulate (prefers-color-scheme:dark).

Currently, when the "Dark" option is selected, it remains chosen in the UI when changing to another page. However, the actual functionality isn't applied on said subsequent page, meaning the UI is inconsistent with what it controls: one has to change it to Light and then Dark again to view the page with (prefers-color-scheme:dark) applied.

Either the UI should change back to its default selection to indicate that the simulation is no longer applied, or the simulation should be maintained when loading another page, reflecting the UI state.
Comment 1 Radar WebKit Bug Importer 2023-04-01 02:58:16 PDT
<rdar://problem/107506257>
Comment 2 Devin Rousso 2023-05-09 00:06:53 PDT
Pull request: https://github.com/WebKit/WebKit/pull/13630
Comment 3 EWS 2023-05-17 13:04:16 PDT
Committed 264172@main (1fb980be68f3): <https://commits.webkit.org/264172@main>

Reviewed commits have been landed. Closing PR #13630 and removing active labels.