summaryrefslogtreecommitdiff
path: root/render/html.c
diff options
context:
space:
mode:
Diffstat (limited to 'render/html.c')
-rw-r--r--render/html.c82
1 files changed, 2 insertions, 80 deletions
diff --git a/render/html.c b/render/html.c
index 3ea0b9aa8..dce873c4f 100644
--- a/render/html.c
+++ b/render/html.c
@@ -1545,91 +1545,13 @@ void html_object_done(struct box *box, hlcache_handle *object,
* \param box box containing object which failed to load
* \param content document of type CONTENT_HTML
* \param background the object was the background image for the box
- *
- * Any fallback content for the object is made visible.
*/
void html_object_failed(struct box *box, struct content *content,
bool background)
{
- struct box *b, *ic;
-
- if (background)
- return;
- if (!box->fallback)
- return;
-
- /* make fallback boxes into children or siblings, as appropriate */
- if (box->type != BOX_INLINE) {
- /* easy case: fallbacks become children */
- assert(box->type == BOX_BLOCK ||
- box->type == BOX_TABLE_CELL ||
- box->type == BOX_INLINE_BLOCK);
- box->children = box->fallback;
- box->last = box->children;
- while (box->last->next)
- box->last = box->last->next;
- box->fallback = 0;
- box_normalise_block(box, content);
- } else {
- assert(box->parent->type == BOX_INLINE_CONTAINER);
- if (box->fallback->type == BOX_INLINE_CONTAINER &&
- !box->fallback->next) {
- /* the fallback is a single inline container: splice
- * it into this inline container */
- for (b = box->fallback->children; b; b = b->next)
- b->parent = box->parent;
- box->fallback->last->next = box->next;
- if (!box->next)
- box->parent->last = box->fallback->last;
- box->next = box->fallback->children;
- box->next->prev = box;
- box->fallback = 0;
- } else {
- if (box->next) {
- /* split this inline container into two inline
- * containers */
- ic = box_create(NULL, 0, false, 0, 0, 0, 0,
- content);
- if (!ic) {
- union content_msg_data msg_data;
-
- msg_data.error =
- messages_get("NoMemory");
- content_broadcast(content,
- CONTENT_MSG_ERROR,
- msg_data);
- return;
- }
- ic->type = BOX_INLINE_CONTAINER;
- box_insert_sibling(box->parent, ic);
- ic->children = box->next;
- ic->last = box->parent->last;
- ic->children->prev = 0;
- box->next = 0;
- box->parent->last = box;
- for (b = ic->children; b; b = b->next)
- b->parent = ic;
- }
- /* insert the fallback after the parent */
- for (b = box->fallback; b->next; b = b->next)
- b->parent = box->parent->parent;
- b->parent = box->parent->parent;
- /* [b is the last fallback box] */
- b->next = box->parent->next;
- if (b->next)
- b->next->prev = b;
- box->parent->next = box->fallback;
- box->fallback->prev = box->parent;
- box->fallback = 0;
- box_normalise_block(box->parent->parent, content);
- }
- }
-
- /* invalidate parent min, max widths */
- for (b = box->parent; b; b = b->parent)
- b->max_width = UNKNOWN_MAX_WIDTH;
- box->width = UNKNOWN_WIDTH;
+ /* Nothing to do */
+ return;
}