1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 12:47:35 +00:00

Ladybird+LibWeb+WebContent: Parse the <input type=file> accept attribute

This parses the accept attribute value for file input types and passes
it along to the browser chromes.
This commit is contained in:
Timothy Flynn 2024-03-14 12:26:00 -04:00 committed by Andreas Kling
parent e4213f5767
commit 6760d236e4
20 changed files with 267 additions and 24 deletions

View file

@ -626,7 +626,7 @@ static void copy_data_to_clipboard(StringView data, NSPasteboardType pasteboard_
[panel makeKeyAndOrderFront:nil];
};
m_web_view_bridge->on_request_file_picker = [self](auto allow_multiple_files) {
m_web_view_bridge->on_request_file_picker = [self](auto const&, auto allow_multiple_files) {
auto* panel = [NSOpenPanel openPanel];
[panel setCanChooseFiles:YES];
[panel setCanChooseDirectories:NO];