summaryrefslogtreecommitdiff
path: root/render
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2012-11-11 19:13:36 +0000
committerMichael Drake <tlsa@netsurf-browser.org>2012-11-11 19:13:36 +0000
commitbd3f65b7da66c55c037c493576701a141ef85019 (patch)
treef1815be37f112f3a874febbde41965306d1dda6a /render
parentddf45cd67287e2c7f6e5597af259931cd40b90e9 (diff)
downloadnetsurf-bd3f65b7da66c55c037c493576701a141ef85019.tar.gz
netsurf-bd3f65b7da66c55c037c493576701a141ef85019.tar.bz2
Use can_reformat instead of HTML special case. Allow reflow of parent for any object that gets a reformat.
Diffstat (limited to 'render')
-rw-r--r--render/html.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/render/html.c b/render/html.c
index 56c65a5d3..f6e3fda56 100644
--- a/render/html.c
+++ b/render/html.c
@@ -1178,14 +1178,15 @@ html_object_callback(hlcache_handle *object,
break;
case CONTENT_MSG_READY:
- /* TODO: avoid knowledge of box internals here */
- content_reformat(object, false,
- box->max_width != UNKNOWN_MAX_WIDTH ?
- box->width : 0,
- box->max_width != UNKNOWN_MAX_WIDTH ?
- box->height : 0);
-
- if (content_get_type(object) == CONTENT_HTML) {
+ if (content_can_reformat(object)) {
+ /* TODO: avoid knowledge of box internals here */
+ content_reformat(object, false,
+ box->max_width != UNKNOWN_MAX_WIDTH ?
+ box->width : 0,
+ box->max_width != UNKNOWN_MAX_WIDTH ?
+ box->height : 0);
+
+ /* Adjust parent content for new object size */
html_object_done(box, object, o->background);
if (c->base.status == CONTENT_STATUS_READY ||
c->base.status == CONTENT_STATUS_DONE)