From 5d05a5379d47f7e7c8e36867a52bde71ff8bea82 Mon Sep 17 00:00:00 2001 From: Joey Arhar Date: Wed, 16 Oct 2024 15:58:50 -0700 Subject: [PATCH] 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 tag being parsed inside a into , and based on my research, this is the case that is most likely going to break sites in SelectParserRelaxation: https://github.com/whatwg/html/issues/10310 Bug: 373672164 Change-Id: I33b40d11c2001092aa076a219dd56c5ea86f13f6 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5936092 Reviewed-by: Mason Freed Commit-Queue: Joey Arhar Cr-Commit-Position: refs/heads/main@{#1369676} --- .../customizable-select/select-parsing.tentative.html | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/html/semantics/forms/the-select-element/customizable-select/select-parsing.tentative.html b/html/semantics/forms/the-select-element/customizable-select/select-parsing.tentative.html index 5aa4638f0be819..1a5b059997bac4 100644 --- a/html/semantics/forms/the-select-element/customizable-select/select-parsing.tentative.html +++ b/html/semantics/forms/the-select-element/customizable-select/select-parsing.tentative.html @@ -42,6 +42,10 @@ + + +
keep this div after the last test case
@@ -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 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.');