diff options
author | Sebastian Geerken <devnull@localhost> | 2014-05-25 12:15:57 +0200 |
---|---|---|
committer | Sebastian Geerken <devnull@localhost> | 2014-05-25 12:15:57 +0200 |
commit | 91330da45aa97bae532cbca20b4cca17ad8aa8d5 (patch) | |
tree | 1520b949033b1358c43abc834ef6e0185b729c49 /dw/outofflowmgr.cc | |
parent | 2d684951c07fb5580f88a83b99f0d9b96699dd2d (diff) |
Worked around a problem with inconsistent extremes.
Diffstat (limited to 'dw/outofflowmgr.cc')
-rw-r--r-- | dw/outofflowmgr.cc | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/dw/outofflowmgr.cc b/dw/outofflowmgr.cc index afc9220a..bbfe42e0 100644 --- a/dw/outofflowmgr.cc +++ b/dw/outofflowmgr.cc @@ -2202,12 +2202,7 @@ int OutOfFlowMgr::adjustFloatWidth (int width, Extremes *extremes) containingBlock->getAvailWidth()); DBG_OBJ_MSG_START (); - // Consider the available width of the containing block (when set): - if (width > containingBlock->getAvailWidth()) { - width = containingBlock->getAvailWidth(); - DBG_OBJ_MSGF ("resize.oofm", 1, "adjusted to availWidth: %d", width); - } - // Finally, consider extremes (as described above). + // Consider extremes (as described above). if (width < extremes->minWidth) { width = extremes->minWidth; DBG_OBJ_MSGF ("resize.oofm", 1, "adjusted to minWidth: %d", width); @@ -2216,6 +2211,15 @@ int OutOfFlowMgr::adjustFloatWidth (int width, Extremes *extremes) width = extremes->maxWidth; DBG_OBJ_MSGF ("resize.oofm", 1, "adjusted to maxWidth: %d", width); } + // Finally, consider the available width of the containing + // block. Order is important: to prevent problems, the available + // width of the float must never be larger than the one of the + // containing block. (Somewhat hackish, will be solved cleaner with + // GROWS.) + if (width > containingBlock->getAvailWidth()) { + width = containingBlock->getAvailWidth(); + DBG_OBJ_MSGF ("resize.oofm", 1, "adjusted to CB::availWidth: %d", width); + } DBG_OBJ_MSGF ("resize.oofm", 1, "=> %d", width); DBG_OBJ_MSG_END (); |