mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
style: Don't clamp Opacity values when computing them for SMIL.
This commit is contained in:
parent
c81d62d36f
commit
6171b5c465
1 changed files with 8 additions and 1 deletions
|
@ -563,7 +563,14 @@ impl ToComputedValue for Opacity {
|
|||
|
||||
#[inline]
|
||||
fn to_computed_value(&self, context: &Context) -> CSSFloat {
|
||||
self.0.to_computed_value(context).min(1.0).max(0.0)
|
||||
let value = self.0.to_computed_value(context);
|
||||
if context.for_smil_animation {
|
||||
// SMIL expects to be able to interpolate between out-of-range
|
||||
// opacity values.
|
||||
value
|
||||
} else {
|
||||
value.min(1.0).max(0.0)
|
||||
}
|
||||
}
|
||||
|
||||
#[inline]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue