style: Update font-style to css-fonts-4.

Bug: 1455358
Reviewed-by: xidorn
MozReview-Commit-ID: 1Nq5DyCjaZe
This commit is contained in:
Emilio Cobos Álvarez 2018-04-19 20:38:08 +02:00
parent f7636e6662
commit 32d4da8a99
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
11 changed files with 361 additions and 63 deletions

View file

@ -41,13 +41,19 @@ impl ToCss for Angle {
}
}
// FIXME(emilio): Probably computed angles shouldn't preserve the unit and
// should serialize to degrees per:
//
// https://drafts.csswg.org/css-values/#compat
impl ToComputedValue for Angle {
type ComputedValue = ComputedAngle;
#[inline]
fn to_computed_value(&self, _context: &Context) -> Self::ComputedValue {
self.value
}
#[inline]
fn from_computed_value(computed: &Self::ComputedValue) -> Self {
Angle {
value: *computed,
@ -89,6 +95,12 @@ impl Angle {
}
}
/// Whether this specified angle came from a `calc()` expression.
#[inline]
pub fn was_calc(&self) -> bool {
self.was_calc
}
/// Returns the amount of radians this angle represents.
#[inline]
pub fn radians(self) -> f32 {