Bug 1374233 - Part 8: Apply restrictions to blur radius.
Only blur radius needs to be clamped, so we just call restrict_value
while uncompute() (from IntermediateShadow into Shadow).
MozReview-Commit-ID: 3ZdExn7kLs9
--- a/servo/components/style/properties/helpers/animated_properties.mako.rs
+++ b/servo/components/style/properties/helpers/animated_properties.mako.rs
@@ -3076,17 +3076,18 @@ impl From<${ty}ShadowList> for Intermedi
}
% endfor
impl From<IntermediateShadow> for Shadow {
fn from(shadow: IntermediateShadow) -> Shadow {
Shadow {
offset_x: shadow.offset_x,
offset_y: shadow.offset_y,
- blur_radius: shadow.blur_radius,
+ // blur-radius must be non-negative.
+ blur_radius: shadow.blur_radius.restrict_value(Restrictions::NonNegative),
spread_radius: shadow.spread_radius,
color: shadow.color.into(),
inset: shadow.inset,
}
}
}
impl From<Shadow> for IntermediateShadow {