NetSurf
Functions
table.h File Reference

Interface to HTML table processing and layout. More...

#include <stdbool.h>
Include dependency graph for table.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

bool table_calculate_column_types (const css_unit_ctx *unit_len_ctx, struct box *table)
 Determine the column width types for a table. More...
 
void table_used_border_for_cell (const css_unit_ctx *unit_len_ctx, struct box *cell)
 Calculate used values of border-{trbl}-{style,color,width} for table cells. More...
 

Detailed Description

Interface to HTML table processing and layout.

Definition in file table.h.

Function Documentation

◆ table_calculate_column_types()

bool table_calculate_column_types ( const css_unit_ctx *  unit_len_ctx,
struct box table 
)

Determine the column width types for a table.

Parameters
unit_len_ctxLength conversion context
tablebox of type BOX_TABLE
Returns
true on success, false on memory exhaustion

The table->col array is allocated and type and width are filled in for each column.

Definition at line 813 of file table.c.

References BOX_TABLE_CELL, box::children, box::col, box::columns, box::next, NSLOG, column::positioned, box::start_column, box::style, talloc_array, column::type, box::type, type, column::width, and width.

Referenced by layout_minmax_table().

Here is the caller graph for this function:

◆ table_used_border_for_cell()

void table_used_border_for_cell ( const css_unit_ctx *  unit_len_ctx,
struct box cell 
)

Calculate used values of border-{trbl}-{style,color,width} for table cells.

Parameters
unit_len_ctxLength conversion context
cellTable cell to consider
Postcondition
cell's border array is populated

Definition at line 988 of file table.c.

References box::border, BOTTOM, BOX_TABLE_CELL, box_border::c, LEFT, RIGHT, box_border::style, box::style, table_used_bottom_border_for_cell(), table_used_left_border_for_cell(), table_used_right_border_for_cell(), table_used_top_border_for_cell(), TOP, box::type, box_border::width, and width.

Referenced by layout_table().

Here is the call graph for this function:
Here is the caller graph for this function: