Bug 236668 - Introduce postMessage mechanism for PDF.js viewer and use it for context menu items
Summary: Introduce postMessage mechanism for PDF.js viewer and use it for context menu...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Tim Nguyen (:ntim)
URL:
Keywords: InRadar
Depends on:
Blocks: 235969
  Show dependency treegraph
 
Reported: 2022-02-15 13:56 PST by pascoe@apple.com
Modified: 2023-02-16 12:37 PST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description pascoe@apple.com 2022-02-15 13:56:01 PST
In https://bugs.webkit.org/show_bug.cgi?id=236525, it would be more efficient to directly get the PDFJSContentScript instead of using executeScriptIgnoringException.
Comment 1 Radar WebKit Bug Importer 2022-02-15 13:56:12 PST
<rdar://problem/88985691>
Comment 2 Tim Nguyen (:ntim) 2022-02-15 17:14:45 PST
After discussing with Chris, it sounds like using postMessage here is the better option, for security reasons. When process isolation happens, the iframe and PDFDocument will be in different processes (since they are in different origins), so accessing functions from the iframe will not be safe.
Comment 3 Tim Nguyen (:ntim) 2022-08-07 00:14:10 PDT
Pull request: https://github.com/WebKit/WebKit/pull/3083
Comment 4 EWS 2022-08-08 11:28:04 PDT
Committed 253223@main (5b3fe7dc3092): <https://commits.webkit.org/253223@main>

Reviewed commits have been landed. Closing PR #3083 and removing active labels.