Skip to content

Commit 4cd7eba

Browse files
josepharharmoz-wptsync-bot
authored andcommitted
Bug 1935213 [wpt PR 49525] - Change parser behavior of <select><select>, a=testonly
Automatic update from web-platform-tests Change parser behavior of <select><select> This patch makes the HTML parser convert nested <select> tags into </select> instead of </select><select> for backwards compatibility with the old parser. This behavior will apply to any nested selects, such as <select><div><select>. This was recommended here: whatwg/html#10557 (comment) This will be tested here: html5lib/html5lib-tests#178 (comment) Change-Id: I7a39901582b96edc10deca8794b9ce117aa08229 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6040687 Commit-Queue: Joey Arhar <[email protected]> Reviewed-by: David Baron <[email protected]> Cr-Commit-Position: refs/heads/main@{#1391787} -- wpt-commits: c4c67222e7b0677f92f43280837db48473603f1e wpt-pr: 49525
1 parent 482853e commit 4cd7eba

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

testing/web-platform/tests/html/semantics/forms/the-select-element/customizable-select/select-parsing.tentative.html

+5-5
Original file line numberDiff line numberDiff line change
@@ -104,15 +104,15 @@
104104
const outerSelect = document.getElementById('nested1');
105105
const innerSelect = document.getElementById('expectafter1');
106106
const nextDiv = document.getElementById('expectafter1b');
107-
assert_true(!!outerSelect && !!innerSelect);
108-
assert_equals(outerSelect.nextSibling, innerSelect,'Nested select should be pushed out as the next sibling');
109-
assert_equals(innerSelect.nextElementSibling, nextDiv,'Subsequent content is there too');
107+
assert_true(!!outerSelect);
108+
assert_equals(innerSelect, null,'Nested select should be removed');
109+
assert_equals(outerSelect.nextElementSibling, nextDiv,'Subsequent content is there too');
110110
}, 'Nested selects should be retained 1');
111111

112112
test(() => {
113113
const outerSelect = document.getElementById('nested2');
114114
const innerSelect = document.getElementById('expectafter2');
115-
assert_true(!!outerSelect && !!innerSelect);
116-
assert_equals(outerSelect.nextSibling, innerSelect,'Nested select should be pushed out as the next sibling');
115+
assert_true(!!outerSelect);
116+
assert_equals(innerSelect, null,'Nested select should be pushed out as the next sibling');
117117
}, 'Nested selects should be retained 2');
118118
</script>

0 commit comments

Comments
 (0)