Bug 1915096 - Ensure CSS Zoom (effective_zoom) is applied correctly when font-size is specified by keywords. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D241936
This commit is contained in:
@@ -594,7 +594,8 @@ impl KeywordInfo {
|
|||||||
#[cfg(feature="gecko")]
|
#[cfg(feature="gecko")]
|
||||||
debug_assert_ne!(self.kw, FontSizeKeyword::Math);
|
debug_assert_ne!(self.kw, FontSizeKeyword::Math);
|
||||||
let base = context.maybe_zoom_text(self.kw.to_length(context).0);
|
let base = context.maybe_zoom_text(self.kw.to_length(context).0);
|
||||||
base * self.factor + context.maybe_zoom_text(self.offset)
|
let zoom_factor = context.style().effective_zoom.value();
|
||||||
|
CSSPixelLength::new(base.px() * self.factor * zoom_factor) + context.maybe_zoom_text(self.offset)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Given a parent keyword info (self), apply an additional factor/offset to
|
/// Given a parent keyword info (self), apply an additional factor/offset to
|
||||||
|
|||||||
@@ -0,0 +1,5 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<title>CSS zoom applies to font-size when specified by keywords</title>
|
||||||
|
<div style="font-size: medium">
|
||||||
|
<div style="zoom: 2">This is some zoomed medium text</div>
|
||||||
|
</div>
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<title>CSS zoom applies to font-size when specified by keywords</title>
|
||||||
|
<link rel="help" href="https://drafts.csswg.org/css-viewport/">
|
||||||
|
<link rel="match" href="font-size-keyword-specified-ref.html">
|
||||||
|
<div style="zoom: 2">
|
||||||
|
<div style="font-size: medium">This is some zoomed medium text</div>
|
||||||
|
</div>
|
||||||
Reference in New Issue
Block a user