RESOLVED FIXED144162
WKPDFView does not support password-protected PDFs
https://bugs.webkit.org/show_bug.cgi?id=144162
Summary WKPDFView does not support password-protected PDFs
Tim Horton
Reported 2015-04-24 14:42:10 PDT
WKPDFView does not support password-protected PDFs
Attachments
Patch (13.54 KB, patch)
2015-04-24 14:48 PDT, Tim Horton
aestes: review+
Tim Horton
Comment 1 2015-04-24 14:48:19 PDT
Tim Horton
Comment 2 2015-04-24 14:49:23 PDT
David Kilzer (:ddkilzer)
Comment 3 2015-04-24 15:06:04 PDT
The initial iOS EWS orange status is due to me updating the EWS to iOS 8.3. It should retry again.
Andy Estes
Comment 4 2015-04-24 15:18:21 PDT
Comment on attachment 251576 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=251576&action=review > Source/WebKit2/Platform/spi/ios/UIKitSPI.h:689 > +@interface UIDocumentPasswordView : UIView <UITextFieldDelegate> > + > +- (id)initWithDocumentName:(NSString *)documentName; > + > +@property (nonatomic, assign) NSObject<UIDocumentPasswordViewDelegate> *passwordDelegate; > +@property (nonatomic, readonly) UITextField *passwordField; > + > +@end I believe the convention for these SPI headers is to declare all methods and properties in a category. > Source/WebKit2/UIProcess/ios/WKPDFView.mm:735 > + if (![passwordField isEditing]) passwordField.isEditing? > Source/WebKit2/UIProcess/ios/WKPDFView.mm:742 > + UIWindow *window = [_scrollView window]; _scrollView.window? > Source/WebKit2/UIProcess/ios/WKPDFView.mm:755 > + CGPoint contentOffset = [_scrollView contentOffset]; _scrollView.contentOffset? > Source/WebKit2/UIProcess/ios/WKPDFView.mm:809 > + UIAlertAction* defaultAction = [UIAlertAction actionWithTitle:WEB_UI_STRING_KEY("OK", "OK (PDF password failure alert)", "OK button label in PDF password failure alert") style:UIAlertActionStyleDefault handler:^(UIAlertAction *) { }]; Not that it matters here since you don't capture anything, but you could use a lambda instead of a block.
Andy Estes
Comment 5 2015-04-24 15:37:01 PDT
Comment on attachment 251576 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=251576&action=review > Source/WebKit2/UIProcess/ios/WKPDFView.mm:801 > + [[NSNotificationCenter defaultCenter] removeObserver:self name:UIKeyboardDidShowNotification object:nil]; Are you sure that this will always be called before a WKPDFView is deallocated? Should this be done in -dealloc as well?
Tim Horton
Comment 6 2015-04-24 16:57:00 PDT
David Kilzer (:ddkilzer)
Comment 7 2015-04-24 21:28:37 PDT
Note You need to log in before you can comment on or make changes to this bug.