diff options
author | James Bursa <james@netsurf-browser.org> | 2004-10-17 21:10:19 +0000 |
---|---|---|
committer | James Bursa <james@netsurf-browser.org> | 2004-10-17 21:10:19 +0000 |
commit | fd4e3de0b59841ca59aeeb1a664370d359d096b2 (patch) | |
tree | 3c174528b81e4a9189ed6aa88ef35d5238c0882b /render/html.c | |
parent | 6db5ad1b73c3a59390d4e060a3752a09ec75ec44 (diff) | |
download | netsurf-fd4e3de0b59841ca59aeeb1a664370d359d096b2.tar.gz netsurf-fd4e3de0b59841ca59aeeb1a664370d359d096b2.tar.bz2 |
[project @ 2004-10-17 21:10:19 by bursa]
Move box tree from html.layout->children to html.layout. Work on scrollbars.
svn path=/import/netsurf/; revision=1314
Diffstat (limited to 'render/html.c')
-rw-r--r-- | render/html.c | 35 |
1 files changed, 6 insertions, 29 deletions
diff --git a/render/html.c b/render/html.c index d3e359f85..abbbb92b9 100644 --- a/render/html.c +++ b/render/html.c @@ -185,7 +185,6 @@ bool html_convert(struct content *c, int width, int height) xmlDoc *document; xmlNode *html, *head; union content_msg_data msg_data; - int descendant_width; /* finish parsing */ htmlParseChunk(c->data.html.parser, "", 0, 1); @@ -252,21 +251,11 @@ bool html_convert(struct content *c, int width, int height) content_set_status(c, messages_get("Formatting")); content_broadcast(c, CONTENT_MSG_STATUS, msg_data); LOG(("Layout document")); - layout_document(c->data.html.layout->children, width, + layout_document(c->data.html.layout, width, c->data.html.box_pool); /*box_dump(c->data.html.layout->children, 0);*/ - - descendant_width = c->data.html.layout->children->descendant_x1 - - c->data.html.layout->children->descendant_x0; - - LOG(("Available width: %d, Returned Width: %d, Required width: %d", width, c->data.html.layout->children->width, descendant_width)); - - if (descendant_width > c->data.html.layout->children->width) - c->width = descendant_width; - else - c->width = c->data.html.layout->children->width; - - c->height = c->data.html.layout->children->height; + c->width = c->data.html.layout->descendant_x1; + c->height = c->data.html.layout->descendant_y1; if (c->active == 0) { c->status = CONTENT_STATUS_DONE; @@ -881,22 +870,10 @@ void html_stop(struct content *c) void html_reformat(struct content *c, int width, int height) { - int descendant_width; - - layout_document(c->data.html.layout->children, width, + layout_document(c->data.html.layout, width, c->data.html.box_pool); - - descendant_width = c->data.html.layout->children->descendant_x1 - - c->data.html.layout->children->descendant_x0; - - LOG(("Available width: %d, Returned Width: %d, Required width: %d", width, c->data.html.layout->children->width, descendant_width)); - - if (descendant_width > c->data.html.layout->children->width) - c->width = descendant_width; - else - c->width = c->data.html.layout->children->width; - - c->height = c->data.html.layout->children->height; + c->width = c->data.html.layout->descendant_x1; + c->height = c->data.html.layout->descendant_y1; } |