LibWeb/CSS: Implement legacy name aliases for properties

When a property is a "legacy name alias", any time it is used in CSS or
via the CSSOM its aliased name is used instead.
(See https://drafts.csswg.org/css-cascade-5/#legacy-name-alias)

This means we only care about the alias when parsing a string as a
PropertyID - and we can just return the PropertyID it is an alias for.
No need for a distinct PropertyID for it, and no need for LibWeb to
care about it at all.

Previously, we had a bunch of these properties, which misused our code
for "logical aliases", some of which I've discovered were not even
fully implemented. But with this change, all that code can go away, and
making a legacy alias is just a case of putting it in the JSON. This
also shrinks `StyleProperties` as it doesn't need to contain data for
these aliases, and removes a whole load of `-webkit-*` spam from the
style inspector.
This commit is contained in:
Sam Atkins
2024-09-27 12:54:08 +01:00
committed by Sam Atkins
parent 2b13079b35
commit fdcece2e88
6 changed files with 113 additions and 243 deletions

View File

@@ -41,40 +41,6 @@ visibility: visible
white-space: normal
word-spacing: normal
word-wrap: normal
-webkit-align-content: normal
-webkit-align-items: normal
-webkit-align-self: auto
-webkit-animation-delay: 0s
-webkit-animation-direction: normal
-webkit-animation-duration: auto
-webkit-animation-fill-mode: none
-webkit-animation-iteration-count: 1
-webkit-animation-name: none
-webkit-animation-play-state: running
-webkit-animation-timing-function: ease
-webkit-appearance: auto
-webkit-background-clip: border-box
-webkit-background-origin: padding-box
-webkit-border-bottom-left-radius: 0px
-webkit-border-bottom-right-radius: 0px
-webkit-border-top-left-radius: 0px
-webkit-border-top-right-radius: 0px
-webkit-box-shadow: none
-webkit-box-sizing: content-box
-webkit-flex-basis: auto
-webkit-flex-direction: row
-webkit-flex-grow: 0
-webkit-flex-shrink: 1
-webkit-flex-wrap: nowrap
-webkit-justify-content: normal
-webkit-mask: none
-webkit-order: 0
-webkit-transform: none
-webkit-transform-origin: 50% 50%
-webkit-transition-delay: 0s
-webkit-transition-duration: 0s
-webkit-transition-property: all
-webkit-transition-timing-function: ease
align-content: normal
align-items: normal
align-self: auto
@@ -150,7 +116,7 @@ grid-row-start: auto
grid-template-areas:
grid-template-columns:
grid-template-rows:
height: 2584px
height: 2006px
inline-size: auto
inset-block-end: auto
inset-block-start: auto