Bug 131206

Summary: [Cocoa] Add additional WKWebView SPI for clients that interact with PDFs
Product: WebKit Reporter: Andy Estes <aestes>
Component: New BugsAssignee: Andy Estes <aestes>
Status: RESOLVED FIXED    
Severity: Normal CC: mitz, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch mitz: review+

Description Andy Estes 2014-04-03 19:41:42 PDT
[Cocoa] Add additional WKWebView SPI for clients that interact with PDFs
Comment 1 Andy Estes 2014-04-03 19:48:16 PDT
Created attachment 228575 [details]
Patch
Comment 2 mitz 2014-04-03 20:24:21 PDT
Comment on attachment 228575 [details]
Patch

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

> Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm:1240
> +    return [reinterpret_cast<WKPDFView *>(_customContentView.get()) documentData];

We normally use C-style casts between Objective-C classes.

> Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm:1247
> +    return [reinterpret_cast<WKPDFView *>(_customContentView.get()) suggestedFilename];

Ditto.

> Source/WebKit2/UIProcess/ios/WKPDFView.mm:71
> +    _suggestedFilename = filename;

Please copy and adopt, since NSString has a mutable subclass.
Comment 3 Andy Estes 2014-04-03 22:24:40 PDT
Committed r166767: <http://trac.webkit.org/changeset/166767>
Comment 4 Radar WebKit Bug Importer 2014-04-04 00:32:13 PDT
<rdar://problem/16522127>