aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/main/layout/construct.rs
diff options
context:
space:
mode:
authorBrendan Zabarauskas <bjzaba@yahoo.com.au>2014-06-20 10:02:37 -0700
committerBrendan Zabarauskas <bjzaba@yahoo.com.au>2014-06-20 10:06:50 -0700
commit520675b237eb40d23f83b028ec1521e8fb2214e3 (patch)
treeee313e2814013f7b50dae6b72c5ec5033bba52a1 /src/components/main/layout/construct.rs
parent61216c301deadc95b4156f8ddf5348e6e410a5d4 (diff)
downloadservo-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.rs4
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);