[webkit-changes] [WebKit/WebKit] 2efb1a: [macOS] Fix rendering of <select> in vertical writ...
Aditya Keerthi
noreply at github.com
Thu Nov 9 09:42:22 PST 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 2efb1a7810e0576317097634354b4c2e942d9708
https://github.com/WebKit/WebKit/commit/2efb1a7810e0576317097634354b4c2e942d9708
Author: Aditya Keerthi <akeerthi at apple.com>
Date: 2023-11-09 (Thu, 09 Nov 2023)
Changed paths:
M Source/WebCore/platform/graphics/mac/controls/MenuListButtonMac.mm
M Source/WebCore/rendering/RenderThemeMac.mm
Log Message:
-----------
[macOS] Fix rendering of <select> in vertical writing mode
https://bugs.webkit.org/show_bug.cgi?id=264457
rdar://118147979
Reviewed by Tim Nguyen.
`NSPopUpButton` is not height resizable, resulting in a squished appearance
for `<select>` in vertical writing mode. To fix, fall back to the
`MenuListButton` path and use custom rendering when using a vertical writing
mode. Update the painting code for menu list buttons to support vertical
writing mode.
* Source/WebCore/platform/graphics/mac/controls/MenuListButtonMac.mm:
(WebCore::MenuListButtonMac::draw):
Remove incorrect logic to draw a separator next to the arrows. Currently, and
dating back to at least Safari 13, the separators do not show up (even in
horizontal writing mode). Fixing the logic to get separators working does not
result in an improvement in appearance. As a result, rather than re-writing the
logic, simply remove it.
* Source/WebCore/rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::isControlStyled const):
Apply our fallback for zoomed `<select>` to `<select>`s that have a
vertical writing mode. In both cases, the fallback is necessary as the
native control only renders at fixed sizes.
Canonical link: https://commits.webkit.org/270458@main
More information about the webkit-changes
mailing list