mirror of
https://github.com/netsurf-browser/netsurf
synced 2025-01-05 10:34:23 +03:00
Move printed to box flags.
svn path=/trunk/netsurf/; revision=11888
This commit is contained in:
parent
77f67bccb6
commit
3707be6292
@ -157,7 +157,6 @@ struct box * box_create(css_select_results *styles, css_computed_style *style,
|
|||||||
box->columns = 1;
|
box->columns = 1;
|
||||||
box->rows = 1;
|
box->rows = 1;
|
||||||
box->start_column = 0;
|
box->start_column = 0;
|
||||||
box->printed = false;
|
|
||||||
box->next = NULL;
|
box->next = NULL;
|
||||||
box->prev = NULL;
|
box->prev = NULL;
|
||||||
box->children = NULL;
|
box->children = NULL;
|
||||||
|
@ -119,7 +119,8 @@ typedef enum {
|
|||||||
/** Type of a struct box. */
|
/** Type of a struct box. */
|
||||||
typedef enum {
|
typedef enum {
|
||||||
NEW_LINE = 1 << 0, /* first inline on a new line */
|
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;
|
} box_flags;
|
||||||
|
|
||||||
/* Sides of a box */
|
/* Sides of a box */
|
||||||
@ -217,8 +218,6 @@ struct box {
|
|||||||
unsigned int rows; /**< Number of rows for TABLE only. */
|
unsigned int rows; /**< Number of rows for TABLE only. */
|
||||||
unsigned int start_column; /**< Start column for TABLE_CELL 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 *next; /**< Next sibling box, or 0. */
|
||||||
struct box *prev; /**< Previous sibling box, or 0. */
|
struct box *prev; /**< Previous sibling box, or 0. */
|
||||||
struct box *children; /**< First child box, or 0. */
|
struct box *children; /**< First child box, or 0. */
|
||||||
|
@ -267,7 +267,7 @@ bool html_redraw_box(struct box *box, int x_parent, int y_parent,
|
|||||||
struct box *bg_box = NULL;
|
struct box *bg_box = NULL;
|
||||||
bool has_x_scroll, has_y_scroll;
|
bool has_x_scroll, has_y_scroll;
|
||||||
|
|
||||||
if (html_redraw_printing && box->printed)
|
if (html_redraw_printing && (box->flags & PRINTED))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
/* avoid trivial FP maths */
|
/* avoid trivial FP maths */
|
||||||
@ -377,7 +377,7 @@ bool html_redraw_box(struct box *box, int x_parent, int y_parent,
|
|||||||
return true;
|
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 */
|
/* if visibility is hidden render children only */
|
||||||
|
Loading…
Reference in New Issue
Block a user