mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 05:39:11 +00:00
LibWeb: Add basic support for maskUnits=userSpaceOnUse
This still does not use the x, y, width, or height attributes on the mask, but this allows at least displaying these masks.
This commit is contained in:
parent
479451498b
commit
92fc426562
Notes:
sideshowbarker
2024-07-17 06:51:48 +09:00
Author: https://github.com/MacDue
Commit: 92fc426562
Pull-request: https://github.com/SerenityOS/serenity/pull/21371
Reviewed-by: https://github.com/AtkinsSJ
2 changed files with 15 additions and 7 deletions
|
@ -53,10 +53,6 @@ MaskUnits SVGMaskElement::mask_units() const
|
|||
|
||||
CSSPixelRect SVGMaskElement::resolve_masking_area(CSSPixelRect const& mask_target) const
|
||||
{
|
||||
if (mask_units() == SVG::MaskUnits::UserSpaceOnUse) {
|
||||
dbgln("SVG: maskUnits=userSpaceOnUse is not supported");
|
||||
return {};
|
||||
}
|
||||
// TODO: Resolve this based on the x, y, width, and height of the mask.
|
||||
return mask_target.inflated(mask_target.size().scaled(CSSPixels(2) / 10));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue