diff options
Diffstat (limited to 'src/components/main/layout/inline.rs')
-rw-r--r-- | src/components/main/layout/inline.rs | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/src/components/main/layout/inline.rs b/src/components/main/layout/inline.rs index 39fda3b7961..2a0c412fb32 100644 --- a/src/components/main/layout/inline.rs +++ b/src/components/main/layout/inline.rs @@ -196,14 +196,14 @@ impl LineboxScanner { debug!("LineboxScanner: Trying to place first box of line {}", self.lines.len()); let first_box_size = first_box.base().position.get().size; - debug!("LineboxScanner: box size: {}", first_box_size); - let splitable = first_box.can_split(); + let splittable = first_box.can_split(); + debug!("LineboxScanner: box size: {}, splittable: {}", first_box_size, splittable); let line_is_empty: bool = self.pending_line.range.length() == 0; - // Initally, pretend a splitable box has 0 width. + // Initally, pretend a splittable box has 0 width. // We will move it later if it has nonzero width // and that causes problems. - let placement_width = if splitable { + let placement_width = if splittable { Au::new(0) } else { first_box_size.width @@ -231,7 +231,7 @@ impl LineboxScanner { // If not, but we can't split the box, then we'll place // the line here and it will overflow. - if !splitable { + if !splittable { debug!("LineboxScanner: case=line doesn't fit, but is unsplittable"); return (line_bounds, first_box_size.width); } @@ -467,6 +467,15 @@ impl InlineFlow { } } + pub fn from_boxes(base: FlowData, boxes: ~[@RenderBox]) -> InlineFlow { + InlineFlow { + base: base, + boxes: boxes, + lines: ~[], + elems: ElementMapping::new(), + } + } + pub fn teardown(&mut self) { for box in self.boxes.iter() { box.teardown(); |