From b22fd60a536fcab26332de2bee21b40b024eb26a Mon Sep 17 00:00:00 2001 From: Sebastian Geerken Date: Sat, 3 Jan 2015 21:24:29 +0100 Subject: Size of inline-blocks with left floats is now calculated correctly. --- dw/textblock_linebreaking.cc | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'dw/textblock_linebreaking.cc') 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; -- cgit v1.2.3