aboutsummaryrefslogtreecommitdiff
path: root/dw
diff options
context:
space:
mode:
authorSebastian Geerken <devnull@localhost>2015-01-03 21:24:29 +0100
committerSebastian Geerken <devnull@localhost>2015-01-03 21:24:29 +0100
commitb22fd60a536fcab26332de2bee21b40b024eb26a (patch)
tree0961746775453918db58ae66d14e1d8fdae635d9 /dw
parenteba615f8984b86bd6c1bce6fbadb8be58c39664a (diff)
Size of inline-blocks with left floats is now calculated correctly.
Diffstat (limited to 'dw')
-rw-r--r--dw/textblock_linebreaking.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/dw/textblock_linebreaking.cc b/dw/textblock_linebreaking.cc
index 65cac81e..1bf4dab6 100644
--- a/dw/textblock_linebreaking.cc
+++ b/dw/textblock_linebreaking.cc
@@ -435,6 +435,15 @@ Textblock::Line *Textblock::addLine (int firstWord, int lastWord,
word->effSpace, word->origSpace, i, lineWidth);
}
+ // Until here, lineWidth refers does not include floats on the left
+ // side. To include left floats, so that maxLineWidth, and
+ // eventually the requisition, is correct, line->textOffset has to
+ // be added, which was calculated just before in calcTextOffset().
+ // The correction in sizeAllocateImpl() is irrelevant in this
+ // regard. Also, right floats are not regarded here, but in
+ // OutOfFlowMgr::getSize(),
+ lineWidth += line->textOffset;
+
if (lines->size () == 1) {
// first line
line->maxLineWidth = lineWidth;