Skip to content

Commit 9b22a81

Browse files
Fix progress() internal type
progress() always return number, but while creating CalculationExpressionNode the result was saved as pixels and percents, which later confused our type system. Fixed: 504004119 Change-Id: I50e7090f63a678e147d99fad8e089aad4b6425fa Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7789613 Commit-Queue: Daniil Sakhapov <sakhapov@chromium.org> Reviewed-by: Anders Hartvoll Ruud <andruud@chromium.org> Cr-Commit-Position: refs/heads/main@{#1619414}
1 parent 5bc4843 commit 9b22a81

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

css/css-values/progress-computed.html

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,16 @@
88
:root {
99
font-size: 10px;
1010
}
11+
#wrapper {
12+
width: 100px;
13+
}
1114
#target {
1215
font-size: 10px;
1316
}
1417
</style>
15-
<div id="target"></div>
18+
<div id="wrapper">
19+
<div id="target"></div>
20+
</div>
1621
<script>
1722

1823
// Identity tests
@@ -46,4 +51,6 @@
4651
test_math_used('calc(progress(sign(1001em - 10lh * progress(100px, 2rex, 10ex)) * 20em, 2rem, 12em) * 4)', '4', {prop:'column-count', type:'number'});
4752
test_math_used('calc(progress(sign(1001em - 10lh * progress(100px, 2rex, 10ex)) * 20em, 2rem, 12em) * 2)', '2', {prop:'scale'});
4853
test_math_used('rotate3d(progress(21em, 1rem, 11em), progress(21em, 1rem, 11em), progress(21em, 1rem, 11em), calc(progress(11em, 1rem, 11em) * 2deg))', 'rotate3d(2, 2, 2, 2deg)', {prop:'transform'});
54+
55+
test_math_used('calc(50% - 0px * clamp(0, progress(0cqw, 0px, 0px), 1))', '50px', {type:'length', prop:'width'});
4956
</script>

0 commit comments

Comments
 (0)