[webkit-changes] [WebKit/WebKit] 9b4ea1: Make <input type=checkbox switch> zoomable on macOS
Anne van Kesteren
noreply at github.com
Tue Jan 16 12:46:27 PST 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 9b4ea113ce2d829f4e4521771621fc0eb82853d1
https://github.com/WebKit/WebKit/commit/9b4ea113ce2d829f4e4521771621fc0eb82853d1
Author: Anne van Kesteren <annevk at annevk.nl>
Date: 2024-01-16 (Tue, 16 Jan 2024)
Changed paths:
A LayoutTests/fast/forms/switch/no-pixels-outside-the-box-expected.html
A LayoutTests/fast/forms/switch/no-pixels-outside-the-box-vertical-lr-rtl-expected.html
A LayoutTests/fast/forms/switch/no-pixels-outside-the-box-vertical-lr-rtl.html
A LayoutTests/fast/forms/switch/no-pixels-outside-the-box.html
A LayoutTests/fast/forms/switch/zoom-approximates-transform-expected.html
A LayoutTests/fast/forms/switch/zoom-approximates-transform-rtl-expected.html
A LayoutTests/fast/forms/switch/zoom-approximates-transform-rtl.html
A LayoutTests/fast/forms/switch/zoom-approximates-transform-vertical-lr-expected.html
A LayoutTests/fast/forms/switch/zoom-approximates-transform-vertical-lr.html
A LayoutTests/fast/forms/switch/zoom-approximates-transform-vertical-rl-expected.html
A LayoutTests/fast/forms/switch/zoom-approximates-transform-vertical-rl.html
A LayoutTests/fast/forms/switch/zoom-approximates-transform.html
M Source/WebCore/platform/graphics/mac/controls/SwitchThumbMac.mm
M Source/WebCore/platform/graphics/mac/controls/SwitchTrackMac.mm
Log Message:
-----------
Make <input type=checkbox switch> zoomable on macOS
https://bugs.webkit.org/show_bug.cgi?id=267450
rdar://120895293
Reviewed by Aditya Keerthi.
Reuse the boilerplate zooming code from other controls for the switch
control so it works correctly when zoomed using "Zoom In".
In SwitchTrackMac this scales both the inflatedTrackRect and the
trackRect as the latter is used for drawing the focus ring.
In SwitchThumbMac this adds a CGContextStateSaver for the
trackBuffer context for consistency with SwitchTrackMac. It isn't
required to address this bug. It also renames a variable for internal
consistency.
* LayoutTests/fast/forms/switch/no-pixels-outside-the-box-expected.html: Added.
* LayoutTests/fast/forms/switch/no-pixels-outside-the-box-vertical-lr-rtl-expected.html: Added.
* LayoutTests/fast/forms/switch/no-pixels-outside-the-box-vertical-lr-rtl.html: Added.
* LayoutTests/fast/forms/switch/no-pixels-outside-the-box.html: Added.
* LayoutTests/fast/forms/switch/zoom-approximates-transform-expected.html: Added.
* LayoutTests/fast/forms/switch/zoom-approximates-transform-rtl-expected.html: Added.
* LayoutTests/fast/forms/switch/zoom-approximates-transform-rtl.html: Added.
* LayoutTests/fast/forms/switch/zoom-approximates-transform-vertical-lr-expected.html: Added.
* LayoutTests/fast/forms/switch/zoom-approximates-transform-vertical-lr.html: Added.
* LayoutTests/fast/forms/switch/zoom-approximates-transform-vertical-rl-expected.html: Added.
* LayoutTests/fast/forms/switch/zoom-approximates-transform-vertical-rl.html: Added.
* LayoutTests/fast/forms/switch/zoom-approximates-transform.html: Added.
* Source/WebCore/platform/graphics/mac/controls/SwitchThumbMac.mm:
(WebCore::SwitchThumbMac::draw):
* Source/WebCore/platform/graphics/mac/controls/SwitchTrackMac.mm:
(WebCore::SwitchTrackMac::draw):
Canonical link: https://commits.webkit.org/273089@main
More information about the webkit-changes
mailing list