Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 394b4318742afa6893a415b3bda9219b54967ed4
      
https://github.com/WebKit/WebKit/commit/394b4318742afa6893a415b3bda9219b54967ed4
  Author: Ahmad Saleem <[email protected]>
  Date:   2026-10-05 (Mon, 05 Oct 2026)

  Changed paths:
    A 
LayoutTests/fast/forms/form-control-refresh/range-vertical-hidden-thumb-ticks-fill-length-expected.html
    A 
LayoutTests/fast/forms/form-control-refresh/range-vertical-hidden-thumb-ticks-fill-length.html
    M Source/WebCore/rendering/cocoa/RenderThemeCocoa.mm

  Log Message:
  -----------
  [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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to