Bug 131206 - [Cocoa] Add additional WKWebView SPI for clients that interact with PDFs
Summary: [Cocoa] Add additional WKWebView SPI for clients that interact with PDFs
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Andy Estes
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2014-04-03 19:41 PDT by Andy Estes
Modified: 2014-04-04 00:32 PDT (History)
2 users (show)

See Also:


Attachments
Patch (6.29 KB, patch)
2014-04-03 19:48 PDT, Andy Estes
mitz: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>