NetSurf
Data Structures | Typedefs | Enumerations | Functions | Variables
html_internal.h File Reference

Private data for text/html content. More...

#include <libcss/libcss.h>
#include <dom/bindings/hubbub/parser.h>
#include "netsurf/types.h"
#include "content/content_protected.h"
#include "desktop/selection.h"
Include dependency graph for html_internal.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

union  html_drag_owner
 For drags we don't own. More...
 
union  html_selection_owner
 For getting at selections in this content or things in this content. More...
 
union  html_focus_owner
 For directing input. More...
 
struct  html_content
 Data specific to CONTENT_HTML. More...
 

Typedefs

typedef struct html_content html_content
 Data specific to CONTENT_HTML. More...
 

Enumerations

enum  html_drag_type {
  HTML_DRAG_NONE, HTML_DRAG_SELECTION, HTML_DRAG_SCROLLBAR, HTML_DRAG_TEXTAREA_SELECTION,
  HTML_DRAG_TEXTAREA_SCROLLBAR, HTML_DRAG_CONTENT_SELECTION, HTML_DRAG_CONTENT_SCROLL
}
 
enum  html_selection_type { HTML_SELECTION_NONE, HTML_SELECTION_TEXTAREA, HTML_SELECTION_SELF, HTML_SELECTION_CONTENT }
 
enum  html_focus_type { HTML_FOCUS_SELF, HTML_FOCUS_CONTENT, HTML_FOCUS_TEXTAREA }
 

Functions

void html__redraw_a_box (html_content *html, struct box *box)
 Redraw a box. More...
 
void html_set_drag_type (html_content *html, html_drag_type drag_type, union html_drag_owner drag_owner, const struct rect *rect)
 Set our drag status, and inform whatever owns the content. More...
 
void html_set_selection (html_content *html, html_selection_type selection_type, union html_selection_owner selection_owner, bool read_only)
 Set our selection status, and inform whatever owns the content. More...
 
void html_set_focus (html_content *html, html_focus_type focus_type, union html_focus_owner focus_owner, bool hide_caret, int x, int y, int height, const struct rect *clip)
 Set our input focus, and inform whatever owns the content. More...
 
struct browser_windowhtml_get_browser_window (struct content *c)
 Get the browser window containing an HTML content. More...
 
void html_finish_conversion (html_content *htmlc)
 Complete conversion of an HTML document. More...
 
bool html_can_begin_conversion (html_content *htmlc)
 Test if an HTML content conversion can begin. More...
 
bool html_begin_conversion (html_content *htmlc)
 Begin conversion of an HTML document. More...
 
bool html_redraw (struct content *c, struct content_redraw_data *data, const struct rect *clip, const struct redraw_context *ctx)
 Draw a CONTENT_HTML using the current set of plotters (plot). More...
 
bool html_redraw_borders (struct box *box, int x_parent, int y_parent, int p_width, int p_height, const struct rect *clip, float scale, const struct redraw_context *ctx)
 Draw borders for a box. More...
 
bool html_redraw_inline_borders (struct box *box, struct rect b, const struct rect *clip, float scale, bool first, bool last, const struct redraw_context *ctx)
 Draw an inline's borders. More...
 
dom_hubbub_error html_process_script (void *ctx, dom_node *node)
 process script node parser callback More...
 
bool html_exec (struct content *c, const char *src, size_t srclen)
 
nserror html_script_exec (html_content *htmlc, bool allow_defer)
 Attempt script execution for defer and async scripts. More...
 
nserror html_script_free (html_content *htmlc)
 Free all script resources and references for a html content. More...
 
bool html_saw_insecure_scripts (html_content *htmlc)
 Check if any of the scripts loaded were insecure. More...
 
struct formhtml_forms_get_forms (const char *docenc, dom_html_document *doc)
 
struct form_controlhtml_forms_get_control_for_node (struct form *forms, dom_node *node)
 
nserror html_css_init (void)
 
void html_css_fini (void)
 
nserror html_css_new_stylesheets (html_content *c)
 Initialise core stylesheets for a content. More...
 
nserror html_css_quirks_stylesheets (html_content *c)
 
nserror html_css_free_stylesheets (html_content *html)
 
bool html_saw_insecure_stylesheets (html_content *html)
 Return if any of the stylesheets were loaded insecurely. More...
 
bool html_css_process_link (html_content *htmlc, dom_node *node)
 
bool html_css_process_style (html_content *htmlc, dom_node *node)
 
bool html_css_update_style (html_content *c, dom_node *style)
 
nserror html_css_new_selection_context (html_content *c, css_select_ctx **ret_select_ctx)
 
nserror html_css_fetcher_register (void)
 Register the fetcher for the pseudo x-ns-css scheme. More...
 
nserror html_css_fetcher_add_item (dom_string *data, nsurl *base_url, uint32_t *key)
 
nserror html_proceed_to_done (html_content *html)
 Complete the HTML content state machine iff all scripts are finished. More...
 
bool fire_generic_dom_event (dom_string *type, dom_node *target, bool bubbles, bool cancelable)
 Construct an event and fire it at the DOM. More...
 
bool fire_dom_keyboard_event (dom_string *type, dom_node *target, bool bubbles, bool cancelable, uint32_t key)
 Construct a keyboard event and fire it at the DOM. More...
 

Variables

bool html_redraw_debug
 Render padding and margin box outlines in html_redraw(). More...
 
struct dom_string * html_dom_string_map
 
struct dom_string * html_dom_string_id
 
struct dom_string * html_dom_string_name
 
struct dom_string * html_dom_string_area
 
struct dom_string * html_dom_string_a
 
struct dom_string * html_dom_string_nohref
 
struct dom_string * html_dom_string_href
 
struct dom_string * html_dom_string_target
 
struct dom_string * html_dom_string_shape
 
struct dom_string * html_dom_string_default
 
struct dom_string * html_dom_string_rect
 
struct dom_string * html_dom_string_rectangle
 
struct dom_string * html_dom_string_coords
 
struct dom_string * html_dom_string_circle
 
struct dom_string * html_dom_string_poly
 
struct dom_string * html_dom_string_polygon
 
struct dom_string * html_dom_string_text_javascript
 
struct dom_string * html_dom_string_type
 
struct dom_string * html_dom_string_src
 

Detailed Description

Private data for text/html content.

Definition in file html_internal.h.

Typedef Documentation

◆ html_content

typedef struct html_content html_content

Data specific to CONTENT_HTML.

Enumeration Type Documentation

◆ html_drag_type

Enumerator
HTML_DRAG_NONE 
HTML_DRAG_SELECTION 

No drag.

HTML_DRAG_SCROLLBAR 

Own; Text selection.

HTML_DRAG_TEXTAREA_SELECTION 

Not own; drag in scrollbar widget.

HTML_DRAG_TEXTAREA_SCROLLBAR 

Not own; drag in textarea widget.

HTML_DRAG_CONTENT_SELECTION 

Not own; drag in textarea widget.

HTML_DRAG_CONTENT_SCROLL 

Not own; drag in child content.

Not own; drag in child content

Definition at line 39 of file html_internal.h.

◆ html_focus_type

Enumerator
HTML_FOCUS_SELF 

Focus is our own.

HTML_FOCUS_CONTENT 

Focus belongs to child content.

HTML_FOCUS_TEXTAREA 

Focus belongs to textarea.

Definition at line 75 of file html_internal.h.

◆ html_selection_type

Enumerator
HTML_SELECTION_NONE 
HTML_SELECTION_TEXTAREA 

No selection.

HTML_SELECTION_SELF 

Selection in one of our textareas.

HTML_SELECTION_CONTENT 

Selection in this html content.

Selection in child content

Definition at line 59 of file html_internal.h.

Function Documentation

◆ fire_dom_keyboard_event()

