Skip to content

Commit

Permalink
Fix up insertion mode constants
Browse files Browse the repository at this point in the history
  • Loading branch information
sirreal committed Jan 21, 2024
1 parent 657601e commit d53fe6c
Showing 1 changed file with 90 additions and 6 deletions.
96 changes: 90 additions & 6 deletions src/wp-includes/html-api/class-wp-html-processor-state.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,27 +60,111 @@ class WP_HTML_Processor_State {
const INSERTION_MODE_IN_BODY = 'insertion-mode-in-body';

/**
* In body insertion mode for full HTML parser.
* In select insertion mode for full HTML parser.
*
* @since 6.5.0
*
* @todo clean this up
*
* @see https://html.spec.whatwg.org/#parsing-main-inbody
* @see https://html.spec.whatwg.org/#parsing-main-inselect
* @see WP_HTML_Processor_State::$insertion_mode
*
* If the insertion mode is one of "in table", "in caption", "in table body", "in row", or "in cell", then switch the insertion mode to "in select in table". Otherwise, switch the insertion mode to "in select".
*
* @var string
*/
const INSERTION_MODE_IN_SELECT = 'insertion-mode-in-select';

/**
* In select in table insertion mode for full HTML parser.
*
* @since 6.5.0
*
* @see https://html.spec.whatwg.org/#parsing-main-inselectintable
* @see WP_HTML_Processor_State::$insertion_mode
*
* @var string
*/
const INSERTION_MODE_IN_SELECT_IN_TABLE = 'insertion-mode-in-select-in-table';

/**
* In table insertion mode for full HTML parser.
*
* @since 6.5.0
*
* @see https://html.spec.whatwg.org/#parsing-main-intable
* @see WP_HTML_Processor_State::$insertion_mode
*
* @var string
*/
const INSERTION_MODE_IN_TABLE = 'insertion-mode-in-table';

/**
* In caption insertion mode for full HTML parser.
*
* @since 6.5.0
*
* @see https://html.spec.whatwg.org/#parsing-main-incaption
* @see WP_HTML_Processor_State::$insertion_mode
*
* @var string
*/
const INSERTION_MODE_IN_CAPTION = 'insertion-mode-in-caption';

/**
* In table body insertion mode for full HTML parser.
*
* @since 6.5.0
*
* @see https://html.spec.whatwg.org/#parsing-main-intablebody
* @see WP_HTML_Processor_State::$insertion_mode
*
* @var string
*/
const INSERTION_MODE_IN_TABLE_BODY = 'insertion-mode-in-table-body';

/**
* In row insertion mode for full HTML parser.
*
* @since 6.5.0
*
* @see https://html.spec.whatwg.org/#parsing-main-inrow
* @see WP_HTML_Processor_State::$insertion_mode
*
* @var string
*/
const INSERTION_MODE_IN_ROW = 'insertion-mode-in-row';

/**
* In cell insertion mode for full HTML parser.
*
* @since 6.5.0
*
* @see https://html.spec.whatwg.org/#parsing-main-incell
* @see WP_HTML_Processor_State::$insertion_mode
*
* @var string
*/
const INSERTION_MODE_IN_CELL = 'insertion-mode-in-cell';

/**
* In column group insertion mode for full HTML parser.
*
* @since 6.5.0
*
* @see https://html.spec.whatwg.org/#parsing-main-incolumngroup
* @see WP_HTML_Processor_State::$insertion_mode
*
* @var string
*/
const INSERTION_MODE_IN_COLUMN_GROUP = 'insertion-mode-in-column-group';

/**
* In frameset insertion mode for full HTML parser.
*
* @since 6.5.0
*
* @see https://html.spec.whatwg.org/#parsing-main-inframeset
* @see WP_HTML_Processor_State::$insertion_mode
*
* @var string
*/
const INSERTION_MODE_IN_FRAMESET = 'insertion-mode-in-frameset';

/**
Expand Down

0 comments on commit d53fe6c

Please sign in to comment.