Bug 75643 - WK2: Safari fails to open a PostScript file in Preview from context menu
Summary: WK2: Safari fails to open a PostScript file in Preview from context menu
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: PDF (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Alexey Proskuryakov
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2012-01-05 12:27 PST by Alexey Proskuryakov
Modified: 2012-01-08 22:31 PST (History)
1 user (show)

See Also:


Attachments
proposed fix (1.72 KB, patch)
2012-01-05 12:31 PST, Alexey Proskuryakov
mitz: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey Proskuryakov 2012-01-05 12:27:47 PST
Steps to Reproduce:
1. Load this URL into Safari:  http://www.cerc.utexas.edu/~vinod/pubs/ultrascalar-arvlsi-99.ps
2. Right-click on the document and select "Open with Preview.app".
3. Observe that this fails.

<rdar://problem/9823430>
Comment 1 Alexey Proskuryakov 2012-01-05 12:31:14 PST
Created attachment 121312 [details]
proposed fix
Comment 2 Alexey Proskuryakov 2012-01-05 12:48:33 PST
Committed <http://trac.webkit.org/r104198>.
Comment 3 Darin Adler 2012-01-08 19:55:51 PST
Comment on attachment 121312 [details]
proposed fix

View in context: https://bugs.webkit.org/attachment.cgi?id=121312&action=review

> Source/WebKit2/UIProcess/API/mac/PDFViewController.mm:455
> +        m_suggestedFilename = String(suggestedFilename + ".pdf");

I don’t think the String() is needed here.
Comment 4 Alexey Proskuryakov 2012-01-08 22:06:32 PST
> > Source/WebKit2/UIProcess/API/mac/PDFViewController.mm:455
> > +        m_suggestedFilename = String(suggestedFilename + ".pdf");
> 
> I don’t think the String() is needed here.

It didn't build otherwise. A result of adding two Strings is a class that can only be converted to String, not NSString. Maybe we should teach it to support NSString.
Comment 5 Darin Adler 2012-01-08 22:31:53 PST
(In reply to comment #4)
> > > Source/WebKit2/UIProcess/API/mac/PDFViewController.mm:455
> > > +        m_suggestedFilename = String(suggestedFilename + ".pdf");
> > 
> > I don’t think the String() is needed here.
> 
> It didn't build otherwise. A result of adding two Strings is a class that can only be converted to String, not NSString. Maybe we should teach it to support NSString.

I see. Didn’t realize that m_suggestedFilename was an NSString.