Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: b859116b450cd87a4d920d9493c1c5657566472a
https://github.com/WebKit/WebKit/commit/b859116b450cd87a4d920d9493c1c5657566472a
Author: Nikolas Zimmermann <[email protected]>
Date: 2026-03-03 (Tue, 03 Mar 2026)
Changed paths:
M Source/WebCore/rendering/RenderTheme.cpp
Log Message:
-----------
RenderTheme::updateSliderTrackPart() may divides by zero when computing
datalist tick ratios
https://bugs.webkit.org/show_bug.cgi?id=309006
Reviewed by Simon Fraser.
The tick ratio calculation divides by (maximum - minimum) without guarding
against zero, unlike the thumb position calculation which already performs
this check. When max == min (e.g. max="0"), this produces NaN values that
propagate into SliderTrackPart::drawTicks() creating an unsorted FloatRect.
This fixes a crash in invalid-datalist-options-crash.html (WPT test in
imported/w3c/web-platform-tests/html/semantics/forms/the-input-element) for
the GTK/WPE ports, where the unsorted rect triggers an assertion in
SkCanvas::onDrawRect in SKIA_DEBUG enabled builds.
Covered by existing tests.
* Source/WebCore/rendering/RenderTheme.cpp:
(WebCore::updateSliderTrackPartForRenderer):
Canonical link: https://commits.webkit.org/308546@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications