diff --git a/components/style/properties/cascade.rs b/components/style/properties/cascade.rs index b1a823f96be..73dee7ede07 100644 --- a/components/style/properties/cascade.rs +++ b/components/style/properties/cascade.rs @@ -1128,13 +1128,12 @@ impl<'a, 'b: 'a> Cascade<'a, 'b> { SCALE_FACTOR_WHEN_INCREMENTING_MATH_DEPTH_BY_ONE { (parent_font.mScriptSizeMultiplier as f32).powi(delta as i32) } else { - builder.add_flags(ComputedValueFlags::DEPENDS_ON_SELF_FONT_METRICS); // Script scale factors are independent of orientation. - let font_metrics = self.context - .font_metrics_provider - .query(self.context, FontBaseSize::InheritedStyle, - FontMetricsOrientation::Horizontal, - true /* retrieve_math_scales */); + let font_metrics = self.context.query_font_metrics( + FontBaseSize::InheritedStyle, + FontMetricsOrientation::Horizontal, + /* retrieve_math_scales = */ true, + ); scale_factor_for_math_depth_change( parent_font.mMathDepth as i32, font.mMathDepth as i32, diff --git a/components/style/values/computed/mod.rs b/components/style/values/computed/mod.rs index e185d297f84..9e8a8e1bfdc 100644 --- a/components/style/values/computed/mod.rs +++ b/components/style/values/computed/mod.rs @@ -195,7 +195,6 @@ impl<'a> Context<'a> { F: FnOnce(&Context) -> R, { let mut conditions = RuleCacheConditions::default(); - let context = Context { builder: StyleBuilder::for_inheritance(device, None, None), cached_system_font: None, @@ -206,7 +205,6 @@ impl<'a> Context<'a> { for_non_inherited_property: None, rule_cache_conditions: RefCell::new(&mut conditions), }; - f(&context) } diff --git a/components/style/values/specified/font.rs b/components/style/values/specified/font.rs index 1ae42ac772d..14947c79500 100644 --- a/components/style/values/specified/font.rs +++ b/components/style/values/specified/font.rs @@ -10,7 +10,7 @@ use crate::parser::{Parse, ParserContext}; use crate::values::computed::font::{FamilyName, FontFamilyList, SingleFontFamily}; use crate::values::computed::FontSizeAdjust as ComputedFontSizeAdjust; use crate::values::computed::{font as computed, Length, NonNegativeLength}; -use crate::values::computed::{Percentage as ComputedPercentage}; +use crate::values::computed::Percentage as ComputedPercentage; use crate::values::computed::{CSSPixelLength, Context, ToComputedValue}; use crate::values::generics::font::VariationValue; use crate::values::generics::font::{