mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-02 00:13:02 +00:00
LibWeb: Parse background-attachment
as part of background
property
This commit is contained in:
parent
116a5fe5d0
commit
018a4aa85c
Notes:
sideshowbarker
2024-07-18 01:20:57 +09:00
Author: https://github.com/AtkinsSJ
Commit: 018a4aa85c
Pull-request: https://github.com/SerenityOS/serenity/pull/10844
Reviewed-by: https://github.com/awesomekling
4 changed files with 39 additions and 8 deletions
|
@ -675,13 +675,15 @@ RefPtr<StyleValue> ResolvedCSSStyleDeclaration::style_value_for_property(Layout:
|
|||
auto maybe_background_position = property(CSS::PropertyID::BackgroundPosition);
|
||||
auto maybe_background_repeat_x = property(CSS::PropertyID::BackgroundRepeatX);
|
||||
auto maybe_background_repeat_y = property(CSS::PropertyID::BackgroundRepeatY);
|
||||
auto maybe_background_attachment = property(CSS::PropertyID::BackgroundAttachment);
|
||||
|
||||
return BackgroundStyleValue::create(
|
||||
value_or_default(maybe_background_color, InitialStyleValue::the()),
|
||||
value_or_default(maybe_background_image, IdentifierStyleValue::create(CSS::ValueID::None)),
|
||||
value_or_default(maybe_background_position, PositionStyleValue::create(PositionEdge::Left, Length::make_px(0), PositionEdge::Top, Length::make_px(0))),
|
||||
value_or_default(maybe_background_repeat_x, IdentifierStyleValue::create(CSS::ValueID::RepeatX)),
|
||||
value_or_default(maybe_background_repeat_y, IdentifierStyleValue::create(CSS::ValueID::RepeatX)));
|
||||
value_or_default(maybe_background_repeat_y, IdentifierStyleValue::create(CSS::ValueID::RepeatX)),
|
||||
value_or_default(maybe_background_attachment, IdentifierStyleValue::create(CSS::ValueID::Scroll)));
|
||||
}
|
||||
case CSS::PropertyID::ListStyleType:
|
||||
return IdentifierStyleValue::create(to_css_value_id(layout_node.computed_values().list_style_type()));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue