mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 23:37:36 +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
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