diff options
author | Sebastian Geerken <devnull@localhost> | 2014-04-29 23:17:05 +0200 |
---|---|---|
committer | Sebastian Geerken <devnull@localhost> | 2014-04-29 23:17:05 +0200 |
commit | 2dfbb50f1dd4062531eaba7611822599e37bb441 (patch) | |
tree | efc5ed8ea8fa1a17630ff92f088e99fbc9dd7302 /dw/outofflowmgr.cc | |
parent | 97c77e536cb878ee4752d7017f26af04e8be74a2 (diff) |
Consider CSS "width" for extremes of floats. (Also, this fixes another CPU hogging bug.)
Diffstat (limited to 'dw/outofflowmgr.cc')
-rw-r--r-- | dw/outofflowmgr.cc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/dw/outofflowmgr.cc b/dw/outofflowmgr.cc index 954da505..dd462caf 100644 --- a/dw/outofflowmgr.cc +++ b/dw/outofflowmgr.cc @@ -1696,6 +1696,18 @@ void OutOfFlowMgr::getFloatsExtremes (Extremes *cbExtr, Side side, vloat->getWidget (), vloat->generatingBlock, extr.minWidth, extr.maxWidth); + if (isAbsLength (vloat->getWidget()->getStyle()->width)) { + int width = absLengthVal (vloat->getWidget()->getStyle()->width); + if (extr.minWidth < width) + extr.minWidth = width; + if (extr.maxWidth > width) + extr.maxWidth = width; + + DBG_OBJ_MSGF ("resize.oofm", 1, + "corrected by absolute width %d: %d / %d", + width, extr.minWidth, extr.maxWidth); + } + // TODO: Or zero (instead of rightDiff) for right floats? *minWidth = max (*minWidth, |