mirror of
https://github.com/servo/servo.git
synced 2025-08-11 16:35:33 +01:00
style: Update font-style to css-fonts-4.
Bug: 1455358 Reviewed-by: xidorn MozReview-Commit-ID: 1Nq5DyCjaZe
This commit is contained in:
parent
f7636e6662
commit
32d4da8a99
11 changed files with 361 additions and 63 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue