diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2022-07-11 16:32:50 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2022-08-11 20:30:20 +0200 |
commit | f1cb0ab451f3282648caec6ec359be356c921942 (patch) | |
tree | afd59a2282208e1afcbb7359f06d6872ea82c3fb /src/core/web_contents_adapter.cpp | |
parent | 772d86b92bba4c1e63fbb4c555e9a6789991b68c (diff) |
Fix PDF viewer
It was broken after 102-based merge
Submodule src/3rdparty c57592220..8496e1340:
> Revert "Jumbo build mojom files"
> FIXUP: Fix building with optimize_webui=false
> Revert "Add remove_v8base_debug_symbols to GN"
> FIXUP: Fix crashes and asserts
> Add missing node modules for PDF support
> [Backport] CVE-2022-2614: Use after free in Sign-In Flow
> [Backport] CVE-2022-2618: Insufficient validation of untrusted input in Internals
> [Backport] CVE-2022-2612: Side-channel information leakage in Keyboard input
> [Backport] CVE-2022-2613: Use after free in Input
> [Backport] CVE-2022-2624: Heap buffer overflow in PDF
> [Backport] CVE-2022-2610: Insufficient policy enforcement in Background Fetch
> [Backport] CVE-2022-2615: Insufficient policy enforcement in Cookies
> [Backport] CVE-2022-2294: Heap buffer overflow in WebRTC
> [Backport] CVE-2022-2478 : Use after free in PDF
> Jumbo build mojom files
Pick-to: 6.4
Change-Id: I4fc608c21ab8aaa508329e708446b57cccbddf76
Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
Diffstat (limited to 'src/core/web_contents_adapter.cpp')
-rw-r--r-- | src/core/web_contents_adapter.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/core/web_contents_adapter.cpp b/src/core/web_contents_adapter.cpp index 1f17d0398..7dc96967f 100644 --- a/src/core/web_contents_adapter.cpp +++ b/src/core/web_contents_adapter.cpp @@ -61,6 +61,8 @@ #include "qtwebengine/browser/qtwebenginepage.mojom.h" #if QT_CONFIG(webengine_printing_and_pdf) +#include "components/pdf/browser/pdf_web_contents_helper.h" +#include "printing/pdf_web_contents_helper_client_qt.h" #include "printing/print_view_manager_qt.h" #endif @@ -487,6 +489,11 @@ void WebContentsAdapter::initialize(content::SiteInstance *site) webContents(), AutofillClientQt::FromWebContents(webContents()), /* app_locale = */ "", autofill::AutofillManager::DISABLE_AUTOFILL_DOWNLOAD_MANAGER); +#if QT_CONFIG(webengine_printing_and_pdf) + pdf::PDFWebContentsHelper::CreateForWebContentsWithClient( + webContents(), std::make_unique<PDFWebContentsHelperClientQt>()); +#endif + // Create an instance of WebEngineVisitedLinksManager to catch the first // content::NOTIFICATION_RENDERER_PROCESS_CREATED event. This event will // force to initialize visited links in VisitedLinkSlave. |