mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-28 02:27:19 +02:00
LibWeb: Skip shorthand serialization for var() longhands
When CSSRule.cssText is accessed, shorthands are recomposed from individual longhand declarations. For coordinating-list shorthands, the `serialize()` function always assumed that each sub-property was a value list. This caused a crash for longhands containing `var()`. We now fall back to serializing properties individually if any sub property contains `var()`. This matches the behavior of other engines.
This commit is contained in:
committed by
Jelle Raaijmakers
parent
710c44a021
commit
30d528d3c0
Notes:
github-actions[bot]
2026-03-06 12:44:41 +00:00
Author: https://github.com/tcl3 Commit: https://github.com/LadybirdBrowser/ladybird/commit/30d528d3c06 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/8250 Reviewed-by: https://github.com/gmta ✅
@@ -0,0 +1,16 @@
|
||||
<!DOCTYPE html>
|
||||
<style>
|
||||
.a {
|
||||
transition-property: var(--a);
|
||||
transition-duration: var(--b);
|
||||
transition-timing-function: var(--c);
|
||||
transition-delay: var(--d);
|
||||
transition-behavior: var(--e);
|
||||
}
|
||||
</style>
|
||||
<script src="../include.js"></script>
|
||||
<script>
|
||||
test(() => {
|
||||
println(document.styleSheets[0].cssRules[0].cssText);
|
||||
});
|
||||
</script>
|
||||
Reference in New Issue
Block a user