From c8c154a7e5f1591ebea7b08b583277a1aa5bca01 Mon Sep 17 00:00:00 2001 From: Daniil Sakhapov Date: Thu, 14 Dec 2023 17:32:30 +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 --- .../tests/css/css-values/progress-computed.tentative.html | 1 + 1 file changed, 1 insertion(+) 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 2f564fa14e9e1..2ef09996d55a7 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 @@ -34,4 +34,5 @@ test_math_used('calc(progress(sign(1001em - 10lh * progress(100px from 2rex to 10ex)) * 20em from 2rem to 12em) * 30)', '60', {prop:'flex-grow', type:'number'}); test_math_used('calc(progress(sign(1001em - 10lh * progress(100px from 2rex to 10ex)) * 20em from 2rem to 12em) / 4)', '0.5', {prop:'flex-grow', type:'number'}); test_math_used('calc(progress(sign(1001em - 10lh * progress(100px from 2rex to 10ex)) * 20em from 2rem to 12em) * 4)', '8', {prop:'column-count', type:'number'}); +test_math_used('calc(progress(sign(1001em - 10lh * progress(100px from 2rex to 10ex)) * 20em from 2rem to 12em) * 2)', '4', {prop:'scale'});