From 40a355a42d4a9444dc753c04c6608dade2f06a23 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 03:13:27 +0200 Subject: Adding upstream version 125.0.1. Signed-off-by: Daniel Baumann --- .../style/properties/shorthands/svg.mako.rs | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'servo/components/style/properties/shorthands/svg.mako.rs') 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 @@ // || // [ / ]? || // || - // || - // [ | no-clip ] || + // || + // [ | no-clip ] || // || // // https://drafts.fxtf.org/css-masking-1/#the-mask @@ -198,12 +198,21 @@ writer.item(repeat)?; } - // - if has_origin { + // + // 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 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)?; } - // [ | no-clip ] + // [ | no-clip ] if has_clip && *clip != From::from(*origin) { writer.item(clip)?; } -- cgit v1.2.3