[webkit-changes] [WebKit/WebKit] 3c71c8: [iOS] Camera view remains visible and active after...
Aditya Keerthi
noreply at github.com
Wed Oct 30 18:27:22 PDT 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 3c71c873941e76477894bb7e1ee013d0d404609c
https://github.com/WebKit/WebKit/commit/3c71c873941e76477894bb7e1ee013d0d404609c
Author: Aditya Keerthi <akeerthi at apple.com>
Date: 2024-10-30 (Wed, 30 Oct 2024)
Changed paths:
M Source/WebKit/UIProcess/ios/forms/WKFileUploadPanel.mm
Log Message:
-----------
[iOS] Camera view remains visible and active after opening a new tab in 3rd-party browsers
https://bugs.webkit.org/show_bug.cgi?id=276132
rdar://130986409
Reviewed by Tim Horton.
The camera capture view does not dismiss itself after a new tab is opened, and
can end up displayed after switching to a site that's unrelated to the one
requesting the upload.
278816 at main fixed the same issue for file pickers and other picker views by
dismissing view controllers for pickers when the associated `WKWebView` was
removed from the view hierarchy.
This solution worked well for everything except the camera capture view, which
has a `FullScreen` modal presentation style. The effect of this presentation
style is that the views beneath the presented content are removed from the view
hierarchy. Consequently, 278816 at main introduced a regression where camera
capture views would always be instantly dismissed after presentation.
278827 at main addressed that regression by preventing dismissal if the `WKWebView`
was removed from the hierarchy as a result of a fullscreen presentation. This
fix left camera capture views vulnerable to the same issue that previously
affected the file picker.
To fix, use the `OverFullScreen` modal presentation style to ensure that
presenting the camera capture view does not remove the `WKWebView` from the
view hierarchy. This allows existing logic to dismiss pickers when the web
view is removed from the hierarchy to kick in. The logic to prevent `FullScreen`
presentations from dismissing pickers is preserved to avoid unexpected
regressions.
* Source/WebKit/UIProcess/ios/forms/WKFileUploadPanel.mm:
Originally-landed-as: 280938.260 at safari-7619-branch (756e84d044e2). rdar://138931678
Canonical link: https://commits.webkit.org/285934@main
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list