summaryrefslogtreecommitdiffstats
path: root/src/core/content_browser_client_qt.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Add hasPostData to QWebEngineNavigationRequestAllan Sandfeld Jensen13 days1-1/+2
| | | | | | | | | | [ChangeLog][QtWebEngineCore][QWebEngineNavigationRequest] hasFormData has been added to indicate navigations request (re)posting form data. Fixes: QTBUG-67613 Change-Id: I0275513a12d4591a53040c62bfce636e99926ab7 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu> Reviewed-by: Anu Aliyas <anu.aliyas@qt.io>
* Add API to override User Agent Client HintsSzabolcs David2023-12-141-1/+2
| | | | | | | | | | | Implement QWebEngineClientHints class to provide API for each user agent client hints. Task-number: QTBUG-112826 Task-number: QTBUG-112825 Change-Id: I3091d60fb363bbafc16c8e48195c1fd82e8a81bb Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Chromium 118 adaptationsAllan Sandfeld Jensen2023-12-091-4/+25
| | | | | Change-Id: I8eea99a472cc597ff9864b570c90b28b79b3751e Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
* Chromium 116 adaptationsAllan Sandfeld Jensen2023-12-091-21/+13
| | | | | Change-Id: Ie297e6ddef21cda8d71ef3daeaa4bcb82e806911 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
* Support FIDO2 user verificationAnu Aliyas2023-07-121-0/+16
| | | | | | | | | | | - Implemented AuthenticatorRequestClientDelegateQt support to handle authenticator requests. - Added FIDO user verification and resident credential support Fixes: QTBUG-90938 Fixes: QTBUG-90941 Change-Id: I6367791e1e9e8aaac27c376408377f838832f426 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Retire the qt_parse_all_argumentsAmir Masoud Abdol2023-02-081-1/+3
| | | | | | | | | | | To do so, we need to deal with the macros a bit differently, so here, I replaced the macros with available utility functions, and added one for the QTWEBENGINEPROCESS_NAME. Fixes: QTBUG-110873 Task-number: QTBUG-99238 Change-Id: I29b41ffb8059511d2d93bfc01d40308aedaa8ad4 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Move out GetInProcessGpuShareGroup form content browser clientMichal Klocek2023-02-021-18/+0
| | | | | | | | | | | | | | | | Keeping the GetInProcessGpuShareGroup in content browser client creates dependency from gpu_child_thread to content browser, however gn build tree asserts when content/public/gpu depends on content/public/browser as it breaks intended components dependency. This worked so far as required headers in content browser client got generated on time despite of missing dependency. Fix the dependency tree and move the problematic function into the content gpu client. Pick-to: 6.5 6.4 Change-Id: Iedcbc8c3c7d1754d1937e6b2c2a470c0e489a597 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Adaptations for 108-basedAllan Sandfeld Jensen2023-01-061-2/+1
| | | | | | | Pick-to: 6.5 Fixes: QTBUG-105147 Change-Id: I0022964903f3443cc97843c62468ab9be8ae2ed8 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
* Deprecate Quota Permission Request APIPeter Varga2022-12-081-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | Requesting host quota is no longer supported by Chromium. navigator.webkitPersistentStorage has became an alias for navigator.webkitTemporaryStorage after the Chromium 106 update. Requesting quota for temporary storage is needless because the allocation is automatic and storage can't be requested beyond the maximum limit. The logic of the persistent storage will be entirely removed in the next Chromium update so just deprecate the API and remove the corresponding implementations. [ChangeLog][QtWebEngineCore] Deprecate QWebEnginePage::quotaRequested() signal and QWebEngineQuotaRequest class. The signal is not emmitted anymore. [ChangeLog][QtWebEngineQuick] Deprecate QWebEngineView.quoataRequested() signal. The signal is not emitted anymore. Task-number: QTBUG-56354 Change-Id: Ie397598c416d9e811270ba56a97f8984948277f7 Reviewed-by: Szabolcs David <davidsz@inf.u-szeged.hu> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Adaptations for 106-basedAllan Sandfeld Jensen2022-11-281-12/+12
| | | | | | Change-Id: I2fe91c06ce91dfaace7825a0589b56ee375479b6 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu> Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Adaptations for 104-basedAllan Sandfeld Jensen2022-11-281-5/+6
| | | | | | Change-Id: Ieb44b5c98b3342adca38916d8b77c54e8ed8e1d7 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu> Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Add MessagingAPIMessageFilter to RenderProcessHostMartin Negyokru2022-11-251-0/+2
| | | | | | | | | | | | | This class handles messaging api-specific IPCs from the renderer e.g.'chrome.runtime.connect' that is required for communication with extensions. It was separated from ExtensionMessageFilter in: https://chromium-review.googlesource.com/c/chromium/src/+/3318572 . Since then the hangout services extension is broken. Task-number: QTBUG-51185 Task-number: QTBUG-61676 Change-Id: I3fd885afa4fece9ee92bd7644cd1adca3c44a491 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Fix build with disabled webengine_extensionsPeter Varga2022-11-241-7/+7
| | | | | | | | | | | | | PDF viewer depends on extensions. Guard these dependencies to make able to build with disabled webengine_extensions and enabled webengine_printing_and_pdf. The PDF Viewer is not expected to work with this configuration but the build should pass and loading a PDF should result a download. Pick-to: 6.4 Change-Id: I4d75e356951c82333ec3dbcd7b6271b9305de3df Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Fix build with disabled spellcheckerPeter Varga2022-10-181-1/+2
| | | | | | Change-Id: Ia85cbfb7def14710ed217feab0fa51f3230d4dd2 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Szabolcs David <davidsz@inf.u-szeged.hu>
* Support navigator.userAgentDataSzabolcs David2022-10-111-0/+7
| | | | | | | | | | | | Use embedder_support component to generate user agent metadata and support this API. ContentBrowserClientQt::GetUserAgentMetadata() has been implemented only for safe-keeping, because we always override that value in RendererPreferences. Task-number: QTBUG-107260 Task-number: QTBUG-107451 Change-Id: Ibbcd8d9c1e9c2c0ebacf97f4b9d4ed1aa55dc881 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Do not intercept websocket connection when there is no associated frameMartin Negyokru2022-10-031-2/+1
| | | | | | | | | This fix is based on chrome's implementation. Fixes: QTBUG-107144 Pick-to: 6.4 Change-Id: If042e4156b8a4bdb27a210c4db94e3a6198aed7d Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Fix build with disabled webengine_printing_and_pdfPeter Varga2022-08-241-6/+9
| | | | | | | | Now the extensions can be enabled when printing is disabled. Pick-to: 6.4 Change-Id: I6183c795298eedf9cdf5110e580e73ba88f45828 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Native spellchecker: Fix it when disabledSzabolcs David2022-08-161-0/+8
| | | | | | | | | | | | | | SpellCheck is enabled by default "due to peculiarities of the initialization sequence" (see the ctor in components/spellcheck/renderer/spellcheck.cc). It produces red underlines on the fist user interaction even if we disable it from WebEngineProfile, then the lazily initialized SpellcheckService disables it correctly. Initialize the service early for this particular case to avoid undesired spellchecking. Change-Id: Ib2e38fb381d9b169f8f59c8100b4df7af3493aa1 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Fix PDF viewerAllan Sandfeld Jensen2022-08-111-1/+43
| | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Adaptations for Chromium 102Allan Sandfeld Jensen2022-08-041-12/+12
| | | | | | Pick-to: 6.4 Change-Id: I7ef0ad616f2ea0fae482253335e95998aa2d360e Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Adaptations for Chromium 100Allan Sandfeld Jensen2022-08-041-34/+40
| | | | | | Pick-to: 6.4 Change-Id: I217c87657f544a2e868de7291353ff1143e20902 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Various clean-upsPeter Varga2022-06-241-7/+2
| | | | | | Pick-to: 6.4 Change-Id: I53e04a247a25149d9f29135484c0528c706de7d8 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Use SPDX license identifiersLucie Gérard2022-06-221-38/+2
| | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. License files are organized under LICENSES directory. Pick-to: 6.4 Task-number: QTBUG-67283 Change-Id: I869ffda1080e283f231eb0dc4477b260f2054d99 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Minor. Remove superfluous checkMichal Klocek2022-06-211-4/+0
| | | | | | | | Same check is two lines below. Pick-to: 6.4 6.3 Change-Id: If9a76ec29f7667d940f2cff231bb30facd621908 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Support HTML5 <datalist> elementPeter Varga2022-06-191-0/+11
| | | | | | | | | | | | | | | | | The datalist uses Chromium's autofill component to fetch and filter predefined options in the list and autocomplete the field with the selected option. Autofill component is added to build and bound to WebEngine. All the unnecessary autofill features for datalist are supposed to be disabled: payment/credit card support, password manager, save profile data, store suggestions in database etc. Custom popups for the dropdown are implemented for Widget and Quick. Scrolling in dropdown is not implemented in this change. Fixes: QTBUG-54433 Pick-to: 6.4 Change-Id: I155d02d6dbc9d88fbca4bc5f55b76c19d0ba7a9d Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Apply url request interceptor on websocket connect as wellAllan Sandfeld Jensen2022-06-121-0/+71
| | | | | | | | | Try to match the types as best as we can, and handle the responses. Pick-to: 6.4 Fixes: QTBUG-92932 Change-Id: I01bc85668d2540b79fd2a52796f99d05f161e8a5 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Implement File System Access permission APISzabolcs David2022-05-261-0/+2
| | | | | | | | | | | | Allow web pages to safely access the local file system by exposing a permission API. Permissions are stored in-memory. The built-in access rules are the same as the behavior of Chrome: JS can't request access to system libraries, sensitive directories and the application itself. Task-number: QTBUG-97829 Change-Id: Ic675422cafbad5a90243b4fa8f0749c46afa192c Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Refactor custom handlersAllan Sandfeld Jensen2022-05-151-1/+1
| | | | | | | | Reimplement the chrome specific classes, as we use very little of them, and move everything to a subdir. Change-Id: I93873399b1bea46c08ed171b7dc75ad252f20108 Reviewed-by: Kirill Burtsev <kirill.burtsev@qt.io>
* Adaptations for Chrome 98Allan Sandfeld Jensen2022-03-291-32/+18
| | | | | Change-Id: I607604f85a111a69da77ca949dddf3399b9721b3 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
* Adaptations for Chrome 96Allan Sandfeld Jensen2022-03-291-14/+34
| | | | | Change-Id: I40039658762b8788a0be57bd186efab71f3e4448 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
* Improve local scheme access rulesAllan Sandfeld Jensen2022-01-281-9/+4
| | | | | | | Pick-to: 6.3 6.2 Task-number: QTBUG-96849 Change-Id: Ieb24da12a61e5e37b29ccf2d1a11b7bd863b842e Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Cleanup code and clang build warningsKirill Burtsev2022-01-021-5/+4
| | | | | | | | | Fix build noise as reported by clang for issues like api deprecation, unused variables, sign/unsigned mismatch and other non critical issues. Pick-to: 6.2 Change-Id: I4fba25406eea8170e3283c42e908ae86bd512e3a Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Fix crash on meet.google.comSzabolcs David2021-12-301-1/+7
| | | | | | | | | | Hangout Services extension has a background WebContents. Do not try to access its delegate and settings. Pick-to: 6.3 Task-number: QTBUG-99119 Change-Id: Ib46867ba98644e14af6263253daa253ef2e6b12a Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Replace GeolocationSystemPermissionManager with GeolocationManager after 94 ↵Peter Varga2021-12-081-3/+3
| | | | | | | | | | | | | adaptations This is necessary to fix crash with disabled geolocation on macOS. The change in upstream is: Use GeolocationManager in CoreLocationProvider https://chromium-review.googlesource.com/c/chromium/src/+/2779636 Change-Id: I97143886bc3c98ad880c3cfc739ef08e5bfa3e73 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Fix crash with disabled geolocation on macOSPeter Varga2021-12-081-1/+14
| | | | | | | | | | | | | | | | | QtWebEngine uses custom LocationProvider for geolocation. If geolocation is disabled, Chromium fallbacks to NetworkLocationProvider. NetworkLocationProvider uses GeolocationSystemPermissionManager and tThere is no nullptr check for the manager instance so QtWebEngine has to provide it. This fix implements a FakeSystemGeolocationPermissionManager what is meant to be used only on macOS if geolocation is disabled. LocationSystemPermissionStatus is always set to denied by the fake manager. Pick-to: 6.2 Change-Id: I25d51c9ce8911b95ff69cc72bc6aae7023e7edbe Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Adaptations for Chromium 94Allan Sandfeld Jensen2021-12-021-53/+51
| | | | | Change-Id: I9fb8998a3a7762b0aea70993ca231f0bbf4f7761 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Adaptations for Chromium 92Allan Sandfeld Jensen2021-12-021-9/+5
| | | | | Change-Id: I1849c130ca75615802744275f6e4212a755c39b4 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Adaptations for Chromium 91Allan Sandfeld Jensen2021-12-021-5/+17
| | | | | Change-Id: Ie0236697615fd67e4f53df3dca013ce39628cc29 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Fix crash when clicking on a link in PDFSzabolcs David2021-08-301-1/+1
| | | | | | | | | Do not try to use WebContentsDelegate of a guest WebContents. Task-number: QTBUG-95269 Change-Id: If7bbd25bcac26c30a4ff1bee3f732ba01215ec4b Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> (cherry picked from commit 7f4a6ff45743cecbfe0dd14ef29afd0874a2ed39)
* Remove unneeded extension -> file access privilegeAllan Sandfeld Jensen2021-08-261-5/+1
| | | | | | | | | | It was hacked in before we got guest views working for the pdf viewer, but should no longer be needed. Pick-to: 6.2 Change-Id: I3085c1ba591c600942e488751ada12473c6454d0 Reviewed-by: Szabolcs David <davidsz@inf.u-szeged.hu> Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* WebEngineNavigationRequest: add accept/reject and deprecate setActionKirill Burtsev2021-07-211-3/+3
| | | | | | | | | | | | Match naming with others and use accept/reject methods to handle request. Also, allow to use request object after call scope in QML. [ChangeLog][QWebEngineQuick][WebEngineNavigationRequest] setAction(action) is deprecated in favor of new accept/reject methods Pick-to: 6.2 Change-Id: I83252370e2e83017008f6951f98b7ecad119e232 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Adaptations for 90-basedAllan Sandfeld Jensen2021-07-081-45/+25
| | | | | | Pick-to: 6.2 Change-Id: I8402b044d8e12d75e144a00984b856f3de10bffd Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
* Remove QRC->file special caseAllan Sandfeld Jensen2021-07-011-2/+1
| | | | | | | | It was marked as to be removed for Qt6 Pick-to: 6.2 Change-Id: I059c450aa6e5cad6d48ecdd2667abff21217d7e0 Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
* Implement dialogs of File System Access APISzabolcs David2021-06-151-0/+7
| | | | | | | | | | | | | Dialogs triggered by window.showOpenFilePicker() or window.showDirectoryPicker() needed different implementation than regular file picker dialogs. Since the end-users can't distinguish between HTML file picker dialogs and these file system access dialogs, we can just use the existing file picker WebEngine API and UI delegates. Task-number: QTBUG-92519 Pick-to: 6.2 Change-Id: Ib1624f80603c4042803303274ba45d864ecb371c Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Replace FaviconManager with Chromium's Favicon ComponentPeter Varga2021-06-041-0/+1
| | | | | | Task-number: QTBUG-51184 Change-Id: Ie050cb23f2c86841a66ec384bfbcdf0713cffa7c Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Merge remote-tracking branch 'origin/5.15' into devAllan Sandfeld Jensen2021-05-121-11/+12
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/webenginewidgets/printme/printhandler.cpp src/3rdparty src/core/api/qwebenginepage_p.h src/core/content_browser_client_qt.h src/core/web_contents_adapter_client.h src/core/web_contents_delegate_qt.cpp src/core/web_contents_delegate_qt.h src/webenginequick/api/qquickwebengineview_p_p.h tests/auto/quick/qmltests/data/tst_download.qml tests/auto/quick/qmltests/data/tst_viewSoure.qml tests/auto/widgets/loadsignals/tst_loadsignals.cpp tests/auto/widgets/qwebengineview/tst_qwebengineview.cpp Change-Id: I9c1819ec15e13d4f8e244defe860e26274b5d4be
| * Fix application locales againSzabolcs David2021-04-211-10/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Different countries (with the same language) can have different number formatting and navigator.language should report not only the language, but also the country. Locale normalization often falls back by cutting the country off, because we have common .pak files for countries with the same language. This patch: - Uses the locale resolvation only for concatenating .pak file paths and reports the full locale everywhere else. - Properly sets default ICU locale for JS number formats and prevents l10n_util::GetApplicationLocale() to set it sneakily to some resolved one. - Fixes the crashing --lang command line argument and always prefers its value over QLocale. Task-number: QTBUG-91225 Change-Id: I1c09798abdb523b80f0b7a3d69fa8d7a08c7c09a Reviewed-by: Kirill Burtsev <kirill.burtsev@qt.io>
| * Report server directs in navigation typeAllan Sandfeld Jensen2021-04-191-1/+7
| | | | | | | | | | | | | | | | | | | | | | A server redirect might not have been reflected in the navigation type at this point, so also check the is_redirect value. Pick-to: 5.15.4 Fixes: QTBUG-92819 Change-Id: I711ef041de69552bc3485c9cf3db68c9e6033d6a Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Kirill Burtsev <kirill.burtsev@qt.io>
* | Adaptations for Chromium 88Allan Sandfeld Jensen2021-04-151-38/+24
| | | | | | | | | | Change-Id: Ie66e95dbb9fbcafe961bb98d5c277f8c32d66b96 Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
* | Merge remote-tracking branch 'origin/5.15' into devAllan Sandfeld Jensen2021-04-131-0/+13
|\| | | | | | | Change-Id: Ia01415e5a44b1df9ed8b3966ff3b39a414b1563c