diff options
author | Brendan Zabarauskas <bjzaba@yahoo.com.au> | 2014-06-20 10:02:37 -0700 |
---|---|---|
committer | Brendan Zabarauskas <bjzaba@yahoo.com.au> | 2014-06-20 10:06:50 -0700 |
commit | 520675b237eb40d23f83b028ec1521e8fb2214e3 (patch) | |
tree | ee313e2814013f7b50dae6b72c5ec5033bba52a1 /src/components/main/layout/inline.rs | |
parent | 61216c301deadc95b4156f8ddf5348e6e410a5d4 (diff) | |
download | servo-520675b237eb40d23f83b028ec1521e8fb2214e3.tar.gz servo-520675b237eb40d23f83b028ec1521e8fb2214e3.zip |
Make move mutation out of compute_minimum_ascent_and_descent
Diffstat (limited to 'src/components/main/layout/inline.rs')
-rw-r--r-- | src/components/main/layout/inline.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/components/main/layout/inline.rs b/src/components/main/layout/inline.rs index 5f8158a0bea..77cacb85cdc 100644 --- a/src/components/main/layout/inline.rs +++ b/src/components/main/layout/inline.rs @@ -1057,15 +1057,14 @@ impl InlineFlow { /// construction. /// /// `style` is the style of the block. - pub fn compute_minimum_ascent_and_descent(&mut self, + pub fn compute_minimum_ascent_and_descent(&self, font_context: &mut FontContext, - style: &ComputedValues) { + style: &ComputedValues) -> (Au, Au) { let font_style = text::computed_style_to_font_style(style); let font_metrics = text::font_metrics_for_style(font_context, &font_style); let line_height = text::line_height_from_style(style, style.get_font().font_size); let inline_metrics = InlineMetrics::from_font_metrics(&font_metrics, line_height); - self.minimum_height_above_baseline = inline_metrics.height_above_baseline; - self.minimum_depth_below_baseline = inline_metrics.depth_below_baseline; + (inline_metrics.height_above_baseline, inline_metrics.depth_below_baseline) } } |