mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-21 23:20:20 +00:00
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:
parent
2b13079b35
commit
fdcece2e88
Notes:
github-actions[bot]
2024-09-27 18:26:40 +00:00
Author: https://github.com/AtkinsSJ Commit: https://github.com/LadybirdBrowser/ladybird/commit/fdcece2e88b Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1550
6 changed files with 113 additions and 243 deletions
|
@ -17,6 +17,8 @@ Most of this data is found in the information box for that property in the relev
|
|||
The file is organized as a single JSON object, with keys being property names, and the values being the data for that property.
|
||||
Each property will have some set of these fields on it:
|
||||
|
||||
(Note that required fields are not required on properties with `legacy-alias-for` or `logical-alias-for` set.)
|
||||
|
||||
| Field | Required | Default | Description | Generated functions |
|
||||
|----------------------------|----------|---------|-------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------|
|
||||
| `affects-layout` | No | `true` | Boolean. Whether changing this property will invalidate the element's layout. | `bool property_affects_layout(PropertyID)` |
|
||||
|
@ -24,7 +26,8 @@ Each property will have some set of these fields on it:
|
|||
| `animation-type` | Yes | | String. How the property should be animated. Defined by the spec. See below. | `AnimationType animation_type_from_longhand_property(PropertyID)` |
|
||||
| `inherited` | Yes | | Boolean. Whether the property is inherited by its child elements. | `bool is_inherited_property(PropertyID)` |
|
||||
| `initial` | Yes | | String. The property's initial value if it is not specified. | `NonnullRefPtr<CSSStyleValue> property_initial_value(JS::Realm&, PropertyID)` |
|
||||
| `logical-alias-for` | No | Nothing | String. The name of a property this is an alias for. | |
|
||||
| `legacy-alias-for` | No | Nothing | String. The name of a property this is an alias for. See below. | |
|
||||
| `logical-alias-for` | No | Nothing | Array of strings. The name of a property this is an alias for. See below. | |
|
||||
| `longhands` | No | `[]` | Array of strings. If this is a shorthand, these are the property names that it expands out into. | `Vector<PropertyID> longhands_for_shorthand(PropertyID)` |
|
||||
| `max-values` | No | `1` | Integer. How many values can be parsed for this property. eg, `margin` can have up to 4 values. | `size_t property_maximum_value_count(PropertyID)` |
|
||||
| `percentages-resolve-to` | No | Nothing | String. What type percentages get resolved to. eg, for `width` percentages are resolved to `length` values. | `Optional<ValueType> property_resolves_percentages_relative_to(PropertyID)` |
|
||||
|
@ -44,6 +47,16 @@ The [Web Animations spec](https://www.w3.org/TR/web-animations/#animation-type)
|
|||
| repeatable list | `repeatable-list` |
|
||||
| (See prose) | `custom` |
|
||||
|
||||
### `legacy-alias-for` and `logical-alias-for`
|
||||
|
||||
These are two separate concepts, with unfortunately similar names:
|
||||
- [Legacy name aliases](https://drafts.csswg.org/css-cascade-5/#legacy-name-alias) are properties whose spec names have changed,
|
||||
but the syntax has not, so setting the old one is defined as setting the new one directly.
|
||||
For example, `font-stretch` was renamed to `font-width`, so `font-stretch` is now a legacy name alias for `font-width`.
|
||||
- Logical aliases are properties like `margin-block-start`, which may assign a value to one of several other properties
|
||||
(`margin-top`, `margin-bottom`, `margin-left`, or `margin-right`) depending on the element they are applied to.
|
||||
List all the properties that they can alias.
|
||||
|
||||
### `quirks`
|
||||
|
||||
The [Quirks spec](https://quirks.spec.whatwg.org/#css) defines these.
|
||||
|
|
|
@ -46,6 +46,11 @@ static bool type_name_is_enum(StringView type_name)
|
|||
"url"sv);
|
||||
}
|
||||
|
||||
static bool is_legacy_alias(JsonObject const& property)
|
||||
{
|
||||
return property.has_string("legacy-alias-for"sv);
|
||||
}
|
||||
|
||||
ErrorOr<int> serenity_main(Main::Arguments arguments)
|
||||
{
|
||||
StringView generated_header_path;
|
||||
|
@ -143,6 +148,9 @@ enum class PropertyID {
|
|||
|
||||
properties.for_each_member([&](auto& name, auto& value) {
|
||||
VERIFY(value.is_object());
|
||||
// Legacy aliases don't get a PropertyID
|
||||
if (is_legacy_alias(value.as_object()))
|
||||
return;
|
||||
bool inherited = value.as_object().get_bool("inherited"sv).value_or(false);
|
||||
if (value.as_object().has("longhands"sv)) {
|
||||
if (inherited)
|
||||
|
@ -305,6 +313,8 @@ bool property_accepts_@css_type_name@(PropertyID property_id, [[maybe_unused]] @
|
|||
|
||||
properties.for_each_member([&](auto& name, JsonValue const& value) -> void {
|
||||
VERIFY(value.is_object());
|
||||
if (is_legacy_alias(value.as_object()))
|
||||
return;
|
||||
if (auto maybe_valid_types = value.as_object().get_array("valid-types"sv); maybe_valid_types.has_value() && !maybe_valid_types->is_empty()) {
|
||||
for (auto valid_type : maybe_valid_types->values()) {
|
||||
auto type_and_range = valid_type.as_string().split_view(' ');
|
||||
|
@ -406,8 +416,12 @@ Optional<PropertyID> property_id_from_camel_case_string(StringView string)
|
|||
|
||||
auto member_generator = generator.fork();
|
||||
member_generator.set("name", name);
|
||||
member_generator.set("name:titlecase", title_casify(name));
|
||||
member_generator.set("name:camelcase", camel_casify(name));
|
||||
if (auto legacy_alias_for = value.as_object().get_byte_string("legacy-alias-for"sv); legacy_alias_for.has_value()) {
|
||||
member_generator.set("name:titlecase", title_casify(legacy_alias_for.value()));
|
||||
} else {
|
||||
member_generator.set("name:titlecase", title_casify(name));
|
||||
}
|
||||
member_generator.append(R"~~~(
|
||||
if (string.equals_ignoring_ascii_case("@name:camelcase@"sv))
|
||||
return PropertyID::@name:titlecase@;
|
||||
|
@ -429,7 +443,11 @@ Optional<PropertyID> property_id_from_string(StringView string)
|
|||
|
||||
auto member_generator = generator.fork();
|
||||
member_generator.set("name", name);
|
||||
member_generator.set("name:titlecase", title_casify(name));
|
||||
if (auto legacy_alias_for = value.as_object().get_byte_string("legacy-alias-for"sv); legacy_alias_for.has_value()) {
|
||||
member_generator.set("name:titlecase", title_casify(legacy_alias_for.value()));
|
||||
} else {
|
||||
member_generator.set("name:titlecase", title_casify(name));
|
||||
}
|
||||
member_generator.append(R"~~~(
|
||||
if (Infra::is_ascii_case_insensitive_match(string, "@name@"sv))
|
||||
return PropertyID::@name:titlecase@;
|
||||
|
@ -446,6 +464,8 @@ FlyString const& string_from_property_id(PropertyID property_id) {
|
|||
|
||||
properties.for_each_member([&](auto& name, auto& value) {
|
||||
VERIFY(value.is_object());
|
||||
if (is_legacy_alias(value.as_object()))
|
||||
return;
|
||||
|
||||
auto member_generator = generator.fork();
|
||||
member_generator.set("name", name);
|
||||
|
@ -472,6 +492,8 @@ FlyString const& camel_case_string_from_property_id(PropertyID property_id) {
|
|||
|
||||
properties.for_each_member([&](auto& name, auto& value) {
|
||||
VERIFY(value.is_object());
|
||||
if (is_legacy_alias(value.as_object()))
|
||||
return;
|
||||
|
||||
auto member_generator = generator.fork();
|
||||
member_generator.set("name", name);
|
||||
|
@ -500,6 +522,9 @@ AnimationType animation_type_from_longhand_property(PropertyID property_id)
|
|||
|
||||
properties.for_each_member([&](auto& name, auto& value) {
|
||||
VERIFY(value.is_object());
|
||||
if (is_legacy_alias(value.as_object()))
|
||||
return;
|
||||
|
||||
auto member_generator = generator.fork();
|
||||
member_generator.set("name:titlecase", title_casify(name));
|
||||
|
||||
|
@ -542,6 +567,9 @@ bool is_animatable_property(PropertyID property_id)
|
|||
|
||||
properties.for_each_member([&](auto& name, auto& value) {
|
||||
VERIFY(value.is_object());
|
||||
if (is_legacy_alias(value.as_object()))
|
||||
return;
|
||||
|
||||
if (is_animatable_property(properties, name)) {
|
||||
auto member_generator = generator.fork();
|
||||
member_generator.set("name:titlecase", title_casify(name));
|
||||
|
@ -574,6 +602,8 @@ bool property_affects_layout(PropertyID property_id)
|
|||
|
||||
properties.for_each_member([&](auto& name, auto& value) {
|
||||
VERIFY(value.is_object());
|
||||
if (is_legacy_alias(value.as_object()))
|
||||
return;
|
||||
|
||||
bool affects_layout = true;
|
||||
if (value.as_object().has("affects-layout"sv))
|
||||
|
@ -602,6 +632,8 @@ bool property_affects_stacking_context(PropertyID property_id)
|
|||
|
||||
properties.for_each_member([&](auto& name, auto& value) {
|
||||
VERIFY(value.is_object());
|
||||
if (is_legacy_alias(value.as_object()))
|
||||
return;
|
||||
|
||||
bool affects_stacking_context = false;
|
||||
if (value.as_object().has("affects-stacking-context"sv))
|
||||
|
@ -663,6 +695,8 @@ NonnullRefPtr<CSSStyleValue> property_initial_value(JS::Realm& context_realm, Pr
|
|||
|
||||
properties.for_each_member([&](auto& name, auto& value) {
|
||||
VERIFY(value.is_object());
|
||||
if (is_legacy_alias(value.as_object()))
|
||||
return;
|
||||
output_initial_value_code(name, value.as_object());
|
||||
});
|
||||
|
||||
|
@ -679,6 +713,9 @@ bool property_has_quirk(PropertyID property_id, Quirk quirk)
|
|||
|
||||
properties.for_each_member([&](auto& name, auto& value) {
|
||||
VERIFY(value.is_object());
|
||||
if (is_legacy_alias(value.as_object()))
|
||||
return;
|
||||
|
||||
if (value.as_object().has("quirks"sv)) {
|
||||
auto quirks_value = value.as_object().get_array("quirks"sv);
|
||||
VERIFY(quirks_value.has_value());
|
||||
|
@ -723,6 +760,9 @@ bool property_accepts_type(PropertyID property_id, ValueType value_type)
|
|||
properties.for_each_member([&](auto& name, auto& value) {
|
||||
VERIFY(value.is_object());
|
||||
auto& object = value.as_object();
|
||||
if (is_legacy_alias(object))
|
||||
return;
|
||||
|
||||
if (auto maybe_valid_types = object.get_array("valid-types"sv); maybe_valid_types.has_value() && !maybe_valid_types->is_empty()) {
|
||||
auto& valid_types = maybe_valid_types.value();
|
||||
auto property_generator = generator.fork();
|
||||
|
@ -813,6 +853,8 @@ bool property_accepts_keyword(PropertyID property_id, Keyword keyword)
|
|||
properties.for_each_member([&](auto& name, auto& value) {
|
||||
VERIFY(value.is_object());
|
||||
auto& object = value.as_object();
|
||||
if (is_legacy_alias(object))
|
||||
return;
|
||||
|
||||
auto property_generator = generator.fork();
|
||||
property_generator.set("name:titlecase", title_casify(name));
|
||||
|
@ -867,6 +909,9 @@ Optional<ValueType> property_resolves_percentages_relative_to(PropertyID propert
|
|||
|
||||
properties.for_each_member([&](auto& name, auto& value) {
|
||||
VERIFY(value.is_object());
|
||||
if (is_legacy_alias(value.as_object()))
|
||||
return;
|
||||
|
||||
if (auto resolved_type = value.as_object().get_byte_string("percentages-resolve-to"sv); resolved_type.has_value()) {
|
||||
auto property_generator = generator.fork();
|
||||
property_generator.set("name:titlecase", title_casify(name));
|
||||
|
@ -891,6 +936,9 @@ size_t property_maximum_value_count(PropertyID property_id)
|
|||
|
||||
properties.for_each_member([&](auto& name, auto& value) {
|
||||
VERIFY(value.is_object());
|
||||
if (is_legacy_alias(value.as_object()))
|
||||
return;
|
||||
|
||||
if (value.as_object().has("max-values"sv)) {
|
||||
JsonValue max_values = value.as_object().get("max-values"sv).release_value();
|
||||
VERIFY(max_values.is_integer<size_t>());
|
||||
|
@ -926,6 +974,9 @@ bool property_is_shorthand(PropertyID property_id)
|
|||
switch (property_id) {
|
||||
)~~~");
|
||||
properties.for_each_member([&](auto& name, auto& value) {
|
||||
if (is_legacy_alias(value.as_object()))
|
||||
return;
|
||||
|
||||
if (value.as_object().has("longhands"sv)) {
|
||||
auto property_generator = generator.fork();
|
||||
property_generator.set("name:titlecase", title_casify(name));
|
||||
|
@ -949,6 +1000,9 @@ Vector<PropertyID> longhands_for_shorthand(PropertyID property_id)
|
|||
switch (property_id) {
|
||||
)~~~");
|
||||
properties.for_each_member([&](auto& name, auto& value) {
|
||||
if (is_legacy_alias(value.as_object()))
|
||||
return;
|
||||
|
||||
if (value.as_object().has("longhands"sv)) {
|
||||
auto longhands = value.as_object().get("longhands"sv);
|
||||
VERIFY(longhands.has_value() && longhands->is_array());
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -7333,8 +7333,6 @@ Parser::ParseErrorOr<NonnullRefPtr<CSSStyleValue>> Parser::parse_css_value(Prope
|
|||
case PropertyID::BackgroundClip:
|
||||
case PropertyID::BackgroundImage:
|
||||
case PropertyID::BackgroundOrigin:
|
||||
case PropertyID::WebkitBackgroundClip:
|
||||
case PropertyID::WebkitBackgroundOrigin:
|
||||
if (auto parsed_value = parse_simple_comma_separated_value_list(property_id, tokens))
|
||||
return parsed_value.release_nonnull();
|
||||
return ParseError::SyntaxError;
|
||||
|
@ -7367,20 +7365,14 @@ Parser::ParseErrorOr<NonnullRefPtr<CSSStyleValue>> Parser::parse_css_value(Prope
|
|||
case PropertyID::BorderTopRightRadius:
|
||||
case PropertyID::BorderBottomRightRadius:
|
||||
case PropertyID::BorderBottomLeftRadius:
|
||||
case PropertyID::WebkitBorderTopLeftRadius:
|
||||
case PropertyID::WebkitBorderTopRightRadius:
|
||||
case PropertyID::WebkitBorderBottomRightRadius:
|
||||
case PropertyID::WebkitBorderBottomLeftRadius:
|
||||
if (auto parsed_value = parse_border_radius_value(tokens); parsed_value && !tokens.has_next_token())
|
||||
return parsed_value.release_nonnull();
|
||||
return ParseError::SyntaxError;
|
||||
case PropertyID::BorderRadius:
|
||||
case PropertyID::WebkitBorderRadius:
|
||||
if (auto parsed_value = parse_border_radius_shorthand_value(tokens); parsed_value && !tokens.has_next_token())
|
||||
return parsed_value.release_nonnull();
|
||||
return ParseError::SyntaxError;
|
||||
case PropertyID::BoxShadow:
|
||||
case PropertyID::WebkitBoxShadow:
|
||||
if (auto parsed_value = parse_shadow_value(tokens, AllowInsetKeyword::Yes); parsed_value && !tokens.has_next_token())
|
||||
return parsed_value.release_nonnull();
|
||||
return ParseError::SyntaxError;
|
||||
|
@ -7409,12 +7401,10 @@ Parser::ParseErrorOr<NonnullRefPtr<CSSStyleValue>> Parser::parse_css_value(Prope
|
|||
return parsed_value.release_nonnull();
|
||||
return ParseError::SyntaxError;
|
||||
case PropertyID::Flex:
|
||||
case PropertyID::WebkitFlex:
|
||||
if (auto parsed_value = parse_flex_shorthand_value(tokens); parsed_value && !tokens.has_next_token())
|
||||
return parsed_value.release_nonnull();
|
||||
return ParseError::SyntaxError;
|
||||
case PropertyID::FlexFlow:
|
||||
case PropertyID::WebkitFlexFlow:
|
||||
if (auto parsed_value = parse_flex_flow_value(tokens); parsed_value && !tokens.has_next_token())
|
||||
return parsed_value.release_nonnull();
|
||||
return ParseError::SyntaxError;
|
||||
|
@ -7531,17 +7521,14 @@ Parser::ParseErrorOr<NonnullRefPtr<CSSStyleValue>> Parser::parse_css_value(Prope
|
|||
return parsed_value.release_nonnull();
|
||||
return ParseError::SyntaxError;
|
||||
case PropertyID::Transform:
|
||||
case PropertyID::WebkitTransform:
|
||||
if (auto parsed_value = parse_transform_value(tokens); parsed_value && !tokens.has_next_token())
|
||||
return parsed_value.release_nonnull();
|
||||
return ParseError::SyntaxError;
|
||||
case PropertyID::TransformOrigin:
|
||||
case PropertyID::WebkitTransformOrigin:
|
||||
if (auto parsed_value = parse_transform_origin_value(tokens); parsed_value && !tokens.has_next_token())
|
||||
return parsed_value.release_nonnull();
|
||||
return ParseError::SyntaxError;
|
||||
case PropertyID::Transition:
|
||||
case PropertyID::WebkitTransition:
|
||||
if (auto parsed_value = parse_transition_value(tokens); parsed_value && !tokens.has_next_token())
|
||||
return parsed_value.release_nonnull();
|
||||
return ParseError::SyntaxError;
|
||||
|
|
|
@ -1,164 +1,102 @@
|
|||
{
|
||||
"-webkit-align-content": {
|
||||
"logical-alias-for": [
|
||||
"align-content"
|
||||
]
|
||||
"legacy-alias-for": "align-content"
|
||||
},
|
||||
"-webkit-align-items": {
|
||||
"logical-alias-for": [
|
||||
"align-items"
|
||||
]
|
||||
"legacy-alias-for": "align-items"
|
||||
},
|
||||
"-webkit-align-self": {
|
||||
"logical-alias-for": [
|
||||
"align-self"
|
||||
]
|
||||
"legacy-alias-for": "align-self"
|
||||
},
|
||||
"-webkit-animation": {
|
||||
"logical-alias-for": [
|
||||
"animation"
|
||||
]
|
||||
"legacy-alias-for": "animation"
|
||||
},
|
||||
"-webkit-animation-delay": {
|
||||
"logical-alias-for": [
|
||||
"animation-delay"
|
||||
]
|
||||
"legacy-alias-for": "animation-delay"
|
||||
},
|
||||
"-webkit-animation-direction": {
|
||||
"logical-alias-for": [
|
||||
"animation-direction"
|
||||
]
|
||||
"legacy-alias-for": "animation-direction"
|
||||
},
|
||||
"-webkit-animation-duration": {
|
||||
"logical-alias-for": [
|
||||
"animation-duration"
|
||||
]
|
||||
"legacy-alias-for": "animation-duration"
|
||||
},
|
||||
"-webkit-animation-fill-mode": {
|
||||
"logical-alias-for": [
|
||||
"animation-fill-mode"
|
||||
]
|
||||
"legacy-alias-for": "animation-fill-mode"
|
||||
},
|
||||
"-webkit-animation-iteration-count": {
|
||||
"logical-alias-for": [
|
||||
"animation-iteration-count"
|
||||
]
|
||||
"legacy-alias-for": "animation-iteration-count"
|
||||
},
|
||||
"-webkit-animation-name": {
|
||||
"logical-alias-for": [
|
||||
"animation-name"
|
||||
]
|
||||
"legacy-alias-for": "animation-name"
|
||||
},
|
||||
"-webkit-animation-play-state": {
|
||||
"logical-alias-for": [
|
||||
"animation-play-state"
|
||||
]
|
||||
"legacy-alias-for": "animation-play-state"
|
||||
},
|
||||
"-webkit-animation-timing-function": {
|
||||
"logical-alias-for": [
|
||||
"animation-timing-function"
|
||||
]
|
||||
"legacy-alias-for": "animation-timing-function"
|
||||
},
|
||||
"-webkit-appearance": {
|
||||
"logical-alias-for": [
|
||||
"appearance"
|
||||
],
|
||||
"max-values": 1
|
||||
"legacy-alias-for": "appearance"
|
||||
},
|
||||
"-webkit-background-clip": {
|
||||
"logical-alias-for": [
|
||||
"background-clip"
|
||||
]
|
||||
"legacy-alias-for": "background-clip"
|
||||
},
|
||||
"-webkit-background-origin": {
|
||||
"logical-alias-for": [
|
||||
"background-origin"
|
||||
]
|
||||
"legacy-alias-for": "background-origin"
|
||||
},
|
||||
"-webkit-background-size": {
|
||||
"legacy-alias-for": "background-size"
|
||||
},
|
||||
"-webkit-border-bottom-left-radius": {
|
||||
"logical-alias-for": [
|
||||
"border-bottom-left-radius"
|
||||
]
|
||||
"legacy-alias-for": "border-bottom-left-radius"
|
||||
},
|
||||
"-webkit-border-bottom-right-radius": {
|
||||
"logical-alias-for": [
|
||||
"border-bottom-right-radius"
|
||||
]
|
||||
"legacy-alias-for": "border-bottom-right-radius"
|
||||
},
|
||||
"-webkit-border-radius": {
|
||||
"logical-alias-for": [
|
||||
"border-radius"
|
||||
]
|
||||
"legacy-alias-for": "border-radius"
|
||||
},
|
||||
"-webkit-border-top-left-radius": {
|
||||
"logical-alias-for": [
|
||||
"border-top-left-radius"
|
||||
]
|
||||
"legacy-alias-for": "border-top-left-radius"
|
||||
},
|
||||
"-webkit-border-top-right-radius": {
|
||||
"logical-alias-for": [
|
||||
"border-top-right-radius"
|
||||
]
|
||||
"legacy-alias-for": "border-top-right-radius"
|
||||
},
|
||||
"-webkit-box-shadow": {
|
||||
"logical-alias-for": [
|
||||
"box-shadow"
|
||||
]
|
||||
"legacy-alias-for": "box-shadow"
|
||||
},
|
||||
"-webkit-box-sizing": {
|
||||
"logical-alias-for": [
|
||||
"box-sizing"
|
||||
]
|
||||
"legacy-alias-for": "box-sizing"
|
||||
},
|
||||
"-webkit-flex": {
|
||||
"logical-alias-for": [
|
||||
"flex"
|
||||
]
|
||||
"legacy-alias-for": "flex"
|
||||
},
|
||||
"-webkit-flex-basis": {
|
||||
"logical-alias-for": [
|
||||
"flex-basis"
|
||||
]
|
||||
"legacy-alias-for": "flex-basis"
|
||||
},
|
||||
"-webkit-flex-direction": {
|
||||
"logical-alias-for": [
|
||||
"flex-direction"
|
||||
]
|
||||
"legacy-alias-for": "flex-direction"
|
||||
},
|
||||
"-webkit-flex-flow": {
|
||||
"logical-alias-for": [
|
||||
"flex-flow"
|
||||
]
|
||||
"legacy-alias-for": "flex-flow"
|
||||
},
|
||||
"-webkit-flex-grow": {
|
||||
"logical-alias-for": [
|
||||
"flex-grow"
|
||||
]
|
||||
"legacy-alias-for": "flex-grow"
|
||||
},
|
||||
"-webkit-flex-shrink": {
|
||||
"logical-alias-for": [
|
||||
"flex-shrink"
|
||||
]
|
||||
"legacy-alias-for": "flex-shrink"
|
||||
},
|
||||
"-webkit-flex-wrap": {
|
||||
"logical-alias-for": [
|
||||
"flex-wrap"
|
||||
]
|
||||
"legacy-alias-for": "flex-wrap"
|
||||
},
|
||||
"-webkit-justify-content": {
|
||||
"logical-alias-for": [
|
||||
"justify-content"
|
||||
]
|
||||
"legacy-alias-for": "justify-content"
|
||||
},
|
||||
"-webkit-mask": {
|
||||
"logical-alias-for": [
|
||||
"mask"
|
||||
]
|
||||
"legacy-alias-for": "mask"
|
||||
},
|
||||
"-webkit-order": {
|
||||
"logical-alias-for": [
|
||||
"order"
|
||||
]
|
||||
"legacy-alias-for": "order"
|
||||
},
|
||||
"-webkit-text-fill-color": {
|
||||
"animation-type": "by-computed-value",
|
||||
|
@ -169,39 +107,25 @@
|
|||
]
|
||||
},
|
||||
"-webkit-transform": {
|
||||
"logical-alias-for": [
|
||||
"transform"
|
||||
]
|
||||
"legacy-alias-for": "transform"
|
||||
},
|
||||
"-webkit-transform-origin": {
|
||||
"logical-alias-for": [
|
||||
"transform-origin"
|
||||
]
|
||||
"legacy-alias-for": "transform-origin"
|
||||
},
|
||||
"-webkit-transition": {
|
||||
"logical-alias-for": [
|
||||
"transition"
|
||||
]
|
||||
"legacy-alias-for": "transition"
|
||||
},
|
||||
"-webkit-transition-delay": {
|
||||
"logical-alias-for": [
|
||||
"transition-delay"
|
||||
]
|
||||
"legacy-alias-for": "transition-delay"
|
||||
},
|
||||
"-webkit-transition-duration": {
|
||||
"logical-alias-for": [
|
||||
"transition-duration"
|
||||
]
|
||||
"legacy-alias-for": "transition-duration"
|
||||
},
|
||||
"-webkit-transition-property": {
|
||||
"logical-alias-for": [
|
||||
"transition-property"
|
||||
]
|
||||
"legacy-alias-for": "transition-property"
|
||||
},
|
||||
"-webkit-transition-timing-function": {
|
||||
"logical-alias-for": [
|
||||
"transition-timing-function"
|
||||
]
|
||||
"legacy-alias-for": "transition-timing-function"
|
||||
},
|
||||
"accent-color": {
|
||||
"animation-type": "by-computed-value",
|
||||
|
|
|
@ -521,80 +521,6 @@ void StyleComputer::for_each_property_expanding_shorthands(PropertyID property_i
|
|||
return PropertyID::Left;
|
||||
case PropertyID::InsetInlineEnd:
|
||||
return PropertyID::Right;
|
||||
case PropertyID::WebkitAlignContent:
|
||||
return PropertyID::AlignContent;
|
||||
case PropertyID::WebkitAlignItems:
|
||||
return PropertyID::AlignItems;
|
||||
case PropertyID::WebkitAlignSelf:
|
||||
return PropertyID::AlignSelf;
|
||||
case PropertyID::WebkitAnimation:
|
||||
return PropertyID::Animation;
|
||||
case PropertyID::WebkitAnimationDelay:
|
||||
return PropertyID::AnimationDelay;
|
||||
case PropertyID::WebkitAnimationDirection:
|
||||
return PropertyID::AnimationDirection;
|
||||
case PropertyID::WebkitAnimationDuration:
|
||||
return PropertyID::AnimationDuration;
|
||||
case PropertyID::WebkitAnimationFillMode:
|
||||
return PropertyID::AnimationFillMode;
|
||||
case PropertyID::WebkitAnimationIterationCount:
|
||||
return PropertyID::AnimationIterationCount;
|
||||
case PropertyID::WebkitAnimationName:
|
||||
return PropertyID::AnimationName;
|
||||
case PropertyID::WebkitAnimationPlayState:
|
||||
return PropertyID::AnimationPlayState;
|
||||
case PropertyID::WebkitAnimationTimingFunction:
|
||||
return PropertyID::AnimationTimingFunction;
|
||||
case PropertyID::WebkitAppearance:
|
||||
return PropertyID::Appearance;
|
||||
case PropertyID::WebkitBackgroundClip:
|
||||
return PropertyID::BackgroundClip;
|
||||
case PropertyID::WebkitBackgroundOrigin:
|
||||
return PropertyID::BackgroundOrigin;
|
||||
case PropertyID::WebkitBorderBottomLeftRadius:
|
||||
return PropertyID::BorderBottomLeftRadius;
|
||||
case PropertyID::WebkitBorderBottomRightRadius:
|
||||
return PropertyID::BorderBottomRightRadius;
|
||||
case PropertyID::WebkitBorderRadius:
|
||||
return PropertyID::BorderRadius;
|
||||
case PropertyID::WebkitBorderTopLeftRadius:
|
||||
return PropertyID::BorderTopLeftRadius;
|
||||
case PropertyID::WebkitBorderTopRightRadius:
|
||||
return PropertyID::BorderTopRightRadius;
|
||||
case PropertyID::WebkitBoxShadow:
|
||||
return PropertyID::BoxShadow;
|
||||
case PropertyID::WebkitBoxSizing:
|
||||
return PropertyID::BoxSizing;
|
||||
case PropertyID::WebkitFlex:
|
||||
return PropertyID::Flex;
|
||||
case PropertyID::WebkitFlexBasis:
|
||||
return PropertyID::FlexBasis;
|
||||
case PropertyID::WebkitFlexDirection:
|
||||
return PropertyID::FlexDirection;
|
||||
case PropertyID::WebkitFlexFlow:
|
||||
return PropertyID::FlexFlow;
|
||||
case PropertyID::WebkitFlexWrap:
|
||||
return PropertyID::FlexWrap;
|
||||
case PropertyID::WebkitJustifyContent:
|
||||
return PropertyID::JustifyContent;
|
||||
case PropertyID::WebkitMask:
|
||||
return PropertyID::Mask;
|
||||
case PropertyID::WebkitOrder:
|
||||
return PropertyID::Order;
|
||||
case PropertyID::WebkitTransform:
|
||||
return PropertyID::Transform;
|
||||
case PropertyID::WebkitTransformOrigin:
|
||||
return PropertyID::TransformOrigin;
|
||||
case PropertyID::WebkitTransition:
|
||||
return PropertyID::Transition;
|
||||
case PropertyID::WebkitTransitionDelay:
|
||||
return PropertyID::TransitionDelay;
|
||||
case PropertyID::WebkitTransitionDuration:
|
||||
return PropertyID::TransitionDuration;
|
||||
case PropertyID::WebkitTransitionProperty:
|
||||
return PropertyID::TransitionProperty;
|
||||
case PropertyID::WebkitTransitionTimingFunction:
|
||||
return PropertyID::TransitionTimingFunction;
|
||||
default:
|
||||
return {};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue