Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: e4ac810c5e5f4855566304c3c00c06dbed215cc9
      
https://github.com/WebKit/WebKit/commit/e4ac810c5e5f4855566304c3c00c06dbed215cc9
  Author: Anuj Panta <[email protected]>
  Date:   2026-02-20 (Fri, 20 Feb 2026)

  Changed paths:
    M Source/WebInspectorUI/UserInterface/Base/Main.js
    M Source/WebInspectorUI/UserInterface/Protocol/InspectorFrontendAPI.js
    M Source/WebInspectorUI/UserInterface/Views/Variables.css
    M Source/WebKit/UIProcess/Inspector/WebInspectorUIProxy.cpp
    M Source/WebKit/UIProcess/Inspector/WebInspectorUIProxy.h
    M Source/WebKit/UIProcess/Inspector/mac/WebInspectorUIProxyMac.mm
    M Source/WebKit/WebProcess/Inspector/WebInspectorUI.cpp
    M Source/WebKit/WebProcess/Inspector/WebInspectorUI.h
    M Source/WebKit/WebProcess/Inspector/WebInspectorUI.messages.in

  Log Message:
  -----------
  Web Inspector uses system highlight color, which becomes misleading when 
that's grey
https://bugs.webkit.org/show_bug.cgi?id=291237
rdar://148779029

Reviewed by BJ Burg.

When macOS accent color is set to Graphite (gray), enabled toolbar buttons and 
selected DOM
elements become visually indistinguishable from disabled/unselected states. 
This patch detects
gray accent colors by checking if RGB channels differ by ≤ 20 (graphite is ~5, 
all chromatic
colors are > 50) and overrides accent-derived CSS variables with blue. To 
handle changes while
Web Inspector is open, NSSystemColorsDidChangeNotification is observed in the 
UIProcess and
forwarded via IPC to WebInspectorUI, which dispatches systemAppearanceDidChange 
to
InspectorFrontendAPI to re-run the detection live.

* Source/WebInspectorUI/UserInterface/Base/Main.js:
* Source/WebInspectorUI/UserInterface/Protocol/InspectorFrontendAPI.js:
(InspectorFrontendAPI.systemAppearanceDidChange):
* Source/WebInspectorUI/UserInterface/Views/Variables.css:
(&.mac-platform):
* Source/WebKit/UIProcess/Inspector/WebInspectorUIProxy.cpp:
(WebKit::WebInspectorUIProxy::systemAppearanceDidChange):
* Source/WebKit/UIProcess/Inspector/WebInspectorUIProxy.h:
* Source/WebKit/UIProcess/Inspector/mac/WebInspectorUIProxyMac.mm:
(-[WKWebInspectorUIProxyObjCAdapter _systemColorsDidChange:]):
(WebKit::WebInspectorUIProxy::platformCreateFrontendPage):
* Source/WebKit/WebProcess/Inspector/WebInspectorUI.cpp:
(WebKit::WebInspectorUI::systemAppearanceDidChange):
* Source/WebKit/WebProcess/Inspector/WebInspectorUI.h:
* Source/WebKit/WebProcess/Inspector/WebInspectorUI.messages.in:

Canonical link: https://commits.webkit.org/307943@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to