From ff84a4f930f93065441cd0a7647b728359457832 Mon Sep 17 00:00:00 2001 From: Youngmin Yoo Date: Thu, 14 Nov 2013 14:45:12 +0900 Subject: [PATCH] Fix compute height using 'height' property --- src/components/main/layout/block.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/main/layout/block.rs b/src/components/main/layout/block.rs index 1f336e48da78..0e36591218c6 100644 --- a/src/components/main/layout/block.rs +++ b/src/components/main/layout/block.rs @@ -212,9 +212,10 @@ impl BlockFlow { for &box in self.box.iter() { let base = box.base(); let style = base.style(); - let maybe_height = MaybeAuto::from_style(style.Box.height, Au::new(0)); - let maybe_height = maybe_height.specified_or_zero(); - height = geometry::max(height, maybe_height); + height = match MaybeAuto::from_style(style.Box.height, Au::new(0)) { + Auto => height, + Specified(value) => value + }; } let mut noncontent_height = Au::new(0); @@ -238,7 +239,6 @@ impl BlockFlow { model.margin.bottom; } - //TODO(eatkinson): compute heights using the 'height' property. self.base.position.size.height = height + noncontent_height; if inorder {