diff options
Diffstat (limited to 'components/layout')
-rw-r--r-- | components/layout/fragment.rs | 4 | ||||
-rw-r--r-- | components/layout/inline.rs | 4 | ||||
-rw-r--r-- | components/layout/text.rs | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/components/layout/fragment.rs b/components/layout/fragment.rs index 35ed91cf6eb..873993f8982 100644 --- a/components/layout/fragment.rs +++ b/components/layout/fragment.rs @@ -2005,7 +2005,7 @@ impl Fragment { } // See CSS 2.1 § 10.8.1. let font_metrics = text::font_metrics_for_style(&mut layout_context.font_context(), - self.style.get_font_arc()); + self.style.clone_font()); let line_height = text::line_height_from_style(&*self.style, &font_metrics); InlineMetrics::from_font_metrics(&info.run.font_metrics, line_height) } @@ -2085,7 +2085,7 @@ impl Fragment { vertical_align::T::middle => { let font_metrics = text::font_metrics_for_style(&mut layout_context.font_context(), - style.get_font_arc()); + style.clone_font()); offset += (content_inline_metrics.ascent - content_inline_metrics.space_below_baseline - font_metrics.x_height).scale_by(0.5) diff --git a/components/layout/inline.rs b/components/layout/inline.rs index 372aa2ea088..833d93c3039 100644 --- a/components/layout/inline.rs +++ b/components/layout/inline.rs @@ -1089,7 +1089,7 @@ impl InlineFlow { return LineMetrics::new(Au(0), Au(0)) } - let font_style = style.get_font_arc(); + let font_style = style.clone_font(); let font_metrics = text::font_metrics_for_style(font_context, font_style); let line_height = text::line_height_from_style(style, &font_metrics); let inline_metrics = InlineMetrics::from_font_metrics(&font_metrics, line_height); @@ -1112,7 +1112,7 @@ impl InlineFlow { for inline_context in fragments.iter() .filter_map(|fragment| fragment.inline_context.as_ref()) { for node in &inline_context.nodes { - let font_style = node.style.get_font_arc(); + let font_style = node.style.clone_font(); let font_metrics = text::font_metrics_for_style(font_context, font_style); let line_height = text::line_height_from_style(&*node.style, &font_metrics); let inline_metrics = InlineMetrics::from_font_metrics(&font_metrics, line_height); diff --git a/components/layout/text.rs b/components/layout/text.rs index 237f339ea71..6e6f12e6ccd 100644 --- a/components/layout/text.rs +++ b/components/layout/text.rs @@ -154,7 +154,7 @@ impl TextRunScanner { let word_break; { let in_fragment = self.clump.front().unwrap(); - let font_style = in_fragment.style().get_font_arc(); + let font_style = in_fragment.style().clone_font(); let inherited_text_style = in_fragment.style().get_inheritedtext(); fontgroup = font_context.layout_font_group_for_style(font_style); compression = match in_fragment.white_space() { |