From cc0ad0d1ef653c7e56a527c310bb7192f153c76b Mon Sep 17 00:00:00 2001 From: Tim Ledbetter Date: Tue, 26 Nov 2024 15:46:31 +0000 Subject: [PATCH] LibWeb: Use `[URL]` extended attribute for `HTMLInputElement.src` --- Libraries/LibWeb/HTML/HTMLInputElement.idl | 2 +- Tests/LibWeb/Text/expected/usvstring-url-reflection.txt | 1 + Tests/LibWeb/Text/input/usvstring-url-reflection.html | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Libraries/LibWeb/HTML/HTMLInputElement.idl b/Libraries/LibWeb/HTML/HTMLInputElement.idl index f4121c0dc7e..1ed87bf4d2e 100644 --- a/Libraries/LibWeb/HTML/HTMLInputElement.idl +++ b/Libraries/LibWeb/HTML/HTMLInputElement.idl @@ -36,7 +36,7 @@ interface HTMLInputElement : HTMLElement { [CEReactions, Reflect=readonly] attribute boolean readOnly; [CEReactions, Reflect] attribute boolean required; [CEReactions] attribute unsigned long size; - [CEReactions, Reflect] attribute USVString src; + [CEReactions, Reflect, URL] attribute USVString src; [CEReactions, Reflect] attribute DOMString step; [CEReactions] attribute DOMString type; [CEReactions, Reflect=value] attribute DOMString defaultValue; diff --git a/Tests/LibWeb/Text/expected/usvstring-url-reflection.txt b/Tests/LibWeb/Text/expected/usvstring-url-reflection.txt index 3c061c9c7c6..a39a5af6186 100644 --- a/Tests/LibWeb/Text/expected/usvstring-url-reflection.txt +++ b/Tests/LibWeb/Text/expected/usvstring-url-reflection.txt @@ -7,6 +7,7 @@ iframe.src final URL path segment: %EF%BF%BDa%EF%BF%BDb%EF%BF%BD img.src final URL path segment: %EF%BF%BDa%EF%BF%BDb%EF%BF%BD img.longDesc final URL path segment: %EF%BF%BDa%EF%BF%BDb%EF%BF%BD img.lowsrc final URL path segment: %EF%BF%BDa%EF%BF%BDb%EF%BF%BD +input.src final URL path segment: %EF%BF%BDa%EF%BF%BDb%EF%BF%BD link.href final URL path segment: %EF%BF%BDa%EF%BF%BDb%EF%BF%BD object.codeBase final URL path segment: %EF%BF%BDa%EF%BF%BDb%EF%BF%BD object.data final URL path segment: %EF%BF%BDa%EF%BF%BDb%EF%BF%BD diff --git a/Tests/LibWeb/Text/input/usvstring-url-reflection.html b/Tests/LibWeb/Text/input/usvstring-url-reflection.html index 8aa5a365245..7a38bff3404 100644 --- a/Tests/LibWeb/Text/input/usvstring-url-reflection.html +++ b/Tests/LibWeb/Text/input/usvstring-url-reflection.html @@ -12,6 +12,7 @@ { "img": "src" }, { "img": "longDesc" }, { "img": "lowsrc" }, + { "input": "src" }, { "link": "href" }, { "object": "codeBase" }, { "object": "data" },