bool fire_dom_keyboard_event ( dom_string *  type,
dom_node *  target,
bool  bubbles,
bool  cancelable,
uint32_t  key 
)

Construct a keyboard event and fire it at the DOM.

Definition at line 129 of file html.c.

References fire_dom_event(), form_control::length, NS_KEY_DOWN, NS_KEY_ESCAPE, NS_KEY_LEFT, NS_KEY_PAGE_DOWN, NS_KEY_PAGE_UP, NS_KEY_RIGHT, NS_KEY_TEXT_END, NS_KEY_TEXT_START, NS_KEY_UP, NSLOG, result, and utf8_from_ucs4().

Referenced by html_keypress().

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

◆ fire_generic_dom_event()

bool fire_generic_dom_event ( dom_string *  type,
dom_node *  target,
bool  bubbles,
bool  cancelable 
)

Construct an event and fire it at the DOM.

Definition at line 107 of file html.c.

References fire_dom_event(), NSLOG, and result.

Referenced by mouse_action_drag_none().

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

◆ html__redraw_a_box()

void html__redraw_a_box ( struct html_content html,
struct box box 
)

Redraw a box.

Parameters
htmlcontent containing the box, of type CONTENT_HTML
boxbox to redraw.

Definition at line 1756 of file html.c.

References BOTTOM, box_coords(), content__request_redraw(), box::height, LEFT, box::padding, RIGHT, TOP, box::width, box::x, and box::y.

Referenced by form__select_process_selection(), form_radio_set(), gadget_mouse_action(), html__set_file_gadget_filename(), html_overflow_scroll_callback(), and html_texty_element_update().

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

◆ html_begin_conversion()

bool html_begin_conversion ( html_content htmlc)

Begin conversion of an HTML document.

Parameters
htmlcContent to convert

Definition at line 1461 of file html.c.

References html_content::aborted, form::action, content::active, html_content::base, html_content::base_url, content_broadcast_error(), content_get_url(), content_set_error(), html_content::conversion_begun, html_content::document, form::document_charset, html_content::encoding, html_content::encoding_source, html_content::forms, html_can_begin_conversion(), html_finish_conversion(), html_forms_get_forms(), html_script_exec(), libdom_hubbub_error_to_nserror(), node_name(), NSERROR_DOM, NSERROR_NOMEM, NSERROR_OK, NSERROR_STOPPED, NSLOG, nsurl_access(), nsurl_join(), nsurl_unref(), html_content::parse_completed, html_content::parser, and form::prev.

Referenced by convert_script_async_cb(), convert_script_defer_cb(), convert_script_sync_cb(), html_convert(), and html_convert_css_callback().

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

◆ html_can_begin_conversion()

bool html_can_begin_conversion ( html_content htmlc)

Test if an HTML content conversion can begin.

Parameters
htmlchtml content to test
Returns
true iff the html content conversion can begin

Definition at line 1442 of file html.c.

References content::active, html_content::base, html_stylesheet::modified, html_content::stylesheet_count, and html_content::stylesheets.

Referenced by convert_script_async_cb(), convert_script_defer_cb(), convert_script_sync_cb(), html_begin_conversion(), html_convert(), and html_convert_css_callback().

Here is the caller graph for this function:

◆ html_css_fetcher_add_item()

nserror html_css_fetcher_add_item ( dom_string *  data,
nsurl base_url,
uint32_t *  key 
)

Definition at line 305 of file css_fetcher.c.

References html_css_fetcher_item::base_url, current_key, html_css_fetcher_item::data, html_css_fetcher_item::key, NSERROR_NOMEM, NSERROR_OK, nsurl_ref(), and RING_INSERT.

Referenced by html_stylesheet_from_domnode().

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

◆ html_css_fetcher_register()

nserror html_css_fetcher_register ( void  )

Register the fetcher for the pseudo x-ns-css scheme.

Returns
NSERROR_OK on successful registration or error code on failure.

Definition at line 286 of file css_fetcher.c.

