aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbors-servo <release+servo@mozilla.com>2014-01-06 22:25:27 -0800
committerbors-servo <release+servo@mozilla.com>2014-01-06 22:25:27 -0800
commit608ee006abf1c67f438fb8504ec28b4ab08dfde9 (patch)
tree7f06d9fc56db5f8f6c08e59651dd864c4eeac1e6
parent7be2125f96bfe5ef74a7ce8436f1fdd47ed15822 (diff)
parent117f55069c6e96e4e01f48a5a3d237c7c5656caf (diff)
downloadservo-608ee006abf1c67f438fb8504ec28b4ab08dfde9.tar.gz
servo-608ee006abf1c67f438fb8504ec28b4ab08dfde9.zip
auto merge of #1463 : ksh8281/servo/img_new_line, r=pcwalton
```` <div> test <img src="test.jpeg"/> </div> ```` if reduce window size, img is disapper. this pr fixes this case.
-rw-r--r--src/components/main/layout/inline.rs9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/components/main/layout/inline.rs b/src/components/main/layout/inline.rs
index 5d5022eaf30..455f05a9249 100644
--- a/src/components/main/layout/inline.rs
+++ b/src/components/main/layout/inline.rs
@@ -364,19 +364,18 @@ impl LineboxScanner {
debug!("LineboxScanner: case=box can't split and line {:u} is empty, so \
overflowing.",
self.lines.len());
- self.push_box_to_line(in_box)
- } else {
- debug!("LineboxScanner: Case=box can't split, not appending.");
+ self.push_box_to_line(in_box);
+ return true
}
- return line_is_empty
}
let available_width = green_zone.width - self.pending_line.bounds.size.width;
let split = in_box.split_to_width(available_width, line_is_empty);
let (left, right) = match (split, line_is_empty) {
(CannotSplit, _) => {
- error!("LineboxScanner: Tried to split unsplittable render box! {:s}",
+ debug!("LineboxScanner: Tried to split unsplittable render box! {:s}",
in_box.debug_str());
+ self.work_list.push_front(in_box);
return false
}
(SplitDidNotFit(_, _), false) => {