layout: Make sure anonymous table flows are statically positioned.

The failing `float-applies-to-*` CSS 2.1 tests never really should have
been passing in the first place; they depend on floats inside
fixed-layout tables working properly, which they don't.

Closes #6078.
Closes #6709.
Closes #6858.
This commit is contained in:
Patrick Walton 2015-08-04 14:38:08 -07:00
parent da06c2dda0
commit ed4172b2c6
21 changed files with 142 additions and 114 deletions

View file

@ -45,7 +45,6 @@ use layout_debug;
use layout_task::DISPLAY_PORT_SIZE_FACTOR;
use model::{IntrinsicISizes, MarginCollapseInfo};
use model::{MaybeAuto, CollapsibleMargins, specified, specified_or_none};
use wrapper::ThreadSafeLayoutNode;
use euclid::{Point2D, Rect, Size2D};
use gfx::display_list::{ClippingRegion, DisplayList};
@ -572,13 +571,10 @@ impl Encodable for BlockFlowFlags {
}
impl BlockFlow {
pub fn from_node_and_fragment(node: &ThreadSafeLayoutNode,
fragment: Fragment,
float_kind: Option<FloatKind>)
-> BlockFlow {
let writing_mode = node.style().writing_mode;
pub fn from_fragment(fragment: Fragment, float_kind: Option<FloatKind>) -> BlockFlow {
let writing_mode = fragment.style().writing_mode;
BlockFlow {
base: BaseFlow::new(Some((*node).clone()), writing_mode, match float_kind {
base: BaseFlow::new(Some(fragment.style()), writing_mode, match float_kind {
Some(_) => ForceNonfloatedFlag::FloatIfNecessary,
None => ForceNonfloatedFlag::ForceNonfloated,
}),