Skip to content

Commit 7d93227

Browse files
committed
feat(ie-html): implement table insertion modes and foster parenting #59
Table-related insertion modes (WHATWG tree construction): - InTable: table structure enforcement, foster parenting fallback - InTableText: simplified pass-through to original mode - InTableBody: tbody/thead/tfoot with implicit tr creation - InRow: tr with implicit td/th handling - InCell: td/th with cell closing and scope checks - InCaption: caption closing on table elements - InColumnGroup: col/colgroup handling - InSelect/InSelectInTable: option/optgroup handling - InTemplate: template content mode switching Foster parenting: - foster_parenting flag on TreeBuilder - appropriate_insertion_location() finds table parent - insert_element/insert_character use foster location when active - Text in table context is inserted before the table Supporting infrastructure: - reset_insertion_mode() walks stack to determine correct mode - clear_stack_back_to_table/body/row_context helpers - has_element_in_table_scope, has_element_in_select_scope - close_cell helper, template_modes stack 4 new tests: table_basic, table_implicit_tbody, foster_parenting, select_element. 59 total ie-html tests passing.
1 parent 7d04ffa commit 7d93227

1 file changed

Lines changed: 822 additions & 6 deletions

File tree

0 commit comments

Comments
 (0)