Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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@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
- Loading branch information