mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-10 01:51:03 +09: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
Notes:
sideshowbarker
2024-07-18 01:43:16 +09:00
Author: https://github.com/TobyAsE
Commit: d00c7e55a5
Pull-request: https://github.com/SerenityOS/serenity/pull/21461
Reviewed-by: https://github.com/AtkinsSJ
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