diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
commit | 40a355a42d4a9444dc753c04c6608dade2f06a23 (patch) | |
tree | 871fc667d2de662f171103ce5ec067014ef85e61 /servo/components/style/properties/shorthands/svg.mako.rs | |
parent | Adding upstream version 124.0.1. (diff) | |
download | firefox-40a355a42d4a9444dc753c04c6608dade2f06a23.tar.xz firefox-40a355a42d4a9444dc753c04c6608dade2f06a23.zip |
Adding upstream version 125.0.1.upstream/125.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'servo/components/style/properties/shorthands/svg.mako.rs')
-rw-r--r-- | servo/components/style/properties/shorthands/svg.mako.rs | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/servo/components/style/properties/shorthands/svg.mako.rs b/servo/components/style/properties/shorthands/svg.mako.rs index cf34b116ee..195427dad5 100644 --- a/servo/components/style/properties/shorthands/svg.mako.rs +++ b/servo/components/style/properties/shorthands/svg.mako.rs @@ -144,8 +144,8 @@ // <mask-reference> || // <position> [ / <bg-size> ]? || // <repeat-style> || - // <geometry-box> || - // [ <geometry-box> | no-clip ] || + // <coord-box> || + // [ <coord-box> | no-clip ] || // <compositing-operator> || // <masking-mode> // https://drafts.fxtf.org/css-masking-1/#the-mask @@ -198,12 +198,21 @@ writer.item(repeat)?; } - // <geometry-box> - if has_origin { + // <coord-box> + // Note: + // Even if 'mask-origin' is at its initial value 'border-box', + // we still have to serialize it to avoid ambiguity iF the + // 'mask-clip' longhand has some other <coord-box> value + // (i.e. neither 'border-box' nor 'no-clip'). (If we naively + // declined to serialize the 'mask-origin' value in this + // situation, then whatever value we serialize for 'mask-clip' + // would implicitly also represent 'mask-origin' and would be + // providing the wrong value for that longhand.) + if has_origin || (has_clip && *clip != Clip::NoClip) { writer.item(origin)?; } - // [ <geometry-box> | no-clip ] + // [ <coord-box> | no-clip ] if has_clip && *clip != From::from(*origin) { writer.item(clip)?; } |