forked from mirrors/gecko-dev
Automatic update from web-platform-tests Make custom properties that are IACVT guaranteed-invalid (II) Per recent spec change [1], custom properties that are invalid at computed-value time (IACVT) shall become guaranteed-invalid [2] if the custom property supports guaranteed-invalid values. In order to maintain our current animations behavior related to cycles (see CSSVarCycleInterpolationType), we still need to be able to distinguish between "cyclic" and "invalid for other reasons" from the outside. These two situations are now represented by CSSCyclicVariableValue and CSSInvalidVariableValue, respectively. [1] https://github.com/w3c/csswg-drafts/pull/6006 [2] https://drafts.csswg.org/css-variables/#guaranteed-invalid-value Fixed: 1110188 I2S: https://groups.google.com/a/chromium.org/g/blink-dev/c/0xrbzYe_vxU/m/7bsL76n9CgAJ Change-Id: I0e7b529e4ae595c6c327c45b4da1a43be64c1c88 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2762156 Reviewed-by: Xiaocheng Hu <xiaochengh@chromium.org> Commit-Queue: Anders Hartvoll Ruud <andruud@chromium.org> Cr-Commit-Position: refs/heads/master@{#863497} -- wpt-commits: 423f1072b46b978c1e280452e647394475542fa3 wpt-pr: 28100
20 lines
776 B
HTML
20 lines
776 B
HTML
<!DOCTYPE html>
|
|
<title>Do not crash when animating to unresolved var()</title>
|
|
<link rel="help" href="https://drafts.css-houdini.org/css-properties-values-api/#dom-css-registerproperty">
|
|
<link rel="help" href="https://crbug.com/1185524">
|
|
<script src="/resources/testharness.js"></script>
|
|
<script src="/resources/testharnessreport.js"></script>
|
|
<div id="target"></div>
|
|
<script>
|
|
promise_test(async function(){
|
|
CSS.registerProperty({
|
|
name: '--x',
|
|
syntax: '<number>',
|
|
initialValue: '1',
|
|
inherits: false
|
|
});
|
|
let animation = target.animate({'--x': [ 'var(--unknown)']}, 100);
|
|
await animation.ready;
|
|
assert_equals(getComputedStyle(target).getPropertyValue('--x'), '1');
|
|
}, 'Do not crash when animating to unresolved var()');
|
|
</script>
|