summaryrefslogtreecommitdiffstats
path: root/servo/components/style/matching.rs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-15 03:34:50 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-15 03:34:50 +0000
commitdef92d1b8e9d373e2f6f27c366d578d97d8960c6 (patch)
tree2ef34b9ad8bb9a9220e05d60352558b15f513894 /servo/components/style/matching.rs
parentAdding debian version 125.0.3-1. (diff)
downloadfirefox-def92d1b8e9d373e2f6f27c366d578d97d8960c6.tar.xz
firefox-def92d1b8e9d373e2f6f27c366d578d97d8960c6.zip
Merging upstream version 126.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'servo/components/style/matching.rs')
-rw-r--r--servo/components/style/matching.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/servo/components/style/matching.rs b/servo/components/style/matching.rs
index 646d08a9e3..e9d754aa10 100644
--- a/servo/components/style/matching.rs
+++ b/servo/components/style/matching.rs
@@ -934,7 +934,8 @@ pub trait MatchMethods: TElement {
if old_font_size != Some(new_font_size) {
if is_root {
debug_assert!(self.owner_doc_matches_for_testing(device));
- device.set_root_font_size(new_font_size.computed_size().into());
+ let size = new_font_size.computed_size();
+ device.set_root_font_size(new_primary_style.effective_zoom.unzoom(size.px()));
if device.used_root_font_size() {
// If the root font-size changed since last time, and something
// in the document did use rem units, ensure we recascade the
@@ -954,7 +955,8 @@ pub trait MatchMethods: TElement {
}
}
- // For line-height, we want the fully resolved value, as `normal` also depends on other font properties.
+ // For line-height, we want the fully resolved value, as `normal` also depends on other
+ // font properties.
let new_line_height = device
.calc_line_height(
&new_primary_style.get_font(),
@@ -968,14 +970,12 @@ pub trait MatchMethods: TElement {
.0
});
- if restyle_requirement != ChildRestyleRequirement::MustMatchDescendants &&
- old_line_height != Some(new_line_height)
- {
+ if old_line_height != Some(new_line_height) {
if is_root {
debug_assert!(self.owner_doc_matches_for_testing(device));
- device.set_root_line_height(new_line_height.into());
+ device.set_root_line_height(new_primary_style.effective_zoom.unzoom(new_line_height.px()));
if device.used_root_line_height() {
- restyle_requirement = ChildRestyleRequirement::MustCascadeDescendants;
+ restyle_requirement = std::cmp::max(restyle_requirement, ChildRestyleRequirement::MustCascadeDescendants);
}
}