From 31a38c690101ba5eae6ad1f3059e3e93ea6ff1b3 Mon Sep 17 00:00:00 2001 From: Marco Castelluccio Date: Sat, 16 Dec 2023 01:01:20 +0000 Subject: [PATCH] Bug 1869602 [wpt PR 43631] - Support number producing css math functions in ConvertScale, a=testonly Automatic update from web-platform-tests Support number producing css math functions in ConvertScale Currently, StyleBuilderConverter::ConvertScale directly calls GetDoubleValue() which is incorrect for math functions, rewrite it to use ComputeNumber with CssToLengthConversionData instead. Note: the crash is due to the parse time percent resolution in ConsumeNumberOrPercent, which doesn't work with math functions yet. It will be fixed in the following CL, meanwhile the added test case covers the changed functionality. Bug: 1505817 Change-Id: Icf553423d09b9ff71ebc3b625c06e10fec637352 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5116383 Commit-Queue: Daniil Sakhapov Reviewed-by: Anders Hartvoll Ruud Cr-Commit-Position: refs/heads/main{#1237458} -- wpt-commits: 26441c2d67e8807e676ed55270e1e9ec4002e306 wpt-pr: 43631 UltraBlame original commit: 821aae74b76d0fa50ac6163ff62f1084a4257658 --- .../progress-computed.tentative.html | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/testing/web-platform/tests/css/css-values/progress-computed.tentative.html b/testing/web-platform/tests/css/css-values/progress-computed.tentative.html index d14c5619fc72..1f8c273364e0 100644 --- a/testing/web-platform/tests/css/css-values/progress-computed.tentative.html +++ b/testing/web-platform/tests/css/css-values/progress-computed.tentative.html @@ -832,6 +832,51 @@ } ) ; +test_math_used +( +' +calc +( +progress +( +sign +( +1001em +- +10lh +* +progress +( +100px +from +2rex +to +10ex +) +) +* +20em +from +2rem +to +12em +) +* +2 +) +' +' +4 +' +{ +prop +: +' +scale +' +} +) +; < / script