References fetcher_add(), html_css_fetcher_abort(), html_css_fetcher_can_fetch(), html_css_fetcher_finalise(), html_css_fetcher_free(), html_css_fetcher_initialise(), html_css_fetcher_poll(), html_css_fetcher_setup(), html_css_fetcher_start(), and fetcher_operation_table::initialise.

Referenced by html_css_init().

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

◆ html_css_fini()

void html_css_fini ( void  )

Definition at line 718 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().

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

◆ html_css_free_stylesheets()

nserror html_css_free_stylesheets ( html_content html)

Definition at line 510 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().

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

◆ html_css_init()

nserror html_css_init ( void  )

Definition at line 689 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().

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

◆ html_css_new_selection_context()

nserror html_css_new_selection_context ( html_content c,
css_select_ctx **  ret_select_ctx 
)

Definition at line 628 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().

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

◆ html_css_new_stylesheets()

nserror html_css_new_stylesheets ( html_content c)

Initialise core stylesheets for a content.

Parameters
ccontent structure to update
Returns
nserror

Definition at line 558 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, hlcache_child_context::quirks, content::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().

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

◆ html_css_process_link()

bool html_css_process_link ( html_content htmlc,
dom_node *  node 
)

Definition at line 371 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, nsurl_access(), nsurl_join(), nsurl_unref(), hlcache_child_context::quirks, content::quirks, html_stylesheet::sheet, strcasestr(), html_content::stylesheet_count, html_content::stylesheets, and html_stylesheet::unused.

Referenced by dom_default_action_DOMNodeInserted_cb().

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

◆ html_css_process_style()

bool html_css_process_style ( html_content htmlc,
dom_node *  node 
)

Definition at line 340 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().

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

◆ html_css_quirks_stylesheets()

nserror html_css_quirks_stylesheets ( html_content c)

Definition at line 530 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, hlcache_child_context::quirks, html_content::quirks, content::quirks, html_stylesheet::sheet, STYLESHEET_QUIRKS, and html_content::stylesheets.

Referenced by html_convert().

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

◆ html_css_update_style()

bool html_css_update_style ( html_content c,
dom_node *  style 
)

Definition at line 313 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().

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

◆ html_exec()

bool html_exec ( struct content c,
const char *  src,
size_t  srclen 
)

Definition at line 2713 of file html.c.

References html_content::document, NSLOG, and result.

Referenced by mouse_action_drag_none().

Here is the caller graph for this function:

◆ html_finish_conversion()

void html_finish_conversion ( html_content htmlc)

Complete conversion of an HTML document.

Parameters
htmlcContent to convert

Definition at line 720 of file html.c.

References html_content::aborted, html_content::base, html_content::box_conversion_context, content_broadcast(), content_broadcast_error(), CONTENT_MSG_STATUS, content_set_error(), content_set_status(), html_content::document, dom_to_box(), content_msg_data::explicit_status_text, html_box_convert_done(), html_css_new_selection_context(), html_get_dimensions(), html_object_free_objects(), js_fire_event(), html_content::jsthread, messages_get(), NSERROR_DOM, NSERROR_OK, NSERROR_STOPPED, NSLOG, and html_content::select_ctx.

Referenced by html_begin_conversion().

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

◆ html_forms_get_control_for_node()

struct form_control* html_forms_get_control_for_node ( struct form forms,
dom_node *  node 
)

Definition at line 542 of file forms.c.

References form::controls, invent_fake_gadget(), form_control::next, form_control::node, parse_button_element(), parse_input_element(), parse_select_element(), parse_textarea_element(), and form::prev.

Referenced by box_button(), box_input(), box_select(), and box_textarea().

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

◆ html_forms_get_forms()

struct form* html_forms_get_forms ( const char *  docenc,
dom_html_document *  doc 
)

Definition at line 124 of file forms.c.

References form::node, parse_form_element(), and form::prev.

Referenced by html_begin_conversion().

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

◆ html_get_browser_window()

struct browser_window* html_get_browser_window ( struct content c)

Get the browser window containing an HTML content.

