layout: Handle floated blocks with percentage heights correctly.

Improves the top menu in Wikipedia.
This commit is contained in:
Patrick Walton 2014-09-19 17:56:07 -07:00
parent 39d7bf93d6
commit 0604d0c6b1
4 changed files with 29 additions and 1 deletions

View file

@ -1094,7 +1094,9 @@ impl BlockFlow {
self.fragment.border_box.start.b = self.fragment.margin.block_start;
// Calculate content block-size, taking `min-block-size` and `max-block-size` into account.
let mut candidate_block_size_iterator = CandidateBSizeIterator::new(self.fragment.style(), None);
let mut candidate_block_size_iterator =
CandidateBSizeIterator::new(self.fragment.style(),
self.base.block_container_explicit_block_size);
for candidate_block_size in candidate_block_size_iterator {
candidate_block_size_iterator.candidate_value = match candidate_block_size {
Auto => content_block_size,