Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: ab99903326f17f17482619fdf6bc4b22fdadb8db
https://github.com/WebKit/WebKit/commit/ab99903326f17f17482619fdf6bc4b22fdadb8db
Author: Ahmad Saleem <[email protected]>
Date: 2026-02-04 (Wed, 04 Feb 2026)
Changed paths:
M LayoutTests/TestExpectations
M Source/WebCore/style/values/images/StyleGradient.cpp
Log Message:
-----------
Linear gradients: clamp stops at same position instead of replacing them
https://bugs.webkit.org/show_bug.cgi?id=306400
rdar://169063497
Reviewed by Simon Fraser.
When all color stops in a linear gradient are at the same position,
they should create a hard color transition at that clamped position,
preserving all stop colors to maintain proper color interpolation.
Previously, LinearGradientAdapter::normalizeStopsAndEndpointsOutsideRange
would clamp all stops to offset 1, but this didn't properly handle cases
where stops were at positions outside the [0, 1] range.
The fix clamps the offset to the [0, 1] range while preserving all color
stops at that position, allowing the gradient renderer to correctly handle
the hard transition with proper color interpolation when needed.
NOTE - the test name includes `radial` but in actual, it is for
`linear-gradient`.
* Source/WebCore/style/values/images/StyleGradient.cpp:
(WebCore::Style::LinearGradientAdapter::normalizeStopsAndEndpointsOutsideRange):
* LayoutTests/TestExpectations: Progressions
Canonical link: https://commits.webkit.org/306823@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications