NetSurf
|
#include <stdint.h>
#include <dom/dom.h>
#include <libcss/libcss.h>
Go to the source code of this file.
Data Structures | |
struct | nscss_select_ctx |
Selection context. More... | |
Typedefs | |
typedef struct nscss_select_ctx | nscss_select_ctx |
Selection context. More... | |
Functions | |
css_stylesheet * | nscss_create_inline_style (const uint8_t *data, size_t len, const char *charset, const char *url, bool allow_quirks) |
Create an inline style. More... | |
css_select_results * | nscss_get_style (nscss_select_ctx *ctx, dom_node *n, const css_media *media, const css_unit_ctx *unit_len_ctx, const css_stylesheet *inline_style) |
Get style selection results for an element. More... | |
css_computed_style * | nscss_get_blank_style (nscss_select_ctx *ctx, const css_unit_ctx *unit_len_ctx, const css_computed_style *parent) |
Get a blank style. More... | |
css_error | named_ancestor_node (void *pw, void *node, const css_qname *qname, void **ancestor) |
Callback to find a named ancestor node. More... | |
css_error | node_is_visited (void *pw, void *node, bool *match) |
Callback to determine if a node is a linking element whose target has been visited. More... | |
typedef struct nscss_select_ctx nscss_select_ctx |
Selection context.
css_error named_ancestor_node | ( | void * | pw, |
void * | node, | ||
const css_qname * | qname, | ||
void ** | ancestor | ||
) |
Callback to find a named ancestor node.
pw | HTML document |
node | DOM node |
qname | Node name to search for |
ancestor | Pointer to location to receive ancestor |
Definition at line 471 of file select.c.
Referenced by css_hint_anchor_color(), and css_hint_table_cell_border_padding().
css_error node_is_visited | ( | void * | pw, |
void * | node, | ||
bool * | match | ||
) |
Callback to determine if a node is a linking element whose target has been visited.
pw | HTML document |
node | DOM node |
match | Pointer to location to receive result |
Definition at line 1471 of file select.c.
References nscss_select_ctx::base_url, NSERROR_OK, nsurl_join(), nsurl_unref(), urldb_get_url_data(), and url_data::visits.
Referenced by css_hint_anchor_color().
css_stylesheet * nscss_create_inline_style | ( | const uint8_t * | data, |
size_t | len, | ||
const char * | charset, | ||
const char * | url, | ||
bool | allow_quirks | ||
) |
Create an inline style.
data | Source data |
len | Length of data in bytes |
charset | Charset of data, or NULL if unknown |
url | Base URL of document containing data |
allow_quirks | True to permit CSS parsing quirks |
Definition at line 148 of file select.c.
References ns_system_colour(), nscss_resolve_url(), and NSLOG.
Referenced by box_get_style().
css_computed_style * nscss_get_blank_style | ( | nscss_select_ctx * | ctx, |
const css_unit_ctx * | unit_len_ctx, | ||
const css_computed_style * | parent | ||
) |
Get a blank style.
ctx | CSS selection context |
unit_unit_len_ctx | Unit length conversion context |
parent | Parent style to cascade inherited properties from |
Definition at line 334 of file select.c.
References nscss_select_ctx::ctx, parent, and selection_handler.
Referenced by box_normalise_block(), box_normalise_flex(), box_normalise_table(), box_normalise_table_row(), box_normalise_table_row_group(), and box_normalise_table_spans().
css_select_results * nscss_get_style | ( | nscss_select_ctx * | ctx, |
dom_node * | n, | ||
const css_media * | media, | ||
const css_unit_ctx * | unit_len_ctx, | ||
const css_stylesheet * | inline_style | ||
) |
Get style selection results for an element.
ctx | CSS selection context |
n | Element to select for |
media | Permitted media types |
unit_unit_len_ctx | Unit length conversion context |
inline_style | Inline style associated with element, or NULL |
Definition at line 253 of file select.c.
References nscss_select_ctx::ctx, nscss_select_ctx::parent_style, and selection_handler.
Referenced by box_get_style().