diff options
author | Sebastian Geerken <devnull@localhost> | 2014-05-11 18:25:46 +0200 |
---|---|---|
committer | Sebastian Geerken <devnull@localhost> | 2014-05-11 18:25:46 +0200 |
commit | 0cc3e10a1503b2ad2fdd44bbb9459f2f1be81c6c (patch) | |
tree | 01a3ac3fc91f8f0f9797b1fdb904b278a5e79eef | |
parent | 8268d0faa03771bbbfaa5796a5b17d49f9a98dd5 (diff) |
Correct recalculation of textblock floats with "auto" width.
-rw-r--r-- | dw/outofflowmgr.cc | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/dw/outofflowmgr.cc b/dw/outofflowmgr.cc index b9abebf2..222b4b42 100644 --- a/dw/outofflowmgr.cc +++ b/dw/outofflowmgr.cc @@ -2028,11 +2028,14 @@ int OutOfFlowMgr::getClearPosition (Textblock *tb, Side side) void OutOfFlowMgr::ensureFloatSize (Float *vloat) { if (vloat->dirty || - // If the size of the containing block has changed (represented - // currently by the available width), a recalculation of a - // relative float width may also be necessary. - (isPerLength (vloat->getWidget()->getStyle()->width) && - vloat->cbAvailWidth != containingBlock->getAvailWidth ())) { + vloat->cbAvailWidth != containingBlock->getAvailWidth () && + (// If the size of the containing block has changed (represented + // currently by the available width), a recalculation of a relative + // float width may also be necessary. + isPerLength (vloat->getWidget()->getStyle()->width) || + // Similar for "auto" widths of textblocks etc. + (vloat->getWidget()->usesHints () && + vloat->getWidget()->getStyle()->width == LENGTH_AUTO))) { DBG_OBJ_MSGF ("resize.oofm", 0, "<b>ensureFloatSize</b> (%p): recalculation", vloat->getWidget ()); |