Skip to content

Commit

Permalink
Bug 1869602 [wpt PR 43631] - Support number producing css math functi…
Browse files Browse the repository at this point in the history
…ons 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 <sakhapovchromium.org>
Reviewed-by: Anders Hartvoll Ruud <andruudchromium.org>
Cr-Commit-Position: refs/heads/main{#1237458}

--

wpt-commits: 26441c2d67e8807e676ed55270e1e9ec4002e306
wpt-pr: 43631

UltraBlame original commit: 821aae74b76d0fa50ac6163ff62f1084a4257658
  • Loading branch information
marco-c committed Dec 16, 2023
1 parent 4af2f15 commit 31a38c6
Showing 1 changed file with 45 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 31a38c6

Please sign in to comment.