Bug 195113

Summary: Web Inspector: popover colors don't change when transitioning to/from dark mode
Product: WebKit Reporter: Devin Rousso <hi>
Component: Web InspectorAssignee: Devin Rousso <hi>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, hi, inspector-bugzilla-changes, mattbaker, timothy, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch none

Description Devin Rousso 2019-02-27 11:35:03 PST
# STEPS TO REPRODUCE:
1. inspect any page
2. find some CSS color in the Styles sidebar of the Elements tab
3. click the color swatch
4. go to System Preferences > General and change the appearance to Dark
 => the popover still has a light background
Comment 1 Radar WebKit Bug Importer 2019-02-27 11:35:40 PST
<rdar://problem/48444188>
Comment 2 Devin Rousso 2019-02-27 11:50:37 PST
Created attachment 363111 [details]
Patch
Comment 3 WebKit Commit Bot 2019-02-27 12:13:21 PST
Comment on attachment 363111 [details]
Patch

Clearing flags on attachment: 363111

Committed r242144: <https://trac.webkit.org/changeset/242144>
Comment 4 WebKit Commit Bot 2019-02-27 12:13:22 PST
All reviewed patches have been landed.  Closing bug.
Comment 5 Matt Baker 2019-02-27 13:45:21 PST
Comment on attachment 363111 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=363111&action=review

> Source/WebInspectorUI/UserInterface/Views/Popover.js:587
> +                this._prefersDarkColorSchemeMediaQueryList = window.matchMedia("(prefers-color-scheme: dark)");

Cool!