aboutsummaryrefslogtreecommitdiff
path: root/dw/textblock.cc
diff options
context:
space:
mode:
authorSebastian Geerken <devnull@localhost>2016-07-24 15:21:01 +0200
committerSebastian Geerken <devnull@localhost>2016-07-24 15:21:01 +0200
commitf3a56bdc779b035b7adc37a2b61a3b3fbea9718d (patch)
tree936d81dfecf21cac99cc3129806b5e4a130990a2 /dw/textblock.cc
parent57fae805f2a9ee9f161dde38141f3682bd5eb847 (diff)
Fix update problem related to CSS 'clear'.
Diffstat (limited to 'dw/textblock.cc')
-rw-r--r--dw/textblock.cc11
1 files changed, 10 insertions, 1 deletions
diff --git a/dw/textblock.cc b/dw/textblock.cc
index 88175665..c468c879 100644
--- a/dw/textblock.cc
+++ b/dw/textblock.cc
@@ -3044,8 +3044,17 @@ void Textblock::queueDrawRange (int index1, int index2)
void Textblock::updateReference (int ref)
{
- if (words->size () > 0)
+ DBG_OBJ_ENTER ("resize", 0, "updateReference", "%d", ref);
+
+ // This method can be optimized: nothing must be done when (i) there are no
+ // words, *and* (ii) there is no float clearance. If the second is not the
+ // case, `queueResize` must still be called, since `extraSpace.top` may be
+ // changed.
+
+ if (!(words->size () == 0 && getStyle()->clear == core::style::CLEAR_NONE))
queueResize (ref, false);
+
+ DBG_OBJ_LEAVE ();
}
void Textblock::widgetRefSizeChanged (int externalIndex)