Files
sousa-gecko/testing/web-platform/tests/css/css-will-change/parsing/will-change-valid.html
T
Ian Kilpatrick 19f4f4a283 Bug 2023072 [wpt PR 58458] - [style] Fix parsing of CSS will-change., a=testonly
Automatic update from web-platform-tests
[style] Fix parsing of CSS will-change.

For forwards-compatibility CSS will-change accepts a list of
<custom-ident> as valid values. We did this previously however within
computed style we dropped any unknown values which we couldn't resolve
to a CSS property.

This was incorrect.

This patch instead stores a Vector<AtomicString> of values in
StyleWillChangeData. This allows us to preserve the values for
getComputedStyle().

We can do this now we have a CSSBitset for querying if a particular
longhand is present.

Change-Id: I76ce32fcab04e8352d370ab0380627513109de5f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7658908
Reviewed-by: Anders Hartvoll Ruud <andruud@chromium.org>
Commit-Queue: Ian Kilpatrick <ikilpatrick@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1598553}

--

wpt-commits: 8df867df74c1ee181f682ff9dff53a0162258499
wpt-pr: 58458
2026-03-16 10:13:23 +00:00

42 lines
1.8 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Will Change Test: parsing will-change with valid values</title>
<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
<link rel="help" href="https://drafts.csswg.org/css-will-change/#propdef-will-change">
<meta name="assert" content="will-change supports the full grammar 'auto | <animateable-feature>#'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
test_valid_value("will-change", "auto");
// <animateable-feature> = scroll-position | contents | <custom-ident>
test_valid_value("will-change", "scroll-position");
test_valid_value("will-change", "contents");
test_valid_value("will-change", "transform");
test_valid_value("will-change", "background-color");
test_valid_value("will-change", "TRANSFORM");
test_valid_value("will-change", "Not-A-Property");
test_valid_value("will-change", "scroll-position, contents");
test_valid_value("will-change", "scroll-position, transform");
test_valid_value("will-change", "contents, transform");
test_valid_value("will-change", "transform, background-color");
test_valid_value("will-change", "transform, transform");
test_valid_value("will-change", "TRANSFORM, transform");
test_valid_value("will-change", "transform, TRANSFORM");
test_valid_value("will-change", "TRANSFORM, TRANSFORM");
test_valid_value("will-change", "Not-A-Property, transform");
test_valid_value("will-change", "transform, Not-A-Property");
test_valid_value("will-change", "Not-A-Property, Not-A-Property");
test_valid_value("will-change", "transform, --var");
test_valid_value("will-change", "--var, transform");
</script>
</body>
</html>