html5lib / html5lib-tests

Testsuite data for html5lib, including the de-facto standard HTML parsing tests.
MIT License
188 stars 61 forks source link

Compat issue: <div><table><svg><foreignObject><select><table><s> #137

Closed Ms2ger closed 1 year ago

Ms2ger commented 3 years ago

Chrome: Chrome Firefox: Firefox Not sure who's right.

annevk commented 1 year ago

I think Firefox is correct. At least I can't find a reason why foreignObject would be popped from the stack of open elements.

@hsivonen @mfreed7?

annevk commented 1 year ago

I've changed my mind. WebKit and Chromium are correct.

Reasoning:

zcorpan commented 1 year ago

Stepping through the spec I reach the same conclusion.

Notes ```
stack: html,body,div im: in body stack: html,body,div,table im: in body -> in table stack: html,body,div,table im: in table Parse error. Enable foster parenting, process the token using the rules for the "in body" insertion mode, and then disable foster parenting. stack: html,body,div,table,svg im: in table -> using the rules for in body dom: | | | |
| |
stack: html,body,div,table,svg im: in table Parse error. Enable foster parenting, process the token using the rules for the "in body" insertion mode, and then disable foster parenting. stack: html,body,div,table,svg,foreignObject im: in table, using the rules for in body; Process the token according to the rules given in the section for parsing tokens in foreign content. dom: | | | |
| | |
|
Pop elements from the stack of open elements until a select element has been popped from the stack. stack: html,body,div,table,svg,foreignObject Reset the insertion mode appropriately. im: in table Reprocess the current token.
Pop elements from this stack until a table element has been popped from the stack. stack: html,body,div Reset the insertion mode appropriately. im: in body Reprocess the token.
stack: html,body,div,table im: in body -> in table dom: | | | |
| | |
|
stack: html,body,div,table,s im: in table Parse error. Enable foster parenting, process the token using the rules for the "in body" insertion mode, and then disable foster parenting. dom: | | | |
| | |
| |
```