24#ifndef NETSURF_HTML_PRIVATE_H
25#define NETSURF_HTML_PRIVATE_H
27#include <dom/bindings/hubbub/parser.h>
304 int p_width,
int p_height,
const struct rect *
clip,
float scale,
309 const struct rect *
clip,
float scale,
bool first,
bool last,
340 bool bubbles,
bool cancelable);
346 bool bubbles,
bool cancelable, uint32_t key);
Protected interface to Content handling.
nserror
Enumeration of error codes.
struct nsurl nsurl
NetSurf URL object.
struct dom_string * html_dom_string_shape
struct dom_string * html_dom_string_href
dom_hubbub_error html_process_script(void *ctx, dom_node *node)
process script node parser callback
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.
struct dom_string * html_dom_string_src
bool html_exec(struct content *c, const char *src, size_t srclen)
execute some text as a script element
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.
bool html_begin_conversion(html_content *htmlc)
Begin conversion of an HTML document.
struct dom_string * html_dom_string_id
struct html_content html_content
Data specific to CONTENT_HTML.
struct dom_string * html_dom_string_type
void html_finish_conversion(html_content *htmlc)
Complete conversion of an HTML document.
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).
nserror html_css_fetcher_add_item(dom_string *data, struct nsurl *base_url, uint32_t *key)
struct dom_string * html_dom_string_rectangle
@ HTML_DRAG_SELECTION
No drag.
@ HTML_DRAG_CONTENT_SELECTION
Not own; drag in textarea widget.
@ HTML_DRAG_TEXTAREA_SELECTION
Not own; drag in scrollbar widget.
@ HTML_DRAG_SCROLLBAR
Own; Text selection.
@ HTML_DRAG_TEXTAREA_SCROLLBAR
Not own; drag in textarea widget.
@ HTML_DRAG_CONTENT_SCROLL
Not own; drag in child content.
bool html_saw_insecure_scripts(html_content *htmlc)
Check if any of the scripts loaded were insecure.
nserror html_script_free(html_content *htmlc)
Free all script resources and references for a html content.
struct dom_string * html_dom_string_area
struct dom_string * html_dom_string_target
struct form * html_forms_get_forms(const char *docenc, dom_html_document *doc)
struct dom_string * html_dom_string_coords
@ HTML_FOCUS_SELF
Focus is our own.
@ HTML_FOCUS_TEXTAREA
Focus belongs to textarea.
@ HTML_FOCUS_CONTENT
Focus belongs to child content.
struct dom_string * html_dom_string_nohref
struct dom_string * html_dom_string_text_javascript
struct dom_string * html_dom_string_poly
@ HTML_SELECTION_SELF
Selection in one of our textareas.
@ HTML_SELECTION_TEXTAREA
No selection.
@ HTML_SELECTION_CONTENT
Selection in this html content.
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.
bool fire_generic_dom_event(dom_string *type, dom_node *target, bool bubbles, bool cancelable)
Construct an event and fire it at the DOM.
nserror html_css_fetcher_register(void)
Register the fetcher for the pseudo x-ns-css scheme.
bool html_redraw_debug
Render padding and margin box outlines in html_redraw().
struct dom_string * html_dom_string_map
struct dom_string * html_dom_string_polygon
struct dom_string * html_dom_string_circle
struct dom_string * html_dom_string_a
struct form_control * html_forms_get_control_for_node(struct form *forms, dom_node *node)
void html__redraw_a_box(html_content *htmlc, struct box *box)
redraw a box
struct dom_string * html_dom_string_default
struct dom_string * html_dom_string_name
struct dom_string * html_dom_string_rect
nserror html_proceed_to_done(html_content *html)
Complete the HTML content state machine iff all scripts are finished.
bool html_can_begin_conversion(html_content *htmlc)
Test if an HTML content conversion can begin.
nserror html_script_exec(html_content *htmlc, bool allow_defer)
Attempt script execution for defer and async scripts.
Frame tree (frameset or frame tag)
Inline frame list (iframe tag)
An object (img, object, etc.
parameters to content redraw
Content which corresponds to a single URL.
Data specific to CONTENT_HTML.
dom_document_quirks_mode quirks
Quirkyness of document.
struct imagemap ** imagemaps
Hash table of imagemaps.
struct selection * sel
HTML content's own text selection object.
int * bctx
A talloc context purely for the render box tree.
struct content_html_object * object_list
List of objects.
struct content_html_frames * frameset
Frameset information.
union html_drag_owner drag_owner
Widget capturing all mouse events.
bool refresh
Whether a meta refresh has been handled.
dom_hubbub_parser * parser
Parser object handle.
colour background_colour
Document background colour.
html_focus_type focus_type
Current input focus target type.
char * encoding
Encoding of source, NULL if unknown.
struct browser_window * bw
Browser window containing this document, or NULL if not open.
unsigned int num_objects
Number of entries in object_list.
dom_document * document
Document tree.
struct nsurl * base_url
Base URL (may be a copy of content->url).
struct html_stylesheet * stylesheets
Stylesheets.
bool conversion_begun
Whether or not the conversion has begun.
struct form * forms
Forms, in reverse order to document.
html_drag_type drag_type
Current drag type.
union html_focus_owner focus_owner
Current input focus target.
char * base_target
Base target.
css_select_ctx * select_ctx
Style selection media specification.
const struct gui_layout_table * font_func
Font callback table.
struct jsthread * jsthread
javascript thread in use
struct html_content * page
Content of type CONTENT_HTML containing this, or NULL if not an object within a page.
struct content_html_iframe * iframe
Inline frame information.
html_selection_type selection_type
Current selection state.
void * box_conversion_context
A context pointer for the box conversion, NULL if no conversion is in progress.
dom_hubbub_encoding_source encoding_source
Source of encoding information.
bool parse_completed
Whether the parse has been completed.
unsigned int scripts_count
Number of entries in scripts.
struct form_control * visible_select_menu
Open core-handled form SELECT menu, or NULL if none currently open.
union html_selection_owner selection_owner
Current selection owner.
bool enable_scripting
Whether scripts are enabled for this content.
bool aborted
Content has been aborted in the LOADING state.
bool had_initial_layout
Whether an initial layout has been done.
css_unit_ctx unit_len_ctx
CSS length conversion context for document.
struct box * layout
Box tree, or NULL.
unsigned int stylesheet_count
Number of entries in stylesheet_content.
bool reflowing
Whether a layout (reflow) is in progress.
struct html_script * scripts
Scripts.
Container for scripts used by an HTML document.
Container for stylesheets used by an HTML document.
uint32_t colour
Colour type: XBGR.
struct scrollbar * scrollbar
For getting at selections in this content or things in this content.
static nserror clip(const struct redraw_context *ctx, const struct rect *clip)
Sets a clip rectangle for subsequent plot operations.