Hubbub $Id$
Enumerations | Functions
modes.h File Reference
#include "treebuilder/treebuilder.h"

Go to the source code of this file.

Enumerations

enum  insertion_mode {
  INITIAL , BEFORE_HTML , BEFORE_HEAD , IN_HEAD ,
  IN_HEAD_NOSCRIPT , AFTER_HEAD , IN_BODY , IN_TABLE ,
  IN_CAPTION , IN_COLUMN_GROUP , IN_TABLE_BODY , IN_ROW ,
  IN_CELL , IN_SELECT , IN_SELECT_IN_TABLE , IN_FOREIGN_CONTENT ,
  AFTER_BODY , IN_FRAMESET , AFTER_FRAMESET , AFTER_AFTER_BODY ,
  AFTER_AFTER_FRAMESET , GENERIC_RCDATA
}
 The various treebuilder insertion modes. More...
 

Functions

hubbub_error handle_initial (hubbub_treebuilder *treebuilder, const hubbub_token *token)
 Handle token in initial insertion mode. More...
 
hubbub_error handle_before_html (hubbub_treebuilder *treebuilder, const hubbub_token *token)
 Handle token in "before html" insertion mode. More...
 
hubbub_error handle_before_head (hubbub_treebuilder *treebuilder, const hubbub_token *token)
 Handle token in "before head" insertion mode. More...
 
hubbub_error handle_in_head (hubbub_treebuilder *treebuilder, const hubbub_token *token)
 Handle token in "in head" insertion mode. More...
 
hubbub_error handle_in_head_noscript (hubbub_treebuilder *treebuilder, const hubbub_token *token)
 Handle tokens in "in head noscript" insertion mode. More...
 
hubbub_error handle_after_head (hubbub_treebuilder *treebuilder, const hubbub_token *token)
 Handle tokens in "after head" insertion mode. More...
 
hubbub_error handle_in_body (hubbub_treebuilder *treebuilder, const hubbub_token *token)
 Handle tokens in "in body" insertion mode. More...
 
hubbub_error handle_in_table (hubbub_treebuilder *treebuilder, const hubbub_token *token)
 Handle token in "in table" insertion mode. More...
 
hubbub_error handle_in_caption (hubbub_treebuilder *treebuilder, const hubbub_token *token)
 Handle tokens in "in caption" insertion mode. More...
 
hubbub_error handle_in_column_group (hubbub_treebuilder *treebuilder, const hubbub_token *token)
 Handle tokens in "in column group" insertion mode. More...
 
hubbub_error handle_in_table_body (hubbub_treebuilder *treebuilder, const hubbub_token *token)
 Handle tokens in "in table body" insertion mode. More...
 
hubbub_error handle_in_row (hubbub_treebuilder *treebuilder, const hubbub_token *token)
 Handle tokens in "in row" insertion mode. More...
 
hubbub_error handle_in_cell (hubbub_treebuilder *treebuilder, const hubbub_token *token)
 Handle tokens in "in cell" insertion mode. More...
 
hubbub_error handle_in_select (hubbub_treebuilder *treebuilder, const hubbub_token *token)
 Handle token in "in head" insertion mode. More...
 
hubbub_error handle_in_select_in_table (hubbub_treebuilder *treebuilder, const hubbub_token *token)
 Handle token in "in select in table" insertion mode. More...
 
hubbub_error handle_generic_rcdata (hubbub_treebuilder *treebuilder, const hubbub_token *token)
 Handle tokens in "generic rcdata" insertion mode. More...
 
hubbub_error handle_script_collect_characters (hubbub_treebuilder *treebuilder, const hubbub_token *token)
 
hubbub_error handle_in_foreign_content (hubbub_treebuilder *treebuilder, const hubbub_token *token)
 Handle tokens in "in foreign content" insertion mode. More...
 
hubbub_error handle_after_body (hubbub_treebuilder *treebuilder, const hubbub_token *token)
 Handle token in "after body" insertion mode. More...
 
hubbub_error handle_in_frameset (hubbub_treebuilder *treebuilder, const hubbub_token *token)
 Handle token in "in frameset" insertion mode. More...
 
hubbub_error handle_after_frameset (hubbub_treebuilder *treebuilder, const hubbub_token *token)
 Handle token in "after frameset" insertion mode. More...
 
hubbub_error handle_after_after_body (hubbub_treebuilder *treebuilder, const hubbub_token *token)
 Handle token in "after after body" insertion mode. More...
 
hubbub_error handle_after_after_frameset (hubbub_treebuilder *treebuilder, const hubbub_token *token)
 Handle token in "after after frameset" insertion mode. More...
 

Enumeration Type Documentation

◆ insertion_mode

The various treebuilder insertion modes.

Enumerator
INITIAL 
BEFORE_HTML 
BEFORE_HEAD 
IN_HEAD 
IN_HEAD_NOSCRIPT 
AFTER_HEAD 
IN_BODY 
IN_TABLE 
IN_CAPTION 
IN_COLUMN_GROUP 
IN_TABLE_BODY 
IN_ROW 
IN_CELL 
IN_SELECT 
IN_SELECT_IN_TABLE 
IN_FOREIGN_CONTENT 
AFTER_BODY 
IN_FRAMESET 
AFTER_FRAMESET 
AFTER_AFTER_BODY 
AFTER_AFTER_FRAMESET 
GENERIC_RCDATA 

Function Documentation

◆ handle_after_after_body()

hubbub_error handle_after_after_body ( hubbub_treebuilder treebuilder,
const hubbub_token token 
)

Handle token in "after after body" insertion mode.

Parameters
treebuilderThe treebuilder instance
tokenThe token to handle
Returns
HUBBUB_OK on completion, HUBBUB_REPROCESS to reprocess the token, appropriate error otherwise
Todo:
parse error
Todo:
parse error

◆ handle_after_after_frameset()

hubbub_error handle_after_after_frameset ( hubbub_treebuilder treebuilder,
const hubbub_token token 
)

Handle token in "after after frameset" insertion mode.

Parameters
treebuilderThe treebuilder instance
tokenThe token to handle
Returns
True to reprocess token, false otherwise
Todo:
parse error
Todo:
parse error

◆ handle_after_body()

hubbub_error handle_after_body ( hubbub_treebuilder treebuilder,
const hubbub_token token 
)

Handle token in "after body" insertion mode.

Parameters
treebuilderThe treebuilder instance
tokenThe token to handle
Returns
True to reprocess token, false otherwise
Todo:
parse error
Todo:
parse error
Todo:
fragment case
Todo:
parse error
Todo:
parse error

◆ handle_after_frameset()

hubbub_error handle_after_frameset ( hubbub_treebuilder treebuilder,
const hubbub_token token 
)

Handle token in "after frameset" insertion mode.

Parameters
treebuilderThe treebuilder instance
tokenThe token to handle
Returns
True to reprocess token, false otherwise
Todo:
parse error
Todo:
parse error
Todo:
parse error
Todo:
fragment case
Todo:
parse error
Todo:
parse error

◆ handle_after_head()

hubbub_error handle_after_head ( hubbub_treebuilder treebuilder,
const hubbub_token token 
)

Handle tokens in "after head" insertion mode.

Parameters
treebuilderThe treebuilder instance
tokenThe token to process
Returns
True to reprocess the token, false otherwise
Todo:
parse error
Todo:
parse error
Todo:
parse error
Todo:
parse error

◆ handle_before_head()

hubbub_error handle_before_head ( hubbub_treebuilder treebuilder,
const hubbub_token token 
)

Handle token in "before head" insertion mode.

Parameters
treebuilderThe treebuilder instance
tokenThe token to handle
Returns
True to reprocess token, false otherwise
Todo:
parse error
Todo:
parse error

◆ handle_before_html()

hubbub_error handle_before_html ( hubbub_treebuilder treebuilder,
const hubbub_token token 
)

Handle token in "before html" insertion mode.

Parameters
treebuilderThe treebuilder instance
tokenThe token to handle
Returns
True to reprocess token, false otherwise
Todo:
parse error
Todo:
cache selection algorithm

◆ handle_generic_rcdata()

hubbub_error handle_generic_rcdata ( hubbub_treebuilder treebuilder,
const hubbub_token token 
)

Handle tokens in "generic rcdata" insertion mode.

Parameters
treebuilderThe treebuilder instance
tokenThe token to process
Returns
True to reprocess the token, false otherwise
Todo:
parse error
Todo:
if the current node's a script, mark it as already executed
Todo:
parse error

◆ handle_in_body()

hubbub_error handle_in_body ( hubbub_treebuilder treebuilder,
const hubbub_token token 
)

Handle tokens in "in body" insertion mode.

Parameters
treebuilderThe treebuilder instance
tokenThe token to process
Returns
True to reprocess the token, false otherwise
Todo:
parse error
Todo:
parse error

◆ handle_in_caption()

hubbub_error handle_in_caption ( hubbub_treebuilder treebuilder,
const hubbub_token token 
)

Handle tokens in "in caption" insertion mode.

Parameters
treebuilderThe treebuilder instance
tokenThe token to process
Returns
True to reprocess the token, false otherwise
Todo:
parse error
Todo:
parse error if type == TABLE
Todo:
parse error
Todo:
fragment case
Todo:
parse error

◆ handle_in_cell()

hubbub_error handle_in_cell ( hubbub_treebuilder treebuilder,
const hubbub_token token 
)

Handle tokens in "in cell" insertion mode.

Parameters
treebuilderThe treebuilder instance
tokenThe token to process
Returns
True to reprocess the token, false otherwise
Todo:
fragment case
Todo:
parse error
Todo:
parse error
Todo:
parse error
Todo:
parse error

◆ handle_in_column_group()

hubbub_error handle_in_column_group ( hubbub_treebuilder treebuilder,
const hubbub_token token 
)

Handle tokens in "in column group" insertion mode.

Parameters
treebuilderThe treebuilder instance
tokenThe token to process
Returns
True to reprocess the token, false otherwise
Todo:
parse error
Todo:
ack sc flag
Todo:
fragment case
Todo:
parse error
Todo:
fragment case

◆ handle_in_foreign_content()

hubbub_error handle_in_foreign_content ( hubbub_treebuilder treebuilder,
const hubbub_token token 
)

Handle tokens in "in foreign content" insertion mode.

Parameters
treebuilderThe treebuilder instance
tokenThe token to process
Returns
True to reprocess the token, false otherwise
Todo:
parse error
Todo:
ack sc flag

◆ handle_in_frameset()

hubbub_error handle_in_frameset ( hubbub_treebuilder treebuilder,
const hubbub_token token 
)

Handle token in "in frameset" insertion mode.

Parameters
treebuilderThe treebuilder instance
tokenThe token to handle
Returns
True to reprocess token, false otherwise
Todo:
parse error
Todo:
parse error
Todo:
ack sc flag
Todo:
parse error
Todo:
parse error
Todo:
parse error
Todo:
parse error

◆ handle_in_head()

hubbub_error handle_in_head ( hubbub_treebuilder treebuilder,
const hubbub_token token 
)

Handle token in "in head" insertion mode.

Parameters
treebuilderThe treebuilder instance
tokenThe token to handle
Returns
True to reprocess token, false otherwise
Todo:
parse error
Todo:
ack sc flag
Todo:
need to ensure that the client callback sets the parser-inserted/already-executed script flags.
Todo:
parse error
Todo:
parse error

◆ handle_in_head_noscript()

hubbub_error handle_in_head_noscript ( hubbub_treebuilder treebuilder,
const hubbub_token token 
)

Handle tokens in "in head noscript" insertion mode.

Parameters
treebuilderThe treebuilder instance
tokenThe token to process
Returns
True to reprocess the token, false otherwise
Todo:
parse error
Todo:
parse error
Todo:
parse error
Todo:
parse error
Todo:
parse error
Todo:
parse error

◆ handle_in_row()

hubbub_error handle_in_row ( hubbub_treebuilder treebuilder,
const hubbub_token token 
)

Handle tokens in "in row" insertion mode.

Parameters
treebuilderThe treebuilder instance
tokenThe token to process
Returns
True to reprocess the token, false otherwise
Todo:
parse error

◆ handle_in_select()

hubbub_error handle_in_select ( hubbub_treebuilder treebuilder,
const hubbub_token token 
)

Handle token in "in head" insertion mode.

Parameters
treebuilderThe treebuilder instance
tokenThe token to handle
Returns
True to reprocess token, false otherwise
Todo:
parse error
Todo:
parse error
Todo:
parse error
Todo:
parse error
Todo:
parse error
Todo:
parse error

◆ handle_in_select_in_table()

hubbub_error handle_in_select_in_table ( hubbub_treebuilder treebuilder,
const hubbub_token token 
)

Handle token in "in select in table" insertion mode.

Parameters
treebuilderThe treebuilder instance
tokenThe token to handle
Returns
True to reprocess token, false otherwise
Todo:
parse error
Todo:
fragment case

◆ handle_in_table()

hubbub_error handle_in_table ( hubbub_treebuilder treebuilder,
const hubbub_token token 
)

Handle token in "in table" insertion mode.

Parameters
treebuilderThe treebuilder instance
tokenThe token to handle
Returns
True to reprocess token, false otherwise
Todo:
parse error
Todo:
parse error
Todo:
fragment case
Todo:
parse error
Todo:
parse error

◆ handle_in_table_body()

hubbub_error handle_in_table_body ( hubbub_treebuilder treebuilder,
const hubbub_token token 
)

Handle tokens in "in table body" insertion mode.

Parameters
treebuilderThe treebuilder instance
tokenThe token to process
Returns
True to reprocess the token, false otherwise
Todo:
parse error
Todo:
parse error
Todo:
parse error

◆ handle_initial()

hubbub_error handle_initial ( hubbub_treebuilder treebuilder,
const hubbub_token token 
)

Handle token in initial insertion mode.

Parameters
treebuilderThe treebuilder instance
tokenThe token to handle
Returns
True to reprocess token, false otherwise
Todo:
parse error
Todo:
parse error
Todo:
parse error

◆ handle_script_collect_characters()

hubbub_error handle_script_collect_characters ( hubbub_treebuilder treebuilder,
const hubbub_token token 
)