Bug 196471 - Add SPI to give injected bundles access to displayed PDFDocuments
Summary: Add SPI to give injected bundles access to displayed PDFDocuments
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit API (show other bugs)
Version: WebKit Nightly Build
Hardware: Macintosh macOS 10.14
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-04-01 17:03 PDT by Remy Demarest
Modified: 2019-04-01 19:04 PDT (History)
4 users (show)

See Also:


Attachments
Patch (9.85 KB, patch)
2019-04-01 17:10 PDT, Remy Demarest
thorton: review+
Details | Formatted Diff | Diff
Updated patch (9.77 KB, patch)
2019-04-01 17:19 PDT, Remy Demarest
thorton: review+
thorton: commit-queue-
Details | Formatted Diff | Diff
Updated patch using autorelease() (9.77 KB, patch)
2019-04-01 18:22 PDT, Remy Demarest
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Remy Demarest 2019-04-01 17:03:51 PDT
Add SPI to give injected bundles access to displayed PDFDocuments
Comment 1 Remy Demarest 2019-04-01 17:04:13 PDT
<rdar://problem/49339242>
Comment 2 Remy Demarest 2019-04-01 17:10:38 PDT
Created attachment 366445 [details]
Patch
Comment 3 Build Bot 2019-04-01 17:13:18 PDT
Attachment 366445 [details] did not pass style-queue:


ERROR: Source/WebKit/WebProcess/InjectedBundle/API/c/mac/WKBundlePageMac.mm:31:  Alphabetical sorting problem.  [build/include_order] [4]
ERROR: Source/WebKit/WebProcess/InjectedBundle/API/c/mac/WKBundlePageMac.h:26:  Use #pragma once instead of #ifndef for header guard.  [build/header_guard] [5]
Total errors found: 2 in 4 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 4 Tim Horton 2019-04-01 17:13:34 PDT
Comment on attachment 366445 [details]
Patch

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

> Source/WebKit/WebProcess/InjectedBundle/API/c/mac/WKBundlePageMac.h:40
> +#ifdef __OBJC__

I feel like at this point you can just toss the whole file in #ifdef __OBJC__, no need to open and close it a few times

> Source/WebKit/WebProcess/InjectedBundle/API/c/mac/WKBundlePageMac.mm:36
> +#include <WebCore/Frame.h>

#import!
Comment 5 Remy Demarest 2019-04-01 17:19:03 PDT
Created attachment 366448 [details]
Updated patch
Comment 6 Tim Horton 2019-04-01 18:13:56 PDT
Comment on attachment 366448 [details]
Updated patch

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

> Source/WebKit/WebProcess/InjectedBundle/API/c/mac/WKBundlePageMac.mm:48
> +    return pluginView->pdfDocumentForPrinting().get();

Unlikely to come up, but shouldn't this be a .autorelease()?
Comment 7 Remy Demarest 2019-04-01 18:22:00 PDT
Created attachment 366451 [details]
Updated patch using autorelease()
Comment 8 WebKit Commit Bot 2019-04-01 19:04:36 PDT
Comment on attachment 366451 [details]
Updated patch using autorelease()

Clearing flags on attachment: 366451

Committed r243731: <https://trac.webkit.org/changeset/243731>
Comment 9 WebKit Commit Bot 2019-04-01 19:04:37 PDT
All reviewed patches have been landed.  Closing bug.