summaryrefslogtreecommitdiff
path: root/content/handlers
diff options
context:
space:
mode:
Diffstat (limited to 'content/handlers')
-rw-r--r--content/handlers/html/box_construct.c2
-rw-r--r--content/handlers/html/box_inspect.c2
-rw-r--r--content/handlers/html/box_manipulate.c6
-rw-r--r--content/handlers/html/box_normalise.c4
-rw-r--r--content/handlers/html/box_special.c2
-rw-r--r--content/handlers/html/box_textarea.c3
-rw-r--r--content/handlers/html/css.c47
-rw-r--r--content/handlers/html/css.h109
-rw-r--r--content/handlers/html/css_fetcher.c2
-rw-r--r--content/handlers/html/form.c6
-rw-r--r--content/handlers/html/forms.c2
-rw-r--r--content/handlers/html/html.c13
-rw-r--r--content/handlers/html/imagemap.c2
-rw-r--r--content/handlers/html/interaction.c2
-rw-r--r--content/handlers/html/interaction.h46
-rw-r--r--content/handlers/html/layout.c2
-rw-r--r--content/handlers/html/object.c3
-rw-r--r--content/handlers/html/private.h (renamed from content/handlers/html/html_internal.h)135
-rw-r--r--content/handlers/html/redraw.c2
-rw-r--r--content/handlers/html/redraw_border.c2
-rw-r--r--content/handlers/html/script.c2
-rw-r--r--content/handlers/html/search.c2
-rw-r--r--content/handlers/javascript/duktape/Document.bnd2
-rw-r--r--content/handlers/javascript/duktape/Window.bnd2
24 files changed, 277 insertions, 123 deletions
diff --git a/content/handlers/html/box_construct.c b/content/handlers/html/box_construct.c
index f1ea71d3b..3d100176a 100644
--- a/content/handlers/html/box_construct.c
+++ b/content/handlers/html/box_construct.c
@@ -37,7 +37,7 @@
#include "css/select.h"
#include "desktop/gui_internal.h"
-#include "html/html_internal.h"
+#include "html/private.h"
#include "html/object.h"
#include "html/box.h"
#include "html/box_manipulate.h"
diff --git a/content/handlers/html/box_inspect.c b/content/handlers/html/box_inspect.c
index 268ed3d95..df9a1b4e2 100644
--- a/content/handlers/html/box_inspect.c
+++ b/content/handlers/html/box_inspect.c
@@ -34,9 +34,9 @@
#include "css/dump.h"
#include "desktop/scrollbar.h"
+#include "html/private.h"
#include "html/box.h"
#include "html/box_inspect.h"
-#include "html/html_internal.h"
/**
* Direction to move in a box-tree walk
diff --git a/content/handlers/html/box_manipulate.c b/content/handlers/html/box_manipulate.c
index 0bc1c9fea..d88e360a1 100644
--- a/content/handlers/html/box_manipulate.c
+++ b/content/handlers/html/box_manipulate.c
@@ -32,11 +32,11 @@
#include "netsurf/mouse.h"
#include "desktop/scrollbar.h"
-#include "html/box.h"
-#include "html/box_manipulate.h"
+#include "html/private.h"
#include "html/form_internal.h"
-#include "html/html_internal.h"
#include "html/interaction.h"
+#include "html/box.h"
+#include "html/box_manipulate.h"
/**
diff --git a/content/handlers/html/box_normalise.c b/content/handlers/html/box_normalise.c
index fbdb6cd05..b7032da55 100644
--- a/content/handlers/html/box_normalise.c
+++ b/content/handlers/html/box_normalise.c
@@ -32,11 +32,11 @@
#include "utils/errors.h"
#include "css/select.h"
+#include "html/private.h"
+#include "html/table.h"
#include "html/box.h"
#include "html/box_manipulate.h"
#include "html/box_normalise.h"
-#include "html/html_internal.h"
-#include "html/table.h"
/* Define to enable box normalise debug */
#undef BOX_NORMALISE_DEBUG
diff --git a/content/handlers/html/box_special.c b/content/handlers/html/box_special.c
index 2d3bd054b..06f2f91d6 100644
--- a/content/handlers/html/box_special.c
+++ b/content/handlers/html/box_special.c
@@ -41,7 +41,7 @@
#include "desktop/frame_types.h"
#include "html/html.h"
-#include "html/html_internal.h"
+#include "html/private.h"
#include "html/object.h"
#include "html/box.h"
#include "html/box_manipulate.h"
diff --git a/content/handlers/html/box_textarea.c b/content/handlers/html/box_textarea.c
index 476773f29..1038be31a 100644
--- a/content/handlers/html/box_textarea.c
+++ b/content/handlers/html/box_textarea.c
@@ -31,7 +31,8 @@
#include "desktop/textarea.h"
#include "desktop/gui_internal.h"
-#include "html/html_internal.h"
+#include "html/private.h"
+#include "html/interaction.h"
#include "html/box.h"
#include "html/box_inspect.h"
#include "html/box_textarea.h"
diff --git a/content/handlers/html/css.c b/content/handlers/html/css.c
index 23d51f1be..575898134 100644
--- a/content/handlers/html/css.c
+++ b/content/handlers/html/css.c
@@ -42,13 +42,17 @@
#include "desktop/gui_internal.h"
#include "html/html.h"
-#include "html/html_internal.h"
+#include "html/private.h"
+#include "html/css.h"
static nsurl *html_default_stylesheet_url;
static nsurl *html_adblock_stylesheet_url;
static nsurl *html_quirks_stylesheet_url;
static nsurl *html_user_stylesheet_url;
+/**
+ * Convert css error to netsurf error.
+ */
static nserror css_error_to_nserror(css_error error)
{
switch (error) {
@@ -82,10 +86,10 @@ static nserror css_error_to_nserror(css_error error)
return NSERROR_CSS;
}
+
/**
* Callback for fetchcache() for stylesheets.
*/
-
static nserror
html_convert_css_callback(hlcache_handle *css,
const hlcache_event *event,
@@ -141,6 +145,7 @@ html_convert_css_callback(hlcache_handle *css,
return NSERROR_OK;
}
+
static nserror
html_stylesheet_from_domnode(html_content *c,
dom_node *node,
@@ -195,6 +200,7 @@ html_stylesheet_from_domnode(html_content *c,
return NSERROR_OK;
}
+
/**
* Process an inline stylesheet in the document.
*
@@ -202,7 +208,6 @@ html_stylesheet_from_domnode(html_content *c,
* \param style xml node of style element
* \return true on success, false if an error occurred
*/
-
static struct html_stylesheet *
html_create_style_element(html_content *c, dom_node *style)
{
@@ -254,8 +259,9 @@ html_create_style_element(html_content *c, dom_node *style)
return c->stylesheets + (c->stylesheet_count - 1);
}
-static bool html_css_process_modified_style(html_content *c,
- struct html_stylesheet *s)
+
+static bool
+html_css_process_modified_style(html_content *c, struct html_stylesheet *s)
{
hlcache_handle *sheet = NULL;
nserror error;
@@ -291,6 +297,10 @@ static bool html_css_process_modified_style(html_content *c,
return true;
}
+
+/**
+ * process a stylesheet that has been modified.
+ */
static void html_css_process_modified_styles(void *pw)
{
html_content *c = pw;
@@ -310,6 +320,8 @@ static void html_css_process_modified_styles(void *pw)
}
}
+
+/* exported function documented in html/css.h */
bool html_css_update_style(html_content *c, dom_node *style)
{
unsigned int i;
@@ -337,6 +349,8 @@ bool html_css_update_style(html_content *c, dom_node *style)
return true;
}
+
+/* exported function documented in html/css.h */
bool html_css_process_style(html_content *c, dom_node *node)
{
unsigned int i;
@@ -368,6 +382,8 @@ bool html_css_process_style(html_content *c, dom_node *node)
return true;
}
+
+/* exported function documented in html/css.h */
bool html_css_process_link(html_content *htmlc, dom_node *node)
{
dom_string *rel, *type_attr, *media, *href;
@@ -475,6 +491,7 @@ no_memory:
return false;
}
+
/* exported interface documented in html/html.h */
struct html_stylesheet *html_get_stylesheets(hlcache_handle *h, unsigned int *n)
{
@@ -488,8 +505,9 @@ struct html_stylesheet *html_get_stylesheets(hlcache_handle *h, unsigned int *n)
return c->stylesheets;
}
-/* exported interface documented in html/html_internal.h */
-bool html_saw_insecure_stylesheets(html_content *html)
+
+/* exported function documented in html/css.h */
+bool html_css_saw_insecure_stylesheets(html_content *html)
{
struct html_stylesheet *s;
unsigned int i;
@@ -506,7 +524,8 @@ bool html_saw_insecure_stylesheets(html_content *html)
return false;
}
-/* exported interface documented in html/html_internal.h */
+
+/* exported function documented in html/css.h */
nserror html_css_free_stylesheets(html_content *html)
{
unsigned int i;
@@ -526,7 +545,8 @@ nserror html_css_free_stylesheets(html_content *html)
return NSERROR_OK;
}
-/* exported interface documented in html/html_internal.h */
+
+/* exported function documented in html/css.h */
nserror html_css_quirks_stylesheets(html_content *c)
{
nserror ns_error = NSERROR_OK;
@@ -554,7 +574,8 @@ nserror html_css_quirks_stylesheets(html_content *c)
return ns_error;
}
-/* exported interface documented in html/html_internal.h */
+
+/* exported function documented in html/css.h */
nserror html_css_new_stylesheets(html_content *c)
{
nserror ns_error;
@@ -624,6 +645,8 @@ nserror html_css_new_stylesheets(html_content *c)
return ns_error;
}
+
+/* exported function documented in html/css.h */
nserror
html_css_new_selection_context(html_content *c, css_select_ctx **ret_select_ctx)
{
@@ -686,6 +709,8 @@ html_css_new_selection_context(html_content *c, css_select_ctx **ret_select_ctx)
return NSERROR_OK;
}
+
+/* exported function documented in html/css.h */
nserror html_css_init(void)
{
nserror error;
@@ -715,6 +740,8 @@ nserror html_css_init(void)
return error;
}
+
+/* exported function documented in html/css.h */
void html_css_fini(void)
{
if (html_user_stylesheet_url != NULL) {
diff --git a/content/handlers/html/css.h b/content/handlers/html/css.h
new file mode 100644
index 000000000..35f6a61e9
--- /dev/null
+++ b/content/handlers/html/css.h
@@ -0,0 +1,109 @@
+/*
+ * Copyright 2020 Vincent Sanders <vince@netsurf-browser.org>
+ *
+ * This file is part of NetSurf, http://www.netsurf-browser.org/
+ *
+ * NetSurf is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * NetSurf is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * \file
+ * HTML content handler CSS interface.
+ */
+
+#ifndef NETSURF_HTML_CSS_H
+#define NETSURF_HTML_CSS_H
+
+/**
+ * Initialise html content css handling.
+ *
+ * \return NSERROR_OK on success else error code
+ */
+nserror html_css_init(void);
+
+/**
+ * Finalise html content css handling.
+ */
+void html_css_fini(void);
+
+/**
+ * create a new css selection context for an html content.
+ *
+ * \param c The html content to create css selction on.
+ * \param select_ctx A pointer to receive the new context.
+ * \return NSERROR_OK on success and \a select_ctx updated else error code
+ */
+nserror html_css_new_selection_context(struct html_content *c, css_select_ctx **select_ctx);
+
+/**
+ * Initialise core stylesheets for a content
+ *
+ * \param c content structure to update
+ * \return NSERROR_OK on success or error code
+ */
+nserror html_css_new_stylesheets(struct html_content *c);
+
+/**
+ * Initialise quirk stylesheets for a content
+ *
+ * \param c content structure to update
+ * \return NSERROR_OK on success or error code
+ */
+nserror html_css_quirks_stylesheets(struct html_content *c);
+
+/**
+ * Free all css stylesheets associated with an HTML content.
+ *
+ * \param html The HTML content to free stylesheets from.
+ * \return NSERROR_OK on success or error code.
+ */
+nserror html_css_free_stylesheets(struct html_content *html);
+
+/**
+ * determine if any of the stylesheets were loaded insecurely
+ *
+ * \param htmlc The HTML content to check.
+ * \return true if there were insecurely loadd stylesheets else false.
+ */
+bool html_css_saw_insecure_stylesheets(struct html_content *htmlc);
+
+/**
+ * process a css stylesheet dom LINK node
+ *
+ * \param htmlc The HTML content.
+ * \param node the DOM link node to process.
+ * \return true on success else false.
+ */
+bool html_css_process_link(struct html_content *htmlc, dom_node *node);
+
+/**
+ * process a css style dom node
+ *
+ * \param htmlc The HTML content.
+ * \param node the DOM node to process.
+ * \return true on success else false.
+ */
+bool html_css_process_style(struct html_content *htmlc, dom_node *node);
+
+/**
+ * process a css style dom node update
+ *
+ * \param htmlc The HTML content.
+ * \param node the DOM node to process.
+ * \return true on success else false.
+ */
+bool html_css_update_style(struct html_content *htmlc, dom_node *node);
+
+
+
+#endif
diff --git a/content/handlers/html/css_fetcher.c b/content/handlers/html/css_fetcher.c
index ae208797d..4e0f672e9 100644
--- a/content/handlers/html/css_fetcher.c
+++ b/content/handlers/html/css_fetcher.c
@@ -39,7 +39,7 @@
#include "content/fetch.h"
#include "content/fetchers.h"
-#include "html/html_internal.h"
+#include "html/private.h"
typedef struct html_css_fetcher_item {
uint32_t key;
diff --git a/content/handlers/html/form.c b/content/handlers/html/form.c
index 86c4196ed..93297e8a2 100644
--- a/content/handlers/html/form.c
+++ b/content/handlers/html/form.c
@@ -52,13 +52,13 @@
#include "desktop/textarea.h"
#include "desktop/gui_internal.h"
+#include "html/html.h"
+#include "html/private.h"
+#include "html/layout.h"
#include "html/box.h"
#include "html/box_inspect.h"
#include "html/font.h"
#include "html/form_internal.h"
-#include "html/html.h"
-#include "html/html_internal.h"
-#include "html/layout.h"
#define MAX_SELECT_HEIGHT 210
#define SELECT_LINE_SPACING 0.2
diff --git a/content/handlers/html/forms.c b/content/handlers/html/forms.c
index 896263dd0..b8b9cb565 100644
--- a/content/handlers/html/forms.c
+++ b/content/handlers/html/forms.c
@@ -26,7 +26,7 @@
#include "utils/log.h"
#include "html/form_internal.h"
-#include "html/html_internal.h"
+#include "html/private.h"
/**
* process form element from dom
diff --git a/content/handlers/html/html.c b/content/handlers/html/html.c
index 2f6377f80..b4cda4a11 100644
--- a/content/handlers/html/html.c
+++ b/content/handlers/html/html.c
@@ -56,7 +56,8 @@
#include "desktop/gui_internal.h"
#include "html/html.h"
-#include "html/html_internal.h"
+#include "html/private.h"
+#include "html/css.h"
#include "html/object.h"
#include "html/html_save.h"
#include "html/interaction.h"
@@ -2816,7 +2817,7 @@ html_saw_insecure_objects(struct content *c)
}
/* Now check stylesheets */
- if (html_saw_insecure_stylesheets(htmlc)) {
+ if (html_css_saw_insecure_stylesheets(htmlc)) {
return true;
}
@@ -2894,12 +2895,8 @@ error:
return error;
}
-/**
- * Get the browser window containing an HTML content
- *
- * \param c HTML content
- * \return the browser window
- */
+
+/* exported function documented in html/private.h */
struct browser_window *html_get_browser_window(struct content *c)
{
html_content *html = (html_content *) c;
diff --git a/content/handlers/html/imagemap.c b/content/handlers/html/imagemap.c
index 37095e21d..f23be2353 100644
--- a/content/handlers/html/imagemap.c
+++ b/content/handlers/html/imagemap.c
@@ -37,7 +37,7 @@
#include "html/box.h"
#include "html/box_construct.h"
-#include "html/html_internal.h"
+#include "html/private.h"
#include "html/imagemap.h"
#define HASH_SIZE 31 /* fixed size hash table */
diff --git a/content/handlers/html/interaction.c b/content/handlers/html/interaction.c
index e4ef2f123..3f401bd11 100644
--- a/content/handlers/html/interaction.c
+++ b/content/handlers/html/interaction.c
@@ -53,7 +53,7 @@
#include "html/box_inspect.h"
#include "html/font.h"
#include "html/form_internal.h"
-#include "html/html_internal.h"
+#include "html/private.h"
#include "html/imagemap.h"
#include "html/search.h"
#include "html/interaction.h"
diff --git a/content/handlers/html/interaction.h b/content/handlers/html/interaction.h
index c1339c01e..fe8beada0 100644
--- a/content/handlers/html/interaction.h
+++ b/content/handlers/html/interaction.h
@@ -64,14 +64,60 @@ nserror html_mouse_track(struct content *c, struct browser_window *bw,
nserror html_mouse_action(struct content *c, struct browser_window *bw,
browser_mouse_state mouse, int x, int y);
+
bool html_keypress(struct content *c, uint32_t key);
+
void html_overflow_scroll_callback(void *client_data,
struct scrollbar_msg_data *scrollbar_data);
+
void html_search(struct content *c, void *context,
search_flags_t flags, const char *string);
+
void html_search_clear(struct content *c);
+
+/**
+ * Set our drag status, and inform whatever owns the content
+ *
+ * \param html HTML content
+ * \param drag_type Type of drag
+ * \param drag_owner What owns the drag
+ * \param rect Pointer movement bounds
+ */
+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 selection status, and inform whatever owns the content
+ *
+ * \param html HTML content
+ * \param selection_type Type of selection
+ * \param selection_owner What owns the selection
+ * \param read_only True iff selection is read only
+ */
+void html_set_selection(html_content *html, html_selection_type selection_type,
+ union html_selection_owner selection_owner, bool read_only);
+
+
+/**
+ * Set our input focus, and inform whatever owns the content
+ *
+ * \param html HTML content
+ * \param focus_type Type of input focus
+ * \param focus_owner What owns the focus
+ * \param hide_caret True iff caret to be hidden
+ * \param x Carret x-coord rel to owner
+ * \param y Carret y-coord rel to owner
+ * \param height Carret height
+ * \param clip Carret clip rect
+ */
+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);
+
+
#endif
diff --git a/content/handlers/html/layout.c b/content/handlers/html/layout.c
index 128b12c0b..3d022ab76 100644
--- a/content/handlers/html/layout.c
+++ b/content/handlers/html/layout.c
@@ -58,7 +58,7 @@
#include "html/html.h"
#include "html/html_save.h"
-#include "html/html_internal.h"
+#include "html/private.h"
#include "html/box.h"
#include "html/box_inspect.h"
#include "html/font.h"
diff --git a/content/handlers/html/object.c b/content/handlers/html/object.c
index e8cdc7db9..ba1470bd0 100644
--- a/content/handlers/html/object.c
+++ b/content/handlers/html/object.c
@@ -41,9 +41,10 @@
#include "desktop/gui_internal.h"
#include "html/html.h"
+#include "html/private.h"
+#include "html/interaction.h"
#include "html/box.h"
#include "html/box_inspect.h"
-#include "html/html_internal.h"
#include "html/object.h"
/* break reference loop */
diff --git a/content/handlers/html/html_internal.h b/content/handlers/html/private.h
index ae3182a07..134acff6d 100644
--- a/content/handlers/html/html_internal.h
+++ b/content/handlers/html/private.h
@@ -21,8 +21,8 @@
* Private data for text/html content.
*/
-#ifndef NETSURF_HTML_HTML_INTERNAL_H
-#define NETSURF_HTML_HTML_INTERNAL_H
+#ifndef NETSURF_HTML_PRIVATE_H
+#define NETSURF_HTML_PRIVATE_H
#include <libcss/libcss.h>
#include <dom/bindings/hubbub/parser.h>
@@ -205,8 +205,10 @@ typedef struct html_content {
/** HTML content's own text selection object */
struct selection sel;
- /** Open core-handled form SELECT menu,
- * or NULL if none currently open. */
+ /**
+ * Open core-handled form SELECT menu, or NULL if none
+ * currently open.
+ */
struct form_control *visible_select_menu;
/** Context for free text search, or NULL if none */
@@ -216,52 +218,32 @@ typedef struct html_content {
} html_content;
-/** Render padding and margin box outlines in html_redraw(). */
+/**
+ * Render padding and margin box outlines in html_redraw().
+ */
extern bool html_redraw_debug;
-void html__redraw_a_box(html_content *html, struct box *box);
-/**
- * Set our drag status, and inform whatever owns the content
- *
- * \param html HTML content
- * \param drag_type Type of drag
- * \param drag_owner What owns the drag
- * \param rect Pointer movement bounds
- */
-void html_set_drag_type(html_content *html, html_drag_type drag_type,
- union html_drag_owner drag_owner, const struct rect *rect);
+/* in html/html.c */
/**
- * Set our selection status, and inform whatever owns the content
+ * redraw a box
*
- * \param html HTML content
- * \param selection_type Type of selection
- * \param selection_owner What owns the selection
- * \param read_only True iff selection is read only
+ * \param htmlc HTML content
+ * \param box The box to redraw.
*/
-void html_set_selection(html_content *html, html_selection_type selection_type,
- union html_selection_owner selection_owner, bool read_only);
+void html__redraw_a_box(html_content *htmlc, struct box *box);
+
/**
- * Set our input focus, and inform whatever owns the content
+ * Get the browser window containing an HTML content
*
- * \param html HTML content
- * \param focus_type Type of input focus
- * \param focus_owner What owns the focus
- * \param hide_caret True iff caret to be hidden
- * \param x Carret x-coord rel to owner
- * \param y Carret y-coord rel to owner
- * \param height Carret height
- * \param clip Carret clip rect
+ * \param c HTML content
+ * \return the browser window
*/
-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);
-
-
struct browser_window *html_get_browser_window(struct content *c);
+
/**
* Complete conversion of an HTML document
*
@@ -269,6 +251,7 @@ struct browser_window *html_get_browser_window(struct content *c);
*/
void html_finish_conversion(html_content *htmlc);
+
/**
* Test if an HTML content conversion can begin
*
@@ -277,6 +260,7 @@ void html_finish_conversion(html_content *htmlc);
*/
bool html_can_begin_conversion(html_content *htmlc);
+
/**
* Begin conversion of an HTML document
*
@@ -284,25 +268,13 @@ bool html_can_begin_conversion(html_content *htmlc);
*/
bool html_begin_conversion(html_content *htmlc);
-/* in html/html_redraw.c */
-bool html_redraw(struct content *c, struct content_redraw_data *data,
- const struct rect *clip, const struct redraw_context *ctx);
-
-/* in html/html_redraw_border.c */
-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);
-
-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);
-
-/* in html/html_script.c */
-dom_hubbub_error html_process_script(void *ctx, dom_node *node);
-/* in html/html.c */
+/**
+ * execute some text as a script element
+ */
bool html_exec(struct content *c, const char *src, size_t srclen);
+
/**
* Attempt script execution for defer and async scripts
*
@@ -315,6 +287,7 @@ bool html_exec(struct content *c, const char *src, size_t srclen);
*/
nserror html_script_exec(html_content *htmlc, bool allow_defer);
+
/**
* Free all script resources and references for a html content.
*
@@ -323,41 +296,46 @@ nserror html_script_exec(html_content *htmlc, bool allow_defer);
*/
nserror html_script_free(html_content *htmlc);
+
/**
* Check if any of the scripts loaded were insecure
*/
bool html_saw_insecure_scripts(html_content *htmlc);
-/* in html/html_forms.c */
-struct form *html_forms_get_forms(const char *docenc, dom_html_document *doc);
-struct form_control *html_forms_get_control_for_node(struct form *forms,
- dom_node *node);
-
-/* in html/html_css.c */
-nserror html_css_init(void);
-void html_css_fini(void);
/**
- * Initialise core stylesheets for a content
- *
- * \param c content structure to update
- * \return nserror
+ * Complete the HTML content state machine *iff* all scripts are finished
*/
-nserror html_css_new_stylesheets(html_content *c);
-nserror html_css_quirks_stylesheets(html_content *c);
-nserror html_css_free_stylesheets(html_content *html);
+nserror html_proceed_to_done(html_content *html);
+
+
+/* in html/redraw.c */
+bool html_redraw(struct content *c, struct content_redraw_data *data,
+ const struct rect *clip, const struct redraw_context *ctx);
-/** Return if any of the stylesheets were loaded insecurely */
-bool html_saw_insecure_stylesheets(html_content *html);
-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);
+/* in html/redraw_border.c */
+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);
-nserror html_css_new_selection_context(html_content *c,
- css_select_ctx **ret_select_ctx);
-/* in html/html_css_fetcher.c */
+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);
+
+
+/* in html/script.c */
+dom_hubbub_error html_process_script(void *ctx, dom_node *node);
+
+
+/* in html/forms.c */
+struct form *html_forms_get_forms(const char *docenc, dom_html_document *doc);
+struct form_control *html_forms_get_control_for_node(struct form *forms,
+ dom_node *node);
+
+
+/* in html/css_fetcher.c */
/**
* Register the fetcher for the pseudo x-ns-css scheme.
*
@@ -367,11 +345,6 @@ nserror html_css_fetcher_register(void);
nserror html_css_fetcher_add_item(dom_string *data, nsurl *base_url,
uint32_t *key);
-/**
- * Complete the HTML content state machine *iff* all scripts are finished
- */
-nserror html_proceed_to_done(html_content *html);
-
/* Events */
/**
diff --git a/content/handlers/html/redraw.c b/content/handlers/html/redraw.c
index ee6fab275..fa4cd954d 100644
--- a/content/handlers/html/redraw.c
+++ b/content/handlers/html/redraw.c
@@ -58,7 +58,7 @@
#include "html/box_manipulate.h"
#include "html/font.h"
#include "html/form_internal.h"
-#include "html/html_internal.h"
+#include "html/private.h"
#include "html/layout.h"
#include "html/search.h"
diff --git a/content/handlers/html/redraw_border.c b/content/handlers/html/redraw_border.c
index 0b3d858e6..39ed432cd 100644
--- a/content/handlers/html/redraw_border.c
+++ b/content/handlers/html/redraw_border.c
@@ -30,7 +30,7 @@
#include "netsurf/css.h"
#include "html/box.h"
-#include "html/html_internal.h"
+#include "html/private.h"
static plot_style_t plot_style_bdr = {
diff --git a/content/handlers/html/script.c b/content/handlers/html/script.c
index 81bdccda9..99275c0e9 100644
--- a/content/handlers/html/script.c
+++ b/content/handlers/html/script.c
@@ -40,7 +40,7 @@
#include "content/hlcache.h"
#include "html/html.h"
-#include "html/html_internal.h"
+#include "html/private.h"
typedef bool (script_handler_t)(struct jsthread *jsthread, const uint8_t *data, size_t size, const char *name);
diff --git a/content/handlers/html/search.c b/content/handlers/html/search.c
index 864fac6dd..8ccb6920c 100644
--- a/content/handlers/html/search.c
+++ b/content/handlers/html/search.c
@@ -42,7 +42,7 @@
#include "html/box.h"
#include "html/box_inspect.h"
#include "html/html.h"
-#include "html/html_internal.h"
+#include "html/private.h"
#include "html/search.h"
#ifndef NOF_ELEMENTS
diff --git a/content/handlers/javascript/duktape/Document.bnd b/content/handlers/javascript/duktape/Document.bnd
index de96cd864..2f9adc380 100644
--- a/content/handlers/javascript/duktape/Document.bnd
+++ b/content/handlers/javascript/duktape/Document.bnd
@@ -14,7 +14,7 @@ prologue Document()
#include "utils/libdom.h"
#include "utils/utils.h"
#include "content/hlcache.h"
-#include "html/html_internal.h"
+#include "html/private.h"
#include "content/urldb.h"
#define HANDLER_MAGIC MAGIC(HANDLER_MAP)
diff --git a/content/handlers/javascript/duktape/Window.bnd b/content/handlers/javascript/duktape/Window.bnd
index 2c26f1d70..f7d143f6c 100644
--- a/content/handlers/javascript/duktape/Window.bnd
+++ b/content/handlers/javascript/duktape/Window.bnd
@@ -19,7 +19,7 @@ class Window {
#include "netsurf/browser_window.h"
#include "content/hlcache.h"
#include "html/html.h"
-#include "html/html_internal.h"
+#include "html/private.h"
#include "desktop/gui_internal.h"
#include "netsurf/misc.h"
#include "utils/ring.h"