54 css_computed_style_destroy(b->
style);
59 css_select_results_destroy(b->
styles);
67 lwc_string_unref(b->
id);
70 if (b->
node != NULL) {
71 dom_node_unref(b->
node);
93 css_computed_style *
style,
121 for (i = 0; i != 4; i++)
168 if (
parent->children != 0) {
169 parent->last->next = child;
260 int visible_width, visible_height;
261 int full_width, full_height;
278 if (!bottom && !right) {
341 visible_width, full_width);
345 if (right && bottom) {
#define UNKNOWN_MAX_WIDTH
void box_insert_sibling(struct box *box, struct box *new_box)
Insert a new box as a sibling to a box in a tree.
void box_unlink_and_free(struct box *box)
Unlink a box from the box tree and then free it recursively.
void box_free_box(struct box *box)
Free the data in a single box structure.
struct box * box_create(css_select_results *styles, css_computed_style *style, bool style_owned, nsurl *href, const char *target, const char *title, lwc_string *id, void *context)
Create a box tree node.
static int box_talloc_destructor(struct box *b)
Destructor for box nodes which own styles.
nserror box_handle_scrollbars(struct content *c, struct box *box, bool bottom, bool right)
Applies the given scroll setup to a box.
void box_free(struct box *box)
Free a box tree recursively.
void box_add_child(struct box *parent, struct box *child)
Add a child to a box tree node.
Box tree manipulation interface.
nserror
Enumeration of error codes.
@ NSERROR_NOMEM
Memory exhaustion.
Core mouse and pointer states.
void html_overflow_scroll_callback(void *client_data, struct scrollbar_msg_data *scrollbar_data)
Callback for in-page scrollbars.
HTML content user interaction handling.
NetSurf URL handling (interface).
void nsurl_unref(nsurl *url)
Drop a reference to a NetSurf URL object.
nsurl * nsurl_ref(nsurl *url)
Increment the reference count to a NetSurf URL object.
struct nsurl nsurl
NetSurf URL object.
Private data for text/html content.
int width
border-width (pixels)
int descendant_y1
bottom edge of descendants
struct box_border border[4]
Border: TOP, RIGHT, BOTTOM, LEFT.
int list_value
List item value.
int min_width
Width of box taking all line breaks (including margins etc).
int width
Width of content box (excluding padding etc.).
struct box * parent
Parent box, or NULL.
struct scrollbar * scroll_x
Horizontal scroll.
lwc_string * id
value of id attribute (or name for anchors)
size_t byte_offset
Byte offset within a textual representation of this content.
struct column * col
Array of table column data for TABLE only.
const char * title
Title, or NULL.
struct box * inline_end
INLINE_END box corresponding to this INLINE box, or INLINE box corresponding to this INLINE_END box.
struct box * children
First child box, or NULL.
int height
Height of content box (excluding padding etc.).
struct hlcache_handle * background
Background image for this box, or NULL if none.
struct box * float_container
If box is a float, points to box's containing block.
struct box * prev
Previous sibling box, or NULL.
struct box * list_marker
List marker box if this is a list-item, or NULL.
int margin[4]
Margin: TOP, RIGHT, BOTTOM, LEFT.
char * usemap
(Image)map to use with this object, or NULL if none
int max_width
Width that would be taken with no line breaks.
const char * target
Link target, or NULL.
struct box * next_float
Next sibling float box.
css_select_results * styles
Computed styles for elements and their pseudo elements.
struct box * last
Last child box, or NULL.
struct box * next
Next sibling box, or NULL.
int descendant_x0
left edge of descendants
struct scrollbar * scroll_y
Vertical scroll.
unsigned int start_column
Start column for TABLE_CELL only.
box_type type
Type of box.
struct nsurl * href
Link, or NULL.
struct box * float_children
First float child box, or NULL.
int descendant_x1
right edge of descendants
struct browser_window * iframe
Iframe's browser_window, or NULL if none.
css_computed_style * style
Style for this box.
size_t length
Length of text.
struct object_params * object_params
Parameters for the object, or NULL.
struct hlcache_handle * object
Object in this box (usually an image), or NULL if none.
char * text
Text, or NULL if none.
int padding[4]
Padding: TOP, RIGHT, BOTTOM, LEFT.
int x
Coordinate of left padding edge relative to parent box, or relative to ancestor that contains this bo...
box_flags flags
Box flags.
int space
Width of space after current text (depends on font and size).
int cached_place_below_level
Level below which floats have been placed.
struct form_control * gadget
Form control data, or NULL if not a form control.
int descendant_y0
top edge of descendants
unsigned int rows
Number of rows for TABLE only.
struct dom_node * node
DOM node that generated this box or NULL.
unsigned int columns
Number of columns for TABLE / TABLE_CELL.
int y
Coordinate of top padding edge, relative as for x.
Content which corresponds to a single URL.
int talloc_free(void *ptr)
#define talloc_set_destructor(ptr, function)
#define talloc(ctx, type)