mirror of
https://github.com/servo/servo.git
synced 2025-10-04 02:29:12 +01:00
style: Use the same computed time representation between Servo and Gecko
Same as above. Differential Revision: https://phabricator.services.mozilla.com/D167126
This commit is contained in:
parent
b96f8f748c
commit
fe8cdbe328
3 changed files with 14 additions and 13 deletions
|
@ -11,6 +11,7 @@ use style_traits::{CssWriter, ToCss};
|
|||
/// A computed `<time>` value.
|
||||
#[derive(Clone, Copy, Debug, MallocSizeOf, PartialEq, PartialOrd, ToResolvedValue)]
|
||||
#[cfg_attr(feature = "servo", derive(Deserialize, Serialize))]
|
||||
#[repr(C)]
|
||||
pub struct Time {
|
||||
seconds: CSSFloat,
|
||||
}
|
||||
|
@ -18,7 +19,7 @@ pub struct Time {
|
|||
impl Time {
|
||||
/// Creates a time value from a seconds amount.
|
||||
pub fn from_seconds(seconds: CSSFloat) -> Self {
|
||||
Time { seconds: seconds }
|
||||
Time { seconds }
|
||||
}
|
||||
|
||||
/// Returns `0s`.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue