stylo: Handle text-zoom for font-size

This commit is contained in:
Manish Goregaokar 2017-07-28 17:32:30 -07:00 committed by Manish Goregaokar
parent de5f6f19bd
commit 16d46eaf7a
5 changed files with 52 additions and 15 deletions

View file

@ -186,6 +186,11 @@ impl Device {
pub fn default_background_color(&self) -> RGBA {
convert_nscolor_to_rgba(self.pres_context().mBackgroundColor)
}
/// Applies text zoom to a font-size or line-height value (see nsStyleFont::ZoomText).
pub fn zoom_text(&self, size: Au) -> Au {
size.scale_by(self.pres_context().mEffectiveTextZoom)
}
}
/// A expression for gecko contains a reference to the media feature, the value