mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-27 10:07:15 +02:00
LibWeb: Don't serialize longhands if we directly serialized shorthand
The spec assumes that we only store values against expanded longhands, there are however limited circumstances where we store against shorthands directly in addition to the expanded longhands. For example if the value of the shorthand is unresolved we store an UnresolvedStyleValue against the shorthand directly and a PendingSubstitutionStyleValue against each of the longhands. This commit updates the logic so that in the case we serialize a shorthand directly we should also mark it's longhands as serialized to avoid serializing them separately. This also avoids the scenario where we tried to create and serialize a ShorthandStyleValue with PendingSubstitutionStyleValue longhands, so we can remove the check and related FIXME for that.
This commit is contained in:
Notes:
github-actions[bot]
2025-06-16 11:38:57 +00:00
Author: https://github.com/Calme1709 Commit: https://github.com/LadybirdBrowser/ladybird/commit/62da6509928 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5066 Reviewed-by: https://github.com/AtkinsSJ ✅
@@ -2,9 +2,8 @@ Harness status: OK
|
||||
|
||||
Found 4 tests
|
||||
|
||||
2 Pass
|
||||
2 Fail
|
||||
4 Pass
|
||||
Pass Longhand with variable preserves original serialization: with whitespace
|
||||
Fail Shorthand with variable preserves original serialization: with whitespace
|
||||
Pass Shorthand with variable preserves original serialization: with whitespace
|
||||
Pass Longhand with variable preserves original serialization but trims whitespace: without whitespace
|
||||
Fail Shorthand with variable preserves original serialization but trims whitespace: without whitespace
|
||||
Pass Shorthand with variable preserves original serialization but trims whitespace: without whitespace
|
||||
Reference in New Issue
Block a user