mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Use ComputedValueAsSpecified wherever possible
This commit is contained in:
parent
77651959e2
commit
2f69e7ff8c
3 changed files with 13 additions and 41 deletions
|
@ -17,7 +17,7 @@ use std::fmt;
|
|||
use std::ops::Mul;
|
||||
use style_traits::values::specified::AllowedNumericType;
|
||||
use super::{CSSFloat, FONT_MEDIUM_PX, HasViewportPercentage, LocalToCss, NoViewportPercentage};
|
||||
use super::computed::{self, Context, ToComputedValue};
|
||||
use super::computed::{self, ComputedValueAsSpecified, Context, ToComputedValue};
|
||||
use url::Url;
|
||||
|
||||
pub mod basic_shape;
|
||||
|
@ -1525,14 +1525,7 @@ impl Time {
|
|||
}
|
||||
}
|
||||
|
||||
impl ToComputedValue for Time {
|
||||
type ComputedValue = Time;
|
||||
|
||||
#[inline]
|
||||
fn to_computed_value(&self, _: &Context) -> Time {
|
||||
*self
|
||||
}
|
||||
}
|
||||
impl ComputedValueAsSpecified for Time {}
|
||||
|
||||
impl ToCss for Time {
|
||||
fn to_css<W>(&self, dest: &mut W) -> fmt::Result where W: fmt::Write {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue