[webkit-changes] [WebKit/WebKit] 1f547d: REGRESSION (macOS 14): Native text fields are invi...

Aditya Keerthi noreply at github.com
Mon Feb 26 20:39:15 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 1f547d4ed1880f4eed134ba8bf5bbcae0e58bb33
      https://github.com/WebKit/WebKit/commit/1f547d4ed1880f4eed134ba8bf5bbcae0e58bb33
  Author: Aditya Keerthi <akeerthi at apple.com>
  Date:   2024-02-26 (Mon, 26 Feb 2024)

  Changed paths:
    A LayoutTests/fast/forms/textfield-dark-color-scheme-expected-mismatch.html
    A LayoutTests/fast/forms/textfield-dark-color-scheme.html
    M Source/WebCore/platform/graphics/mac/controls/WebControlView.mm

  Log Message:
  -----------
  REGRESSION (macOS 14): Native text fields are invisible in dark mode
https://bugs.webkit.org/show_bug.cgi?id=270134
rdar://123658326

Reviewed by Richard Robinson.

201985 at main added logic to ensure that text fields are displayed correctly in
dark mode, as they do not support "border only" painting. The detection of
dark mode was performed by checking the appearance of the cell's control view.

However, with the introduction of GPU process for DOM rendering on macOS, cells
no longer have control views. Consequently, the appearance check always fails,
and the light mode border treatment, which results in an invisible control in
dark mode, is used.

Fix by comparing against `-[NSAppearance currentDrawingAppearance]` rather than
assuming there is a control view. This is correct, as the drawing appearance is
always set (using `LocalDefaultSystemAppearance`) prior to drawing the control.

* LayoutTests/fast/forms/textfield-dark-color-scheme-expected-mismatch.html: Added.
* LayoutTests/fast/forms/textfield-dark-color-scheme.html: Added.
* Source/WebCore/platform/graphics/mac/controls/WebControlView.mm:
(-[WebControlTextFieldCell _adjustedCoreUIDrawOptionsForDrawingBordersOnly:]):

Canonical link: https://commits.webkit.org/275363@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