mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 21:59:07 +00:00
LibWeb: Flesh out SVGMaskElement a bit
- Add method to resolve the masking area (based on the target element size) - Parse the maskUnits and maskContentUnits attributes
This commit is contained in:
parent
0af8d81f48
commit
650180811e
Notes:
sideshowbarker
2024-07-17 05:58:46 +09:00
Author: https://github.com/MacDue
Commit: 650180811e
Pull-request: https://github.com/SerenityOS/serenity/pull/21012
Reviewed-by: https://github.com/AtkinsSJ
Reviewed-by: https://github.com/awesomekling
5 changed files with 55 additions and 6 deletions
|
@ -88,11 +88,15 @@ struct PreserveAspectRatio {
|
|||
MeetOrSlice meet_or_slice { MeetOrSlice::Meet };
|
||||
};
|
||||
|
||||
enum class GradientUnits {
|
||||
enum class SVGUnits {
|
||||
ObjectBoundingBox,
|
||||
UserSpaceOnUse
|
||||
};
|
||||
|
||||
using GradientUnits = SVGUnits;
|
||||
using MaskUnits = SVGUnits;
|
||||
using MaskContentUnits = SVGUnits;
|
||||
|
||||
enum class SpreadMethod {
|
||||
Pad,
|
||||
Repeat,
|
||||
|
@ -149,7 +153,7 @@ public:
|
|||
static Vector<PathInstruction> parse_path_data(StringView input);
|
||||
static Optional<Vector<Transform>> parse_transform(StringView input);
|
||||
static Optional<PreserveAspectRatio> parse_preserve_aspect_ratio(StringView input);
|
||||
static Optional<GradientUnits> parse_gradient_units(StringView input);
|
||||
static Optional<SVGUnits> parse_units(StringView input);
|
||||
static Optional<SpreadMethod> parse_spread_method(StringView input);
|
||||
|
||||
private:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue