LibWeb: Make DOM::validate_and_extract() preserve entire local name

Change local-name computation in DOM::validate_and_extract() to preserve
everything after the first colon in a qualified name — matching a recent
spec change made in https://github.com/whatwg/dom/pull/1455 (and
replacing a previous spec requirement to use the “strictly split”
algorithm, which resulted in throwing away any other part of the name
after any second colon the name might have).

For the qualified name “f:o:o”, this change now gives localName=“o:o”.
Otherwise, without this change, it’d instead give localName=“o”.
This commit is contained in:
sideshowbarker
2026-03-10 17:18:52 +09:00
committed by Shannon Booth
parent 2e930e83ce
commit 7adadedf52
Notes: github-actions[bot] 2026-03-10 09:39:00 +00:00
6 changed files with 33 additions and 31 deletions

View File

@@ -116,7 +116,7 @@ test(function() {
var names = []
var firstColonIndex = qualified.indexOf(":")
if (firstColonIndex >= 0) {
names = qualifiedName.split(":", 2);
names = [qualified.substring(0, firstColonIndex), qualified.substring(firstColonIndex + 1)];
} else {
names = [null, qualified]
}