diff options
Diffstat (limited to 'render')
-rw-r--r-- | render/html.c | 42 | ||||
-rw-r--r-- | render/html_internal.h | 2 | ||||
-rw-r--r-- | render/html_redraw.c | 4 | ||||
-rw-r--r-- | render/textplain.c | 33 |
4 files changed, 41 insertions, 40 deletions
diff --git a/render/html.c b/render/html.c index 4d76d0c8b..f3667d470 100644 --- a/render/html.c +++ b/render/html.c @@ -540,12 +540,8 @@ static bool html_process_img(html_content *c, dom_node *node) return success; } -/** - * Complete conversion of an HTML document - * - * \param c Content to convert - */ -void html_finish_conversion(html_content *c) +/* exported function documented in render/html_internal.h */ +void html_finish_conversion(html_content *htmlc) { union content_msg_data msg_data; dom_exception exc; /* returned by libdom functions */ @@ -553,17 +549,17 @@ void html_finish_conversion(html_content *c) nserror error; /* Bail out if we've been aborted */ - if (c->aborted) { - content_broadcast_errorcode(&c->base, NSERROR_STOPPED); - content_set_error(&c->base); + if (htmlc->aborted) { + content_broadcast_errorcode(&htmlc->base, NSERROR_STOPPED); + content_set_error(&htmlc->base); return; } /* create new css selection context */ - error = html_css_new_selection_context(c, &c->select_ctx); + error = html_css_new_selection_context(htmlc, &htmlc->select_ctx); if (error != NSERROR_OK) { - content_broadcast_errorcode(&c->base, error); - content_set_error(&c->base); + content_broadcast_errorcode(&htmlc->base, error); + content_set_error(&htmlc->base); return; } @@ -572,29 +568,29 @@ void html_finish_conversion(html_content *c) * object, but with its target set to the Document object (and * the currentTarget set to the Window object) */ - js_fire_event(c->jscontext, "load", c->document, NULL); + js_fire_event(htmlc->jscontext, "load", htmlc->document, NULL); /* convert dom tree to box tree */ - LOG(("DOM to box (%p)", c)); - content_set_status(&c->base, messages_get("Processing")); + LOG(("DOM to box (%p)", htmlc)); + content_set_status(&htmlc->base, messages_get("Processing")); msg_data.explicit_status_text = NULL; - content_broadcast(&c->base, CONTENT_MSG_STATUS, msg_data); + content_broadcast(&htmlc->base, CONTENT_MSG_STATUS, msg_data); - exc = dom_document_get_document_element(c->document, (void *) &html); + exc = dom_document_get_document_element(htmlc->document, (void *) &html); if ((exc != DOM_NO_ERR) || (html == NULL)) { LOG(("error retrieving html element from dom")); - content_broadcast_errorcode(&c->base, NSERROR_DOM); - content_set_error(&c->base); + content_broadcast_errorcode(&htmlc->base, NSERROR_DOM); + content_set_error(&htmlc->base); return; } - error = dom_to_box(html, c, html_box_convert_done); + error = dom_to_box(html, htmlc, html_box_convert_done); if (error != NSERROR_OK) { LOG(("box conversion failed")); dom_node_unref(html); - html_object_free_objects(c); - content_broadcast_errorcode(&c->base, error); - content_set_error(&c->base); + html_object_free_objects(htmlc); + content_broadcast_errorcode(&htmlc->base, error); + content_set_error(&htmlc->base); return; } diff --git a/render/html_internal.h b/render/html_internal.h index 1a878031b..fd5cf8443 100644 --- a/render/html_internal.h +++ b/render/html_internal.h @@ -227,7 +227,7 @@ struct browser_window *html_get_browser_window(struct content *c); /** * Complete conversion of an HTML document * - * \param htmlc Content to convert + * \param htmlc Content to convert */ void html_finish_conversion(html_content *htmlc); diff --git a/render/html_redraw.c b/render/html_redraw.c index 3d1f33ce8..091ece0f5 100644 --- a/render/html_redraw.c +++ b/render/html_redraw.c @@ -329,6 +329,7 @@ static plot_style_t plot_style_fillbdr_dlight = { * \param style border line style * \param thickness border thickness * \param rectangular whether border is rectangular + * \param clip cliping area for redrawing border. * \param ctx current redraw context * \return true if successful, false otherwise */ @@ -690,6 +691,7 @@ static bool html_redraw_border_plot(const int side, const int *p, colour c, * \param y_parent coordinate of top padding edge of parent of box * \param p_width width of padding box * \param p_height height of padding box + * \param clip cliping area for redrawing border. * \param scale scale for redraw * \param ctx current redraw context * \return true if successful, false otherwise @@ -923,6 +925,7 @@ static bool html_redraw_borders(struct box *box, int x_parent, int y_parent, * * \param box BOX_INLINE which created the border * \param b coordinates of border edge rectangle + * \param clip cliping area for redrawing border. * \param scale scale for redraw * \param first true if this is the first rectangle associated with the inline * \param last true if this is the last rectangle associated with the inline @@ -1796,6 +1799,7 @@ static bool html_redraw_text_decoration(struct box *box, * Redraw the text content of a box, possibly partially highlighted * because the text has been selected, or matches a search operation. * + * \param html The html content to redraw text within. * \param box box with text content * \param x x co-ord of box * \param y y co-ord of box diff --git a/render/textplain.c b/render/textplain.c index 9d87fbf1e..9a63da1dd 100644 --- a/render/textplain.c +++ b/render/textplain.c @@ -688,7 +688,7 @@ void textplain_mouse_track(struct content *c, struct browser_window *bw, * * \param c content of type textplain * \param bw browser window - * \param click type of mouse click + * \param mouse mouse state on action * \param x coordinate of mouse * \param y coordinate of mouse */ @@ -772,11 +772,10 @@ bool textplain_keypress(struct content *c, uint32_t key) /** * Handle search. * - * \param c content of type text - * \param gui_callbacks vtable for updating front end - * \param gui_data front end private data - * \param flags search flags - * \param string search string + * \param c content of type text + * \param gui_data front end private data + * \param flags search flags + * \param string search string */ void textplain_search(struct content *c, void *gui_data, search_flags_t flags, const char *string) @@ -1029,7 +1028,7 @@ char *textplain_get_selection(struct content *c) /** * Retrieve number of lines in content * - * \param h Content to retrieve line count from + * \param c Content to retrieve line count from * \return Number of lines */ unsigned long textplain_line_count(struct content *c) @@ -1044,7 +1043,7 @@ unsigned long textplain_line_count(struct content *c) /** * Retrieve the size (in bytes) of text data * - * \param h Content to retrieve size of + * \param c Content to retrieve size of * \return Size, in bytes, of data */ size_t textplain_size(struct content *c) @@ -1057,12 +1056,14 @@ size_t textplain_size(struct content *c) } /** - * Return byte offset within UTF8 textplain content, given the co-ordinates - * of a point within a textplain content. 'dir' specifies the direction in - * which to search (-1 = above-left, +1 = below-right) if the co-ordinates are not - * contained within a line. + + * Return byte offset within UTF8 textplain content. + * + * given the co-ordinates of a point within a textplain content. 'dir' + * specifies the direction in which to search (-1 = above-left, +1 = + * below-right) if the co-ordinates are not contained within a line. * - * \param h content of type CONTENT_TEXTPLAIN + * \param c content of type CONTENT_TEXTPLAIN * \param x x ordinate of point * \param y y ordinate of point * \param dir direction of search if not within line @@ -1216,7 +1217,7 @@ int textplain_coord_from_offset(const char *text, size_t offset, size_t length) * Given a range of byte offsets within a UTF8 textplain content, * return a box that fully encloses the text * - * \param h content of type CONTENT_TEXTPLAIN + * \param c content of type CONTENT_TEXTPLAIN * \param start byte offset of start of text range * \param end byte offset of end * \param r rectangle to be completed @@ -1273,7 +1274,7 @@ void textplain_coords_from_range(struct content *c, unsigned start, /** * Return a pointer to the requested line of text. * - * \param h content of type CONTENT_TEXTPLAIN + * \param c content of type CONTENT_TEXTPLAIN * \param lineno line number * \param poffset receives byte offset of line start within text * \param plen receives length of returned line @@ -1303,7 +1304,7 @@ char *textplain_get_line(struct content *c, unsigned lineno, * text to fit the window width. Thus only hard newlines are preserved * in the saved/copied text of a selection. * - * \param h content of type CONTENT_TEXTPLAIN + * \param c content of type CONTENT_TEXTPLAIN * \param start starting byte offset within UTF-8 text * \param end ending byte offset * \param plen receives validated length |