mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 05:47:34 +00:00
LibWeb: Support translate3d
This commit is contained in:
parent
f099e2aa12
commit
e4db71c88b
4 changed files with 36 additions and 1 deletions
|
@ -5563,6 +5563,21 @@ RefPtr<StyleValue> Parser::parse_transform_value(Vector<ComponentValue> const& c
|
|||
}
|
||||
break;
|
||||
}
|
||||
case TransformFunctionParameterType::Length: {
|
||||
if (maybe_calc_value && maybe_calc_value->resolves_to_length()) {
|
||||
values.append(LengthStyleValue::create(Length::make_calculated(maybe_calc_value.release_nonnull())));
|
||||
} else {
|
||||
auto dimension_value = parse_dimension_value(value);
|
||||
if (!dimension_value)
|
||||
return nullptr;
|
||||
|
||||
if (dimension_value->is_length())
|
||||
values.append(dimension_value.release_nonnull());
|
||||
else
|
||||
return nullptr;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case TransformFunctionParameterType::LengthPercentage: {
|
||||
if (maybe_calc_value && maybe_calc_value->resolves_to_length()) {
|
||||
values.append(LengthStyleValue::create(Length::make_calculated(maybe_calc_value.release_nonnull())));
|
||||
|
|
|
@ -35,6 +35,13 @@
|
|||
{ "type": "<length-percentage>", "required": false }
|
||||
]
|
||||
},
|
||||
"translate3d": {
|
||||
"parameters": [
|
||||
{ "type": "<length-percentage>", "required": true },
|
||||
{ "type": "<length-percentage>", "required": true },
|
||||
{ "type": "<length>", "required": true }
|
||||
]
|
||||
},
|
||||
"translateX": {
|
||||
"parameters": [{ "type": "<length-percentage>", "required": true }]
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue