layout: Implement floated list items.

This patch also makes Servo not crash when
`generated_containing_block_rect()` is called on a list item (as, for
example, GitHub does), and for good measure I added the fix to other
flows as well.
This commit is contained in:
Patrick Walton 2014-12-22 11:40:20 -08:00
parent c8e68fa45c
commit d891c677aa
9 changed files with 110 additions and 12 deletions

View file

@ -15,6 +15,7 @@ use wrapper::ThreadSafeLayoutNode;
use geom::{Point2D, Rect};
use servo_util::geometry::Au;
use servo_util::logical_geometry::LogicalRect;
use std::fmt;
use style::ComputedValues;
use std::sync::Arc;
@ -86,6 +87,10 @@ impl Flow for TableCaptionFlow {
self.block_flow.compute_overflow()
}
fn generated_containing_block_rect(&self) -> LogicalRect<Au> {
self.block_flow.generated_containing_block_rect()
}
fn iterate_through_fragment_border_boxes(&self,
iterator: &mut FragmentBorderBoxIterator,
stacking_context_position: &Point2D<Au>) {