layout: Stop calling normal block size assignment for flex container

No need to call the `assign_block_size_block_base()` method of normal
block since it is implemented for CSS2.
This commit is contained in:
Pu Xingyu 2017-08-22 01:49:28 +08:00
parent 6a1b0d0526
commit 9103743d0c
16 changed files with 29 additions and 50 deletions

View file

@ -1429,6 +1429,9 @@ impl BlockFlow {
/// Determines the type of formatting context this is. See the definition of
/// `FormattingContextType`.
pub fn formatting_context_type(&self) -> FormattingContextType {
if self.is_inline_flex_item() || self.is_block_flex_item() {
return FormattingContextType::Other
}
let style = self.fragment.style();
if style.get_box().float != float::T::none {
return FormattingContextType::Other