mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Auto merge of #17071 - servo:derive-all-the-things, r=emilio
Reuse Rect<T> some more <!-- Reviewable:start --> This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/17071) <!-- Reviewable:end -->
This commit is contained in:
commit
433d68955b
24 changed files with 324 additions and 355 deletions
|
@ -37,12 +37,13 @@ use std::fmt;
|
|||
use style_traits::ToCss;
|
||||
use super::ComputedValues;
|
||||
use values::CSSFloat;
|
||||
use values::{Auto, Either, generics};
|
||||
use values::{Auto, Either};
|
||||
use values::computed::{Angle, LengthOrPercentageOrAuto, LengthOrPercentageOrNone};
|
||||
use values::computed::{BorderRadiusSize, ClipRect};
|
||||
use values::computed::{BorderCornerRadius, ClipRect};
|
||||
use values::computed::{CalcLengthOrPercentage, Context, LengthOrPercentage};
|
||||
use values::computed::{MaxLength, MozLength};
|
||||
use values::computed::ToComputedValue;
|
||||
use values::generics::border::BorderCornerRadius as GenericBorderCornerRadius;
|
||||
use values::generics::position as generic_position;
|
||||
|
||||
|
||||
|
@ -874,10 +875,10 @@ impl<T: Animatable + Copy> Animatable for Point2D<T> {
|
|||
}
|
||||
}
|
||||
|
||||
impl Animatable for BorderRadiusSize {
|
||||
impl Animatable for BorderCornerRadius {
|
||||
#[inline]
|
||||
fn add_weighted(&self, other: &Self, self_portion: f64, other_portion: f64) -> Result<Self, ()> {
|
||||
self.0.add_weighted(&other.0, self_portion, other_portion).map(generics::BorderRadiusSize)
|
||||
self.0.add_weighted(&other.0, self_portion, other_portion).map(GenericBorderCornerRadius)
|
||||
}
|
||||
|
||||
#[inline]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue