Commit 534741b0 authored by sullivan's avatar sullivan
Browse files

Reviewed by Adele Peterson

        
        - fixed <rdar://problem/5267607> Clicking the "Save to Downloads" button in 
          PDF overlay too soon results in corrupt file

        * WebView/WebPDFView.mm:
        (-[WebPDFView PDFViewSavePDFToDownloadFolder:]):
        Just beep if the document isn't available yet, since trying to save it as a file
        really isn't a good idea.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@23508 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 3cb4d7c6
2007-06-13 John Sullivan <sullivan@apple.com>
Reviewed by Adele Peterson
- fixed <rdar://problem/5267607> Clicking the "Save to Downloads" button in
PDF overlay too soon results in corrupt file
* WebView/WebPDFView.mm:
(-[WebPDFView PDFViewSavePDFToDownloadFolder:]):
Just beep if the document isn't available yet, since trying to save it as a file
really isn't a good idea.
2007-06-12 Oliver Hunt <oliver@apple.com>
 
Reviewed by Darin.
......
......@@ -909,6 +909,12 @@ static BOOL _PDFSelectionsAreEqual(PDFSelection *selectionA, PDFSelection *selec
- (void)PDFViewSavePDFToDownloadFolder:(PDFView *)sender
{
// We don't want to write the file until we have a document to write (see 5267607).
if (![PDFSubview document]) {
NSBeep();
return;
}
// Delegate method sent when the user requests downloading the PDF file to disk. We pass NO for
// showingPanel: so that the PDF file is saved to the standard location without user intervention.
id UIDelegate = [[self _webView] UIDelegate];
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment