summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--render/box.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/render/box.c b/render/box.c
index e13282e9b..307df5848 100644
--- a/render/box.c
+++ b/render/box.c
@@ -1264,6 +1264,16 @@ void box_normalise_inline_container(struct box *cont)
default:
assert(0);
}
+ if (child->children == 0) {
+ /* the child has destroyed itself: remove float */
+ if (child->prev == 0)
+ child->parent->children = child->next;
+ else
+ child->prev->next = child->next;
+ if (child->next != 0)
+ child->next->prev = child->prev;
+ box_free_box(child);
+ }
break;
case BOX_BLOCK:
case BOX_INLINE_CONTAINER: