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) {
719 lwc_string_unref(
box->
id);
726 err = dom_element_get_attribute(n, corestring_dom_target, &s);
727 if (err == DOM_NO_ERR && s != NULL) {
728 if (dom_string_caseless_lwc_isequal(s,
729 corestring_lwc__blank))
731 else if (dom_string_caseless_lwc_isequal(s,
732 corestring_lwc__top))
734 else if (dom_string_caseless_lwc_isequal(s,
735 corestring_lwc__parent))
737 else if (dom_string_caseless_lwc_isequal(s,
738 corestring_lwc__self))
766 bool *convert_children)
770 css_computed_background_color(
box->
style, &color);
788 bool *convert_children)
802 bool *convert_children)
830 bool *convert_children)
833 if (!
content->enable_scripting) {
836 *convert_children =
false;
857 bool *convert_children)
861 dom_namednodemap *attrs;
885 err = dom_element_get_attribute(n, corestring_dom_src, &src);
886 if (err != DOM_NO_ERR || src == NULL)
889 ¶ms->
data) ==
false) {
890 dom_string_unref(src);
894 dom_string_unref(src);
896 if (params->
data == NULL)
904 err = dom_node_get_attributes(n, &attrs);
905 if (err != DOM_NO_ERR)
908 err = dom_namednodemap_get_length(attrs, &num_attrs);
909 if (err != DOM_NO_ERR) {
910 dom_namednodemap_unref(attrs);
914 for (idx = 0; idx < num_attrs; idx++) {
918 err = dom_namednodemap_item(attrs, idx, (
void *) &attr);
919 if (err != DOM_NO_ERR) {
920 dom_namednodemap_unref(attrs);
924 err = dom_attr_get_name(attr, &
name);
925 if (err != DOM_NO_ERR) {
926 dom_node_unref(attr);
927 dom_namednodemap_unref(attrs);
931 if (dom_string_caseless_lwc_isequal(
name, corestring_lwc_src)) {
932 dom_node_unref(attr);
933 dom_string_unref(
name);
937 err = dom_attr_get_value(attr, &
value);
938 if (err != DOM_NO_ERR) {
939 dom_node_unref(attr);
940 dom_string_unref(
name);
941 dom_namednodemap_unref(attrs);
947 dom_node_unref(attr);
948 dom_string_unref(
value);
949 dom_string_unref(
name);
950 dom_namednodemap_unref(attrs);
960 dom_string_unref(
value);
961 dom_string_unref(
name);
962 dom_node_unref(attr);
964 if (param->
name == NULL || param->
value == NULL ||
966 dom_namednodemap_unref(attrs);
974 dom_namednodemap_unref(attrs);
991 bool *convert_children)
996 NSLOG(netsurf, INFO,
"Error: multiple framesets in document.");
998 if (convert_children)
999 *convert_children =
false;
1016 if (convert_children) {
1017 *convert_children =
false;
1030 bool *convert_children)
1043 css_computed_visibility(
box->
style) == CSS_VISIBILITY_HIDDEN) {
1051 err = dom_element_get_attribute(n, corestring_dom_src, &s);
1052 if (err != DOM_NO_ERR || s == NULL)
1055 dom_string_unref(s);
1058 dom_string_unref(s);
1070 if (iframe == NULL) {
1080 iframe->
name = NULL;
1090 err = dom_element_get_attribute(n, corestring_dom_name, &s);
1091 if (err == DOM_NO_ERR && s != NULL) {
1093 dom_string_unref(s);
1096 err = dom_element_get_attribute(n, corestring_dom_frameborder, &s);
1097 if (err == DOM_NO_ERR && s != NULL) {
1098 i = atoi(dom_string_data(s));
1099 iframe->
border = (i != 0);
1100 dom_string_unref(s);
1103 err = dom_element_get_attribute(n, corestring_dom_bordercolor, &s);
1104 if (err == DOM_NO_ERR && s != NULL) {
1110 dom_string_unref(s);
1113 err = dom_element_get_attribute(n, corestring_dom_scrolling, &s);
1114 if (err == DOM_NO_ERR && s != NULL) {
1115 if (dom_string_caseless_lwc_isequal(s,
1116 corestring_lwc_yes))
1118 else if (dom_string_caseless_lwc_isequal(s,
1121 dom_string_unref(s);
1124 err = dom_element_get_attribute(n, corestring_dom_marginwidth, &s);
1125 if (err == DOM_NO_ERR && s != NULL) {
1127 dom_string_unref(s);
1130 err = dom_element_get_attribute(n, corestring_dom_marginheight, &s);
1131 if (err == DOM_NO_ERR && s != NULL) {
1133 dom_string_unref(s);
1142 if (convert_children)
1143 *convert_children =
false;
1155 bool *convert_children)
1161 enum css_width_e wtype;
1162 enum css_height_e htype;
1163 css_fixed value = 0;
1164 css_unit wunit = CSS_UNIT_PX;
1165 css_unit hunit = CSS_UNIT_PX;
1172 err = dom_element_get_attribute(n, corestring_dom_alt, &s);
1173 if (err == DOM_NO_ERR && s != NULL) {
1175 dom_string_unref(s);
1196 err = dom_element_get_attribute(n, corestring_dom_src, &s);
1197 if (err != DOM_NO_ERR || s == NULL)
1201 dom_string_unref(s);
1205 dom_string_unref(s);
1215 wtype = css_computed_width(
box->
style, &value, &wunit);
1216 htype = css_computed_height(
box->
style, &value, &hunit);
1218 if (wtype == CSS_WIDTH_SET &&
1219 wunit != CSS_UNIT_PCT &&
1220 htype == CSS_HEIGHT_SET &&
1221 hunit != CSS_UNIT_PCT) {
1238 bool *convert_children)
1241 dom_string *
type = NULL;
1247 if (gadget == NULL) {
1257 err = dom_element_get_attribute(n, corestring_dom_type, &
type);
1258 if ((err != DOM_NO_ERR) || (
type == NULL)) {
1263 *convert_children =
false;
1267 if (dom_string_caseless_lwc_isequal(
type, corestring_lwc_password)) {
1271 }
else if (dom_string_caseless_lwc_isequal(
type, corestring_lwc_file)) {
1274 }
else if (dom_string_caseless_lwc_isequal(
type,
1275 corestring_lwc_hidden)) {
1279 }
else if ((dom_string_caseless_lwc_isequal(
type,
1280 corestring_lwc_checkbox) ||
1281 dom_string_caseless_lwc_isequal(
type,
1282 corestring_lwc_radio))) {
1284 }
else if (dom_string_caseless_lwc_isequal(
type,
1285 corestring_lwc_submit) ||
1286 dom_string_caseless_lwc_isequal(
type,
1287 corestring_lwc_reset) ||
1288 dom_string_caseless_lwc_isequal(
type,
1289 corestring_lwc_button)) {
1290 struct box *inline_container, *inline_box;
1295 inline_container =
box_create(NULL, 0,
false, 0, 0, 0, 0,
1297 if (inline_container == NULL)
1304 if (inline_box == NULL)
1322 if (inline_box->
text == NULL)
1325 inline_box->
length = strlen(inline_box->
text);
1331 }
else if (dom_string_caseless_lwc_isequal(
type,
1332 corestring_lwc_image)) {
1340 err = dom_element_get_attribute(n, corestring_dom_src, &s);
1341 if (err == DOM_NO_ERR && s != NULL) {
1343 dom_string_data(s), &url);
1344 dom_string_unref(s);
1371 dom_string_unref(
type);
1373 *convert_children =
false;
1378 dom_string_unref(
type);
1391 bool *convert_children)
1394 if (
content->enable_scripting) {
1395 *convert_children =
false;
1409 bool *convert_children)
1413 dom_string *codebase, *classid, *data;
1433 params->
data = NULL;
1434 params->
type = NULL;
1442 err = dom_element_get_attribute(n, corestring_dom_codebase, &codebase);
1443 if (err == DOM_NO_ERR && codebase != NULL) {
1446 dom_string_unref(codebase);
1449 dom_string_unref(codebase);
1454 err = dom_element_get_attribute(n, corestring_dom_classid, &classid);
1455 if (err == DOM_NO_ERR && classid != NULL) {
1458 dom_string_unref(classid);
1461 dom_string_unref(classid);
1464 err = dom_element_get_attribute(n, corestring_dom_data, &data);
1465 if (err == DOM_NO_ERR && data != NULL) {
1468 dom_string_unref(data);
1471 dom_string_unref(data);
1474 if (params->
classid == NULL && params->
data == NULL)
1498 if (params->
classid != NULL && params->
data == NULL &&
1500 lwc_string *icodetype;
1503 lerror = lwc_intern_string(params->
codetype,
1504 strlen(params->
codetype), &icodetype);
1505 if (lerror != lwc_error_ok)
1511 lwc_string_unref(icodetype);
1515 lwc_string_unref(icodetype);
1518 if (params->
data != NULL && params->
type != NULL) {
1522 lerror = lwc_intern_string(params->
type, strlen(params->
type),
1524 if (lerror != lwc_error_ok)
1530 lwc_string_unref(itype);
1534 lwc_string_unref(itype);
1538 err = dom_node_get_first_child(n, &c);
1539 if (err != DOM_NO_ERR)
1546 err = dom_node_get_node_type(c, &
type);
1547 if (err != DOM_NO_ERR) {
1552 if (
type == DOM_ELEMENT_NODE) {
1555 err = dom_node_get_node_name(c, &
name);
1556 if (err != DOM_NO_ERR) {
1561 if (!dom_string_caseless_lwc_isequal(
name,
1562 corestring_lwc_param)) {
1566 dom_string_unref(
name);
1570 dom_string_unref(
name);
1573 if (param == NULL) {
1578 param->
value = NULL;
1584 ¶m->
name) ==
false) {
1590 ¶m->
value) ==
false) {
1596 ¶m->
type) ==
false) {
1619 err = dom_node_get_next_sibling(c, &
next);
1620 if (err != DOM_NO_ERR) {
1640 *convert_children =
false;
1652 bool *convert_children)
1666 bool *convert_children)
1668 struct box *inline_container;
1669 struct box *inline_box;
1672 dom_node *
next, *next2;
1680 err = dom_node_get_first_child(n, &c);
1681 if (err != DOM_NO_ERR) {
1689 err = dom_node_get_node_name(c, &
name);
1690 if (err != DOM_NO_ERR) {
1696 if (dom_string_caseless_lwc_isequal(
name,
1697 corestring_lwc_option)) {
1698 dom_string_unref(
name);
1705 }
else if (dom_string_caseless_lwc_isequal(
name,
1706 corestring_lwc_optgroup)) {
1707 dom_string_unref(
name);
1709 err = dom_node_get_first_child(c, &c2);
1710 if (err != DOM_NO_ERR) {
1716 while (c2 != NULL) {
1717 dom_string *c2_name;
1719 err = dom_node_get_node_name(c2, &c2_name);
1720 if (err != DOM_NO_ERR) {
1727 if (dom_string_caseless_lwc_isequal(c2_name,
1728 corestring_lwc_option)) {
1729 dom_string_unref(c2_name);
1739 dom_string_unref(c2_name);
1742 err = dom_node_get_next_sibling(c2, &next2);
1743 if (err != DOM_NO_ERR) {
1754 dom_string_unref(
name);
1757 err = dom_node_get_next_sibling(c, &
next);
1758 if (err != DOM_NO_ERR) {
1768 if (gadget->
data.select.num_items == 0) {
1780 if (inline_container == NULL)
1785 if (inline_box == NULL)
1791 if (gadget->
data.select.multiple ==
false &&
1792 gadget->
data.select.num_selected == 0) {
1793 gadget->
data.select.current = gadget->
data.select.items;
1794 gadget->
data.select.current->initial_selected =
1795 gadget->
data.select.current->selected =
true;
1796 gadget->
data.select.num_selected = 1;
1797 dom_html_option_element_set_selected(
1798 gadget->
data.select.current->node,
true);
1801 if (gadget->
data.select.num_selected == 0)
1804 else if (gadget->
data.select.num_selected == 1)
1806 gadget->
data.select.current->text);
1810 if (inline_box->
text == NULL)
1813 inline_box->
length = strlen(inline_box->
text);
1815 *convert_children =
false;
1829 bool *convert_children)
1843 *convert_children =
false;
1858 bool *convert_children)
1861 dom_html_element_type tag_type;
1864 exc = dom_html_element_get_tag_type(
node, &tag_type);
1865 if (exc != DOM_NO_ERR) {
1866 tag_type = DOM_HTML_ELEMENT_TYPE__UNKNOWN;
1870 case DOM_HTML_ELEMENT_TYPE_A:
1874 case DOM_HTML_ELEMENT_TYPE_BODY:
1878 case DOM_HTML_ELEMENT_TYPE_BR:
1882 case DOM_HTML_ELEMENT_TYPE_BUTTON:
1886 case DOM_HTML_ELEMENT_TYPE_CANVAS:
1890 case DOM_HTML_ELEMENT_TYPE_EMBED:
1894 case DOM_HTML_ELEMENT_TYPE_FRAMESET:
1898 case DOM_HTML_ELEMENT_TYPE_IFRAME:
1902 case DOM_HTML_ELEMENT_TYPE_IMG:
1906 case DOM_HTML_ELEMENT_TYPE_INPUT:
1910 case DOM_HTML_ELEMENT_TYPE_NOSCRIPT:
1914 case DOM_HTML_ELEMENT_TYPE_OBJECT:
1918 case DOM_HTML_ELEMENT_TYPE_PRE:
1922 case DOM_HTML_ELEMENT_TYPE_SELECT:
1926 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.