Replace Au-related free functions in util::geometry with Au methods.

This commit is contained in:
Simon Sapin 2015-05-05 17:34:01 +02:00
parent 49aed6555d
commit 32d5e24922
12 changed files with 50 additions and 92 deletions

View file

@ -397,8 +397,8 @@ impl LineBreaker {
fn new_block_size_for_line(&self, new_fragment: &Fragment, layout_context: &LayoutContext)
-> Au {
Au::max(self.pending_line.bounds.size.block,
self.new_inline_metrics_for_line(new_fragment, layout_context).block_size())
max(self.pending_line.bounds.size.block,
self.new_inline_metrics_for_line(new_fragment, layout_context).block_size())
}
/// Computes the position of a line that has only the provided fragment. Returns the bounding
@ -1589,10 +1589,10 @@ impl InlineMetrics {
pub fn max(&self, other: &InlineMetrics) -> InlineMetrics {
InlineMetrics {
block_size_above_baseline: Au::max(self.block_size_above_baseline,
other.block_size_above_baseline),
depth_below_baseline: Au::max(self.depth_below_baseline, other.depth_below_baseline),
ascent: Au::max(self.ascent, other.ascent),
block_size_above_baseline: max(self.block_size_above_baseline,
other.block_size_above_baseline),
depth_below_baseline: max(self.depth_below_baseline, other.depth_below_baseline),
ascent: max(self.ascent, other.ascent),
}
}
}