Automatic update from web-platform-tests Support complex CSS pow() parameters Parameters may not be possible to simplify at parse time. Support representing pow() parameters as complex expression to be evaluated as computed value time. Bug: 404174133 Change-Id: I8e974882fb08cfd25a3f2ab0bb9c92582d948a42 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6368381 Reviewed-by: Daniil Sakhapov <sakhapov@chromium.org> Commit-Queue: Rune Lillesveen <futhark@chromium.org> Cr-Commit-Position: refs/heads/main@{#1434770} -- wpt-commits: 8ba10db942eeafa368b94e4a25312172abc6b80e wpt-pr: 51449
27 lines
1.2 KiB
HTML
27 lines
1.2 KiB
HTML
<!DOCTYPE html>
|
|
<title>CSS Values and Units Test: Serialization of non-simplified calc() expressions</title>
|
|
<link rel="help" href="https://drafts.csswg.org/css-values-4/#calc-simplification">
|
|
<script src="/resources/testharness.js"></script>
|
|
<script src="/resources/testharnessreport.js"></script>
|
|
<script src="../support/serialize-testcommon.js"></script>
|
|
<style>
|
|
#target { font-size: 20px; }
|
|
</style>
|
|
<div>
|
|
<div id="target"></div>
|
|
</div>
|
|
<script>
|
|
function test_serialization(value, specified, computed) {
|
|
test_specified_serialization("orphans", value, specified);
|
|
test_computed_serialization("orphans", value, computed);
|
|
}
|
|
|
|
test_serialization("calc(pow(2, sign(1em - 18px)))", "calc(pow(2, sign(1em - 18px)))", "2");
|
|
test_serialization("calc(pow(sign(1em - 18px), 2))", "calc(pow(sign(1em - 18px), 2))", "1");
|
|
test_serialization("calc(pow(sign(1em - 18px), sign(1em - 18px)))", "calc(pow(sign(1em - 18px), sign(1em - 18px)))", "1");
|
|
|
|
test_serialization("calc(pow(2, sibling-index())", "calc(pow(2, sibling-index()))", "2");
|
|
test_serialization("calc(pow(sibling-index(), 2)", "calc(pow(sibling-index(), 2))", "1");
|
|
test_serialization("calc(pow(sibling-index(), sibling-index())", "calc(pow(sibling-index(), sibling-index()))", "1");
|
|
</script>
|