Parameters
cHTML content
Returns
the browser window

Definition at line 2903 of file html.c.

References html_content::bw, and content::handler.

Referenced by selection_get_browser_window().

Here is the caller graph for this function:

◆ html_proceed_to_done()

nserror html_proceed_to_done ( html_content html)

Complete the HTML content state machine iff all scripts are finished.

Definition at line 281 of file html.c.

References content::active, html_content::base, content__get_status(), content_set_done(), CONTENT_STATUS_DONE, CONTENT_STATUS_LOADING, CONTENT_STATUS_READY, NSERROR_OK, NSERROR_UNKNOWN, and NSLOG.

Referenced by html_box_convert_done(), and html_script_exec().

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

◆ html_process_script()

dom_hubbub_error html_process_script ( void *  ctx,
dom_node *  node 
)

process script node parser callback

Definition at line 567 of file script.c.

References html_content::base, content_broadcast(), CONTENT_MSG_GETTHREAD, exec_inline_script(), exec_src_script(), html_content::jsthread, content_msg_data::jsthread, html_script::mimetype, NSLOG, and html_content::parser.

Referenced by dom_SCRIPT_showed_up(), html_create_html_data(), and html_process_encoding_change().

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

◆ html_redraw()

bool html_redraw ( struct content c,
struct content_redraw_data data,
const struct rect clip,
const struct redraw_context ctx 
)

Draw a CONTENT_HTML using the current set of plotters (plot).

Parameters
ccontent of type CONTENT_HTML
dataredraw data for this content redraw
clipcurrent clip region
ctxcurrent redraw context
Returns
true if successful, false otherwise

x, y, clip_[xy][01] are in target coordinates.

Definition at line 1904 of file redraw.c.

References content_redraw_data::background_colour, html_content::background_colour, box::border, BOTTOM, form_control::box, box_coords(), plotter_table::clip, plot_style_s::fill_colour, plot_style_s::fill_type, form_clip_inside_select_menu(), form_redraw_select_menu(), box::height, html_redraw_box(), redraw_context::interactive, html_content::layout, LEFT, NS_TRANSPARENT, NSERROR_OK, box::padding, redraw_context::plot, PLOT_OP_TYPE_SOLID, plotter_table::rectangle, result, content_redraw_data::scale, TOP, html_content::visible_select_menu, box_border::width, content_redraw_data::x, and content_redraw_data::y.

Here is the call graph for this function:

◆ html_redraw_borders()

bool html_redraw_borders ( struct box box,
int  x_parent,
int  y_parent,
int  p_width,
int  p_height,
const struct rect clip,
float  scale,
const struct redraw_context ctx 
)

Draw borders for a box.

Parameters
boxbox to draw
x_parentcoordinate of left padding edge of parent of box
y_parentcoordinate of top padding edge of parent of box
p_widthwidth of padding box
p_heightheight of padding box
clipcliping area for redrawing border.
scalescale for redraw
ctxcurrent redraw context
Returns
true if successful, false otherwise

Definition at line 443 of file redraw_border.c.

References box::border, BOTTOM, box_border::c, html_redraw_border_plot(), LEFT, nscss_color_is_transparent, nscss_color_to_ns, NSERROR_OK, RIGHT, box::style, box_border::style, TOP, box_border::width, box::x, box::y, rect::y0, and rect::y1.

Referenced by html_redraw_box().

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

◆ html_redraw_inline_borders()

bool html_redraw_inline_borders ( struct box box,
struct rect  b,
const struct rect clip,
float  scale,
bool  first,
bool  last,
const struct redraw_context ctx 
)

Draw an inline's borders.

Parameters
boxBOX_INLINE which created the border
bcoordinates of border edge rectangle
clipcliping area for redrawing border.
scalescale for redraw
firsttrue if this is the first rectangle associated with the inline
lasttrue if this is the last rectangle associated with the inline
ctxcurrent redraw context
Returns
true if successful, false otherwise

Definition at line 706 of file redraw_border.c.

