LibWeb: Support @-webkit-keyframes as an alias for @keyframes

This is listed as mandatory in the compat spec.
This commit is contained in:
Tim Ledbetter
2026-01-25 04:49:04 +00:00
committed by Andreas Kling
parent 757795ada4
commit 191e0e8c18
Notes: github-actions[bot] 2026-02-06 11:08:06 +00:00
4 changed files with 29 additions and 4 deletions

View File

@@ -0,0 +1,19 @@
<!DOCTYPE html>
<style id="test-style">
@-webkit-keyframes test-animation {
0% { opacity: 0; }
100% { opacity: 1; }
}
</style>
<script src="../include.js"></script>
<script>
test(() => {
const sheet = document.getElementById("test-style").sheet;
const rule = sheet.cssRules[0];
println(`Rule type: ${rule.type}`);
println(`Rule is CSSKeyframesRule: ${rule instanceof CSSKeyframesRule}`);
println(`Animation name: ${rule.name}`);
println(`Number of keyframes: ${rule.cssRules.length}`);
});
</script>