mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-07 21:59:54 +00:00
LibWeb/SVG: Parse mask attribute as the mask CSS property
We now have support for the various mask longhands so we no longer need this hack.
This commit is contained in:
parent
d61791e6e8
commit
fd559341e3
Notes:
github-actions[bot]
2025-11-14 09:56:47 +00:00
Author: https://github.com/AtkinsSJ
Commit: fd559341e3
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6811
Reviewed-by: https://github.com/lpas
1 changed files with 2 additions and 6 deletions
|
|
@ -135,12 +135,8 @@ void SVGElement::apply_presentational_hints(GC::Ref<CSS::CascadedProperties> cas
|
|||
if (!property.supported_elements.is_empty() && !property.supported_elements.contains_slow(local_name()))
|
||||
continue;
|
||||
if (property.id == CSS::PropertyID::Mask) {
|
||||
// Mask is a shorthand property in CSS, but parse_css_value does not take that into account. For now,
|
||||
// just parse as 'mask-image' as anything else is currently not supported.
|
||||
// FIXME: properly parse longhand 'mask' property
|
||||
if (auto style_value = parse_css_value(parsing_context, value, CSS::PropertyID::MaskImage)) {
|
||||
cascaded_properties->set_property_from_presentational_hint(CSS::PropertyID::MaskImage, style_value.release_nonnull());
|
||||
}
|
||||
if (auto style_value = parse_css_value(parsing_context, value, CSS::PropertyID::Mask))
|
||||
cascaded_properties->set_property_from_presentational_hint(CSS::PropertyID::Mask, style_value.release_nonnull());
|
||||
} else {
|
||||
if (auto style_value = parse_css_value(parsing_context, value, property.id))
|
||||
cascaded_properties->set_property_from_presentational_hint(property.id, style_value.release_nonnull());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue