72 err = dom_node_get_parent_node(n, &
parent);
73 if (err != DOM_NO_ERR)
81 if (err != DOM_NO_ERR)
84 if (
type != DOM_DOCUMENT_NODE)
126 s = dom_string_data(ds);
128 for (i = 0, n = 1; s[i]; i++)
136 for (i = 0; i != n; i++) {
140 length[i].
value = strtof(s, &end);
141 if (length[i].
value <= 0) {
156 while (*s && *s !=
',') {
177 if (f->
url != NULL) {
194 unsigned int row, col, index, i;
195 unsigned int rows = 1, cols = 1;
202 bool default_border =
true;
203 colour default_border_colour = 0x000000;
206 err = dom_element_get_attribute(n, corestring_dom_rows, &s);
207 if (err == DOM_NO_ERR && s != NULL) {
210 if (row_height == NULL)
214 if (row_height == NULL)
216 row_height->
value = 100;
217 row_height->
unit = FRAME_DIMENSION_PERCENT;
220 err = dom_element_get_attribute(n, corestring_dom_cols, &s);
221 if (err == DOM_NO_ERR && s != NULL) {
224 if (col_width == NULL) {
230 if (col_width == NULL) {
234 col_width->value = 100;
235 col_width->unit = FRAME_DIMENSION_PERCENT;
239 err = dom_element_get_attribute(n, corestring_dom_border, &s);
240 if (err == DOM_NO_ERR && s != NULL) {
241 if ((dom_string_data(s)[0] ==
'0') &&
242 (dom_string_data(s)[1] ==
'\0'))
243 default_border =
false;
248 err = dom_element_get_attribute(n, corestring_dom_frameborder, &s);
249 if (err == DOM_NO_ERR && s != NULL) {
250 if (dom_string_caseless_lwc_isequal(s,
251 corestring_lwc_no) == 0)
252 default_border =
false;
258 err = dom_element_get_attribute(n, corestring_dom_bordercolor, &s);
259 if (err == DOM_NO_ERR && s != NULL) {
277 for (row = 0; row <
rows; row++) {
278 for (col = 0; col <
cols; col++) {
279 index = (row *
cols) + col;
283 frame->
width = col_width[col];
284 frame->
height = row_height[row];
291 frame->
border = default_border;
300 err = dom_node_get_first_child(n, &c);
301 if (err != DOM_NO_ERR)
304 for (row = 0; c != NULL && row <
rows; row++) {
305 for (col = 0; c != NULL && col <
cols; col++) {
310 err = dom_node_get_node_type(c, &
type);
311 if (err != DOM_NO_ERR) {
316 err = dom_node_get_node_name(c, &
name);
317 if (err != DOM_NO_ERR) {
322 if (
type != DOM_ELEMENT_NODE ||
323 (!dom_string_caseless_lwc_isequal(
325 corestring_lwc_frame) &&
326 !dom_string_caseless_lwc_isequal(
328 corestring_lwc_frameset
330 err = dom_node_get_next_sibling(c,
332 if (err != DOM_NO_ERR) {
333 dom_string_unref(
name);
338 dom_string_unref(
name);
343 dom_string_unref(
name);
352 index = (row *
cols) + col;
356 err = dom_node_get_node_name(c, &s);
357 if (err != DOM_NO_ERR) {
362 if (dom_string_caseless_lwc_isequal(s,
363 corestring_lwc_frameset)) {
372 err = dom_node_get_next_sibling(c, &next);
373 if (err != DOM_NO_ERR) {
387 err = dom_element_get_attribute(c, corestring_dom_src, &s);
388 if (err == DOM_NO_ERR && s != NULL) {
404 err = dom_element_get_attribute(c, corestring_dom_name, &s);
405 if (err == DOM_NO_ERR && s != NULL) {
411 if (dom_element_has_attribute(c, corestring_dom_noresize,
419 err = dom_element_get_attribute(c, corestring_dom_frameborder,
421 if (err == DOM_NO_ERR && s != NULL) {
422 i = atoi(dom_string_data(s));
427 err = dom_element_get_attribute(c, corestring_dom_scrolling, &s);
428 if (err == DOM_NO_ERR && s != NULL) {
429 if (dom_string_caseless_lwc_isequal(s,
432 else if (dom_string_caseless_lwc_isequal(s,
438 err = dom_element_get_attribute(c, corestring_dom_marginwidth,
440 if (err == DOM_NO_ERR && s != NULL) {
445 err = dom_element_get_attribute(c, corestring_dom_marginheight,
447 if (err == DOM_NO_ERR && s != NULL) {
452 err = dom_element_get_attribute(c, corestring_dom_bordercolor,
454 if (err == DOM_NO_ERR && s != NULL) {
466 err = dom_node_get_next_sibling(c, &next);
467 if (err != DOM_NO_ERR) {
494 if (f->
url != NULL) {
517 const char *attribute,
522 dom_string *attr, *attr_name;
525 err = dom_string_create_interned((
const uint8_t *) attribute,
526 strlen(attribute), &attr_name);
527 if (err != DOM_NO_ERR)
530 err = dom_element_get_attribute(n, attr_name, &attr);
531 if (err != DOM_NO_ERR) {
532 dom_string_unref(attr_name);
536 dom_string_unref(attr_name);
541 dom_string_unref(attr);
562 struct box *inline_container, *inline_box;
563 uint8_t display = css_computed_display_static(
box->
style);
566 case CSS_DISPLAY_GRID:
567 case CSS_DISPLAY_FLEX:
568 case CSS_DISPLAY_BLOCK:
576 inline_container =
box_create(NULL, 0,
false, 0, 0, 0, 0, html->
bctx);
577 if (!inline_container)
605 char *text_nowrap = NULL;
610 err = dom_node_get_text_content(n, &
content);
611 if (err != DOM_NO_ERR)
624 err = dom_element_get_attribute(n, corestring_dom_value, &s);
625 if (err == DOM_NO_ERR && s != NULL) {
626 value = strdup(dom_string_data(s));
629 value = strdup(
text);
635 if (dom_element_has_attribute(n, corestring_dom_selected, &selected) != DOM_NO_ERR) {
642 if (text_nowrap == NULL)
645 if (
form_add_option(control, value, text_nowrap, selected, n) ==
false)
686 bool *convert_children)
693 err = dom_element_get_attribute(n, corestring_dom_href, &s);
694 if (err == DOM_NO_ERR && s != NULL) {
707 err = dom_element_get_attribute(n, corestring_dom_name, &s);
708 if (err == DOM_NO_ERR && s != NULL) {
709 lwc_string *lwc_name;
711 err = dom_string_intern(s, &lwc_name);
715 if (err == DOM_NO_ERR) {
718 lwc_string_unref(
box->
id);
724 err = dom_element_get_attribute(n, corestring_dom_target, &s);
725 if (err == DOM_NO_ERR && s != NULL) {
726 if (dom_string_caseless_lwc_isequal(s,
727 corestring_lwc__blank))
729 else if (dom_string_caseless_lwc_isequal(s,
730 corestring_lwc__top))
732 else if (dom_string_caseless_lwc_isequal(s,
733 corestring_lwc__parent))
735 else if (dom_string_caseless_lwc_isequal(s,
736 corestring_lwc__self))
764 bool *convert_children)
768 css_computed_background_color(
box->
style, &color);
786 bool *convert_children)
800 bool *convert_children)
828 bool *convert_children)
831 if (!
content->enable_scripting) {
834 *convert_children =
false;
855 bool *convert_children)
859 dom_namednodemap *attrs;
883 err = dom_element_get_attribute(n, corestring_dom_src, &src);
884 if (err != DOM_NO_ERR || src == NULL)
887 ¶ms->
data) ==
false) {
888 dom_string_unref(src);
892 dom_string_unref(src);
894 if (params->
data == NULL)
902 err = dom_node_get_attributes(n, &attrs);
903 if (err != DOM_NO_ERR)
906 err = dom_namednodemap_get_length(attrs, &num_attrs);
907 if (err != DOM_NO_ERR) {
908 dom_namednodemap_unref(attrs);
912 for (idx = 0; idx < num_attrs; idx++) {
916 err = dom_namednodemap_item(attrs, idx, (
void *) &attr);
917 if (err != DOM_NO_ERR) {
918 dom_namednodemap_unref(attrs);
922 err = dom_attr_get_name(attr, &
name);
923 if (err != DOM_NO_ERR) {
924 dom_node_unref(attr);
925 dom_namednodemap_unref(attrs);
929 if (dom_string_caseless_lwc_isequal(
name, corestring_lwc_src)) {
930 dom_node_unref(attr);
931 dom_string_unref(
name);
935 err = dom_attr_get_value(attr, &
value);
936 if (err != DOM_NO_ERR) {
937 dom_node_unref(attr);
938 dom_string_unref(
name);
939 dom_namednodemap_unref(attrs);
945 dom_node_unref(attr);
946 dom_string_unref(
value);
947 dom_string_unref(
name);
948 dom_namednodemap_unref(attrs);
958 dom_string_unref(
value);
959 dom_string_unref(
name);
960 dom_node_unref(attr);
962 if (param->
name == NULL || param->
value == NULL ||
964 dom_namednodemap_unref(attrs);
972 dom_namednodemap_unref(attrs);
989 bool *convert_children)
994 NSLOG(netsurf, INFO,
"Error: multiple framesets in document.");
996 if (convert_children)
997 *convert_children =
false;
1014 if (convert_children) {
1015 *convert_children =
false;
1028 bool *convert_children)
1041 css_computed_visibility(
box->
style) == CSS_VISIBILITY_HIDDEN) {
1049 err = dom_element_get_attribute(n, corestring_dom_src, &s);
1050 if (err != DOM_NO_ERR || s == NULL)
1053 dom_string_unref(s);
1056 dom_string_unref(s);
1068 if (iframe == NULL) {
1078 iframe->
name = NULL;
1088 err = dom_element_get_attribute(n, corestring_dom_name, &s);
1089 if (err == DOM_NO_ERR && s != NULL) {
1091 dom_string_unref(s);
1094 err = dom_element_get_attribute(n, corestring_dom_frameborder, &s);
1095 if (err == DOM_NO_ERR && s != NULL) {
1096 i = atoi(dom_string_data(s));
1097 iframe->
border = (i != 0);
1098 dom_string_unref(s);
1101 err = dom_element_get_attribute(n, corestring_dom_bordercolor, &s);
1102 if (err == DOM_NO_ERR && s != NULL) {
1108 dom_string_unref(s);
1111 err = dom_element_get_attribute(n, corestring_dom_scrolling, &s);
1112 if (err == DOM_NO_ERR && s != NULL) {
1113 if (dom_string_caseless_lwc_isequal(s,
1114 corestring_lwc_yes))
1116 else if (dom_string_caseless_lwc_isequal(s,
1119 dom_string_unref(s);
1122 err = dom_element_get_attribute(n, corestring_dom_marginwidth, &s);
1123 if (err == DOM_NO_ERR && s != NULL) {
1125 dom_string_unref(s);
1128 err = dom_element_get_attribute(n, corestring_dom_marginheight, &s);
1129 if (err == DOM_NO_ERR && s != NULL) {
1131 dom_string_unref(s);
1140 if (convert_children)
1141 *convert_children =
false;
1153 bool *convert_children)
1159 enum css_width_e wtype;
1160 enum css_height_e htype;
1161 css_fixed value = 0;
1162 css_unit wunit = CSS_UNIT_PX;
1163 css_unit hunit = CSS_UNIT_PX;
1170 err = dom_element_get_attribute(n, corestring_dom_alt, &s);
1171 if (err == DOM_NO_ERR && s != NULL) {
1173 dom_string_unref(s);
1194 err = dom_element_get_attribute(n, corestring_dom_src, &s);
1195 if (err != DOM_NO_ERR || s == NULL)
1199 dom_string_unref(s);
1203 dom_string_unref(s);
1213 wtype = css_computed_width(
box->
style, &value, &wunit);
1214 htype = css_computed_height(
box->
style, &value, &hunit);
1216 if (wtype == CSS_WIDTH_SET &&
1217 wunit != CSS_UNIT_PCT &&
1218 htype == CSS_HEIGHT_SET &&
1219 hunit != CSS_UNIT_PCT) {
1236 bool *convert_children)
1239 dom_string *
type = NULL;
1245 if (gadget == NULL) {
1255 err = dom_element_get_attribute(n, corestring_dom_type, &
type);
1256 if ((err != DOM_NO_ERR) || (
type == NULL)) {
1261 *convert_children =
false;
1265 if (dom_string_caseless_lwc_isequal(
type, corestring_lwc_password)) {
1269 }
else if (dom_string_caseless_lwc_isequal(
type, corestring_lwc_file)) {
1272 }
else if (dom_string_caseless_lwc_isequal(
type,
1273 corestring_lwc_hidden)) {
1277 }
else if ((dom_string_caseless_lwc_isequal(
type,
1278 corestring_lwc_checkbox) ||
1279 dom_string_caseless_lwc_isequal(
type,
1280 corestring_lwc_radio))) {
1282 }
else if (dom_string_caseless_lwc_isequal(
type,
1283 corestring_lwc_submit) ||
1284 dom_string_caseless_lwc_isequal(
type,
1285 corestring_lwc_reset) ||
1286 dom_string_caseless_lwc_isequal(
type,
1287 corestring_lwc_button)) {
1288 struct box *inline_container, *inline_box;
1293 inline_container =
box_create(NULL, 0,
false, 0, 0, 0, 0,
1295 if (inline_container == NULL)
1302 if (inline_box == NULL)
1320 if (inline_box->
text == NULL)
1323 inline_box->
length = strlen(inline_box->
text);
1329 }
else if (dom_string_caseless_lwc_isequal(
type,
1330 corestring_lwc_image)) {
1338 err = dom_element_get_attribute(n, corestring_dom_src, &s);
1339 if (err == DOM_NO_ERR && s != NULL) {
1341 dom_string_data(s), &url);
1342 dom_string_unref(s);
1369 dom_string_unref(
type);
1371 *convert_children =
false;
1376 dom_string_unref(
type);
1389 bool *convert_children)
1392 if (
content->enable_scripting) {
1393 *convert_children =
false;
1407 bool *convert_children)
1411 dom_string *codebase, *classid, *data;
1431 params->
data = NULL;
1432 params->
type = NULL;
1440 err = dom_element_get_attribute(n, corestring_dom_codebase, &codebase);
1441 if (err == DOM_NO_ERR && codebase != NULL) {
1444 dom_string_unref(codebase);
1447 dom_string_unref(codebase);
1452 err = dom_element_get_attribute(n, corestring_dom_classid, &classid);
1453 if (err == DOM_NO_ERR && classid != NULL) {
1456 dom_string_unref(classid);
1459 dom_string_unref(classid);
1462 err = dom_element_get_attribute(n, corestring_dom_data, &data);
1463 if (err == DOM_NO_ERR && data != NULL) {
1466 dom_string_unref(data);
1469 dom_string_unref(data);
1472 if (params->
classid == NULL && params->
data == NULL)
1496 if (params->
classid != NULL && params->
data == NULL &&
1498 lwc_string *icodetype;
1501 lerror = lwc_intern_string(params->
codetype,
1502 strlen(params->
codetype), &icodetype);
1503 if (lerror != lwc_error_ok)
1509 lwc_string_unref(icodetype);
1513 lwc_string_unref(icodetype);
1516 if (params->
data != NULL && params->
type != NULL) {
1520 lerror = lwc_intern_string(params->
type, strlen(params->
type),
1522 if (lerror != lwc_error_ok)
1528 lwc_string_unref(itype);
1532 lwc_string_unref(itype);
1536 err = dom_node_get_first_child(n, &c);
1537 if (err != DOM_NO_ERR)
1544 err = dom_node_get_node_type(c, &
type);
1545 if (err != DOM_NO_ERR) {
1550 if (
type == DOM_ELEMENT_NODE) {
1553 err = dom_node_get_node_name(c, &
name);
1554 if (err != DOM_NO_ERR) {
1559 if (!dom_string_caseless_lwc_isequal(
name,
1560 corestring_lwc_param)) {
1564 dom_string_unref(
name);
1568 dom_string_unref(
name);
1571 if (param == NULL) {
1576 param->
value = NULL;
1582 ¶m->
name) ==
false) {
1588 ¶m->
value) ==
false) {
1594 ¶m->
type) ==
false) {
1617 err = dom_node_get_next_sibling(c, &
next);
1618 if (err != DOM_NO_ERR) {
1638 *convert_children =
false;
1650 bool *convert_children)
1664 bool *convert_children)
1666 struct box *inline_container;
1667 struct box *inline_box;
1670 dom_node *
next, *next2;
1678 err = dom_node_get_first_child(n, &c);
1679 if (err != DOM_NO_ERR) {
1687 err = dom_node_get_node_name(c, &
name);
1688 if (err != DOM_NO_ERR) {
1694 if (dom_string_caseless_lwc_isequal(
name,
1695 corestring_lwc_option)) {
1696 dom_string_unref(
name);
1703 }
else if (dom_string_caseless_lwc_isequal(
name,
1704 corestring_lwc_optgroup)) {
1705 dom_string_unref(
name);
1707 err = dom_node_get_first_child(c, &c2);
1708 if (err != DOM_NO_ERR) {
1714 while (c2 != NULL) {
1715 dom_string *c2_name;
1717 err = dom_node_get_node_name(c2, &c2_name);
1718 if (err != DOM_NO_ERR) {
1725 if (dom_string_caseless_lwc_isequal(c2_name,
1726 corestring_lwc_option)) {
1727 dom_string_unref(c2_name);
1737 dom_string_unref(c2_name);
1740 err = dom_node_get_next_sibling(c2, &next2);
1741 if (err != DOM_NO_ERR) {
1752 dom_string_unref(
name);
1755 err = dom_node_get_next_sibling(c, &
next);
1756 if (err != DOM_NO_ERR) {
1766 if (gadget->
data.select.num_items == 0) {
1778 if (inline_container == NULL)
1783 if (inline_box == NULL)
1789 if (gadget->
data.select.multiple ==
false &&
1790 gadget->
data.select.num_selected == 0) {
1791 gadget->
data.select.current = gadget->
data.select.items;
1792 gadget->
data.select.current->initial_selected =
1793 gadget->
data.select.current->selected =
true;
1794 gadget->
data.select.num_selected = 1;
1795 dom_html_option_element_set_selected(
1796 gadget->
data.select.current->node,
true);
1799 if (gadget->
data.select.num_selected == 0)
1802 else if (gadget->
data.select.num_selected == 1)
1804 gadget->
data.select.current->text);
1808 if (inline_box->
text == NULL)
1811 inline_box->
length = strlen(inline_box->
text);
1813 *convert_children =
false;
1827 bool *convert_children)
1841 *convert_children =
false;
1856 bool *convert_children)
1859 dom_html_element_type tag_type;
1862 exc = dom_html_element_get_tag_type(
node, &tag_type);
1863 if (exc != DOM_NO_ERR) {
1864 tag_type = DOM_HTML_ELEMENT_TYPE__UNKNOWN;
1868 case DOM_HTML_ELEMENT_TYPE_A:
1872 case DOM_HTML_ELEMENT_TYPE_BODY:
1876 case DOM_HTML_ELEMENT_TYPE_BR:
1880 case DOM_HTML_ELEMENT_TYPE_BUTTON:
1884 case DOM_HTML_ELEMENT_TYPE_CANVAS:
1888 case DOM_HTML_ELEMENT_TYPE_EMBED:
1892 case DOM_HTML_ELEMENT_TYPE_FRAMESET:
1896 case DOM_HTML_ELEMENT_TYPE_IFRAME:
1900 case DOM_HTML_ELEMENT_TYPE_IMG:
1904 case DOM_HTML_ELEMENT_TYPE_INPUT:
1908 case DOM_HTML_ELEMENT_TYPE_NOSCRIPT:
1912 case DOM_HTML_ELEMENT_TYPE_OBJECT:
1916 case DOM_HTML_ELEMENT_TYPE_PRE:
1920 case DOM_HTML_ELEMENT_TYPE_SELECT:
1924 case DOM_HTML_ELEMENT_TYPE_TEXTAREA:
Helpers for ASCII string handling.
static bool ascii_is_space(char c)
Test whether a character is a whitespace character.
bool box_extract_link(const html_content *content, const dom_string *dsrel, nsurl *base, nsurl **result)
HTML Box tree construction interface.
struct box * box_create(css_select_results *styles, css_computed_style *style, bool style_owned, nsurl *href, const char *target, const char *title, lwc_string *id, void *context)
Create a box tree node.
void box_add_child(struct box *parent, struct box *child)
Add a child to a box tree node.
Box tree manipulation interface.
static struct frame_dimension * box_parse_multi_lengths(const dom_string *ds, unsigned int *count)
Parse a multi-length-list, as defined by HTML 4.01.
static bool box_embed(dom_node *n, html_content *content, struct box *box, bool *convert_children)
Embedded object (not in any HTML specification: see http://wp.netscape.com/assist/net_sites/new_html3...
static bool box_textarea(dom_node *n, html_content *content, struct box *box, bool *convert_children)
Multi-line text field [17.7].
static bool box_canvas(dom_node *n, html_content *content, struct box *box, bool *convert_children)
Canvas element.
static bool box_button(dom_node *n, html_content *content, struct box *box, bool *convert_children)
special element handler for Push button [17.5].
static bool box_noscript(dom_node *n, html_content *content, struct box *box, bool *convert_children)
Noscript element.
static bool box_a(dom_node *n, html_content *content, struct box *box, bool *convert_children)
special element handler for Anchor [12.2].
bool convert_special_elements(dom_node *node, html_content *content, struct box *box, bool *convert_children)
call an elements special conversion handler
static int box_iframes_talloc_destructor(struct content_html_iframe *f)
Destructor for content_html_iframe, for <iframe> elements.
static bool box_iframe(dom_node *n, html_content *content, struct box *box, bool *convert_children)
Inline subwindow [16.5].
static bool box_input_text(html_content *html, struct box *box, struct dom_node *node)
Helper function for adding textarea widget to box.
static bool box_select_add_option(struct form_control *control, dom_node *n)
Add an option to a form select control (helper function for box_select()).
static int box_object_talloc_destructor(struct object_params *o)
Destructor for object_params, for <object> elements.
static int box_frames_talloc_destructor(struct content_html_frames *f)
Destructor for content_html_frames, for frame elements.
static bool box_br(dom_node *n, html_content *content, struct box *box, bool *convert_children)
special element handler for forced line break [9.3.2].
static bool box_object(dom_node *n, html_content *content, struct box *box, bool *convert_children)
Generic embedded object [13.3].
static bool box_frameset(dom_node *n, html_content *content, struct box *box, bool *convert_children)
Window subdivision [16.2.1].
static bool box_get_attribute(dom_node *n, const char *attribute, void *context, char **value)
Get the value of a dom node element's attribute.
static bool box_is_root(dom_node *n)
determine if a box is the root node
static bool box_select(dom_node *n, html_content *content, struct box *box, bool *convert_children)
Option selector [17.6].
static bool box_create_frameset(struct content_html_frames *f, dom_node *n, html_content *content)
create a frameset box tree
static bool box_pre(dom_node *n, html_content *content, struct box *box, bool *convert_children)
Preformatted text [9.3.4].
static bool box_image(dom_node *n, html_content *content, struct box *box, bool *convert_children)
Embedded image [13.2].
static bool box_body(dom_node *n, html_content *content, struct box *box, bool *convert_children)
Document body special element handler [7.5.1].
static const content_type image_types
static bool box_input(dom_node *n, html_content *content, struct box *box, bool *convert_children)
Form control [17.4].
HTML Box tree construction special element conversion interface.
bool box_textarea_create_textarea(html_content *html, struct box *box, struct dom_node *node)
Create textarea widget for a form element.
Box tree treeview box replacement (interface).
static uint32_t count(const http_directive *list, lwc_string *key)
static uint8_t ns_computed_display(const css_computed_style *style, bool root)
Temporary helper wrappers for for libcss computed style getter, while we don't support all values of ...
bool html_fetch_object(html_content *c, nsurl *url, struct box *box, content_type permitted_types, bool background)
Start a fetch for an object required by a page.
HTML content object interface.
content_type content_factory_type_from_mime_type(lwc_string *mime_type)
Compute the generic content type for a MIME type.
content_type
The type of a content.
@ CONTENT_IMAGE
All images.
@ CONTENT_NONE
no type for content
@ CONTENT_ANY
Any content matches.
Useful interned string pointers (interface).
nserror
Enumeration of error codes.
Interface to browser frames.
bool nscss_parse_colour(const char *data, css_color *result)
Parser for colours specified in attribute values.
Interface to text/html content handler.
#define nscss_color_is_transparent(color)
Determine if a CSS color primitive is transparent.
#define nscss_color_to_ns(c)
Convert a CSS color to a NetSurf colour primitive.
#define NSLOG(catname, level, logmsg, args...)
const char * messages_get(const char *key)
Fast lookup of a message by key from the standard Messages hash.
Localised message support (interface).
NetSurf URL handling (interface).
bool nsurl_compare(const nsurl *url1, const nsurl *url2, nsurl_component parts)
Compare two URLs.
void nsurl_unref(nsurl *url)
Drop a reference to a NetSurf URL object.
nsurl * nsurl_ref(nsurl *url)
Increment the reference count to a NetSurf URL object.
nserror nsurl_join(const nsurl *base, const char *rel, nsurl **joined)
Join a base url to a relative link part, creating a new NetSurf URL object.
struct nsurl nsurl
NetSurf URL object.
plotter style interfaces, generic styles and style colour helpers.
#define NS_TRANSPARENT
Transparent colour value.
Private data for text/html content.
Interface to utility string handling.
char * cnv_space2nbsp(const char *s)
Converts NUL terminated UTF-8 encoded string s containing zero or more spaces (char 32) or TABs (char...
char * squash_whitespace(const char *s)
Replace consecutive whitespace with a single space.
lwc_string * id
value of id attribute (or name for anchors)
const char * title
Title, or NULL.
char * usemap
(Image)map to use with this object, or NULL if none
const char * target
Link target, or NULL.
box_type type
Type of box.
struct nsurl * href
Link, or NULL.
css_computed_style * style
Style for this box.
size_t length
Length of text.
struct object_params * object_params
Parameters for the object, or NULL.
char * text
Text, or NULL if none.
box_flags flags
Box flags.
struct form_control * gadget
Form control data, or NULL if not a form control.
struct dom_node * node
DOM node that generated this box or NULL.
Frame tree (frameset or frame tag)
char * name
frame margin height
int rows
number of columns in frameset
struct content_html_frames * children
frame border colour
int margin_width
frame width
struct nsurl * url
frame name (for targetting)
browser_scrolling scrolling
frame is not resizable
bool border
scrolling characteristics
colour border_colour
frame has a border
int margin_height
frame margin width
struct frame_dimension width
number of rows in frameset
struct frame_dimension height
frame width
Inline frame list (iframe tag)
struct content_html_iframe * next
frame border colour
int margin_height
frame margin width
browser_scrolling scrolling
frame url
struct nsurl * url
frame name (for targetting)
colour border_colour
frame has a border
bool border
scrolling characteristics
char * name
frame margin height
Content which corresponds to a single URL.
enum frame_dimension::@63 unit
@ FRAME_DIMENSION_PERCENT
@ FRAME_DIMENSION_RELATIVE
Data specific to CONTENT_HTML.
int * bctx
A talloc context purely for the render box tree.
Linked list of object element parameters.
struct object_param * next
Parameters for object element and similar elements.
struct object_param * params
char * talloc_strdup(const void *t, const char *p)
#define talloc_array(ctx, type, count)
#define talloc_set_destructor(ptr, function)
#define talloc_zero(ctx, type)
#define talloc(ctx, type)
uint32_t colour
Colour type: XBGR.
Option reading and saving interface.
#define nsoption_bool(OPTION)
Get the value of a boolean option.
static nserror text(const struct redraw_context *ctx, const struct plot_font_style *fstyle, int x, int y, const char *text, size_t length)
Text plotting.