References box::border, BOTTOM, box_border::c, html_redraw_border_plot(), LEFT, nscss_color_is_transparent, nscss_color_to_ns, NSERROR_OK, RIGHT, box::style, box_border::style, TOP, box_border::width, rect::x0, rect::x1, rect::y0, and rect::y1.

Referenced by html_redraw_box().

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

◆ html_saw_insecure_scripts()

bool html_saw_insecure_scripts ( html_content htmlc)

Check if any of the scripts loaded were insecure.

Definition at line 612 of file script.c.

References content_saw_insecure_objects(), html_script::data, html_script::handle, html_script::HTML_SCRIPT_INLINE, html_content::scripts, html_content::scripts_count, and html_script::type.

Referenced by html_saw_insecure_objects().

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

◆ html_saw_insecure_stylesheets()

bool html_saw_insecure_stylesheets ( html_content html)

Return if any of the stylesheets were loaded insecurely.

Definition at line 492 of file css.c.

References content_saw_insecure_objects(), html_stylesheet::sheet, and html_content::stylesheets.

Referenced by html_saw_insecure_objects().

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

◆ html_script_exec()

nserror html_script_exec ( html_content htmlc,
bool  allow_defer 
)

Attempt script execution for defer and async scripts.

execute scripts using algorithm found in: http://www.whatwg.org/specs/web-apps/current-work/multipage/scripting-1.html#the-script-element

Parameters
htmlchtml content.
allow_deferallow deferred execution, if not, only async scripts.
Returns
NSERROR_OK error code.

Definition at line 58 of file script.c.

References html_script::already_started, content_get_source_data(), content_get_status(), content_get_type(), CONTENT_STATUS_DONE, CONTENT_STATUS_ERROR, html_script::data, html_script::handle, hlcache_handle_get_url(), html_proceed_to_done(), html_script::HTML_SCRIPT_ASYNC, html_script::HTML_SCRIPT_DEFER, html_content::jsthread, NSERROR_BAD_PARAMETER, NSERROR_OK, nsurl_access(), html_content::scripts, html_content::scripts_count, select_script_handler(), and html_script::type.

Referenced by convert_script_async_cb(), and html_begin_conversion().

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

◆ html_script_free()

nserror html_script_free ( html_content htmlc)

Free all script resources and references for a html content.

Parameters
htmlchtml content.
Returns
NSERROR_OK or error code.

Definition at line 637 of file script.c.

References html_script::data, html_script::handle, hlcache_handle_release(), html_script::HTML_SCRIPT_ASYNC, html_script::HTML_SCRIPT_DEFER, html_script::HTML_SCRIPT_INLINE, html_script::HTML_SCRIPT_SYNC, html_script::mimetype, NSERROR_OK, html_content::scripts, html_content::scripts_count, html_script::string, and html_script::type.

Referenced by html_destroy().

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

◆ html_set_drag_type()

void html_set_drag_type ( html_content html,
html_drag_type  drag_type,
union html_drag_owner  drag_owner,
const struct rect rect 
)

Set our drag status, and inform whatever owns the content.

Parameters
htmlHTML content
drag_typeType of drag
drag_ownerWhat owns the drag
rectPointer movement bounds

Definition at line 1726 of file interaction.c.

References content_broadcast(), content_msg_data::CONTENT_DRAG_NONE, content_msg_data::CONTENT_DRAG_SCROLL, content_msg_data::CONTENT_DRAG_SELECTION, CONTENT_MSG_DRAG, content_msg_data::drag, html_content::drag_owner, html_content::drag_type, HTML_DRAG_CONTENT_SCROLL, HTML_DRAG_CONTENT_SELECTION, HTML_DRAG_NONE, HTML_DRAG_SCROLLBAR, HTML_DRAG_SELECTION, HTML_DRAG_TEXTAREA_SCROLLBAR, HTML_DRAG_TEXTAREA_SELECTION, html_drag_owner::no_owner, content_msg_data::rect, and content_msg_data::type.

Referenced by box_textarea_callback(), default_mouse_action(), html_object_callback(), html_overflow_scroll_callback(), and mouse_action_drag_selection().

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

◆ html_set_focus()

void html_set_focus ( html_content html,
html_focus_type  focus_type,
union html_focus_owner  focus_owner,
bool  hide_caret,
int  x,
int  y,
int  height,
const struct rect clip 
)

Set our input focus, and inform whatever owns the content.

Parameters
htmlHTML content
focus_typeType of input focus
focus_ownerWhat owns the focus
hide_caretTrue iff caret to be hidden
xCarret x-coord rel to owner
yCarret y-coord rel to owner
heightCarret height
clipCarret clip rect

Definition at line 1763 of file interaction.c.

References box_coords(), content_msg_data::caret, clip(), html_focus_owner::content, content_broadcast(), CONTENT_MSG_CARET, html_content::focus_owner, html_content::focus_type, height, HTML_FOCUS_CONTENT, HTML_FOCUS_SELF, HTML_FOCUS_TEXTAREA, content_msg_data::pos, html_focus_owner::self, html_focus_owner::textarea, content_msg_data::type, rect::x0, rect::x1, rect::y0, and rect::y1.

Referenced by box_textarea_callback(), default_mouse_action(), and html_object_callback().

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

◆ html_set_selection()

void html_set_selection ( html_content html,
html_selection_type  selection_type,
union html_selection_owner  selection_owner,
bool  read_only 
)

Set our selection status, and inform whatever owns the content.

Parameters
htmlHTML content
selection_typeType of selection
selection_ownerWhat owns the selection
read_onlyTrue iff selection is read only

Definition at line 1821 of file interaction.c.

References mouse_action_state::box, html_selection_owner::content, content_broadcast(), content_clear_selection(), CONTENT_MSG_SELECTION, form_control::data, box::gadget, HTML_SELECTION_CONTENT, HTML_SELECTION_NONE, HTML_SELECTION_SELF, HTML_SELECTION_TEXTAREA, html_selection_owner::none, box::object, html_content::sel, content_msg_data::selection, selection_clear(), html_content::selection_owner, html_content::selection_type, html_selection_owner::textarea, and textarea_clear_selection().

Referenced by box_textarea_callback(), default_mouse_action(), gadget_mouse_action(), html_object_callback(), and html_object_mouse_action().

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

Variable Documentation

◆ html_dom_string_a

struct dom_string* html_dom_string_a

◆ html_dom_string_area

struct dom_string* html_dom_string_area

◆ html_dom_string_circle

struct dom_string* html_dom_string_circle

◆ html_dom_string_coords

struct dom_string* html_dom_string_coords

◆ html_dom_string_default

struct dom_string* html_dom_string_default

◆ html_dom_string_href

struct dom_string* html_dom_string_href

◆ html_dom_string_id

struct dom_string* html_dom_string_id

◆ html_dom_string_map

struct dom_string* html_dom_string_map

◆ html_dom_string_name

struct dom_string* html_dom_string_name

◆ html_dom_string_nohref

struct dom_string* html_dom_string_nohref

◆ html_dom_string_poly

struct dom_string* html_dom_string_poly

◆ html_dom_string_polygon

struct dom_string* html_dom_string_polygon

◆ html_dom_string_rect

struct dom_string* html_dom_string_rect

◆ html_dom_string_rectangle

struct dom_string* html_dom_string_rectangle

◆ html_dom_string_shape

struct dom_string* html_dom_string_shape

◆ html_dom_string_src

struct dom_string* html_dom_string_src

◆ html_dom_string_target

struct dom_string* html_dom_string_target

◆ html_dom_string_text_javascript

struct dom_string* html_dom_string_text_javascript

◆ html_dom_string_type

struct dom_string* html_dom_string_type

◆ html_redraw_debug

bool html_redraw_debug

Render padding and margin box outlines in html_redraw().

Definition at line 66 of file redraw.c.

Referenced by html_redraw_box().