mirror of
https://github.com/servo/servo.git
synced 2025-08-09 15:35:34 +01:00
stylo: Handle text-zoom for font-size
This commit is contained in:
parent
de5f6f19bd
commit
16d46eaf7a
5 changed files with 52 additions and 15 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue