mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Auto merge of #18538 - emilio:font-size-dep-correct, r=heycam
stylo: Don't add a font-size dependency to the rule cache if the reference size is not our current style. We enter the Custom(..) code path from other random places, like to remove the relative lengths from a calc expression while zooming, or whatever craziness MathML font-size uses, and we don't want to set the dependency on those cases. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/18538) <!-- Reviewable:end -->
This commit is contained in:
commit
4b4a744265
1 changed files with 7 additions and 5 deletions
|
@ -132,11 +132,13 @@ impl FontRelativeLength {
|
|||
|
||||
match *self {
|
||||
FontRelativeLength::Em(length) => {
|
||||
if !matches!(base_size, FontBaseSize::InheritedStyle) {
|
||||
context.rule_cache_conditions.borrow_mut()
|
||||
.set_font_size_dependency(
|
||||
reference_font_size.into()
|
||||
);
|
||||
if context.for_non_inherited_property.is_some() {
|
||||
if matches!(base_size, FontBaseSize::CurrentStyle) {
|
||||
context.rule_cache_conditions.borrow_mut()
|
||||
.set_font_size_dependency(
|
||||
reference_font_size.into()
|
||||
);
|
||||
}
|
||||
}
|
||||
(reference_font_size, length)
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue