Skip to content

Commit

Permalink
Bug 1925140 [wpt PR 48658] - Add InputClosesSelect flag, a=testonly
Browse files Browse the repository at this point in the history
Automatic update from web-platform-tests
Add InputClosesSelect flag

This flag is intended to de-risk the launch of SelectParserRelaxation by
partially reverting the new parser behavior to the old parser behavior
specifically in the case of an <input> tag being parsed inside a
<select>. The old parser would convert <select><input> into
<select></select><input>, and based on my research, this is the case
that is most likely going to break sites in SelectParserRelaxation:
whatwg/html#10310

Bug: 373672164
Change-Id: I33b40d11c2001092aa076a219dd56c5ea86f13f6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5936092
Reviewed-by: Mason Freed <[email protected]>
Commit-Queue: Joey Arhar <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1369676}

--

wpt-commits: 00e1df7e329f3d11b91d7b2e11a2db63bbd98ef9
wpt-pr: 48658
  • Loading branch information
josepharhar authored and moz-wptsync-bot committed Oct 21, 2024
1 parent 659ea8b commit 1590ce1
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@
</div>
</select>

<select id=s7>
<input>
</select>

<div id=afterlast>
keep this div after the last test case
</div>
Expand Down Expand Up @@ -100,6 +104,13 @@
`);
}, 'Divs and imgs should be allowed as direct children of select and within options without a datalist.');

test(() => {
assert_equals(document.getElementById('s7').parentNode, document.body);
assert_equals(document.getElementById('s7').innerHTML, `
<input>
`);
}, 'Input tags should parse inside select instead of closing the select.');

test(() => {
assert_equals(document.getElementById('afterlast').parentNode, document.body);
}, 'The last test should not leave any tags open after parsing.');
Expand Down

0 comments on commit 1590ce1

Please sign in to comment.