mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 05:08:13 +00:00
LibWeb: Parse background-clip
and background-origin
Including as part of the `background` shorthand. :^)
This commit is contained in:
parent
018a4aa85c
commit
532f1e859d
6 changed files with 106 additions and 10 deletions
|
@ -676,6 +676,8 @@ RefPtr<StyleValue> ResolvedCSSStyleDeclaration::style_value_for_property(Layout:
|
|||
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);
|
||||
auto maybe_background_origin = property(CSS::PropertyID::BackgroundOrigin);
|
||||
auto maybe_background_clip = property(CSS::PropertyID::BackgroundClip);
|
||||
|
||||
return BackgroundStyleValue::create(
|
||||
value_or_default(maybe_background_color, InitialStyleValue::the()),
|
||||
|
@ -683,7 +685,9 @@ RefPtr<StyleValue> ResolvedCSSStyleDeclaration::style_value_for_property(Layout:
|
|||
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_attachment, IdentifierStyleValue::create(CSS::ValueID::Scroll)));
|
||||
value_or_default(maybe_background_attachment, IdentifierStyleValue::create(CSS::ValueID::Scroll)),
|
||||
value_or_default(maybe_background_origin, IdentifierStyleValue::create(CSS::ValueID::PaddingBox)),
|
||||
value_or_default(maybe_background_clip, IdentifierStyleValue::create(CSS::ValueID::BorderBox)));
|
||||
}
|
||||
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