summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2011-03-02 18:41:17 +0000
committerMichael Drake <tlsa@netsurf-browser.org>2011-03-02 18:41:17 +0000
commit3707be6292e5d8c93b121a698f67bb679ff8fba4 (patch)
tree74c63354a8746592f6b0498adc380a0b1e054037
parent77f67bccb666876fbeb0081550e0245de7ad411b (diff)
downloadnetsurf-3707be6292e5d8c93b121a698f67bb679ff8fba4.tar.gz
netsurf-3707be6292e5d8c93b121a698f67bb679ff8fba4.tar.bz2
Move printed to box flags.
svn path=/trunk/netsurf/; revision=11888
-rw-r--r--render/box.c1
-rw-r--r--render/box.h5
-rw-r--r--render/html_redraw.c4
3 files changed, 4 insertions, 6 deletions
diff --git a/render/box.c b/render/box.c
index 91999b8ac..dc745f6be 100644
--- a/render/box.c
+++ b/render/box.c
@@ -157,7 +157,6 @@ struct box * box_create(css_select_results *styles, css_computed_style *style,
box->columns = 1;
box->rows = 1;
box->start_column = 0;
- box->printed = false;
box->next = NULL;
box->prev = NULL;
box->children = NULL;
diff --git a/render/box.h b/render/box.h
index a24047001..3d00db98e 100644
--- a/render/box.h
+++ b/render/box.h
@@ -119,7 +119,8 @@ typedef enum {
/** Type of a struct box. */
typedef enum {
NEW_LINE = 1 << 0, /* first inline on a new line */
- STYLE_OWNED = 1 << 1 /* style is owned by this box */
+ STYLE_OWNED = 1 << 1, /* style is owned by this box */
+ PRINTED = 1 << 2 /* box has already been printed */
} box_flags;
/* Sides of a box */
@@ -217,8 +218,6 @@ struct box {
unsigned int rows; /**< Number of rows for TABLE only. */
unsigned int start_column; /**< Start column for TABLE_CELL only. */
- bool printed; /** Whether this box has already been printed*/
-
struct box *next; /**< Next sibling box, or 0. */
struct box *prev; /**< Previous sibling box, or 0. */
struct box *children; /**< First child box, or 0. */
diff --git a/render/html_redraw.c b/render/html_redraw.c
index c69b24610..e56035f38 100644
--- a/render/html_redraw.c
+++ b/render/html_redraw.c
@@ -267,7 +267,7 @@ bool html_redraw_box(struct box *box, int x_parent, int y_parent,
struct box *bg_box = NULL;
bool has_x_scroll, has_y_scroll;
- if (html_redraw_printing && box->printed)
+ if (html_redraw_printing && (box->flags & PRINTED))
return true;
/* avoid trivial FP maths */
@@ -377,7 +377,7 @@ bool html_redraw_box(struct box *box, int x_parent, int y_parent,
return true;
}
}
- else box->printed = true;/*it won't be printed anymore*/
+ else box->flags |= PRINTED; /*it won't be printed anymore*/
}
/* if visibility is hidden render children only */