mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Replace Au-related free functions in util::geometry with Au methods.
This commit is contained in:
parent
49aed6555d
commit
32d5e24922
12 changed files with 50 additions and 92 deletions
|
@ -933,7 +933,7 @@ impl BlockFlow {
|
|||
if is_root {
|
||||
let screen_size = LogicalSize::from_physical(self.fragment.style.writing_mode,
|
||||
layout_context.shared.screen_size);
|
||||
block_size = Au::max(screen_size.block, block_size)
|
||||
block_size = max(screen_size.block, block_size)
|
||||
}
|
||||
|
||||
if is_root || self.formatting_context_type() != FormattingContextType::None ||
|
||||
|
@ -1478,11 +1478,11 @@ impl Flow for BlockFlow {
|
|||
child_base.intrinsic_inline_sizes.minimum_inline_size);
|
||||
|
||||
if child_base.flags.contains(CLEARS_LEFT) {
|
||||
left_float_width = Au::max(left_float_width, left_float_width_accumulator);
|
||||
left_float_width = max(left_float_width, left_float_width_accumulator);
|
||||
left_float_width_accumulator = Au(0)
|
||||
}
|
||||
if child_base.flags.contains(CLEARS_RIGHT) {
|
||||
right_float_width = Au::max(right_float_width, right_float_width_accumulator);
|
||||
right_float_width = max(right_float_width, right_float_width_accumulator);
|
||||
right_float_width_accumulator = Au(0)
|
||||
}
|
||||
|
||||
|
@ -1509,8 +1509,8 @@ impl Flow for BlockFlow {
|
|||
// FIXME(pcwalton): This should consider all float descendants, not just children.
|
||||
// FIXME(pcwalton): This is not well-spec'd; INTRINSIC specifies to do this, but CSS-SIZING
|
||||
// says not to. In practice, Gecko and WebKit both do this.
|
||||
left_float_width = Au::max(left_float_width, left_float_width_accumulator);
|
||||
right_float_width = Au::max(right_float_width, right_float_width_accumulator);
|
||||
left_float_width = max(left_float_width, left_float_width_accumulator);
|
||||
right_float_width = max(right_float_width, right_float_width_accumulator);
|
||||
computation.content_intrinsic_sizes.preferred_inline_size =
|
||||
max(computation.content_intrinsic_sizes.preferred_inline_size,
|
||||
left_float_width + right_float_width);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue