[Cocoa] Vertical range slider fill overshoots its value when ticks are present and the thumb is hidden
https://bugs.webkit.org/show_bug.cgi?id=326240 rdar://189116567 Reviewed by Aditya Keerthi. When a range slider has datalist ticks and its thumb is not visible, RenderThemeCocoa::paintSliderTrackForVectorBasedControls() extends the fill by additionalLength (1.5 times the tick length) so that the fill fully covers the tick for the current value. The horizontal branch does this correctly. The vertical branch multiplied by tickLength a second time. As a result, the overshoot was 1.5 * tickLength^2 instead of 1.5 * tickLength, and it grew with the square of the zoom. At zoom: 3 on macOS, the fill ran 54px past the value instead of 9px. Use additionalLength in the vertical branch too, matching the horizontal branch. Test: fast/forms/form-control-refresh/range-vertical-hidden-thumb-ticks-fill-length.html * LayoutTests/fast/forms/form-control-refresh/range-vertical-hidden-thumb-ticks-fill-length-expected.html: Added. * LayoutTests/fast/forms/form-control-refresh/range-vertical-hidden-thumb-ticks-fill-length.html: Added. * Source/WebCore/rendering/cocoa/RenderThemeCocoa.mm: (WebCore::RenderThemeCocoa::paintSliderTrackForVectorBasedControls): Canonical link: https://commits.webkit.org/322780@main
A
Ahmad Saleem committed
394b4318742afa6893a415b3bda9219b54967ed4
Parent: 0ce3baf
Committed by Ahmad Saleem <ahmad.saleem792@gmail.com>
on 10/5/2026, 11:28:30 PM