summaryrefslogtreecommitdiff
path: root/riscos/print.c
diff options
context:
space:
mode:
authorJames Bursa <james@netsurf-browser.org>2005-07-02 18:17:51 +0000
committerJames Bursa <james@netsurf-browser.org>2005-07-02 18:17:51 +0000
commit9b78daf135d7fa555990454c219649e4d54157d2 (patch)
treed5d8c1d773d0ef51afbe055dcff60607821f7a9c /riscos/print.c
parent894ba8b6230ffa57e1a5037adbd1b246a9a877da (diff)
downloadnetsurf-9b78daf135d7fa555990454c219649e4d54157d2.tar.gz
netsurf-9b78daf135d7fa555990454c219649e4d54157d2.tar.bz2
[project @ 2005-07-02 18:17:51 by bursa]
Rewrite calculation of box minimum and maximum widths to improve layout of many pages. Move calculation of column types and border collapsing to box tree normalising stage, since they are layout independent. Add window height parameter to layout and make <html> and <body> at least window height. svn path=/import/netsurf/; revision=1777
Diffstat (limited to 'riscos/print.c')
-rw-r--r--riscos/print.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/riscos/print.c b/riscos/print.c
index 94f067783..29663f259 100644
--- a/riscos/print.c
+++ b/riscos/print.c
@@ -469,7 +469,7 @@ void print_cleanup(void)
bool print_document(struct gui_window *g, const char *filename)
{
int left, right, top, bottom, width, height;
- int saved_width;
+ int saved_width, saved_height;
int yscroll = 0, sheets = print_max_sheets;
struct content *c = g->bw->current_content;
const char *error_message;
@@ -506,8 +506,9 @@ bool print_document(struct gui_window *g, const char *filename)
/* layout the document to the correct width */
saved_width = c->width;
+ saved_height = c->height;
if (c->type == CONTENT_HTML)
- layout_document(c, width);
+ layout_document(c, width, height);
/* open printer file */
error = xosfind_openoutw(osfind_NO_PATH | osfind_ERROR_IF_DIR |
@@ -645,7 +646,7 @@ bool print_document(struct gui_window *g, const char *filename)
/* restore document layout */
if (c->type == CONTENT_HTML)
- layout_document(c, saved_width);
+ layout_document(c, saved_width, saved_height);
return true;
@@ -663,7 +664,7 @@ error:
/* restore document layout */
if (c->type == CONTENT_HTML)
- layout_document(c, saved_width);
+ layout_document(c, saved_width, saved_height);
return false;
}