NetSurf
|
HTML content handler CSS interface. More...
Go to the source code of this file.
Functions | |
nserror | html_css_init (void) |
Initialise html content css handling. More... | |
void | html_css_fini (void) |
Finalise html content css handling. More... | |
nserror | html_css_new_selection_context (struct html_content *c, css_select_ctx **select_ctx) |
create a new css selection context for an html content. More... | |
nserror | html_css_new_stylesheets (struct html_content *c) |
Initialise core stylesheets for a content. More... | |
nserror | html_css_quirks_stylesheets (struct html_content *c) |
Initialise quirk stylesheets for a content. More... | |
nserror | html_css_free_stylesheets (struct html_content *html) |
Free all css stylesheets associated with an HTML content. More... | |
bool | html_css_saw_insecure_stylesheets (struct html_content *htmlc) |
determine if any of the stylesheets were loaded insecurely More... | |
bool | html_css_process_link (struct html_content *htmlc, dom_node *node) |
process a css stylesheet dom LINK node More... | |
bool | html_css_process_style (struct html_content *htmlc, dom_node *node) |
process a css style dom node More... | |
bool | html_css_update_style (struct html_content *htmlc, dom_node *node) |
process a css style dom node update More... | |
HTML content handler CSS interface.
Definition in file css.h.
void html_css_fini | ( | void | ) |
Finalise html content css handling.
Definition at line 747 of file css.c.
References html_adblock_stylesheet_url, html_default_stylesheet_url, html_quirks_stylesheet_url, html_user_stylesheet_url, and nsurl_unref().
Referenced by html_fini().
nserror html_css_free_stylesheets | ( | struct html_content * | html | ) |
Free all css stylesheets associated with an HTML content.
html | The HTML content to free stylesheets from. |
Definition at line 531 of file css.c.
References guit, hlcache_handle_release(), html_css_process_modified_styles(), netsurf_table::misc, html_stylesheet::node, NSERROR_OK, gui_misc_table::schedule, html_stylesheet::sheet, html_content::stylesheet_count, and html_content::stylesheets.
Referenced by html_destroy().
nserror html_css_init | ( | void | ) |
Initialise html content css handling.
Definition at line 716 of file css.c.
References html_adblock_stylesheet_url, html_css_fetcher_register(), html_default_stylesheet_url, html_quirks_stylesheet_url, html_user_stylesheet_url, NSERROR_OK, and nsurl_create().
Referenced by html_init().
nserror html_css_new_selection_context | ( | struct html_content * | c, |
css_select_ctx ** | select_ctx | ||
) |
create a new css selection context for an html content.
c | The html content to create css selction on. |
select_ctx | A pointer to receive the new context. |
Definition at line 653 of file css.c.
References css_error_to_nserror(), nscss_get_stylesheet(), NSERROR_CSS_BASE, NSERROR_OK, html_stylesheet::sheet, STYLESHEET_BASE, html_content::stylesheet_count, STYLESHEET_START, STYLESHEET_USER, html_content::stylesheets, and html_stylesheet::unused.
Referenced by html_finish_conversion().
nserror html_css_new_stylesheets | ( | struct html_content * | c | ) |
Initialise core stylesheets for a content.
c | content structure to update |
Definition at line 581 of file css.c.
References content::active, html_content::base, hlcache_child_context::charset, CONTENT_CSS, content_get_url(), html_content::encoding, hlcache_handle_retrieve(), html_adblock_stylesheet_url, html_convert_css_callback(), html_default_stylesheet_url, html_user_stylesheet_url, NSERROR_NOMEM, NSERROR_OK, NSLOG, nsoption_bool, content::quirks, hlcache_child_context::quirks, html_stylesheet::sheet, STYLESHEET_ADBLOCK, STYLESHEET_BASE, html_content::stylesheet_count, STYLESHEET_QUIRKS, STYLESHEET_START, STYLESHEET_USER, and html_content::stylesheets.
Referenced by html_create().
bool html_css_process_link | ( | struct html_content * | htmlc, |
dom_node * | node | ||
) |
process a css stylesheet dom LINK node
htmlc | The HTML content. |
node | the DOM link node to process. |
Definition at line 385 of file css.c.
References content::active, html_content::base, html_content::base_url, hlcache_child_context::charset, content_broadcast_error(), CONTENT_CSS, content_get_url(), html_content::encoding, hlcache_handle_retrieve(), html_convert_css_callback(), html_stylesheet::modified, html_stylesheet::node, NSERROR_NOMEM, NSERROR_OK, NSLOG, nsoption_bool, nsurl_access(), nsurl_join(), nsurl_unref(), content::quirks, hlcache_child_context::quirks, html_stylesheet::sheet, strcasestr(), html_content::stylesheet_count, html_content::stylesheets, and html_stylesheet::unused.
Referenced by html_process_inserted_link().
bool html_css_process_style | ( | struct html_content * | htmlc, |
dom_node * | node | ||
) |
process a css style dom node
htmlc | The HTML content. |
node | the DOM node to process. |
Definition at line 352 of file css.c.
References html_stylesheet::node, strcasestr(), html_content::stylesheet_count, html_content::stylesheets, and html_stylesheet::unused.
Referenced by dom_default_action_DOMNodeInserted_cb().
nserror html_css_quirks_stylesheets | ( | struct html_content * | c | ) |
Initialise quirk stylesheets for a content.
c | content structure to update |
Definition at line 552 of file css.c.
References content::active, html_content::base, hlcache_child_context::charset, CONTENT_CSS, content_get_url(), html_content::encoding, hlcache_handle_retrieve(), html_convert_css_callback(), html_quirks_stylesheet_url, NSERROR_OK, NSLOG, content::quirks, html_content::quirks, hlcache_child_context::quirks, html_stylesheet::sheet, STYLESHEET_QUIRKS, and html_content::stylesheets.
Referenced by html_convert().
bool html_css_saw_insecure_stylesheets | ( | struct html_content * | htmlc | ) |
determine if any of the stylesheets were loaded insecurely
htmlc | The HTML content to check. |
Definition at line 512 of file css.c.
References content_saw_insecure_objects(), html_stylesheet::sheet, and html_content::stylesheets.
Referenced by html_saw_insecure_objects().
bool html_css_update_style | ( | struct html_content * | htmlc, |
dom_node * | node | ||
) |
process a css style dom node update
htmlc | The HTML content. |
node | the DOM node to process. |
Definition at line 323 of file css.c.
References guit, html_create_style_element(), html_css_process_modified_styles(), netsurf_table::misc, html_stylesheet::modified, html_stylesheet::node, NSLOG, gui_misc_table::schedule, html_content::stylesheet_count, and html_content::stylesheets.
Referenced by dom_default_action_DOMSubtreeModified_cb().