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/construct.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/construct.rs')
-rw-r--r-- | src/components/main/layout/construct.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/components/main/layout/construct.rs b/src/components/main/layout/construct.rs index 4e9712caa8f..5f999eb2663 100644 --- a/src/components/main/layout/construct.rs +++ b/src/components/main/layout/construct.rs @@ -293,7 +293,9 @@ impl<'a> FlowConstructor<'a> { } let mut inline_flow = box InlineFlow::from_fragments((*node).clone(), fragments); - inline_flow.compute_minimum_ascent_and_descent(self.font_context(), &**node.style()); + let (ascent, descent) = inline_flow.compute_minimum_ascent_and_descent(self.font_context(), &**node.style()); + inline_flow.minimum_height_above_baseline = ascent; + inline_flow.minimum_depth_below_baseline = descent; let mut inline_flow = inline_flow as Box<Flow>; TextRunScanner::new().scan_for_runs(self.font_context(), inline_flow); let mut inline_flow = FlowRef::new(inline_flow); |