Bug 229885 - [macCatalyst] Support photo picker and camera actions for file inputs
Summary: [macCatalyst] Support photo picker and camera actions for file inputs
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Forms (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Aditya Keerthi
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-09-03 12:31 PDT by Aditya Keerthi
Modified: 2021-09-03 13:35 PDT (History)
6 users (show)

See Also:


Attachments
Patch (4.06 KB, patch)
2021-09-03 12:40 PDT, Aditya Keerthi
no flags Details | Formatted Diff | Diff
Patch (4.10 KB, patch)
2021-09-03 13:00 PDT, Aditya Keerthi
thorton: review+
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
Patch for landing (3.98 KB, patch)
2021-09-03 13:34 PDT, Aditya Keerthi
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Aditya Keerthi 2021-09-03 12:31:12 PDT
iOS supports three actions for media-accepting file inputs:
1. Choose Photo or Video
2. Take Photo or Video
3. Choose File

macCatalyst currently only supports (3) – we should add support for (1) and (2).
Comment 1 Aditya Keerthi 2021-09-03 12:40:22 PDT
Created attachment 437298 [details]
Patch
Comment 2 Aditya Keerthi 2021-09-03 12:44:21 PDT
rdar://49961589
Comment 3 Aditya Keerthi 2021-09-03 13:00:13 PDT
Created attachment 437304 [details]
Patch
Comment 4 Tim Horton 2021-09-03 13:08:23 PDT
Comment on attachment 437304 [details]
Patch

It seems slightly odd to me that we would make macCatalyst WebKit and macOS WebKit do different things when you click a file input, but I don't know if that means "macOS WebKit should get an image picker" or "macCatalyst WebKit should just go straight to NSOpenPanel". Regardless, that should be an explicit decision instead of a random ifdef about missing API, so I guess this is a change in a good /direction/.
Comment 5 Aditya Keerthi 2021-09-03 13:34:43 PDT
Created attachment 437306 [details]
Patch for landing
Comment 6 Aditya Keerthi 2021-09-03 13:35:39 PDT
(In reply to Tim Horton from comment #4)
> Comment on attachment 437304 [details]
> Patch
> 
> It seems slightly odd to me that we would make macCatalyst WebKit and macOS
> WebKit do different things when you click a file input, but I don't know if
> that means "macOS WebKit should get an image picker" or "macCatalyst WebKit
> should just go straight to NSOpenPanel". Regardless, that should be an
> explicit decision instead of a random ifdef about missing API, so I guess
> this is a change in a good /direction/.

Thanks for the review!

I will discuss with more Catalyst folks prior to landing.