summaryrefslogtreecommitdiffstats
path: root/servo/components/style/matching.rs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-15 03:35:49 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-15 03:35:49 +0000
commitd8bbc7858622b6d9c278469aab701ca0b609cddf (patch)
treeeff41dc61d9f714852212739e6b3738b82a2af87 /servo/components/style/matching.rs
parentReleasing progress-linux version 125.0.3-1~progress7.99u1. (diff)
downloadfirefox-d8bbc7858622b6d9c278469aab701ca0b609cddf.tar.xz
firefox-d8bbc7858622b6d9c278469aab701ca0b609cddf.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);
}
}