/* browser_html: see browser_html.h. A deliberately tolerant parser: bad * nesting is repaired, unknown tags are transparent, and the CSS engine only * implements the properties in the browser's documented subset. */ #include "browser_html.h" #include static int is_space(char c); static int is_ident(char c); /* ---- storage (one document per process) ---- */ static struct br_node nodes_store[BR_MAX_NODES]; static char text_store[BR_TEXT_SIZE]; static char attr_store[BR_ATTR_SIZE]; static struct br_rule rule_fallback[BR_RULE_FALLBACK]; static char css_store[BR_CSS_SIZE]; static int root_font_px = 16; #define BR_BG_URLS 16 static char bg_urls[BR_BG_URLS][192]; static unsigned int bg_url_count; /* @font-face definitions, one document at a time. The URL is resolved by * the browser against `base` (the sheet URL, or the page URL for