[webkit-changes] [WebKit/WebKit] 3fec0e: Password protected PDFs should emit password-relat...

Tim Horton noreply at github.com
Fri May 26 12:48:42 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 3fec0ecd58593da08f46f9e3da99739da19e0618
      https://github.com/WebKit/WebKit/commit/3fec0ecd58593da08f46f9e3da99739da19e0618
  Author: Tim Horton <thorton at apple.com>
  Date:   2023-05-26 (Fri, 26 May 2023)

  Changed paths:
    M Source/WebKit/UIProcess/API/ios/WKWebViewIOS.h
    M Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm
    M Source/WebKit/UIProcess/Cocoa/NavigationState.h
    M Source/WebKit/UIProcess/Cocoa/NavigationState.mm
    M Source/WebKit/UIProcess/ios/PageClientImplIOS.mm
    M Source/WebKit/UIProcess/ios/WKPDFView.mm

  Log Message:
  -----------
  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




More information about the webkit-changes mailing list