summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFran├žois Revel <mmu_man@netsurf-browser.org>2008-08-15 03:32:01 +0000
committerFran├žois Revel <mmu_man@netsurf-browser.org>2008-08-15 03:32:01 +0000
commit4e9dc3fe657c4826350451e1fbe50ad0d187cc90 (patch)
tree5557fa4119a7fd6921924af85b638d8bb8220699
parente063a2a59d698dd96123b68a44b09f0623f80cab (diff)
downloadnetsurf-4e9dc3fe657c4826350451e1fbe50ad0d187cc90.tar.gz
netsurf-4e9dc3fe657c4826350451e1fbe50ad0d187cc90.tar.bz2
#ifdef WITH_PDF_EXPORT for printing stuff, this should fix the BeOS build, and possibly AmigaOS.
svn path=/trunk/netsurf/; revision=5119
-rw-r--r--render/html_redraw.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/render/html_redraw.c b/render/html_redraw.c
index d76f0d9bd..e4dce8183 100644
--- a/render/html_redraw.c
+++ b/render/html_redraw.c
@@ -175,8 +175,10 @@ bool html_redraw_box(struct box *box,
int x_scrolled, y_scrolled;
struct box *bg_box = NULL;
+#ifdef WITH_PDF_EXPORT
if (html_redraw_printing && box->printed)
return true;
+#endif
/* avoid trivial FP maths */
if (scale == 1.0) {
@@ -231,6 +233,7 @@ bool html_redraw_box(struct box *box,
if (clip_y1 < y0 || y1 < clip_y0 || clip_x1 < x0 || x1 < clip_x0)
return true;
+#ifdef WITH_PDF_EXPORT
/*if the rectangle is under the page bottom but it can fit in a page,
don't print it now*/
if (html_redraw_printing)
@@ -247,6 +250,7 @@ bool html_redraw_box(struct box *box,
}
}
else box->printed = true;/*it won't be printed anymore*/
+#endif
/* if visibility is hidden render children only */
if (box->style && box->style->visibility == CSS_VISIBILITY_HIDDEN) {
@@ -318,8 +322,12 @@ bool html_redraw_box(struct box *box,
* + For any other box, just use its own styling.
*/
+#ifdef WITH_PDF_EXPORT
if (!html_redraw_printing ||
(html_redraw_printing && !option_remove_backgrounds)) {
+#else
+ {
+#endif
if (!box->parent) {
/* Root box */
if (box->style &&
@@ -1444,9 +1452,11 @@ bool html_redraw_text_decoration(struct box *box,
unsigned int i;
/* antialias colour for under/overline */
+#ifdef WITH_PDF_EXPORT
if (html_redraw_printing)
colour = box->style->color;
else
+#endif
colour = html_redraw_aa(background_colour, box->style->color);
if (box->type == BOX_INLINE) {