| Summary: | WKPDFView does not support password-protected PDFs | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Tim Horton <thorton> | ||||
| Component: | New Bugs | Assignee: | Tim Horton <thorton> | ||||
| Status: | RESOLVED FIXED | ||||||
| Severity: | Normal | CC: | aestes, ddkilzer, mitz, simon.fraser | ||||
| Priority: | P2 | ||||||
| Version: | 528+ (Nightly build) | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Attachments: |
|
||||||
|
Description
Tim Horton
2015-04-24 14:42:10 PDT
Created attachment 251576 [details]
Patch
The initial iOS EWS orange status is due to me updating the EWS to iOS 8.3. It should retry again. 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. 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? (In reply to comment #6) > http://trac.webkit.org/changeset/183293 Build fix: <http://trac.webkit.org/changeset/183296> |