Bug 1583987 [wpt PR 19309] - Do not simplify calculation across math functions, a=testonly

Automatic update from web-platform-tests
Do not simplify calculation across math functions

The existing code is too aggressive in simplifying calc() expressions
that, math functions (min/max etc) can be simplified away when they
can be directly resolved. This doesn't match the spec (*), and is fixed
in this patch.

(*) https://drafts.csswg.org/css-values-4/#math-function-simplify-a-calculation

Bug: 825895
Change-Id: Id5796299da50e40b09bc38bf0271c8f5cd7897de
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1825325
Reviewed-by: Emil A Eklund <eae@chromium.org>
Reviewed-by: Rune Lillesveen <futhark@chromium.org>
Commit-Queue: Xiaocheng Hu <xiaochengh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#700132}

--

wpt-commits: 66689b5c50fa635f64ef48cff2498b7d17937dae
wpt-pr: 19309
This commit is contained in:
Xiaocheng Hu 2019-09-27 16:51:09 +00:00 committed by moz-wptsync-bot
parent ce65ff8d29
commit 1977238793

View File

@ -20,6 +20,9 @@ test_valid_angle('max(1rad)', 'max(1rad)');
test_valid_angle('max(1turn)', 'max(1turn)');
test_valid_angle('max(1grad)', 'max(1grad)');
test_valid_angle('calc(min(1deg) + min(2deg))', 'calc(min(1deg) + min(2deg))');
test_valid_angle('calc(max(1deg) + max(2deg))', 'calc(max(1deg) + max(2deg))');
// TODO(crbug.com/978682): Complete this test suite
</script>