mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 10:57:35 +00:00
LibWeb: Allow having a linear-gradient() as a background-image
This commit is contained in:
parent
d924e9ff60
commit
ee7e9e7c86
4 changed files with 11 additions and 7 deletions
|
@ -280,9 +280,13 @@ void NodeWithStyle::apply_style(const CSS::StyleProperties& computed_style)
|
|||
for (size_t layer_index = 0; layer_index < layer_count; layer_index++) {
|
||||
CSS::BackgroundLayerData layer;
|
||||
|
||||
if (auto image_value = value_for_layer(images, layer_index); image_value && image_value->is_image()) {
|
||||
layer.image = image_value->as_image();
|
||||
layer.image->load_bitmap(document());
|
||||
if (auto image_value = value_for_layer(images, layer_index); image_value) {
|
||||
if (image_value->is_image()) {
|
||||
image_value->as_image().load_bitmap(document());
|
||||
layer.background_image = image_value;
|
||||
} else if (image_value->is_linear_gradient()) {
|
||||
layer.background_image = image_value;
|
||||
}
|
||||
}
|
||||
|
||||
if (auto attachment_value = value_for_layer(attachments, layer_index); attachment_value && attachment_value->has_identifier()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue