mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:58:12 +00:00
LibWeb: Add plumbing for the new 'object-position' property
Now, the 'object-position' property gets properly parsed and is provided to the rest of the ecosystem. In the parser we use the same parsing as for the background-position, which is not entirely correct but almost a <position>.
This commit is contained in:
parent
7e11de272f
commit
d00c7e55a5
3 changed files with 14 additions and 0 deletions
|
@ -5952,6 +5952,12 @@ Parser::ParseErrorOr<NonnullRefPtr<StyleValue>> Parser::parse_css_value(Property
|
|||
if (auto parsed_value = parse_math_depth_value(component_values))
|
||||
return parsed_value.release_nonnull();
|
||||
return ParseError::SyntaxError;
|
||||
case PropertyID::ObjectPosition:
|
||||
// FIXME: This should use a parse_position compatible to VALUES-4
|
||||
// and not the background position, which is almost the same.
|
||||
if (auto parsed_value = parse_comma_separated_value_list(component_values, [this](auto& tokens) { return parse_single_background_position_value(tokens); }))
|
||||
return parsed_value.release_nonnull();
|
||||
return ParseError::SyntaxError;
|
||||
case PropertyID::Overflow:
|
||||
if (auto parsed_value = parse_overflow_value(component_values))
|
||||
return parsed_value.release_nonnull();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue