diff options
author | Szabolcs David <davidsz@inf.u-szeged.hu> | 2023-12-11 17:30:22 +0100 |
---|---|---|
committer | Szabolcs David <davidsz@inf.u-szeged.hu> | 2023-12-20 09:26:51 +0100 |
commit | e09cf6e7a1f582d06f86ff2c166b7c2269fd4b47 (patch) | |
tree | 8a4baa88a73fd620fb1d3e046ea869dde36daf06 /src/core/web_contents_adapter.cpp | |
parent | 65d92f0f93b3f4e9bad05aa7a1bdf40545201c52 (diff) |
Fix printing from PDF plugin
Update the plugin finder logic everywhere to match with Chrome. This
comes with a small cleanup: collect PDF-related helper functions
scattered around WebEngine in one pdf_util_qt implementation.
Add auto test to catch this recurring issue earlier.
Pick-to: 6.5 6.6 6.7
Task-number: QTBUG-119878
Change-Id: I03b2bd62bebf5b38afc572e0629db106d024e89d
Reviewed-by: Michael BrĂ¼ning <michael.bruning@qt.io>
Diffstat (limited to 'src/core/web_contents_adapter.cpp')
-rw-r--r-- | src/core/web_contents_adapter.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/web_contents_adapter.cpp b/src/core/web_contents_adapter.cpp index 494e5a8cb..a5ea37225 100644 --- a/src/core/web_contents_adapter.cpp +++ b/src/core/web_contents_adapter.cpp @@ -15,6 +15,7 @@ #include "favicon_service_factory_qt.h" #include "find_text_helper.h" #include "media_capture_devices_dispatcher.h" +#include "pdf_util_qt.h" #include "profile_adapter.h" #include "profile_qt.h" #include "qwebengineloadinginfo.h" @@ -1952,7 +1953,7 @@ WebContentsAdapter::LifecycleState WebContentsAdapter::determineRecommendedState // Do not discard PDFs as they might contain entry that is not saved and they // don't remember their scrolling positions. See crbug.com/547286 and // crbug.com/65244. - if (m_webContents->GetContentsMimeType() == "application/pdf") + if (m_webContents->GetContentsMimeType() == kPDFMimeType) return LifecycleState::Frozen; return LifecycleState::Discarded; |