Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Password protected PDFs should emit password-related navigation delegate methods #14379

Conversation

hortont424
Copy link
Contributor

@hortont424 hortont424 commented May 26, 2023

3fec0ec

Password protected PDFs should emit password-related navigation delegate methods
https://bugs.webkit.org/show_bug.cgi?id=257364
rdar://109858534

Reviewed by Megan Gardner, Wenson Hsieh and Aditya Keerthi.

* Source/WebKit/UIProcess/API/ios/WKWebViewIOS.h:
* Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm:
(-[WKWebView _showPasswordViewWithDocumentName:passwordHandler:]):
(-[WKWebView _hidePasswordView]):
(-[WKWebView _didRequestPasswordForDocument]):
(-[WKWebView _didStopRequestingPasswordForDocument]):
* Source/WebKit/UIProcess/Cocoa/NavigationState.h:
* Source/WebKit/UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::setNavigationDelegate):
* Source/WebKit/UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::requestPasswordForQuickLookDocument):
Make the password-related navigation delegates exist on all IOS_FAMILY, not just
where USE(QUICKLOOK) is true, and adopt them for WKPDFView as well. Despite
the names being QuickLook-specific, clients generally want to do the same things
when a password field is up regardless of whether it's up for PDF or QuickLook
reasons.

* Source/WebKit/UIProcess/ios/WKPDFView.mm:
(-[WKPDFView web_initWithFrame:webView:mimeType:]):
(-[WKPDFView updateBackgroundColor]):
Drive-by; update the background color when entering and exiting the password view.

(-[WKPDFView pdfHostViewControllerDocumentDidRequestPassword:]):
(-[WKPDFView pdfHostViewController:documentDidUnlockWithPassword:]):
Call the navigation delegate.

Canonical link: https://commits.webkit.org/264600@main

8bc0b78

Misc iOS, tvOS & watchOS macOS Linux Windows
βœ… πŸ§ͺ style βœ… πŸ›  ios βœ… πŸ›  mac βœ… πŸ›  wpe   πŸ›  wincairo
βœ… πŸ›  ios-sim βœ… πŸ›  mac-AS-debug βœ… πŸ§ͺ wpe-wk2
βœ… πŸ§ͺ webkitperl βœ… πŸ§ͺ ios-wk2 βœ… πŸ§ͺ api-mac βœ… πŸ›  gtk
βœ… πŸ§ͺ ios-wk2-wpt   πŸ§ͺ gtk-wk2
βœ… πŸ§ͺ api-ios   πŸ§ͺ mac-wk2 βœ… πŸ§ͺ api-gtk
βœ… πŸ›  tv βœ… πŸ§ͺ mac-AS-debug-wk2
βœ… πŸ›  tv-sim
βœ… πŸ›  πŸ§ͺ merge βœ… πŸ›  watch
βœ… πŸ›  watch-sim

@hortont424 hortont424 requested a review from cdumez as a code owner May 26, 2023 00:18
@hortont424 hortont424 self-assigned this May 26, 2023
@hortont424 hortont424 added the WebKit Misc. For miscellaneous bugs in the WebKit framework (and not JavaScriptCore or WebCore). label May 26, 2023
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label May 26, 2023
@hortont424 hortont424 removed the merging-blocked Applied to prevent a change from being merged label May 26, 2023
@hortont424 hortont424 force-pushed the eng/Password-protected-PDFs-should-emit-password-related-navigation-delegate-methods branch from f41d313 to 8bc0b78 Compare May 26, 2023 18:09
@hortont424 hortont424 added the merge-queue Applied to send a pull request to merge-queue label May 26, 2023
…ate methods

https://bugs.webkit.org/show_bug.cgi?id=257364
rdar://109858534

Reviewed by Megan Gardner, Wenson Hsieh and Aditya Keerthi.

* Source/WebKit/UIProcess/API/ios/WKWebViewIOS.h:
* Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm:
(-[WKWebView _showPasswordViewWithDocumentName:passwordHandler:]):
(-[WKWebView _hidePasswordView]):
(-[WKWebView _didRequestPasswordForDocument]):
(-[WKWebView _didStopRequestingPasswordForDocument]):
* Source/WebKit/UIProcess/Cocoa/NavigationState.h:
* Source/WebKit/UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::setNavigationDelegate):
* Source/WebKit/UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::requestPasswordForQuickLookDocument):
Make the password-related navigation delegates exist on all IOS_FAMILY, not just
where USE(QUICKLOOK) is true, and adopt them for WKPDFView as well. Despite
the names being QuickLook-specific, clients generally want to do the same things
when a password field is up regardless of whether it's up for PDF or QuickLook
reasons.

* Source/WebKit/UIProcess/ios/WKPDFView.mm:
(-[WKPDFView web_initWithFrame:webView:mimeType:]):
(-[WKPDFView updateBackgroundColor]):
Drive-by; update the background color when entering and exiting the password view.

(-[WKPDFView pdfHostViewControllerDocumentDidRequestPassword:]):
(-[WKPDFView pdfHostViewController:documentDidUnlockWithPassword:]):
Call the navigation delegate.

Canonical link: https://commits.webkit.org/264600@main
@webkit-commit-queue webkit-commit-queue force-pushed the eng/Password-protected-PDFs-should-emit-password-related-navigation-delegate-methods branch from 8bc0b78 to 3fec0ec Compare May 26, 2023 19:48
@webkit-commit-queue
Copy link
Collaborator

Committed 264600@main (3fec0ec): https://commits.webkit.org/264600@main

Reviewed commits have been landed. Closing PR #14379 and removing active labels.

@webkit-commit-queue webkit-commit-queue merged commit 3fec0ec into WebKit:main May 26, 2023
@webkit-commit-queue webkit-commit-queue removed the merge-queue Applied to send a pull request to merge-queue label May 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
WebKit Misc. For miscellaneous bugs in the WebKit framework (and not JavaScriptCore or WebCore).
Projects
None yet
9 participants