Fix layout of Create Account / Login when rendering Wikipedia.

When calculating the preferred width for a block, accumulate
the left and right float widths of children separately, which
is then max'ed with the normal flow widths later on.

Ref bug #2554 - improves the layout of the top bar.
This commit is contained in:
Glenn Watson 2014-09-10 13:43:56 +10:00
parent 05f2d0ca83
commit 98caecf7ec
5 changed files with 83 additions and 3 deletions

View file

@ -61,7 +61,7 @@ use std::iter::Zip;
use std::raw;
use std::sync::atomics::{AtomicUint, Relaxed, SeqCst};
use std::slice::MutItems;
use style::computed_values::{clear, position, text_align};
use style::computed_values::{clear, float, position, text_align};
/// Virtual methods that make up a float context.
///
@ -195,6 +195,10 @@ pub trait Flow: fmt::Show + ToString + Share {
clear::none
}
fn float_kind(&self) -> float::T {
float::none
}
/// Returns true if this float is a block formatting context and false otherwise. The default
/// implementation returns false.
fn is_block_formatting_context(&self, _only_impactable_by_floats: bool) -> bool {