mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-04 23:30:20 +00:00
LibWeb: Create EdgeStyleValue for BackgroundPositionXY with no offset
When specifying either `background-position-x: right` or `background-position-y: bottom` without an offset value no EdgeStyleValue was created. However, the spec says the offset should be optional. Now, if you do not provide an offset, it creates the EdgeStyleValue with a default offset of 0 pixels.
This commit is contained in:
parent
016b31fae2
commit
3fd870a429
Notes:
sideshowbarker
2024-07-17 06:00:02 +09:00
Author: https://github.com/alankemp 🔰
Commit: 3fd870a429
Pull-request: https://github.com/SerenityOS/serenity/pull/19910
Reviewed-by: https://github.com/AtkinsSJ ✅
4 changed files with 28 additions and 1 deletions
|
@ -4783,7 +4783,9 @@ ErrorOr<RefPtr<StyleValue>> Parser::parse_single_background_position_x_or_y_valu
|
|||
return EdgeStyleValue::create(relative_edge, *offset);
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
// If no offset is provided create this element but with an offset of default value of zero
|
||||
transaction.commit();
|
||||
return EdgeStyleValue::create(relative_edge, Length::make_px(0));
|
||||
}
|
||||
|
||||
ErrorOr<RefPtr<StyleValue>> Parser::parse_single_background_repeat_value(TokenStream<ComponentValue>& tokens)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue