Introduce MaxRect trait

It is implemented for LayoutRect and Rect<Au>.
Replaces the max_rect() function from servo_geometry.
This commit is contained in:
Pyfisch 2018-01-17 23:17:39 +01:00
parent 8c7c5f6e79
commit af52233ae5
9 changed files with 56 additions and 28 deletions

View file

@ -44,7 +44,7 @@ use layout_debug;
use model::{AdjoiningMargins, CollapsibleMargins, IntrinsicISizes, MarginCollapseInfo, MaybeAuto};
use sequential;
use serde::{Serialize, Serializer};
use servo_geometry::max_rect;
use servo_geometry::MaxRect;
use std::cmp::{max, min};
use std::fmt;
use std::sync::Arc;
@ -1955,7 +1955,7 @@ impl Flow for BlockFlow {
let container_size = Size2D::new(self.base.block_container_inline_size, Au(0));
if self.is_root() {
self.base.clip = max_rect();
self.base.clip = Rect::max_rect();
}
if self.base.flags.contains(FlowFlags::IS_ABSOLUTELY_POSITIONED) {