style: Refactor and add infrastructure for font metrics in style.

This commit itself only moves things around and adds an extra parameter to the
`apply_declarations` function to eventually handle #14079 correctly.

Probably needs a more granular API to query fonts, á la nsFontMetrics, but
that's trivial to do once this is landed.

Then we should make the font provider mandatory, and implement the missing stylo
bits.
This commit is contained in:
Emilio Cobos Álvarez 2016-11-11 19:56:04 +01:00
parent 9fd6f0acd5
commit 6c3458767b
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
15 changed files with 196 additions and 94 deletions

View file

@ -418,7 +418,7 @@ impl Interpolate for CalcLengthOrPercentage {
}
Ok(CalcLengthOrPercentage {
length: try!(interpolate_half(self.length, other.length, progress)),
length: try!(self.length.interpolate(&other.length, progress)),
percentage: try!(interpolate_half(self.percentage, other.percentage, progress)),
})
}