mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-27 21:21:50 +03:00
LibWeb: Allow submitting forms whose submission URL is a file:// URL
In particular, this will allow us to test form submission on such URLs.
This commit is contained in:
parent
986811d2aa
commit
36302388a3
Notes:
sideshowbarker
2024-07-17 10:10:18 +09:00
Author: https://github.com/trflynn89 Commit: https://github.com/SerenityOS/serenity/commit/36302388a3 Pull-request: https://github.com/SerenityOS/serenity/pull/23254 Issue: https://github.com/SerenityOS/serenity/issues/23239
@ -265,6 +265,8 @@ WebIDL::ExceptionOr<void> HTMLFormElement::submit_form(JS::NonnullGCPtr<HTMLElem
|
||||
// User agents should, in the absence of another specification defining this, act in a manner analogous to that defined
|
||||
// in this specification for similar schemes.
|
||||
|
||||
// AD-HOC: In accordance with the above paragraph, we implement file:// submission URLs the same as data: URLs.
|
||||
|
||||
// This should have been handled above.
|
||||
VERIFY(method != MethodAttributeState::Dialog);
|
||||
|
||||
@ -275,7 +277,7 @@ WebIDL::ExceptionOr<void> HTMLFormElement::submit_form(JS::NonnullGCPtr<HTMLElem
|
||||
TRY_OR_THROW_OOM(vm, submit_as_entity_body(move(parsed_action), move(entry_list), encoding_type, move(encoding), *target_navigable, history_handling, options.user_involvement));
|
||||
} else if (scheme.is_one_of("ftp"sv, "javascript"sv)) {
|
||||
get_action_url(move(parsed_action), *target_navigable, history_handling, options.user_involvement);
|
||||
} else if (scheme == "data"sv) {
|
||||
} else if (scheme.is_one_of("data"sv, "file"sv)) {
|
||||
if (method == MethodAttributeState::GET)
|
||||
TRY_OR_THROW_OOM(vm, mutate_action_url(move(parsed_action), move(entry_list), move(encoding), *target_navigable, history_handling, options.user_involvement));
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user