Bug 266721 - Web Inspector: PrefersColorScheme is not defined on all platforms causing exception
Summary: Web Inspector: PrefersColorScheme is not defined on all platforms causing exc...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: Other All
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-12-20 11:48 PST by ujwal koneru
Modified: 2023-12-27 11:49 PST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ujwal koneru 2023-12-20 11:48:08 PST
https://github.com/WebKit/WebKit/blob/c186aa353a2e83ef72ed2609fab10a7be617c8ea/Source/WebInspectorUI/UserInterface/Controllers/CSSManager.js#L669

PrefersColorScheme does not seem to exist on all platforms in InspectorBackend.Enum.Page.UserPreferenceName.
An exception is triggered. This was caught by accident as one of the event listeners gets exception and exits causing buggy behavior.


I am wondering if a change to something like is correct on this context.
this._overriddenUserPreferences.delete(InspectorBackend.Enum.Page.UserPreferenceName?.PrefersColorScheme);

Hoping Devin has a chance to offer feedback on this?
Comment 1 Radar WebKit Bug Importer 2023-12-27 11:49:14 PST
<rdar://problem/120218897>