[webkit-changes] [WebKit/WebKit] 80d6b8: [macOS] Menu and MenuText system colors are incorrect

Aditya Keerthi noreply at github.com
Sat Mar 23 12:11:53 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 80d6b8db8ff38513395c9ed7c404f22874c94c09
      https://github.com/WebKit/WebKit/commit/80d6b8db8ff38513395c9ed7c404f22874c94c09
  Author: Aditya Keerthi <akeerthi at apple.com>
  Date:   2024-03-23 (Sat, 23 Mar 2024)

  Changed paths:
    M LayoutTests/platform/mac/imported/w3c/web-platform-tests/css/css-color/system-color-compute-expected.txt
    M Source/WebCore/PAL/pal/spi/mac/NSGraphicsSPI.h
    M Source/WebCore/rendering/mac/RenderThemeMac.mm

  Log Message:
  -----------
  [macOS] Menu and MenuText system colors are incorrect
https://bugs.webkit.org/show_bug.cgi?id=271506
rdar://125270664

Reviewed by Wenson Hsieh.

There are two issues:

1. `MenuText` is using `+[NSColor selectedMenuItemTextColor]`. The system color
   is not about selected items.

2. `Menu` does not adapt to dark mode.

* LayoutTests/platform/mac/imported/w3c/web-platform-tests/css/css-color/system-color-compute-expected.txt:
* Source/WebCore/PAL/pal/spi/mac/NSGraphicsSPI.h:
* Source/WebCore/rendering/mac/RenderThemeMac.mm:
(WebCore::menuBackgroundColor):

Adopt `NSDrawMenuBackground` for dark mode support. While this method is
deprecated, the only alternative is to use a custom material, which is not
viable at this time.

(WebCore::RenderThemeMac::systemColor const):

Use `+[NSColor labelColor]` for `MenuText`, which matches the system.

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



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


More information about the webkit-changes mailing list