Commit df9472e
Ignore the form element pointer throughout template contents
The form element pointer is deliberately not used inside template
contents, but the conditions expressing that only tested the stack of
open elements. A fragment parse whose context element is a template
element produces template contents without a template element on that
stack, so a nested <form> was dropped there.
The standard now defines "parsing template contents", which also covers
that case, and uses it for the <form> start and end tags and for form
association (whatwg/html#12911). It also
changed the "in table" <form> start tag to insert the element while
parsing template contents, skipping only the pointer assignment, rather
than dropping it, and requires there to be no fragment context element
for form association. Do the same.
This fixes three template.dat tests that now live in WPT
(html/syntax/parsing/resources).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Anders Kaseorg <andersk@mit.edu>1 parent 7760920 commit df9472e
3 files changed
Lines changed: 63 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1119 | 1119 | | |
1120 | 1120 | | |
1121 | 1121 | | |
| 1122 | + | |
| 1123 | + | |
| 1124 | + | |
| 1125 | + | |
| 1126 | + | |
| 1127 | + | |
| 1128 | + | |
| 1129 | + | |
| 1130 | + | |
| 1131 | + | |
1122 | 1132 | | |
1123 | 1133 | | |
1124 | 1134 | | |
| |||
1385 | 1395 | | |
1386 | 1396 | | |
1387 | 1397 | | |
1388 | | - | |
| 1398 | + | |
| 1399 | + | |
1389 | 1400 | | |
1390 | 1401 | | |
1391 | 1402 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
541 | 541 | | |
542 | 542 | | |
543 | 543 | | |
544 | | - | |
545 | | - | |
546 | | - | |
| 544 | + | |
547 | 545 | | |
548 | 546 | | |
549 | 547 | | |
550 | 548 | | |
551 | | - | |
| 549 | + | |
552 | 550 | | |
553 | 551 | | |
554 | 552 | | |
| |||
630 | 628 | | |
631 | 629 | | |
632 | 630 | | |
633 | | - | |
| 631 | + | |
634 | 632 | | |
635 | 633 | | |
636 | 634 | | |
| |||
1116 | 1114 | | |
1117 | 1115 | | |
1118 | 1116 | | |
1119 | | - | |
1120 | | - | |
1121 | | - | |
1122 | | - | |
| 1117 | + | |
| 1118 | + | |
| 1119 | + | |
| 1120 | + | |
| 1121 | + | |
| 1122 | + | |
1123 | 1123 | | |
1124 | 1124 | | |
1125 | 1125 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
6 | 48 | | |
7 | 49 | | |
8 | 50 | | |
| |||
0 commit comments