Dillo v3.1.1-119-g140d9ebd
|
Dillo HTML parsing routines. More...
#include <ctype.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <errno.h>
#include "bw.h"
#include "msg.h"
#include "binaryconst.h"
#include "colors.h"
#include "html_charrefs.h"
#include "utf8.hh"
#include "misc.h"
#include "uicmd.hh"
#include "history.h"
#include "menu.hh"
#include "prefs.h"
#include "capi.h"
#include "html.hh"
#include "html_common.hh"
#include "form.hh"
#include "table.hh"
#include "dw/textblock.hh"
#include "dw/bullet.hh"
#include "dw/listitem.hh"
#include "dw/image.hh"
#include "dw/ruler.hh"
Go to the source code of this file.
Macros | |
#define | SGML_SPCDEL 0 |
#define | TAB_SIZE 8 |
#define | NTAGS (sizeof(Tags)/sizeof(Tags[0])) |
Typedefs | |
typedef void(* | TagOpenFunct) (DilloHtml *html, const char *tag, int tagsize) |
typedef void(* | TagCloseFunct) (DilloHtml *html) |
Enumerations | |
enum | DilloHtmlTagParsingState { SEEK_ATTR_START , MATCH_ATTR_NAME , SEEK_TOKEN_START , SEEK_VALUE_START , SKIP_VALUE , GET_VALUE , FINISHED } |
enum | DilloHtmlTagParsingFlags { HTML_LeftTrim = 1 << 0 , HTML_RightTrim = 1 << 1 , HTML_ParseEntities = 1 << 2 } |
Functions | |
void * | a_Html_text (const char *Type, void *P, CA_Callback_t *Call, void **Data) |
Set callback function and callback data for the "html/text" MIME type. | |
static int | Html_write_raw (DilloHtml *html, char *buf, int bufsize, int Eof) |
Here's where we parse the html and put it into the Textblock structure. | |
static bool | Html_load_image (BrowserWindow *bw, DilloUrl *url, const DilloUrl *requester, DilloImage *Image) |
Tell cache to retrieve image. | |
static void | Html_callback (int Op, CacheClient_t *Client) |
Dispatch the apropriate function for 'Op'. | |
static void | Html_tag_cleanup_at_close (DilloHtml *html, int new_idx) |
Conditional cleanup of the stack, called before closing any tag. | |
int | a_Html_tag_index (const char *tag) |
Get 'tag' index. | |
DilloUrl * | a_Html_url_new (DilloHtml *html, const char *url_str, const char *base_url, int use_base_url) |
Wrapper for a_Url_new that adds an error detection message. | |
static void | Html_free (void *data) |
void | a_Html_load_images (void *v_html, DilloUrl *pattern) |
Used by the "Load images" page menuitem. | |
static bool | Html_contains_form (DilloHtml *html, void *v_form) |
Search for form. | |
void | a_Html_form_submit (void *v_html, void *v_form) |
Used by the "Submit form" form menuitem. | |
void | a_Html_form_reset (void *v_html, void *v_form) |
Used by the "Reset form" form menuitem. | |
void | a_Html_form_display_hiddens (void *v_html, void *v_form, bool_t display) |
Used by the "Show/Hide hiddens" form menuitem. | |
static void | Html_set_link_coordinates (DilloHtml *html, int link, int x, int y) |
Set the URL data for image maps. | |
static int | Html_set_new_link (DilloHtml *html, DilloUrl **url) |
Create a new link, set it as the url's parent and return the index. | |
void | a_Html_tag_set_align_attr (DilloHtml *html, const char *tag, int tagsize) |
Evaluates the ALIGN attribute (left|center|right|justify) and sets the style at the top of the stack. | |
bool | a_Html_tag_set_valign_attr (DilloHtml *html, const char *tag, int tagsize) |
Evaluates the VALIGN attribute (top|bottom|middle|baseline) and sets the style in style_attrs. | |
static void | Html_add_textblock (DilloHtml *html, bool addBreaks, int breakSpace, bool addBreakOpt) |
Create and add a new Textblock to the current Textblock. | |
static bool | Html_must_add_breaks (DilloHtml *html) |
void | a_Html_stash_init (DilloHtml *html) |
Initialize the stash buffer. | |
static int | Html_ms_stupid_quotes_2ucs (int codepoint) |
This is M$ non-standard "smart quotes" (w1252). | |
static const char * | Html_parse_numeric_charref (DilloHtml *html, char *tok, bool_t is_attr, int *entsize) |
Parse a numeric character reference (e.g., "/" or "/"). | |
static int | Html_charref_comp (const void *a, const void *b) |
Comparison function for binary search. | |
static Charref_t * | Html_charref_search (char *key) |
Binary search of 'key' in charref list. | |
static const char * | Html_parse_named_charref (DilloHtml *html, char *tok, bool_t is_attr, int *entsize) |
Parse a named character reference (e.g., "&" or "…"). | |
static const char * | Html_parse_entity (DilloHtml *html, const char *token, int toksize, int *entsize, bool_t is_attr) |
Given an entity, return the corresponding string. | |
char * | a_Html_parse_entities (DilloHtml *html, const char *token, int toksize) |
Parse all the entities in a token. | |
static void | Html_process_space_pre_line (DilloHtml *html, const char *space, int spacesize) |
For white-space: pre-line, we must break the line if encountering a newline. | |
static void | Html_process_space (DilloHtml *html, const char *space, int spacesize) |
Parse spaces. | |
static void | Html_process_word (DilloHtml *html, const char *word, int size) |
Handles putting the word into its proper place. | |
static bool | Html_match_tag (const char *tagstr, char *tag, int tagsize) |
Does the tag in tagstr (e.g. | |
static void | Html_eventually_pop_dw (DilloHtml *html, bool hand_over_break) |
This function is called after popping the stack, to handle nested Textblock widgets. | |
static void | Html_push_tag (DilloHtml *html, int tag_idx) |
Push the tag (copying attributes from the top of the stack) | |
static void | Html_force_push_tag (DilloHtml *html, int tag_idx) |
Push the tag (used to force en element with optional open into the stack). | |
static void | Html_real_pop_tag (DilloHtml *html) |
Pop the top tag in the stack. | |
static CssLength | Html_parse_length_or_multi_length (const char *attr, char **endptr) |
CssLength | a_Html_parse_length (DilloHtml *html, const char *attr) |
Returns a length or a percentage, or UNDEF_LENGTH in case of an error, or if attr is NULL. | |
int32_t | a_Html_color_parse (DilloHtml *html, const char *str, int32_t default_color) |
Parse a color attribute. | |
static int | Html_check_name_val (DilloHtml *html, const char *val, const char *attrname) |
Check that 'val' is composed of characters inside [A-Za-z0-9:_. | |
static void | Html_parse_doctype (DilloHtml *html, const char *tag, int tagsize) |
Handle DOCTYPE declaration. | |
static void | Html_tag_open_html (DilloHtml *html, const char *tag, int tagsize) |
Handle open HTML element. | |
static void | Html_tag_close_html (DilloHtml *html) |
Handle close HTML element. | |
static void | Html_tag_open_head (DilloHtml *html, const char *tag, int tagsize) |
Handle open HEAD element. | |
static void | Html_tag_close_head (DilloHtml *html) |
Handle close HEAD element. | |
static void | Html_tag_open_title (DilloHtml *html, const char *tag, int tagsize) |
Handle open TITLE. | |
static void | Html_tag_close_title (DilloHtml *html) |
Handle close TITLE. | |
static void | Html_tag_open_script (DilloHtml *html, const char *tag, int tagsize) |
Handle open SCRIPT. | |
static void | Html_tag_close_script (DilloHtml *html) |
Handle close SCRIPT. | |
static void | Html_tag_open_style (DilloHtml *html, const char *tag, int tagsize) |
Handle open STYLE. | |
static void | Html_tag_close_style (DilloHtml *html) |
Handle close STYLE. | |
static void | Html_tag_open_body (DilloHtml *html, const char *tag, int tagsize) |
static void | Html_tag_close_body (DilloHtml *html) |
static void | Html_tag_open_p (DilloHtml *html, const char *tag, int tagsize) |
static void | Html_tag_open_frame (DilloHtml *html, const char *tag, int tagsize) |
static void | Html_tag_content_frame (DilloHtml *html, const char *tag, int tagsize) |
static void | Html_tag_content_frameset (DilloHtml *html, const char *tag, int tagsize) |
static void | Html_tag_open_h (DilloHtml *html, const char *tag, int tagsize) |
static void | Html_tag_content_br (DilloHtml *html, const char *tag, int tagsize) |
static void | Html_tag_open_font (DilloHtml *html, const char *tag, int tagsize) |
static void | Html_tag_open_abbr (DilloHtml *html, const char *tag, int tagsize) |
void | a_Html_common_image_attrs (DilloHtml *html, const char *tag, int tagsize) |
Read image-associated tag attributes and create new image. | |
DilloImage * | a_Html_image_new (DilloHtml *html, const char *tag, int tagsize) |
static void | Html_tag_open_img (DilloHtml *html, const char *tag, int tagsize) |
static void | Html_tag_content_img (DilloHtml *html, const char *tag, int tagsize) |
Create a new Image struct and request the image-url to the cache. | |
static void | Html_tag_content_map (DilloHtml *html, const char *tag, int tagsize) |
static void | Html_tag_close_map (DilloHtml *html) |
Handle close <MAP>. | |
static misc::SimpleVector< int > * | Html_read_coords (DilloHtml *html, const char *str) |
Read coords in a string, returning a vector of ints. | |
static void | Html_tag_content_area (DilloHtml *html, const char *tag, int tagsize) |
static void | Html_tag_open_object (DilloHtml *html, const char *tag, int tagsize) |
static void | Html_tag_content_object (DilloHtml *html, const char *tag, int tagsize) |
static void | Html_tag_open_video (DilloHtml *html, const char *tag, int tagsize) |
static void | Html_tag_open_audio (DilloHtml *html, const char *tag, int tagsize) |
static void | Html_tag_open_source (DilloHtml *html, const char *tag, int tagsize) |
static void | Html_tag_content_source (DilloHtml *html, const char *tag, int tagsize) |
static void | Html_tag_close_media (DilloHtml *html) |
Media (AUDIO/VIDEO) close function. | |
static void | Html_tag_open_embed (DilloHtml *html, const char *tag, int tagsize) |
static void | Html_tag_content_embed (DilloHtml *html, const char *tag, int tagsize) |
static const char * | Html_get_javascript_link (DilloHtml *html) |
Test and extract the link from a javascript instruction. | |
static void | Html_add_anchor (DilloHtml *html, const char *name) |
Register an anchor for this page. | |
static void | Html_tag_open_a (DilloHtml *html, const char *tag, int tagsize) |
static void | Html_tag_close_a (DilloHtml *html) |
static void | Html_tag_open_blockquote (DilloHtml *html, const char *tag, int tagsize) |
static void | Html_tag_open_q (DilloHtml *html, const char *tag, int tagsize) |
static void | Html_tag_close_q (DilloHtml *html) |
static void | Html_tag_open_ul (DilloHtml *html, const char *tag, int tagsize) |
static void | Html_tag_open_dir (DilloHtml *html, const char *tag, int tagsize) |
static void | Html_tag_open_menu (DilloHtml *html, const char *tag, int tagsize) |
static void | Html_tag_open_ol (DilloHtml *html, const char *tag, int tagsize) |
static void | Html_tag_open_li (DilloHtml *html, const char *tag, int tagsize) |
static void | Html_tag_close_li (DilloHtml *html) |
static void | Html_tag_open_hr (DilloHtml *html, const char *tag, int tagsize) |
static void | Html_tag_content_hr (DilloHtml *html, const char *tag, int tagsize) |
static void | Html_tag_open_dl (DilloHtml *html, const char *tag, int tagsize) |
static void | Html_tag_open_dt (DilloHtml *html, const char *tag, int tagsize) |
static void | Html_tag_open_dd (DilloHtml *html, const char *tag, int tagsize) |
static void | Html_tag_open_pre (DilloHtml *html, const char *tag, int tagsize) |
static void | Html_tag_close_pre (DilloHtml *html) |
static int | Html_tag_pre_excludes (DilloHtml *html, int tag_idx) |
Check whether a tag is in the "excluding" element set for PRE. | |
static void | Html_update_content_type (DilloHtml *html, const char *content) |
Update the document's content type information based on meta tag data. | |
static void | Html_tag_open_meta (DilloHtml *html, const char *tag, int tagsize) |
Handle META We do not support http-equiv=refresh with delay>0 because it's non standard, (the HTML 4.01 SPEC recommends explicitly to avoid it). | |
static void | Html_css_load_callback (int Op, CacheClient_t *Client) |
Called by the network engine when a stylesheet has new data. | |
void | a_Html_load_stylesheet (DilloHtml *html, DilloUrl *url) |
Tell cache to retrieve a stylesheet. | |
static void | Html_tag_open_link (DilloHtml *html, const char *tag, int tagsize) |
Parse the LINK element (Only CSS stylesheets by now). | |
static void | Html_tag_open_base (DilloHtml *html, const char *tag, int tagsize) |
Set the Document Base URI. | |
static void | Html_tag_open_default (DilloHtml *html, const char *tag, int tagsize) |
static void | Html_tag_open_span (DilloHtml *html, const char *tag, int tagsize) |
static void | Html_tag_open_sectioning (DilloHtml *html, const char *tag, int tagsize) |
static void | Html_tag_open_div (DilloHtml *html, const char *tag, int tagsize) |
static void | Html_tag_close_par (DilloHtml *html) |
Default close for paragraph tags - pop the stack and break. | |
static void | Html_tag_content_wbr (DilloHtml *html, const char *tag, int tagsize) |
static int | Html_tag_compare (const char *p1, const char *p2) |
static int | Html_triggers_optional_close (int old_idx, int cur_idx) |
For elements with optional close, check whether is time to close, by also following Firefox's de facto rules. | |
static int | Html_forbids_cross_nesting (const int InFlags, const int new_idx) |
Check nesting and cross-nesting between BUTTON, SELECT, TEXTAREA and A. | |
static void | Html_tag_cleanup_to_idx (DilloHtml *html, int s_idx, int new_idx, int fi, char op) |
Cleanup the stack to a given index. | |
static void | Html_stack_cleanup_at_open (DilloHtml *html, int ni) |
Conditional cleanup of the stack (at open time). | |
static void | Html_test_section (DilloHtml *html, int new_idx, int IsCloseTag) |
HTML, HEAD and BODY elements have optional open and close tags. | |
static void | Html_parse_common_attrs (DilloHtml *html, char *tag, int tagsize) |
Parse attributes that can appear on any tag. | |
static void | Html_check_html5_obsolete (DilloHtml *html, int ni) |
Warn when encountering elements that are obsolete in HTML5. | |
static void | Html_display_block (DilloHtml *html) |
static void | Html_display_inline_block (DilloHtml *html) |
static void | Html_display_listitem (DilloHtml *html) |
static void | Html_process_tag (DilloHtml *html, char *tag, int tagsize) |
Process a tag, given as 'tag' and 'tagsize'. | |
static const char * | Html_get_attr2 (DilloHtml *html, const char *tag, int tagsize, const char *attrname, int tag_parsing_flags) |
Get attribute value for 'attrname' and return it. | |
const char * | a_Html_get_attr (DilloHtml *html, const char *tag, int tagsize, const char *attrname) |
Call Html_get_attr2 telling it to parse entities and strip the result. | |
char * | a_Html_get_attr_wdef (DilloHtml *html, const char *tag, int tagsize, const char *attrname, const char *def) |
"a_Html_get_attr with default" Call a_Html_get_attr() and dStrdup() the returned string. | |
Variables | |
static int | i_A = a_Html_tag_index("a") |
static int | i_BODY = a_Html_tag_index("body") |
static int | i_BUTTON = a_Html_tag_index("button") |
static int | i_DD = a_Html_tag_index("dd") |
static int | i_DT = a_Html_tag_index("dt") |
static int | i_HTML = a_Html_tag_index("html") |
static int | i_HR = a_Html_tag_index("hr") |
static int | i_LI = a_Html_tag_index("li") |
static int | i_OPTGROUP = a_Html_tag_index("optgroup") |
static int | i_OPTION = a_Html_tag_index("option") |
static int | i_P = a_Html_tag_index("p") |
static int | i_SELECT = a_Html_tag_index("select") |
static int | i_TEXTAREA = a_Html_tag_index("textarea") |
static int | i_TD = a_Html_tag_index("td") |
static int | i_TR = a_Html_tag_index("tr") |
static int | i_TBODY = a_Html_tag_index("tbody") |
static int | i_TH = a_Html_tag_index("th") |
static const TagInfo | Tags [] |
Function index for the open, content, and close functions for each tag. | |
Dillo HTML parsing routines.
Definition in file html.cc.
typedef void(* TagOpenFunct) (DilloHtml *html, const char *tag, int tagsize) |
int32_t a_Html_color_parse | ( | DilloHtml * | html, |
const char * | str, | ||
int32_t | default_color | ||
) |
Parse a color attribute.
Return value: parsed color, or default_color (+ error msg) on error.
Definition at line 1458 of file html.cc.
References a_Color_parse(), and BUG_MSG.
Referenced by Html_tag_open_body(), Html_tag_open_font(), Html_tag_open_table(), Html_tag_open_table_cell(), and Html_tag_open_tr().
void a_Html_common_image_attrs | ( | DilloHtml * | html, |
const char * | tag, | ||
int | tagsize | ||
) |
Read image-associated tag attributes and create new image.
Definition at line 2063 of file html.cc.
References a_Html_get_attr(), a_Html_get_attr_wdef(), a_Html_parse_length(), CSS_CREATE_LENGTH(), CSS_LENGTH_TYPE(), CSS_LENGTH_TYPE_AUTO, CSS_LENGTH_TYPE_PX, CSS_LENGTH_VALUE(), CSS_PROPERTY_HEIGHT, CSS_PROPERTY_WIDTH, CSS_TYPE_INTEGER, CSS_TYPE_LENGTH_PERCENTAGE, CSS_TYPE_STRING, dFree(), IMAGE_MAX_AREA, DilloHtml::images, MSG, prefs, PROPERTY_X_IMG, PROPERTY_X_TOOLTIP, StyleEngine::setNonCssHint(), DilloPrefs::show_tooltip, lout::misc::SimpleVector< T >::size(), and DilloHtml::styleEngine.
Referenced by Html_input_image(), and Html_tag_open_img().
void a_Html_form_display_hiddens | ( | void * | v_html, |
void * | v_form, | ||
bool_t | display | ||
) |
Used by the "Show/Hide hiddens" form menuitem.
Definition at line 279 of file html.cc.
References a_Html_form_display_hiddens2(), and Html_contains_form().
Referenced by Menu_form_hiddens_cb().
void a_Html_form_reset | ( | void * | v_html, |
void * | v_form | ||
) |
Used by the "Reset form" form menuitem.
Definition at line 266 of file html.cc.
References a_Html_form_reset2(), and Html_contains_form().
Referenced by Menu_form_reset_cb().
void a_Html_form_submit | ( | void * | v_html, |
void * | v_form | ||
) |
Used by the "Submit form" form menuitem.
Definition at line 253 of file html.cc.
References a_Html_form_submit2(), and Html_contains_form().
Referenced by Menu_form_submit_cb().
const char * a_Html_get_attr | ( | DilloHtml * | html, |
const char * | tag, | ||
int | tagsize, | ||
const char * | attrname | ||
) |
Call Html_get_attr2 telling it to parse entities and strip the result.
Definition at line 4267 of file html.cc.
References Html_get_attr2(), HTML_LeftTrim, HTML_ParseEntities, and HTML_RightTrim.
Referenced by a_Html_common_image_attrs(), a_Html_get_attr_wdef(), a_Html_image_new(), a_Html_tag_set_align_attr(), a_Html_tag_set_valign_attr(), Html_parse_common_attrs(), Html_tag_content_area(), Html_tag_content_embed(), Html_tag_content_frame(), Html_tag_content_img(), Html_tag_content_map(), Html_tag_content_object(), Html_tag_content_source(), Html_tag_content_table_cell(), Html_tag_content_textarea(), Html_tag_open_a(), Html_tag_open_abbr(), Html_tag_open_audio(), Html_tag_open_base(), Html_tag_open_body(), Html_tag_open_button(), Html_tag_open_embed(), Html_tag_open_font(), Html_tag_open_form(), Html_tag_open_frame(), Html_tag_open_hr(), Html_tag_open_img(), Html_tag_open_input(), Html_tag_open_isindex(), Html_tag_open_li(), Html_tag_open_link(), Html_tag_open_meta(), Html_tag_open_object(), Html_tag_open_ol(), Html_tag_open_optgroup(), Html_tag_open_option(), Html_tag_open_sectioning(), Html_tag_open_select(), Html_tag_open_source(), Html_tag_open_span(), Html_tag_open_style(), Html_tag_open_table(), Html_tag_open_table_cell(), Html_tag_open_tr(), Html_tag_open_ul(), and Html_tag_open_video().
char * a_Html_get_attr_wdef | ( | DilloHtml * | html, |
const char * | tag, | ||
int | tagsize, | ||
const char * | attrname, | ||
const char * | def | ||
) |
"a_Html_get_attr with default" Call a_Html_get_attr() and dStrdup() the returned string.
If the attribute isn't found a copy of 'def' is returned.
Definition at line 4281 of file html.cc.
References a_Html_get_attr(), and dStrdup().
Referenced by a_Html_common_image_attrs(), a_Html_image_new(), Html_tag_open_button(), Html_tag_open_hr(), Html_tag_open_input(), Html_tag_open_optgroup(), Html_tag_open_option(), and Html_tag_open_select().
DilloImage * a_Html_image_new | ( | DilloHtml * | html, |
const char * | tag, | ||
int | tagsize | ||
) |
Definition at line 2133 of file html.cc.
References a_Capi_get_flags_with_redirection(), a_Html_get_attr(), a_Html_get_attr_wdef(), a_Html_url_new(), a_Image_new(), a_Image_ref(), a_Image_unref(), DilloHtml::bw, CAPI_IsCached, dFree(), dNew, dStrAsciiCasecmp(), dStrdup(), DilloHtml::dw, dw::core::Widget::getBgColor(), dw::core::style::ColorAttrs::getColor(), dw::core::Widget::getFgColor(), dw::core::Widget::getLayout(), HT2TB, Html_load_image(), DilloHtmlImage::image, image, DilloHtml::images, lout::misc::SimpleVector< T >::increase(), DilloPrefs::load_images, DilloHtml::page_url, prefs, lout::misc::SimpleVector< T >::set(), lout::misc::SimpleVector< T >::size(), DilloHtmlImage::url, and URL_SCHEME.
Referenced by Html_input_image(), and Html_tag_content_img().
void a_Html_load_images | ( | void * | v_html, |
DilloUrl * | pattern | ||
) |
Used by the "Load images" page menuitem.
Definition at line 230 of file html.cc.
References DilloHtml::loadImages().
Referenced by Menu_imgload_toggle_cb(), and Menu_load_images_cb().
Tell cache to retrieve a stylesheet.
Definition at line 3247 of file html.cc.
References _MSG, a_Bw_add_client(), a_Bw_add_url(), a_Capi_get_buf(), a_Capi_get_flags_with_redirection(), a_Capi_open_url(), a_Capi_set_content_type(), a_Capi_unref_buf(), a_Web_new(), DilloHtml::bw, CAPI_Completed, DilloHtml::content_type, CSS_ORIGIN_AUTHOR, dFree(), dReturn_if, dStrconcat(), _DilloWeb::flags, Html_css_load_callback(), DilloPrefs::load_stylesheets, MSG, BrowserWindow::NumPendingStyleSheets, DilloHtml::page_url, StyleEngine::parse(), prefs, DilloHtml::styleEngine, URL_STR, and WEB_Stylesheet.
Referenced by Html_tag_close_head(), and CssParser::parseImport().
char * a_Html_parse_entities | ( | DilloHtml * | html, |
const char * | token, | ||
int | toksize | ||
) |
Parse all the entities in a token.
Takes the token and its length, and returns a newly allocated string.
Definition at line 1070 of file html.cc.
References dStr_append(), dStr_append_c(), dStr_append_l(), dStr_free(), dStr_sized_new(), dStrndup(), FALSE, Html_parse_entity(), and Dstr::str.
Referenced by Html_process_word(), and Html_tag_close_textarea().
Returns a length or a percentage, or UNDEF_LENGTH in case of an error, or if attr is NULL.
Definition at line 1433 of file html.cc.
References _MSG, BUG_MSG, CSS_CREATE_LENGTH(), CSS_LENGTH_TYPE(), CSS_LENGTH_TYPE_AUTO, CSS_LENGTH_TYPE_RELATIVE, CSS_LENGTH_VALUE(), and Html_parse_length_or_multi_length().
Referenced by a_Html_common_image_attrs(), Html_tag_open_hr(), Html_tag_open_table(), and Html_tag_open_table_cell().
void a_Html_stash_init | ( | DilloHtml * | html | ) |
Initialize the stash buffer.
Definition at line 843 of file html.cc.
References DILLO_HTML_PARSE_MODE_STASH, dStr_truncate(), S_TOP, DilloHtml::Stash, and DilloHtml::StashSpace.
Referenced by Html_tag_content_textarea(), Html_tag_open_h(), Html_tag_open_option(), Html_tag_open_script(), Html_tag_open_select(), Html_tag_open_style(), and Html_tag_open_title().
int a_Html_tag_index | ( | const char * | tag | ) |
Get 'tag' index.
return -1 if tag is not handled yet
Definition at line 3610 of file html.cc.
References Html_tag_compare(), NTAGS, and Tags.
Referenced by Html_check_html5_obsolete(), Html_process_tag(), Html_table_get_border_model(), Html_table_set_border_model(), Html_tag_pre_excludes(), Html_test_section(), CssParser::parseSimpleSelector(), and StyleEngine::startElement().
void a_Html_tag_set_align_attr | ( | DilloHtml * | html, |
const char * | tag, | ||
int | tagsize | ||
) |
Evaluates the ALIGN attribute (left|center|right|justify) and sets the style at the top of the stack.
Definition at line 318 of file html.cc.
References a_Html_get_attr(), BUG_MSG, CSS_PROPERTY_TEXT_ALIGN, CSS_TYPE_ENUM, DilloHtml::DocType, DilloHtml::DocTypeVersion, dStrAsciiCasecmp(), DT_HTML, StyleEngine::setNonCssHint(), DilloHtml::styleEngine, dw::core::style::TEXT_ALIGN_CENTER, dw::core::style::TEXT_ALIGN_JUSTIFY, dw::core::style::TEXT_ALIGN_LEFT, dw::core::style::TEXT_ALIGN_RIGHT, and dw::core::style::TEXT_ALIGN_STRING.
Referenced by Html_tag_open_div(), Html_tag_open_h(), Html_tag_open_hr(), Html_tag_open_p(), Html_tag_open_table_cell(), and Html_tag_open_tr().
bool a_Html_tag_set_valign_attr | ( | DilloHtml * | html, |
const char * | tag, | ||
int | tagsize | ||
) |
Evaluates the VALIGN attribute (top|bottom|middle|baseline) and sets the style in style_attrs.
Returns true when set.
Definition at line 363 of file html.cc.
References a_Html_get_attr(), BUG_MSG, CSS_PROPERTY_VERTICAL_ALIGN, CSS_TYPE_ENUM, DilloHtml::DocType, DilloHtml::DocTypeVersion, dStrAsciiCasecmp(), DT_HTML, StyleEngine::setNonCssHint(), DilloHtml::styleEngine, dw::core::style::VALIGN_BASELINE, dw::core::style::VALIGN_BOTTOM, dw::core::style::VALIGN_MIDDLE, and dw::core::style::VALIGN_TOP.
Referenced by Html_tag_open_table_cell(), and Html_tag_open_tr().
void * a_Html_text | ( | const char * | type, |
void * | P, | ||
CA_Callback_t * | Call, | ||
void ** | Data | ||
) |
Set callback function and callback data for the "html/text" MIME type.
Function prototypes defined elsewhere.
Definition at line 211 of file html.cc.
References _DilloWeb::bw, DilloHtml::dw, Html_callback(), and _DilloWeb::url.
Referenced by a_Mime_init().
DilloUrl * a_Html_url_new | ( | DilloHtml * | html, |
const char * | url_str, | ||
const char * | base_url, | ||
int | use_base_url | ||
) |
Wrapper for a_Url_new that adds an error detection message.
If use_base_url is TRUE, it uses base_url. Otherwise it uses html->base_url.
Definition at line 172 of file html.cc.
References a_Url_new(), DilloHtml::base_url, BUG_MSG, MSG, URL_ILLEGAL_CHARS, URL_ILLEGAL_CHARS_SPC, and URL_STR_.
Referenced by a_Html_image_new(), Html_tag_content_area(), Html_tag_content_img(), Html_tag_content_map(), Html_tag_open_a(), Html_tag_open_audio(), Html_tag_open_base(), Html_tag_open_embed(), Html_tag_open_form(), Html_tag_open_frame(), Html_tag_open_isindex(), Html_tag_open_link(), Html_tag_open_meta(), Html_tag_open_object(), Html_tag_open_source(), Html_tag_open_video(), and CssParser::parseImport().
|
static |
Register an anchor for this page.
Definition at line 2675 of file html.cc.
References _MSG, BUG_MSG, HT2TB, and DilloHtml::style().
Referenced by Html_process_tag(), and Html_tag_open_a().
|
static |
Create and add a new Textblock to the current Textblock.
Typically only one of addBreaks and addBreakOpt is true.
Definition at line 393 of file html.cc.
References dw::core::style::Style::create(), dw::core::style::StyleAttrs::display, dw::core::style::DISPLAY_BLOCK, DilloHtml::dw, HT2TB, DilloPrefs::limit_text_width, prefs, dw::core::style::Style::ref(), S_TOP, DilloHtml::style(), dw::core::style::Style::unref(), and DilloHtml::wordStyle().
Referenced by Html_display_block(), Html_display_inline_block(), Html_tag_content_frameset(), Html_tag_open_blockquote(), and Html_tag_open_dd().
|
static |
Dispatch the apropriate function for 'Op'.
This function is a Cache client and gets called whenever new data arrives
Op | operation to perform. |
CbData | a pointer to a DilloHtml structure |
Buf | a pointer to new data |
BufSize | new data size (in bytes) |
Definition at line 4300 of file html.cc.
References CacheClient::Buf, CacheClient::BufSize, CacheClient::CbData, DilloHtml::finishParsing(), CacheClient::Key, and DilloHtml::write().
Referenced by a_Html_text().
|
static |
Comparison function for binary search.
Definition at line 958 of file html.cc.
Referenced by Html_charref_search().
|
static |
Binary search of 'key' in charref list.
Definition at line 966 of file html.cc.
References Charrefs, Html_charref_comp(), NumRef, and Charref_t::ref.
Referenced by Html_parse_named_charref().
|
static |
Warn when encountering elements that are obsolete in HTML5.
This list was from the "W3C Candidate Recommendation 6 August 2013".
Definition at line 3952 of file html.cc.
References a_Html_tag_index(), BUG_MSG, and Tags.
Referenced by Html_process_tag().
|
static |
Check that 'val' is composed of characters inside [A-Za-z0-9:_.
-]. Note: ID can't have entities, but this check is enough (no '&'). Return value: 1 if OK, 0 otherwise.
Definition at line 1476 of file html.cc.
References BUG_MSG, d_isascii, DilloHtml::DocType, DilloHtml::DocTypeVersion, and DT_HTML.
Referenced by Html_parse_common_attrs(), and Html_tag_open_a().
|
static |
Search for form.
Definition at line 240 of file html.cc.
References DilloHtml::forms, lout::misc::SimpleVector< T >::get(), and lout::misc::SimpleVector< T >::size().
Referenced by a_Html_form_display_hiddens(), a_Html_form_reset(), and a_Html_form_submit().
|
static |
Called by the network engine when a stylesheet has new data.
Definition at line 3233 of file html.cc.
References _MSG, a_UIcmd_repush(), DilloHtml::bw, BrowserWindow::NumPendingStyleSheets, and CacheClient::Web.
Referenced by a_Html_load_stylesheet().
|
static |
Definition at line 3975 of file html.cc.
References Html_add_textblock(), and Html_must_add_breaks().
Referenced by Html_process_tag().
|
static |
Definition at line 3981 of file html.cc.
References Html_add_textblock().
Referenced by Html_process_tag().
|
static |
Definition at line 3986 of file html.cc.
References DilloHtml::dw, lout::misc::SimpleVector< T >::getRef(), HT2TB, dw::ListItem::initWithText(), dw::ListItem::initWithWidget(), DilloPrefs::limit_text_width, DilloHtmlState::list_number, dw::core::style::LIST_STYLE_TYPE_DECIMAL, dw::core::style::LIST_STYLE_TYPE_NONE, dw::core::style::StyleAttrs::listStyleType, dw::core::style::numtostr(), prefs, DilloHtmlState::ref_list_item, S_TOP, lout::misc::SimpleVector< T >::size(), DilloHtml::stack, DilloHtml::style(), and DilloHtml::wordStyle().
Referenced by Html_process_tag().
|
static |
This function is called after popping the stack, to handle nested Textblock widgets.
Definition at line 1336 of file html.cc.
References DilloHtml::dw, HT2TB, S_TOP, and DilloHtml::style().
Referenced by Html_real_pop_tag().
|
inlinestatic |
Check nesting and cross-nesting between BUTTON, SELECT, TEXTAREA and A.
The cleanup process will close any of them before opening another. This is not an HTML SPEC restriction , but it avoids lots of trouble inside dillo (concurrent inputs), and makes almost no sense to have. return: index of the open element, -1 if none.
Definition at line 3676 of file html.cc.
References i_A, i_BUTTON, i_SELECT, i_TEXTAREA, IN_A, IN_BUTTON, IN_SELECT, IN_TEXTAREA, and DilloHtml::InFlags.
Referenced by Html_stack_cleanup_at_open().
|
static |
Push the tag (used to force en element with optional open into the stack).
Note: now it's the same as Html_push_tag(), but things may change...
Definition at line 1366 of file html.cc.
References Html_push_tag(), and DilloHtml::startElement().
Referenced by Html_test_section().
|
static |
Definition at line 222 of file html.cc.
Referenced by DilloHtml::DilloHtml().
|
static |
Get attribute value for 'attrname' and return it.
Tags start with '<' and end with a '>' (Ex: "<P align=center>") tagsize = strlen(tag) from '<' to '>', inclusive.
Returns one of the following:
Definition at line 4164 of file html.cc.
References DilloHtml::attr_data, D_ASCII_TOLOWER, dReturn_val_if_fail, dStr_append(), dStr_append_c(), dStr_erase(), dStr_truncate(), FINISHED, GET_VALUE, HTML_LeftTrim, Html_parse_entity(), HTML_ParseEntities, HTML_RightTrim, Dstr::len, MATCH_ATTR_NAME, SEEK_ATTR_START, SEEK_TOKEN_START, SEEK_VALUE_START, SKIP_VALUE, Dstr::str, and TRUE.
Referenced by a_Html_get_attr().
|
static |
Test and extract the link from a javascript instruction.
Definition at line 2652 of file html.cc.
References DilloHtml::attr_data, BUG_MSG, dStr_erase(), dStr_truncate(), dStrnAsciiCasecmp(), and Dstr::str.
Referenced by Html_tag_open_a().
|
static |
Tell cache to retrieve image.
Definition at line 2188 of file html.cc.
References a_Bw_add_client(), a_Bw_add_url(), a_Capi_open_url(), a_Image_ref(), a_Web_new(), DilloHtml::bw, _DilloWeb::flags, _DilloWeb::Image, and WEB_Image.
Referenced by a_Html_image_new(), and DilloHtml::loadImages().
|
static |
Does the tag in tagstr (e.g.
"p") match the tag in the tag, tagsize structure, with the initial < skipped over (e.g. "P align=center>")?
Definition at line 1318 of file html.cc.
References D_ASCII_TOLOWER.
Referenced by Html_write_raw().
|
static |
This is M$ non-standard "smart quotes" (w1252).
Now even deprecated by them!
SGML for HTML4.01 defines c >= 128 and c <= 159 as UNUSED. TODO: Probably I should remove this hack. –Jcid
Definition at line 856 of file html.cc.
Referenced by Html_parse_numeric_charref().
|
static |
Definition at line 424 of file html.cc.
References HT2TB, and DilloHtml::style().
Referenced by Html_display_block().
|
static |
Parse attributes that can appear on any tag.
Definition at line 3898 of file html.cc.
References a_Html_get_attr(), CSS_TYPE_STRING, Html_check_name_val(), DilloPrefs::load_stylesheets, DilloPrefs::parse_embedded_css, prefs, PROPERTY_X_LANG, StyleEngine::setClass(), StyleEngine::setId(), StyleEngine::setNonCssHint(), StyleEngine::setStyle(), and DilloHtml::styleEngine.
Referenced by Html_process_tag().
|
static |
Handle DOCTYPE declaration.
Follows the convention that HTML 4.01 doctypes which include a full w3c DTD url are treated as standards-compliant, but 4.01 without the url and HTML 4.0 and earlier are not. XHTML doctypes are always standards-compliant whether or not an url is present.
Note: I'm not sure about this convention. The W3C validator recognizes the "HTML Level" with or without the URL. The convention comes from mozilla (see URLs below), but Dillo doesn't have the same rendering modes, so it may be better to chose another behaviour. –Jcid
http://www.mozilla.org/docs/web-developer/quirks/doctypes.html http://lists.dillo.org/pipermail/dillo-dev/2004-October/002300.html
This is not a full DOCTYPE parser, just enough for what Dillo uses.
Definition at line 1520 of file html.cc.
References _MSG, BUG_MSG, dFree(), DilloHtml::DocType, DilloHtml::DocTypeVersion, dStrAsciiCasecmp(), dStriAsciiStr(), dStrnAsciiCasecmp(), dStrndup(), DT_HTML, DT_NONE, DT_UNRECOGNIZED, and DT_XHTML.
Referenced by Html_process_tag().
|
static |
Given an entity, return the corresponding string.
Returns NULL if not a valid entity.
The first character *token is assumed to be == '&'
For valid entities, *entsize is set to the length of the parsed entity.
Definition at line 1035 of file html.cc.
References BUG_MSG, dFree(), DilloHtml::DocType, DilloHtml::DocTypeVersion, dStrndup(), DT_HTML, Html_parse_named_charref(), Html_parse_numeric_charref(), prefs, and DilloPrefs::show_extra_warnings.
Referenced by a_Html_parse_entities(), and Html_get_attr2().
|
static |
Definition at line 1394 of file html.cc.
References CSS_CREATE_LENGTH(), CSS_LENGTH_TYPE_PERCENTAGE, CSS_LENGTH_TYPE_PX, and CSS_LENGTH_TYPE_RELATIVE.
Referenced by a_Html_parse_length().
|
static |
Parse a named character reference (e.g., "&" or "…").
The "&" has already been consumed.
Definition at line 979 of file html.cc.
References BUG_MSG, DilloHtml::DocType, DilloHtml::DocTypeVersion, DT_HTML, DT_XHTML, Charref_t::html4_str, Charref_t::html5_str, Html_charref_search(), prefs, and DilloPrefs::show_extra_warnings.
Referenced by Html_parse_entity().
|
static |
Parse a numeric character reference (e.g., "/" or "/").
The "&#" has already been consumed.
Definition at line 876 of file html.cc.
References a_Utf8_encode(), BUG_MSG, DilloHtml::DocType, DilloHtml::DocTypeVersion, DT_HTML, DT_XHTML, Html_ms_stupid_quotes_2ucs(), prefs, and DilloPrefs::show_extra_warnings.
Referenced by Html_parse_entity().
|
static |
Parse spaces.
Definition at line 1130 of file html.cc.
References BUG_MSG, dFree(), DILLO_HTML_PARSE_MODE_PRE, DILLO_HTML_PARSE_MODE_STASH, DILLO_HTML_PARSE_MODE_STASH_AND_BODY, DILLO_HTML_PARSE_MODE_VERBATIM, dStr_append_l(), dStrnfill(), HT2TB, Html_process_space_pre_line(), Dstr::len, DilloHtml::pre_column, DilloHtml::PreFirstChar, prefs, DilloHtml::PrevWasCR, S_TOP, SGML_SPCDEL, DilloPrefs::show_extra_warnings, DilloHtml::Stash, DilloHtml::StashSpace, TAB_SIZE, dw::core::style::WHITE_SPACE_PRE_LINE, dw::core::style::StyleAttrs::whiteSpace, and DilloHtml::wordStyle().
Referenced by Html_process_word(), and Html_write_raw().
|
static |
For white-space: pre-line, we must break the line if encountering a newline.
Otherwise, collapse whitespace as usual.
Definition at line 1108 of file html.cc.
References HT2TB, DilloHtml::PrevWasCR, and DilloHtml::wordStyle().
Referenced by Html_process_space().
|
static |
Process a tag, given as 'tag' and 'tagsize'.
– tagsize is [1 based] ('tag' must include the enclosing angle brackets) This function calls the right open or close function for the tag.
Definition at line 4024 of file html.cc.
References _MSG, a_Html_tag_index(), BUG_MSG, DILLO_HTML_PARSE_MODE_PRE, DILLO_HTML_PARSE_MODE_VERBATIM, dw::core::style::StyleAttrs::display, dw::core::style::DISPLAY_BLOCK, dw::core::style::DISPLAY_INLINE, dw::core::style::DISPLAY_INLINE_BLOCK, dw::core::style::DISPLAY_LIST_ITEM, dw::core::style::DISPLAY_NONE, DilloHtml::DocType, DilloHtml::DocTypeVersion, dReturn_if, dStrnAsciiCasecmp(), DT_HTML, dw::core::style::FLOAT_NONE, StyleEngine::getId(), Html_add_anchor(), Html_check_html5_obsolete(), Html_display_block(), Html_display_inline_block(), Html_display_listitem(), Html_parse_common_attrs(), Html_parse_doctype(), Html_push_tag(), Html_stack_cleanup_at_open(), Html_tag_cleanup_at_close(), Html_tag_pre_excludes(), Html_test_section(), i_HTML, IN_BODY, IN_HTML, IN_PRE, DilloHtml::InFlags, DilloHtml::pre_column, DilloHtml::PreFirstChar, DilloHtml::PrevWasBodyClose, DilloHtml::PrevWasHtmlClose, DilloHtml::ReqTagClose, S_TOP, lout::misc::SimpleVector< T >::size(), DilloHtml::stack, DilloHtml::startElement(), DilloHtml::stop_parser, DilloHtml::style(), DilloHtml::styleEngine, Tags, dw::core::style::StyleAttrs::vloat, dw::core::style::WHITE_SPACE_PRE, dw::core::style::WHITE_SPACE_PRE_WRAP, and dw::core::style::StyleAttrs::whiteSpace.
Referenced by Html_write_raw().
|
static |
Handles putting the word into its proper place.
Entities are parsed (or not) according to parse_mode. 'word' is a '\0'-terminated string.
Definition at line 1216 of file html.cc.
References a_Html_parse_entities(), a_Utf8_ideographic(), BUG_MSG, dFree(), DILLO_HTML_PARSE_MODE_PRE, DILLO_HTML_PARSE_MODE_STASH, DILLO_HTML_PARSE_MODE_STASH_AND_BODY, DILLO_HTML_PARSE_MODE_VERBATIM, dStr_append(), dStr_append_c(), dStr_append_l(), HT2TB, Html_process_space(), DilloHtml::pre_column, DilloHtml::PreFirstChar, DilloHtml::PrevWasBodyClose, DilloHtml::PrevWasHtmlClose, S_TOP, DilloHtml::Stash, DilloHtml::StashSpace, utf8_zero_width_space, and DilloHtml::wordStyle().
Referenced by Html_write_raw().
|
static |
Push the tag (copying attributes from the top of the stack)
Definition at line 1349 of file html.cc.
References DilloHtml::dw, lout::misc::SimpleVector< T >::getRef(), lout::misc::SimpleVector< T >::increase(), S_TOP, lout::misc::SimpleVector< T >::size(), DilloHtml::stack, and DilloHtmlState::tag_idx.
Referenced by Html_force_push_tag(), and Html_process_tag().
|
static |
Read coords in a string, returning a vector of ints.
Definition at line 2366 of file html.cc.
References BUG_MSG, lout::misc::SimpleVector< T >::increase(), lout::misc::SimpleVector< T >::set(), and lout::misc::SimpleVector< T >::size().
Referenced by Html_tag_content_area().
|
static |
Pop the top tag in the stack.
Definition at line 1375 of file html.cc.
References StyleEngine::endElement(), Html_eventually_pop_dw(), S_TOP, lout::misc::SimpleVector< T >::setSize(), lout::misc::SimpleVector< T >::size(), DilloHtml::stack, and DilloHtml::styleEngine.
Referenced by Html_tag_cleanup_to_idx().
|
static |
Set the URL data for image maps.
Definition at line 292 of file html.cc.
References a_Url_set_ismap_coords(), lout::misc::SimpleVector< T >::get(), and DilloHtml::links.
Referenced by DilloHtml::HtmlLinkReceiver::click(), and DilloHtml::HtmlLinkReceiver::enter().
Create a new link, set it as the url's parent and return the index.
Definition at line 306 of file html.cc.
References lout::misc::SimpleVector< T >::increase(), DilloHtml::links, lout::misc::SimpleVector< T >::set(), and lout::misc::SimpleVector< T >::size().
Referenced by Html_tag_content_area(), Html_tag_open_a(), Html_tag_open_audio(), Html_tag_open_embed(), Html_tag_open_frame(), Html_tag_open_object(), Html_tag_open_source(), and Html_tag_open_video().
|
static |
Conditional cleanup of the stack (at open time).
Handles:
This function is called before opening/pushing a new tag into the stack. 'ni' is the new tag's index in Tags[].
Definition at line 3747 of file html.cc.
References BUG_MSG, DilloHtml::DocTypeVersion, lout::misc::SimpleVector< T >::getRef(), Html_forbids_cross_nesting(), Html_tag_cleanup_to_idx(), Html_triggers_optional_close(), i_A, i_HR, IN_PRE, DilloHtml::InFlags, lout::misc::SimpleVector< T >::size(), DilloHtml::stack, DilloHtmlState::tag_idx, Tags, and DilloHtml::TagSoup.
Referenced by Html_process_tag().
|
static |
Conditional cleanup of the stack, called before closing any tag.
There are several ways of doing it. Considering the HTML 4.01 spec which defines optional close tags, and the will to deliver useful diagnose messages for bad-formed HTML, it'll go as follows:
Definition at line 3797 of file html.cc.
References BUG_MSG, lout::misc::SimpleVector< T >::getRef(), Html_tag_cleanup_to_idx(), i_A, i_BUTTON, i_SELECT, i_TEXTAREA, IN_A, IN_BUTTON, IN_SELECT, IN_TEXTAREA, DilloHtml::InFlags, lout::misc::SimpleVector< T >::size(), DilloHtml::stack, DilloHtmlState::tag_idx, and Tags.
Referenced by DilloHtml::finishParsing(), Html_process_tag(), and Html_test_section().
|
static |
Cleanup the stack to a given index.
's_idx' stack index to clean up to. 'new_idx' is the tag index that triggered the cleanup. 'fi' forbidden tag index. -1 if allowed (most of the time). 'op' cleanup operation. {'o' = open, 'c' = close}.
Definition at line 3695 of file html.cc.
References _MSG, BUG_MSG, Html_real_pop_tag(), i_BODY, IN_EOF, DilloHtml::InFlags, DilloHtml::PrevWasBodyClose, DilloHtml::PrevWasHtmlClose, DilloHtml::ReqTagClose, S_TOP, lout::misc::SimpleVector< T >::size(), DilloHtml::stack, and Tags.
Referenced by Html_stack_cleanup_at_open(), and Html_tag_cleanup_at_close().
|
static |
Definition at line 2764 of file html.cc.
References DilloHtml::InFlags, and DilloHtml::InVisitedLink.
|
static |
Definition at line 1889 of file html.cc.
References _MSG, and DilloHtml::Num_BODY.
|
static |
Handle close HEAD element.
Note: HEAD is parsed once completely got.
Definition at line 1662 of file html.cc.
References a_Html_load_stylesheet(), BUG_MSG, DilloHtml::cssUrls, lout::misc::SimpleVector< T >::get(), IN_HEAD, DilloHtml::InFlags, DilloHtml::Num_HEAD, DilloHtml::Num_TITLE, and lout::misc::SimpleVector< T >::size().
|
static |
Handle close HTML element.
Definition at line 1625 of file html.cc.
References _MSG, and DilloHtml::Num_HTML.
|
static |
Definition at line 2943 of file html.cc.
References DilloHtml::dw, and DilloHtml::InFlags.
|
static |
Handle close <MAP>.
Definition at line 2340 of file html.cc.
References dw::Image::forceMapRedraw(), lout::misc::SimpleVector< T >::get(), DilloHtmlImage::image, DilloHtml::images, _DilloImage::img_rndr, DilloHtml::InFlags, and lout::misc::SimpleVector< T >::size().
|
static |
Media (AUDIO/VIDEO) close function.
Definition at line 2614 of file html.cc.
References DilloHtml::InFlags.
|
static |
Default close for paragraph tags - pop the stack and break.
Definition at line 3428 of file html.cc.
References HT2TB, and DilloHtml::wordStyle().
|
static |
Definition at line 3062 of file html.cc.
References DilloHtml::InFlags.
|
static |
Definition at line 2797 of file html.cc.
References HT2TB, and DilloHtml::wordStyle().
|
static |
|
static |
Handle close STYLE.
Definition at line 1773 of file html.cc.
References DilloHtml::base_url, CSS_ORIGIN_AUTHOR, Dstr::len, DilloHtml::loadCssFromStash, StyleEngine::parse(), DilloPrefs::parse_embedded_css, prefs, DilloHtml::Stash, Dstr::str, and DilloHtml::styleEngine.
|
static |
Handle close TITLE.
set page-title in the browser window and in the history.
Definition at line 1708 of file html.cc.
References a_History_set_title_by_url(), a_UIcmd_set_page_title(), DilloHtml::bw, IN_HEAD, DilloHtml::InFlags, DilloHtml::Num_TITLE, DilloHtml::page_url, DilloHtml::Stash, and Dstr::str.
|
static |
Definition at line 3595 of file html.cc.
References D_ASCII_TOLOWER.
Referenced by a_Html_tag_index().
|
static |
Definition at line 2396 of file html.cc.
References a_Html_get_attr(), a_Html_url_new(), dw::core::Polygon::addPoint(), dw::ImageMapsList::addShapeToCurrentMap(), BUG_MSG, dReturn_if_fail, dStrAsciiCasecmp(), dStrnAsciiCasecmp(), lout::misc::SimpleVector< T >::get(), Html_read_coords(), Html_set_new_link(), IN_MAP, DilloHtml::InFlags, DilloHtml::maps, dw::ImageMapsList::setCurrentMapDefaultLink(), and lout::misc::SimpleVector< T >::size().
Referenced by Html_tag_open_a().
|
static |
Definition at line 2008 of file html.cc.
References HT2TB, and DilloHtml::wordStyle().
|
static |
Definition at line 2643 of file html.cc.
References a_Html_get_attr(), HT2TB, and DilloHtml::wordStyle().
|
static |
Definition at line 1940 of file html.cc.
References a_Html_get_attr(), dw::Textblock::addParbreak(), dw::Textblock::addSpace(), dw::Textblock::addText(), dw::Textblock::addWidget(), D_ASCII_TOLOWER, dFree(), dStrdup(), HT2TB, and DilloHtml::wordStyle().
|
static |
Definition at line 1985 of file html.cc.
References HT2TB, Html_add_textblock(), and DilloHtml::wordStyle().
|
static |
Definition at line 3010 of file html.cc.
References HT2TB, dw::core::Widget::setStyle(), DilloHtml::style(), and DilloHtml::wordStyle().
|
static |
Create a new Image struct and request the image-url to the cache.
(If it either hits or misses, is not relevant here; that's up to the cache functions)
Definition at line 2269 of file html.cc.
References _MSG, a_Html_get_attr(), a_Html_image_new(), a_Html_url_new(), a_Url_free(), DilloHtml::base_url, HT2TB, DilloHtml::maps, dw::Image::setIsMap(), dw::Image::setUseMap(), DilloHtml::style(), URL_FLAGS, URL_SpamSafe, URL_STR, and dw::core::style::StyleAttrs::x_link.
|
static |
Definition at line 2315 of file html.cc.
References a_Html_get_attr(), a_Html_url_new(), a_Url_free(), BUG_MSG, dFree(), dStrconcat(), IN_MAP, DilloHtml::InFlags, DilloHtml::maps, dw::ImageMapsList::startNewMap(), and URL_STR.
|
static |
Definition at line 2500 of file html.cc.
References a_Html_get_attr(), HT2TB, and DilloHtml::wordStyle().
|
static |
Definition at line 2604 of file html.cc.
References a_Html_get_attr(), HT2TB, IN_MEDIA, DilloHtml::InFlags, and DilloHtml::wordStyle().
|
static |
Definition at line 3436 of file html.cc.
References HT2TB, and DilloHtml::wordStyle().
|
static |
Definition at line 2694 of file html.cc.
References a_Capi_get_flags_with_redirection(), a_Html_get_attr(), a_Html_url_new(), a_Url_decode_hex_str(), BUG_MSG, CAPI_IsCached, CSS_PROPERTY_COLOR, CSS_TYPE_COLOR, CSS_TYPE_INTEGER, CSS_TYPE_STRING, D_ASCII_TOLOWER, dFree(), dReturn_if_fail, StyleEngine::getId(), Html_add_anchor(), Html_check_name_val(), Html_get_javascript_link(), Html_set_new_link(), Html_tag_content_area(), IN_A, IN_MAP, DilloHtml::InFlags, StyleEngine::inheritBackgroundColor(), DilloHtml::InVisitedLink, DilloHtml::non_css_link_color, DilloHtml::non_css_visited_color, prefs, PROPERTY_X_LINK, PROPERTY_X_TOOLTIP, StyleEngine::setNonCssHint(), StyleEngine::setPseudoLink(), StyleEngine::setPseudoVisited(), DilloPrefs::show_extra_warnings, DilloPrefs::show_tooltip, and DilloHtml::styleEngine.
|
static |
Definition at line 2046 of file html.cc.
References a_Html_get_attr(), CSS_TYPE_STRING, StyleEngine::inheritBackgroundColor(), prefs, PROPERTY_X_TOOLTIP, StyleEngine::setNonCssHint(), DilloPrefs::show_tooltip, and DilloHtml::styleEngine.
|
static |
Definition at line 2544 of file html.cc.
References a_Capi_get_flags_with_redirection(), a_Html_get_attr(), a_Html_url_new(), CAPI_IsCached, CSS_TYPE_INTEGER, dReturn_if_fail, HT2TB, Html_set_new_link(), IN_MEDIA, DilloHtml::InFlags, MSG, PROPERTY_X_LINK, StyleEngine::setNonCssHint(), StyleEngine::setPseudoLink(), StyleEngine::setPseudoVisited(), DilloHtml::styleEngine, and DilloHtml::wordStyle().
|
static |
Set the Document Base URI.
Definition at line 3349 of file html.cc.
References a_Html_get_attr(), a_Html_url_new(), a_Url_free(), a_Url_set_flags(), DilloHtml::base_url, BUG_MSG, DilloHtml::DocType, DilloHtml::DocTypeVersion, DT_HTML, IN_HEAD, DilloHtml::InFlags, URL_FLAGS, URL_SCHEME_, and URL_SpamSafe.
|
static |
Definition at line 2773 of file html.cc.
References Html_add_textblock().
|
static |
Definition at line 1783 of file html.cc.
References _MSG, a_Color_vc(), a_Html_color_parse(), a_Html_get_attr(), dw::core::style::StyleAttrs::backgroundColor, StyleEngine::backgroundColor(), StyleEngine::backgroundImage(), DilloHtml::backgroundStyle(), BUG_MSG, dw::core::style::StyleAttrs::color, DilloPrefs::contrast_visited_color, CSS_PROPERTY_BACKGROUND_COLOR, CSS_PROPERTY_COLOR, CSS_TYPE_COLOR, DILLO_HTML_PARSE_MODE_BODY, DilloHtml::DocType, DilloHtml::DocTypeVersion, DT_HTML, DilloHtml::dw, StyleEngine::endElement(), dw::core::style::ColorAttrs::getColor(), HT2LT, i_A, IN_BODY, IN_HEAD, DilloHtml::InFlags, DilloHtml::non_css_link_color, DilloHtml::non_css_visited_color, DilloHtml::Num_BODY, prefs, DilloHtml::ReqTagClose, DilloHtml::restyle(), S_TOP, StyleEngine::setNonCssHint(), StyleEngine::setPseudoVisited(), dw::core::Widget::setStyle(), DilloHtml::startElement(), DilloHtml::style(), DilloHtml::styleEngine, and DilloHtml::visited_color.
|
static |
Definition at line 3043 of file html.cc.
References Html_add_textblock().
|
static |
Definition at line 3378 of file html.cc.
References StyleEngine::inheritBackgroundColor(), and DilloHtml::styleEngine.
|
static |
Definition at line 2841 of file html.cc.
References BUG_MSG, HT2TB, HTML_LIST_UNORDERED, StyleEngine::inheritBackgroundColor(), prefs, S_TOP, DilloPrefs::show_extra_warnings, DilloHtml::styleEngine, and DilloHtml::wordStyle().
Referenced by Html_tag_open_menu().
|
static |
Definition at line 3419 of file html.cc.
References a_Html_tag_set_align_attr(), and Html_tag_open_sectioning().
|
static |
Definition at line 3024 of file html.cc.
References HT2TB, StyleEngine::inheritBackgroundColor(), DilloHtml::styleEngine, and DilloHtml::wordStyle().
|
static |
Definition at line 3034 of file html.cc.
References HT2TB, StyleEngine::inheritBackgroundColor(), DilloHtml::styleEngine, and DilloHtml::wordStyle().
|
static |
Definition at line 2623 of file html.cc.
References a_Capi_get_flags_with_redirection(), a_Html_get_attr(), a_Html_url_new(), CAPI_IsCached, CSS_TYPE_INTEGER, dReturn_if_fail, Html_set_new_link(), PROPERTY_X_LINK, StyleEngine::setNonCssHint(), StyleEngine::setPseudoLink(), StyleEngine::setPseudoVisited(), and DilloHtml::styleEngine.
|
static |
Definition at line 2016 of file html.cc.
References a_Html_color_parse(), a_Html_get_attr(), DilloPrefs::contrast_visited_color, CSS_PROPERTY_COLOR, CSS_PROPERTY_FONT_FAMILY, CSS_TYPE_COLOR, CSS_TYPE_SYMBOL, dFree(), dStrdup(), DilloHtml::InVisitedLink, prefs, StyleEngine::setNonCssHint(), DilloHtml::styleEngine, and DilloHtml::visited_color.
|
static |
Definition at line 1915 of file html.cc.
References a_Capi_get_flags_with_redirection(), a_Html_get_attr(), a_Html_url_new(), CAPI_IsCached, CSS_TYPE_INTEGER, Html_set_new_link(), PROPERTY_X_LINK, StyleEngine::setNonCssHint(), StyleEngine::setPseudoLink(), StyleEngine::setPseudoVisited(), and DilloHtml::styleEngine.
|
static |
Definition at line 1996 of file html.cc.
References a_Html_stash_init(), a_Html_tag_set_align_attr(), DILLO_HTML_PARSE_MODE_STASH_AND_BODY, and S_TOP.
|
static |
Handle open HEAD element.
Definition at line 1637 of file html.cc.
References BUG_MSG, IN_BODY, IN_HEAD, DilloHtml::InFlags, DilloHtml::Num_HEAD, and DilloHtml::ReqTagClose.
|
static |
Definition at line 2952 of file html.cc.
References a_Html_get_attr(), a_Html_get_attr_wdef(), a_Html_parse_length(), a_Html_tag_set_align_attr(), dw::core::style::BORDER_SOLID, BUG_MSG, CSS_CREATE_LENGTH(), CSS_LENGTH_TYPE_PX, CSS_PROPERTY_BORDER_BOTTOM_STYLE, CSS_PROPERTY_BORDER_BOTTOM_WIDTH, CSS_PROPERTY_BORDER_LEFT_STYLE, CSS_PROPERTY_BORDER_LEFT_WIDTH, CSS_PROPERTY_BORDER_RIGHT_STYLE, CSS_PROPERTY_BORDER_RIGHT_WIDTH, CSS_PROPERTY_BORDER_TOP_STYLE, CSS_PROPERTY_BORDER_TOP_WIDTH, CSS_PROPERTY_WIDTH, CSS_TYPE_ENUM, CSS_TYPE_LENGTH_PERCENTAGE, dFree(), DilloHtml::DocType, DilloHtml::DocTypeVersion, DT_HTML, StyleEngine::setNonCssHint(), and DilloHtml::styleEngine.
|
static |
Handle open HTML element.
Definition at line 1606 of file html.cc.
References BUG_MSG, IN_HTML, DilloHtml::InFlags, DilloHtml::Num_HTML, and DilloHtml::ReqTagClose.
|
static |
Definition at line 2206 of file html.cc.
References a_Html_common_image_attrs(), a_Html_get_attr(), dw::core::style::BORDER_SOLID, CSS_CREATE_LENGTH(), CSS_LENGTH_TYPE_PX, CSS_PROPERTY_BORDER_BOTTOM_STYLE, CSS_PROPERTY_BORDER_BOTTOM_WIDTH, CSS_PROPERTY_BORDER_LEFT_STYLE, CSS_PROPERTY_BORDER_LEFT_WIDTH, CSS_PROPERTY_BORDER_RIGHT_STYLE, CSS_PROPERTY_BORDER_RIGHT_WIDTH, CSS_PROPERTY_BORDER_TOP_STYLE, CSS_PROPERTY_BORDER_TOP_WIDTH, CSS_PROPERTY_MARGIN_BOTTOM, CSS_PROPERTY_MARGIN_LEFT, CSS_PROPERTY_MARGIN_RIGHT, CSS_PROPERTY_MARGIN_TOP, CSS_TYPE_ENUM, CSS_TYPE_LENGTH_PERCENTAGE, StyleEngine::setNonCssHint(), and DilloHtml::styleEngine.
|
static |
Definition at line 2911 of file html.cc.
References a_Html_get_attr(), BUG_MSG, DilloHtml::DocType, DilloHtml::DocTypeVersion, DT_HTML, lout::misc::SimpleVector< T >::getRef(), HTML_LIST_NONE, IN_LI, DilloHtml::InFlags, DilloHtmlState::list_number, dw::core::style::LIST_STYLE_TYPE_DECIMAL, dw::core::style::StyleAttrs::listStyleType, S_TOP, lout::misc::SimpleVector< T >::size(), DilloHtml::stack, and DilloHtml::style().
|
static |
Parse the LINK element (Only CSS stylesheets by now).
(If it either hits or misses, is not relevant here; that's up to the cache functions)
TODO: How will we know when to use "handheld"? Ask the html->bw->ui for screen dimensions, or a dillorc preference.
Definition at line 3299 of file html.cc.
References _MSG, a_Html_get_attr(), a_Html_url_new(), a_Url_free(), DilloHtml::addCssUrl(), DilloHtml::base_url, BUG_MSG, DilloHtml::DocType, DilloHtml::DocTypeVersion, dReturn_if, dReturn_if_fail, dStrAsciiCasecmp(), dStriAsciiStr(), DT_HTML, IN_HEAD, DilloHtml::InFlags, DilloPrefs::load_stylesheets, prefs, URL_FLAGS, URL_SpamSafe, and URL_STR.
|
static |
Definition at line 2857 of file html.cc.
References DilloHtml::DocType, DilloHtml::DocTypeVersion, DT_HTML, and Html_tag_open_dir().
|
static |
Handle META We do not support http-equiv=refresh with delay>0 because it's non standard, (the HTML 4.01 SPEC recommends explicitly to avoid it).
More info at: http://lists.w3.org/Archives/Public/www-html/2000Feb/thread.html#msg232 Instant client-side redirects (delay=0) are supported: http://www.w3.org/TR/2008/NOTE-WCAG20-TECHS-20081211/H76.html
TODO: Note that we're sending custom HTML while still IN_HEAD. This is a hackish way to put the message. A much cleaner approach is to build a custom widget for it.
Definition at line 3120 of file html.cc.
References _MSG, a_Capi_dpi_verify_request(), a_Html_get_attr(), a_Html_url_new(), a_UIcmd_redirection0(), a_UIcmd_set_msg(), a_Url_cmp(), a_Url_free(), DilloHtml::base_url, BUG_MSG, DilloHtml::bw, DilloHtml::charset, dFree(), DilloHtml::DocType, DilloHtml::DocTypeVersion, dStr_free(), dStr_sized_new(), dStr_sprintf(), dStrAsciiCasecmp(), dStrconcat(), dStrdup(), dStriAsciiStr(), dStrndup(), DT_HTML, Html_update_content_type(), Html_write_raw(), IN_BODY, IN_HEAD, IN_META_HACK, DilloHtml::InFlags, Dstr::len, DilloHtml::stop_parser, Dstr::str, DilloHtml::TagSoup, URL_FLAGS, URL_SpamSafe, and URL_STR.
|
static |
Definition at line 2474 of file html.cc.
References a_Capi_get_flags_with_redirection(), a_Html_get_attr(), a_Html_url_new(), a_Url_free(), DilloHtml::base_url, CAPI_IsCached, CSS_TYPE_INTEGER, dReturn_if_fail, Html_set_new_link(), PROPERTY_X_LINK, StyleEngine::setNonCssHint(), StyleEngine::setPseudoLink(), StyleEngine::setPseudoVisited(), DilloHtml::styleEngine, and URL_STR.
|
static |
Definition at line 2874 of file html.cc.
References a_Html_get_attr(), BUG_MSG, CSS_PROPERTY_LIST_STYLE_TYPE, CSS_TYPE_ENUM, HTML_LIST_ORDERED, dw::core::style::LIST_STYLE_TYPE_DECIMAL, dw::core::style::LIST_STYLE_TYPE_LOWER_ALPHA, dw::core::style::LIST_STYLE_TYPE_LOWER_ROMAN, dw::core::style::LIST_STYLE_TYPE_UPPER_ALPHA, dw::core::style::LIST_STYLE_TYPE_UPPER_ROMAN, S_TOP, StyleEngine::setNonCssHint(), and DilloHtml::styleEngine.
|
static |
Definition at line 1903 of file html.cc.
References a_Html_tag_set_align_attr().
|
static |
Definition at line 3051 of file html.cc.
References HT2TB, IN_PRE, DilloHtml::InFlags, StyleEngine::inheritBackgroundColor(), DilloHtml::styleEngine, and DilloHtml::wordStyle().
|
static |
Definition at line 2782 of file html.cc.
References HT2TB, StyleEngine::inheritBackgroundColor(), DilloHtml::styleEngine, and DilloHtml::wordStyle().
|
static |
Handle open SCRIPT.
initializes stash, where the embedded code will be stored. MODE_VERBATIM is used because MODE_STASH catches entities.
Definition at line 1726 of file html.cc.
References a_Html_stash_init(), DILLO_HTML_PARSE_MODE_VERBATIM, and S_TOP.
|
static |
Definition at line 3403 of file html.cc.
References a_Html_get_attr(), CSS_TYPE_STRING, prefs, PROPERTY_X_TOOLTIP, StyleEngine::setNonCssHint(), DilloPrefs::show_tooltip, and DilloHtml::styleEngine.
Referenced by Html_tag_open_div().
|
static |
Definition at line 2576 of file html.cc.
References a_Capi_get_flags_with_redirection(), a_Html_get_attr(), a_Html_url_new(), BUG_MSG, CAPI_IsCached, CSS_TYPE_INTEGER, dReturn_if_fail, Html_set_new_link(), IN_MEDIA, DilloHtml::InFlags, PROPERTY_X_LINK, StyleEngine::setNonCssHint(), StyleEngine::setPseudoLink(), StyleEngine::setPseudoVisited(), and DilloHtml::styleEngine.
|
static |
Definition at line 3386 of file html.cc.
References a_Html_get_attr(), CSS_TYPE_STRING, StyleEngine::inheritBackgroundColor(), prefs, PROPERTY_X_TOOLTIP, StyleEngine::setNonCssHint(), DilloPrefs::show_tooltip, and DilloHtml::styleEngine.
|
static |
Handle open STYLE.
Store contents in the stash where the style sheet interpreter can get it.
Definition at line 1744 of file html.cc.
References a_Html_get_attr(), a_Html_stash_init(), BUG_MSG, DILLO_HTML_PARSE_MODE_VERBATIM, DilloHtml::DocType, DilloHtml::DocTypeVersion, dStrAsciiCasecmp(), dStriAsciiStr(), DT_HTML, DilloHtml::loadCssFromStash, and S_TOP.
|
static |
Handle open TITLE.
calls stash init, where the title string will be stored
Definition at line 1688 of file html.cc.
References a_Html_stash_init(), BUG_MSG, IN_HEAD, DilloHtml::InFlags, and DilloHtml::Num_TITLE.
|
static |
Definition at line 2808 of file html.cc.
References a_Html_get_attr(), BUG_MSG, CSS_PROPERTY_LIST_STYLE_TYPE, CSS_TYPE_ENUM, DilloHtml::DocType, DilloHtml::DocTypeVersion, dStrAsciiCasecmp(), DT_HTML, HTML_LIST_UNORDERED, dw::core::style::LIST_STYLE_TYPE_CIRCLE, dw::core::style::LIST_STYLE_TYPE_DISC, dw::core::style::LIST_STYLE_TYPE_SQUARE, S_TOP, StyleEngine::setNonCssHint(), and DilloHtml::styleEngine.
|
static |
Definition at line 2511 of file html.cc.
References a_Capi_get_flags_with_redirection(), a_Html_get_attr(), a_Html_url_new(), CAPI_IsCached, CSS_TYPE_INTEGER, dReturn_if_fail, HT2TB, Html_set_new_link(), IN_MEDIA, DilloHtml::InFlags, MSG, PROPERTY_X_LINK, StyleEngine::setNonCssHint(), StyleEngine::setPseudoLink(), StyleEngine::setPseudoVisited(), DilloHtml::styleEngine, and DilloHtml::wordStyle().
|
static |
Check whether a tag is in the "excluding" element set for PRE.
Excl. Set = {IMG, OBJECT, APPLET, BIG, SMALL, SUB, SUP, FONT, BASEFONT}
Definition at line 3071 of file html.cc.
References a_Html_tag_index(), DilloHtml::DocType, DilloHtml::DocTypeVersion, and DT_HTML.
Referenced by Html_process_tag().
|
static |
HTML, HEAD and BODY elements have optional open and close tags.
Handle this "magic" here.
Definition at line 3844 of file html.cc.
References _MSG, a_Html_tag_index(), BUG_MSG, DilloHtml::DocType, DT_NONE, Html_force_push_tag(), Html_tag_cleanup_at_close(), IN_HEAD, IN_HTML, DilloHtml::InFlags, DilloHtml::Num_HEAD, lout::misc::SimpleVector< T >::size(), DilloHtml::stack, and Tags.
Referenced by Html_process_tag().
|
static |
For elements with optional close, check whether is time to close, by also following Firefox's de facto rules.
Called at open time.
Return value: (1: Close, 0: Don't close) –tuned for speed.
Definition at line 3637 of file html.cc.
References i_DD, i_DT, i_LI, i_OPTGROUP, i_OPTION, i_P, i_TBODY, i_TD, i_TH, i_TR, and Tags.
Referenced by Html_stack_cleanup_at_open().
|
static |
Update the document's content type information based on meta tag data.
Definition at line 3094 of file html.cc.
References a_Capi_set_content_type(), a_Misc_content_type_cmp(), a_UIcmd_repush(), DilloHtml::bw, DilloHtml::content_type, DilloHtml::page_url, and DilloHtml::stop_parser.
Referenced by Html_tag_open_meta().
|
static |
Here's where we parse the html and put it into the Textblock structure.
Return value: number of bytes parsed
Definition at line 4316 of file html.cc.
References bufsize, BUG_MSG, DilloHtml::CurrOfs, dFree(), DILLO_HTML_PARSE_MODE_VERBATIM, dStr_append(), dStrndup(), HT2TB, Html_match_tag(), Html_process_space(), Html_process_tag(), Html_process_word(), S_TOP, DilloHtml::Start_Ofs, DilloHtml::Stash, DilloHtml::stop_parser, and Tags.
Referenced by Html_tag_open_meta(), and DilloHtml::write().
|
static |
Definition at line 125 of file html.cc.
Referenced by Html_forbids_cross_nesting(), Html_stack_cleanup_at_open(), Html_tag_cleanup_at_close(), and Html_tag_open_body().
|
static |
Definition at line 126 of file html.cc.
Referenced by Html_tag_cleanup_to_idx().
|
static |
Definition at line 127 of file html.cc.
Referenced by Html_forbids_cross_nesting(), and Html_tag_cleanup_at_close().
|
static |
Definition at line 128 of file html.cc.
Referenced by Html_triggers_optional_close().
|
static |
Definition at line 129 of file html.cc.
Referenced by Html_triggers_optional_close().
|
static |
Definition at line 131 of file html.cc.
Referenced by Html_stack_cleanup_at_open().
|
static |
Definition at line 130 of file html.cc.
Referenced by Html_process_tag().
|
static |
Definition at line 132 of file html.cc.
Referenced by Html_triggers_optional_close().
|
static |
Definition at line 133 of file html.cc.
Referenced by Html_triggers_optional_close().
|
static |
Definition at line 134 of file html.cc.
Referenced by Html_triggers_optional_close().
|
static |
Definition at line 135 of file html.cc.
Referenced by Html_triggers_optional_close().
|
static |
Definition at line 136 of file html.cc.
Referenced by Html_forbids_cross_nesting(), and Html_tag_cleanup_at_close().
|
static |
Definition at line 140 of file html.cc.
Referenced by Html_triggers_optional_close().
|
static |
Definition at line 138 of file html.cc.
Referenced by Html_triggers_optional_close().
|
static |
Definition at line 137 of file html.cc.
Referenced by Html_forbids_cross_nesting(), and Html_tag_cleanup_at_close().
|
static |
Definition at line 141 of file html.cc.
Referenced by Html_triggers_optional_close().
|
static |
Definition at line 139 of file html.cc.
Referenced by Html_triggers_optional_close().
|
static |
Function index for the open, content, and close functions for each tag.
(Alphabetically sorted for a binary search). The open and close functions are always called. They are used for style handling and HTML bug reporting. Content creation (e.g. adding new widgets or text) is done in the content function, which is not called in the display:none case. Note: many tags don't need a content function (e.g. <div>
, <span>
, ...).
Explanation for the 'Flags' field:
* {"address", B8(01110), ...} * ||||| * ||||`-- inline/block element (1/0 resp.) * |||`--- inline container * ||`---- block container * |`----- body element * `------ head element *
Notes:
Definition at line 3469 of file html.cc.
Referenced by a_Html_tag_index(), Html_check_html5_obsolete(), Html_process_tag(), Html_stack_cleanup_at_open(), Html_tag_cleanup_at_close(), Html_tag_cleanup_to_idx(), Html_test_section(), Html_triggers_optional_close(), and Html_write_raw().