mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 12:38:12 +00:00
LibWeb: Support two-value background-repeat
The background-repeat value may be specified as either one- or two-value identifiers (to be interpreted as horizontal and vertical repeat). This adds two pseudo-properties, background-repeat-x and background-repeat-y, to handle this. One-value identifiers are mapped to two-value in accordance with the spec.
This commit is contained in:
parent
0794d879f3
commit
5de0e0068c
12 changed files with 152 additions and 35 deletions
|
@ -234,9 +234,13 @@ void NodeWithStyle::apply_style(const CSS::StyleProperties& specified_style)
|
|||
m_background_image = static_ptr_cast<CSS::ImageStyleValue>(bgimage.value());
|
||||
}
|
||||
|
||||
auto background_repeat = specified_style.background_repeat();
|
||||
if (background_repeat.has_value())
|
||||
computed_values.set_background_repeat(background_repeat.value());
|
||||
auto background_repeat_x = specified_style.background_repeat_x();
|
||||
if (background_repeat_x.has_value())
|
||||
computed_values.set_background_repeat_x(background_repeat_x.value());
|
||||
|
||||
auto background_repeat_y = specified_style.background_repeat_y();
|
||||
if (background_repeat_y.has_value())
|
||||
computed_values.set_background_repeat_y(background_repeat_y.value());
|
||||
|
||||
computed_values.set_display(specified_style.display());
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue