mirror of
https://github.com/servo/servo.git
synced 2025-08-12 08:55:32 +01:00
Create a module for generics and make BorderRadiusSize generic
This commit is contained in:
parent
c5c6e8c442
commit
0249270f61
9 changed files with 91 additions and 74 deletions
|
@ -31,7 +31,7 @@ use std::fmt;
|
|||
use style_traits::ToCss;
|
||||
use super::ComputedValues;
|
||||
use values::CSSFloat;
|
||||
use values::{Auto, Either, Normal};
|
||||
use values::{Auto, Either, Normal, generics};
|
||||
use values::computed::{Angle, LengthOrPercentageOrAuto, LengthOrPercentageOrNone};
|
||||
use values::computed::{BorderRadiusSize, ClipRect, LengthOrNone};
|
||||
use values::computed::{CalcLengthOrPercentage, Context, LengthOrPercentage};
|
||||
|
@ -711,7 +711,7 @@ impl<T: Interpolate + Copy> Interpolate for Point2D<T> {
|
|||
impl Interpolate for BorderRadiusSize {
|
||||
#[inline]
|
||||
fn interpolate(&self, other: &Self, progress: f64) -> Result<Self, ()> {
|
||||
self.0.interpolate(&other.0, progress).map(BorderRadiusSize)
|
||||
self.0.interpolate(&other.0, progress).map(generics::BorderRadiusSize)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue