24 #ifndef NETSURF_HTML_HTML_INTERNAL_H 25 #define NETSURF_HTML_HTML_INTERNAL_H 27 #include <libcss/libcss.h> 28 #include <dom/bindings/hubbub/parser.h> 293 int p_width,
int p_height,
const struct rect *
clip,
float scale,
358 css_select_ctx **ret_select_ctx);
382 bool bubbles,
bool cancelable);
388 bool bubbles,
bool cancelable, uint32_t key);
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).
struct dom_string * html_dom_string_area
nserror html_css_fetcher_register(void)
Register the fetcher for the pseudo x-ns-css scheme.
nserror html_script_free(html_content *htmlc)
Free all script resources and references for a html content.
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.
struct dom_string * html_dom_string_text_javascript
struct imagemap ** imagemaps
Hash table of imagemaps.
unsigned int num_objects
Number of entries in object_list.
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.
struct dom_string * html_dom_string_name
css_media media
Universal selector.
const struct gui_layout_table * font_func
Font callback table.
Inline frame list (iframe tag)
bool html_saw_insecure_stylesheets(html_content *html)
Return if any of the stylesheets were loaded insecurely.
struct dom_string * html_dom_string_nohref
Not own; drag in textarea widget.
nserror html_css_fetcher_add_item(dom_string *data, nsurl *base_url, uint32_t *key)
nserror html_css_free_stylesheets(html_content *html)
struct form_control * visible_select_menu
Open core-handled form SELECT menu, or NULL if none currently open.
struct dom_string * html_dom_string_map
nserror html_proceed_to_done(html_content *html)
Complete the HTML content state machine iff all scripts are finished.
html_drag_type drag_type
Current drag type.
struct html_stylesheet * stylesheets
Stylesheets.
struct form * forms
Forms, in reverse order to document.
bool conversion_begun
Whether or not the conversion has begun.
Focus belongs to child content.
nserror html_css_quirks_stylesheets(html_content *c)
struct jsthread * jsthread
javascript thread in use
struct box * layout
Box tree, or NULL.
Length conversion context data.
struct dom_string * html_dom_string_circle
struct form * html_forms_get_forms(const char *docenc, dom_html_document *doc)
html_focus_type focus_type
Current input focus target 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.
bool fire_generic_dom_event(dom_string *type, dom_node *target, bool bubbles, bool cancelable)
Construct an event and fire it at the DOM.
bool html_begin_conversion(html_content *htmlc)
Begin conversion of an HTML document.
struct dom_string * html_dom_string_href
struct form_control * html_forms_get_control_for_node(struct form *forms, dom_node *node)
bool html_css_process_link(html_content *htmlc, dom_node *node)
bool html_css_update_style(html_content *c, dom_node *style)
int * bctx
A talloc context purely for the render box tree.
bool html_exec(struct content *c, const char *src, size_t srclen)
nserror
Enumeration of error codes.
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.
dom_hubbub_encoding_source encoding_source
Source of encoding information.
struct dom_string * html_dom_string_rectangle
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.
nserror html_css_init(void)
Corresponds to a single URL.
dom_document * document
Document tree.
bool reflowing
Whether a layout (reflow) is in progress.
Selection in one of our textareas.
nserror html_css_new_selection_context(html_content *c, css_select_ctx **ret_select_ctx)
struct dom_string * html_dom_string_a
html_selection_type selection_type
Current selection state.
dom_hubbub_error html_process_script(void *ctx, dom_node *node)
process script node parser callback
struct dom_string * html_dom_string_shape
Not own; drag in child content.
bool refresh
Whether a meta refresh has been handled.
Selection in this html content.
uint32_t colour
Colour type: XBGR.
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.
char * search_string
Search string or NULL.
Focus belongs to textarea.
Not own; drag in scrollbar widget.
nserror html_script_exec(html_content *htmlc, bool allow_defer)
Attempt script execution for defer and async scripts.
struct dom_string * html_dom_string_type
For drags we don't own.
struct dom_string * html_dom_string_src
struct search_context * search
Context for free text search, or NULL if none.
parameters to content redraw
void * box_conversion_context
A context pointer for the box conversion, NULL if no conversion is in progress.
bool html_css_process_style(html_content *htmlc, dom_node *node)
Container for stylesheets used by an HTML document.
struct content_html_iframe * iframe
Inline frame information.
dom_hubbub_parser * parser
Parser object handle.
Not own; drag in textarea widget.
void html_finish_conversion(html_content *htmlc)
Complete conversion of an HTML document.
nsurl * base_url
Base URL (may be a copy of content->url).
struct html_content * page
Content of type CONTENT_HTML containing this, or NULL if not an object within a page.
struct html_content html_content
Data specific to CONTENT_HTML.
struct browser_window * bw
Browser window containing this document, or NULL if not open.
bool html_redraw_debug
Render padding and margin box outlines in html_redraw().
unsigned int stylesheet_count
Number of entries in stylesheet_content.
struct dom_string * html_dom_string_coords
Frame tree (frameset or frame tag)
struct dom_string * html_dom_string_default
bool aborted
Content has been aborted in the LOADING state.
bool html_can_begin_conversion(html_content *htmlc)
Test if an HTML content conversion can begin.
An object (img, object, etc.
struct html_script * scripts
Scripts.
bool html_saw_insecure_scripts(html_content *htmlc)
Check if any of the scripts loaded were insecure.
float scale
scale of window contents
char * base_target
Base target.
struct dom_string * html_dom_string_poly
Text selection within browser windows (interface).
struct dom_string * html_dom_string_id
nscss_len_ctx len_ctx
CSS length conversion context for document.
char * encoding
Encoding of source, NULL if unknown.
bool enable_scripting
Whether scripts are enabled for this content.
css_select_ctx * select_ctx
Style selection media specification.
struct browser_window * html_get_browser_window(struct content *c)
Get the browser window containing an HTML content.
struct dom_string * html_dom_string_rect
Data specific to CONTENT_HTML.
struct scrollbar * scrollbar
static nserror clip(const struct redraw_context *ctx, const struct rect *clip)
Sets a clip rectangle for subsequent plot operations.
dom_document_quirks_mode quirks
Quirkyness of document.
unsigned int scripts_count
Number of entries in scripts.
colour background_colour
Document background colour.
struct dom_string * html_dom_string_target
Container for scripts used by an HTML document.
struct nsurl nsurl
NetSurf URL object.
Protected interface to Content handling.
For getting at selections in this content or things in this content.
struct content_html_frames * frameset
Frameset information.
struct content_html_object * object_list
List of objects.
bool parse_completed
Whether the parse has been completed.
struct dom_string * html_dom_string_polygon
void html__redraw_a_box(html_content *html, struct box *box)
Redraw a box.
bool had_initial_layout
Whether an initial layout has been done.
nserror html_css_new_stylesheets(html_content *c)
Initialise core stylesheets for a content.