Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 9b15b6d2ae8ff74a27eab213292e77653955ca90
https://github.com/WebKit/WebKit/commit/9b15b6d2ae8ff74a27eab213292e77653955ca90
Author: Tim Nguyen <[email protected]>
Date: 2026-06-27 (Sat, 27 Jun 2026)
Changed paths:
M
LayoutTests/imported/w3c/web-platform-tests/css/css-values/progress-computed-expected.txt
M
LayoutTests/imported/w3c/web-platform-tests/css/css-values/progress-serialize-expected.txt
M Source/WebCore/css/CSSValueKeywords.in
M Source/WebCore/css/calc/CSSCalcExecutor.h
M Source/WebCore/css/calc/CSSCalcOperator.cpp
M Source/WebCore/css/calc/CSSCalcOperator.h
M Source/WebCore/css/calc/CSSCalcTree+Mappings.h
M Source/WebCore/css/calc/CSSCalcTree+Parser.cpp
M Source/WebCore/css/calc/CSSCalcTree+Serialization.cpp
M Source/WebCore/css/calc/CSSCalcTree+Simplification.cpp
M Source/WebCore/css/calc/CSSCalcTree+Simplification.h
M Source/WebCore/css/calc/CSSCalcTree.cpp
M Source/WebCore/css/calc/CSSCalcTree.h
M Source/WebCore/style/calc/StyleCalculationTree.cpp
M Source/WebCore/style/calc/StyleCalculationTree.h
Log Message:
-----------
[css-values] Add `no-clamp` option to `progress()` function
https://bugs.webkit.org/show_bug.cgi?id=317720
rdar://180473472
Reviewed by Sam Weinig.
The no-clamp keyword allows progress() to return values outside [0, 1].
When from == to and no-clamp is specified, the result is -∞, 0, or +∞
depending on whether the progress value is less than, equal to, or greater
than the shared value. This commit also fixes the existing clamped
from == to behavior, which was previously producing incorrect results
(NaN or 1 instead of 0).
The no-clamp variant is represented as a separate ProgressNoClamp struct
rather than a bool flag on Progress, following the same pattern used by
RoundNearest/RoundUp/RoundDown/RoundToZero. This means copy, conversion,
evaluation, and simplification all work correctly through the existing
generic template machinery without any special-case overloads.
Spec change:
https://github.com/w3c/csswg-drafts/commit/a44eb8c76fe066d115b019895ee1c4fb90389384
*
LayoutTests/imported/w3c/web-platform-tests/css/css-values/progress-computed-expected.txt:
*
LayoutTests/imported/w3c/web-platform-tests/css/css-values/progress-serialize-expected.txt:
* Source/WebCore/css/CSSValueKeywords.in:
* Source/WebCore/css/calc/CSSCalcExecutor.h:
(WebCore::CSSCalc::OperatorExecutor<Operator::Progress>::operator()):
(WebCore::CSSCalc::OperatorExecutor<Operator::ProgressNoClamp>::operator()):
* Source/WebCore/css/calc/CSSCalcOperator.cpp:
(WebCore::CSSCalc::operator<<):
* Source/WebCore/css/calc/CSSCalcOperator.h:
* Source/WebCore/css/calc/CSSCalcTree+Mappings.h:
* Source/WebCore/css/calc/CSSCalcTree+Parser.cpp:
(WebCore::CSSCalc::consumeProgressImpl):
(WebCore::CSSCalc::consumeProgress):
* Source/WebCore/css/calc/CSSCalcTree+Serialization.cpp:
(WebCore::CSSCalc::serializeMathFunctionPrefix):
* Source/WebCore/css/calc/CSSCalcTree+Simplification.cpp:
(WebCore::CSSCalc::simplify):
* Source/WebCore/css/calc/CSSCalcTree+Simplification.h:
* Source/WebCore/css/calc/CSSCalcTree.cpp:
(WebCore::CSSCalc::toType):
* Source/WebCore/css/calc/CSSCalcTree.h:
(WebCore::CSSCalc::get):
* Source/WebCore/style/calc/StyleCalculationTree.cpp:
* Source/WebCore/style/calc/StyleCalculationTree.h:
(WebCore::Style::Calculation::get):
Canonical link: https://commits.webkit.org/315977@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications