LibWeb: Implement mask-image CSS property support

Implemented by reusing AddMask display list item that was initially
added for `background-clip` property.

Progress on flashlight effect on https://null.com/games/athena-crisis
This commit is contained in:
Aliaksandr Kalenik
2024-11-16 03:25:48 +03:00
committed by Andreas Kling
parent 7b7bb60393
commit 96a35767b6
11 changed files with 149 additions and 58 deletions

View File

@@ -1177,6 +1177,10 @@ void PaintableBox::resolve_paint_properties()
if (background_layers) {
m_resolved_background = resolve_background_layers(*background_layers, *this, background_color, background_rect, normalized_border_radii_data());
};
if (auto mask_image = computed_values.mask_image()) {
mask_image->resolve_for_size(layout_node_with_style_and_box_metrics(), absolute_padding_box_rect().size());
}
}
void PaintableWithLines::resolve_paint_properties()