summaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/publicapi/tst_publicapi.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Add local fonts permission support to QuickWebEngineViewKaloyan Chehlarski2024-03-221-0/+1
| | | | | | | | | This change hooks up QuickWebEngineView to the newly-enabled local font access API. Task-number: QTBUG-121320 Change-Id: Ib7e093904ea8d834a2282cd265086e501cb392ff Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Add granular permission for clipboard-read/writeMoss Heim2024-03-111-0/+1
| | | | | | | | | | | | | | | Previously, permissions for clipboard access could only be managed through the JavascriptCanAccessClipboard and JavascriptCanPaste settings. This change allows copy/paste to be handled the same way as notification and geolocation permissions. If both JavascriptCanAccessClipboard and JavascriptCanPaste are enabled, permissions will be granted unconditionally without a feature request being made. Fixes: QTBUG-77450 Change-Id: I383e27e244ced3d6b7988644e38d2307c6267f76 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Add setting method to set image animation policyAnu Aliyas2024-03-071-0/+5
| | | | | | | | - added a method to set image animation policy in QWebEngineSettings Fixes: QTBUG-86154 Change-Id: I8b3ab6067f9cff4219b0da90bb8601406cb98e24 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Add scroll animator to QML APIAllan Sandfeld Jensen2024-02-011-0/+2
| | | | | | | | | | Was missing from the QML settings. Change-Id: I585fd7906b6831d9cf1c560427be18b1d76fd8ca Fixes: QTBUG-85473 Reviewed-by: Michael Brüning <michael.bruning@qt.io> Reviewed-by: Anu Aliyas <anu.aliyas@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Correct PrintedPageSizeId to match QPageSize::PageSizeIdMichael Brüning2024-01-241-4/+2
| | | | | | | | | | With Qt 6, QPageSize::PageSizeId enum was cleaned up and some values were reordered, but the WebEngineQuick part was not changed accordingly. Pick-to: 6.7 6.6 6.5 Fixes: QTBUG-120218 Change-Id: I7e4c419750d30a64193e68b0b217ebbccce07d87 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Update QWebEngineDesktopMediaRequest based on API reviewMartin Negyokru2024-01-221-3/+3
| | | | | | | | | | | | | - Port the request's d-pointer to std::unique_ptr - Disable copy of the request - Remove QWebEngineMediaSourceModel from the header - Remove the NameRole definition - Update tests and documentation according to changes - Use forward declaration in qwebenginepage Pick-to: 6.7 Change-Id: I972b3104a0bca5367a4bb63ac183a60d00a71776 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Update QWebEngineWebAuthUxRequest based on 6.7 API review commentAnu Aliyas2024-01-171-47/+47
| | | | | | | | | | | - Modified WebAuthUXState as enum class - Renamed QWebEngineWebAuthUXRequest as QWebEngineWebAuthUxRequest - Renamed QWebEngineWebAuthPINRequest as QWebEngineWebAuthPinRequest - Replaced all occurrence of UX and PIN with Ux and Pin respectively Fixes: 6.7 Change-Id: Iaf0b4c93e0dfa3508a604f7d6562c4401ff800af Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Add new API for screen capturingMartin Negyokru2023-12-151-0/+9
| | | | | | | | | | | | [ChangeLog][WebEngineCore] Add QWebEnginePage::desktopMediaRequested() signal [ChangeLog][WebEngineQuick] Add QQuickWebEngineView::desktopMediaRequested() signal Pick-to: 6.7 Fixes: QTBUG-112142 Task-number: QTBUG-70077 Change-Id: I4bfad88732b45fb68b77f7617440bcb50b248a11 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Provide the correct type information for WebEngineViewAnu Aliyas2023-10-131-6/+6
| | | | | | | | | | | | -Duplicate entries in the QML type file are created when exporting the type as a value and its enums within a namespace. Resolved this by introducing a derived class, and using it for exporting the Enums. - Added namespace resolution to avoid type ambiguity Fixes: QTBUG-117031 Pick-to: 6.6 Change-Id: Ieea4492238843c3c781c8d9602ddc89207b61137 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Add QWebEngineSettings::ForceDarkModeMartin Negyokru2023-09-281-0/+2
| | | | | | | | | Enable forcibly modifying content rendering to result in dark color scheme. [ChangeLog][Settings] ForceDarkMode added, disabled by default. Fixes: QTBUG-84484 Change-Id: I4b3512dc365c61da8f91d8dead0715dadce91f75 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Switch response headers to QMultiMapAllan Sandfeld Jensen2023-08-291-2/+2
| | | | | | | | | To allow duplicate key values and preserve order within multi key duplicates Pick-to: 6.6 Change-Id: I8da0a3441255c9b72256d63f4ede10491c96c2dc Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Add clearHttpCacheCompleted signal to profilePeter Varga2023-08-171-0/+1
| | | | | | | | | | | | | [ChangeLog][QtWebEngineQuick][WebEngineProfile] Added clearHttpCacheCompleted signal. [ChangeLog][QtWebEngineCore][QWebEngineProfile] Added clearHttpCacheCompleted signal. Fixes: QTBUG-89670 Fixes: QTBUG-111541 Change-Id: If93a99f7171c516ef75a3c8004da9ae621705a1a Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Rename disableReadingFromCanvas to follow naming styleAllan Sandfeld Jensen2023-08-101-2/+2
| | | | | | | | | | | We prefer to name settings with Enabled at the end. From API review. Pick-to: 6.6 Change-Id: I7aacc6dbb92d852fd21b067475d2fd9e7df56163 Reviewed-by: Michal Klocek <michal.klocek@qt.io> Reviewed-by: Anu Aliyas <anu.aliyas@qt.io>
* Support FIDO2 user verificationAnu Aliyas2023-07-121-0/+47
| | | | | | | | | | | - 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>
* Sync WebAction enums of QQuickWebEngineView/QWebEnginePageFriedemann Kleint2023-06-281-0/+1
| | | | | | | Pick-to: 6.6 Change-Id: Ibe750d541dba458f2278632355bcaf864fdc845a Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Add QWebEnginePage::devToolsId()Benjamin Terrier2023-05-311-0/+1
| | | | | | | | [ChangeLog][WebEngineCore] Add QWebEnginePage::devToolsId() [ChangeLog][WebEngineView] Add devToolsId property Change-Id: I16e8a27d595b010239557c2a3af2d3b39976cd46 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Add QWebEngineSettings::DisableReadingFromCanvasAnu Aliyas2023-04-241-0/+2
| | | | | | | | - disables reading from canvas. Fixes: QTBUG-84486 Change-Id: I3e181bfa6e351dea8dfa61f8010bafb94ea8a77d Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Add WebEngineView::save() convenience APIAnu Aliyas2023-04-201-1/+5
| | | | | | | | | | Add the convenience method QQuickWebEngineView::save for saving pages without the need to explicitly handle download requests. Task-number: QTBUG-56093 Change-Id: I67909fdca6472d1ea9b32e0f89c1ab90219bca3b Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Support LTR and RTL text directions in input fieldsSzabolcs David2023-02-151-0/+2
| | | | | | | | | | Implement WebActions to temporarily change text direction directly from context menu - like Chrome does. They only work for the selected input field. Omit the "default" option since it is always grayed out in Chrome. Task-number: QTWB-67 Change-Id: I4bacbd82c6bd7261ac465eec9da3776613f98074 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* QWebEngineLoadingInfo: Add response headersYigit Akcay2023-02-131-1/+3
| | | | | | | | | | | | | | | | | | | | This change adds a member variable that contains the response headers to QWebEngineLoadingInfo. It is filled when a QWebEngineLoadingInfo instance is constructed inside WebContentsDelegateQt::emitLoadFinished(bool). The response headers are extracted from the navigation handle when WebContentsDelegateQt::DidFinishNavigation(content::NavigationHandle *) is called. The response headers are non-empty when QWebEngineLoadingInfo::status() is equal to QWebEngineLoadingInfo::LoadSucceededStatus or QWebEngineLoadingInfo::LoadFailedStatus. Fixes: QTBUG-106862 Change-Id: I4d196e3cc71725ddad9a5832af72d1b4e50924c8 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Remove setPushServiceEndpoint from APIMichal Klocek2022-12-221-2/+2
| | | | | | | | | | Use setPushServiceEnabled instead. Update also getter and documentation. Task-number: QTBUG-107442 Pick-to: 6.5 Change-Id: I299ce88b06edef0f1a0088fb10f4a142056039be Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Port from qAsConst() to std::as_const()Marc Mutz2022-10-071-2/+2
| | | | | | | | | | | | | | We've been requiring C++17 since Qt 6.0, and our qAsConst use finally starts to bother us (QTBUG-99313), so time to port away from it now. Since qAsConst has exactly the same semantics as std::as_const (down to rvalue treatment, constexpr'ness and noexcept'ness), there's really nothing more to it than a global search-and-replace. Task-number: QTBUG-99313 Change-Id: I4b5f85df579532c2af938fe70db945ba273782fb Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Enable Push MessagingSzabolcs David2022-09-121-0/+2
| | | | | | | | | | | | | | | | | | Use Chrome's implementation of PushMessagingService. This feature relies on notification permissions, so it is not different from Web Notification from end-users perspective. We don't persist push subscriptions, because it seems these have to be consistent with persisting notification permissions. Make address of push service configurable by a profile setting. It is empty by default - which means the feature is disabled until the user sets the address of a push service. Task-number: QTBUG-98904 Task-number: QTBUG-53457 Change-Id: If44f459fecf2da482c28fee5562f62fe40de103e Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Use SPDX license identifiersLucie Gérard2022-06-221-27/+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>
* Implement File System Access permission APISzabolcs David2022-05-261-0/+13
| | | | | | | | | | | | 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>
* Add NavigateOnDrop settingsAllan Sandfeld Jensen2022-05-131-0/+2
| | | | | | | | | | Some applications want this to avoid users navigating away from their app content. [ChangeLog][Settings] NavigateOnDropEnabled added, enabled by default. Change-Id: I2cc370f60ef42c708042cbc2503207f8254cf932 Reviewed-by: Kirill Burtsev <kirill.burtsev@qt.io>
* Quick: Add support for replacing touch handles with delegatesBalazs Egedi2022-05-041-1/+4
| | | | | | Task-number: QTBUG-85043 Change-Id: I1c87aff352e07eb309d5ba8747b9e50a191d478e Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Introduce http status code domain for loading infoKirill Burtsev2022-04-181-0/+1
| | | | | | | | | | | | | | | | Fix inconsistency in reporting load info error category for http status codes, which across versions was reported either as internal error category or just no error domain. Add new separate domain for http status codes. [ChangeLog][QWebEngineLoadingInfo] Added HttpStatusCodeDomain for http status code range of errors Fixes: QTBUG-94963 Change-Id: I9fd496248c6fa33c424d758e9a0be99758aaf061 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Benjamin Terrier <b.terrier@gmail.com> Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Stop using deprecated QWARNAllan Sandfeld Jensen2022-02-111-2/+2
| | | | | | | | Just use qWarning instead Pick-to: 6.3 Change-Id: I0382ca0e84daa50d32572d6827d908ae391d00d4 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* Add onTouchSelectionMenuRequested QML handlerBalazs Egedi2021-10-261-0/+9
| | | | | | Task-number: QTBUG-85043 Change-Id: Iecd2f5ae20fcf031937a1d44cc154f2e2a3ff52f Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Restore enums for QQuickWebEngineView from old-new API classesKirill Burtsev2021-08-261-0/+13
| | | | | | | | | Restore SC, but at least deprecate these enums in view Pick-to: 6.2 Change-Id: Ic2a263b0ec175c56b8bf450fae9576bfefca2928 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Rename quick's 'newViewRequested' to 'newWindowRequested'Kirill Burtsev2021-08-181-5/+5
| | | | | | | | Match new api within the page API. Pick-to: 6.2 Change-Id: Ib2af2f5270f368813cecab8f1c6b7366d3b7172f Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* WebEngineNavigationRequest: add accept/reject and deprecate setActionKirill Burtsev2021-07-211-0/+2
| | | | | | | | | | | | 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>
* Remove duplicated 'downloadProgress' in favor of separate signalsKirill Burtsev2021-07-211-1/+0
| | | | | | Pick-to: 6.2 Change-Id: Ib825d63c89e591e740b206f43c3eadbf32319daa Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Get rid of Quick's TestSupport APIPeter Varga2021-07-201-6/+0
| | | | | | | | | | | - Moved TestInputContext and TestInputEvent APIs to tst_qmltests. - Removed loadVisuallyCommitted and use Item.grabToImage to check if page is rendered. - Removed windowCloseRejected signal and use a hidden callback instead. Pick-to: 6.2 Change-Id: Ica6e4c6017426e0171d738a6a59afa557c786698 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Remove QQuickWebEngineFormValidationMessageRequestAllan Sandfeld Jensen2021-07-071-10/+0
| | | | | | | | Has been deprecated and non functional for years. Pick-to: 6.2 Change-Id: I77966c00e2aaa5828bb276e9647b5ba38b99c81a Reviewed-by: Kirill Burtsev <kirill.burtsev@qt.io>
* Remove deprecated useforglobalcertificateverificationPeter Varga2021-07-061-2/+0
| | | | | | | | | | | | It enabled an unrecommended OCSP path on Linux [ChangeLog] (Q)WebEngineSettings::useForGlobalCertificateVerification has been removed. Pick-to: 6.2 Task-number: QTBUG-91467 Change-Id: I9f5d1ad5e4fcb59abd31e6a133ded7bf8319c811 Reviewed-by: Kirill Burtsev <kirill.burtsev@qt.io>
* Restore WebEngineNewViewRequest::openIn methodAllan Sandfeld Jensen2021-07-061-1/+4
| | | | | | | Pick-to: 6.2 Change-Id: Ib765970d4c57f742a53cd4d2c870b00628d527aa Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Kirill Burtsev <kirill.burtsev@qt.io>
* Add page() and view() back to download-itemAllan Sandfeld Jensen2021-06-211-3/+5
| | | | | | | | Restores a QML type but this time derived from the core type. Pick-to: 6.2 Change-Id: I09ddb6672f7262ae31e4c57f09d019f71abccd41 Reviewed-by: Kirill Burtsev <kirill.burtsev@qt.io>
* Replace testsupport's QQuickWebEngineErrorPage with isErrorPageAllan Sandfeld Jensen2021-06-061-1/+1
| | | | | | | | | | | | | | | | Merge and unify handling of loading started/finished for quick and widgets by removing separate quick's type for monitoring error page load and replace it with an isErrorPage method in WebEngineLoadRequest to indicate, that load ended with an error page being displayed. Effectively this only slightly changes when loading finished gets emitted: now the signal is just postponed until error page is finished loading after initial failure. [ChangeLog][QWebEngineQuick][WebEngineLoadingInfo] New property 'isErrorPage' which indicates that the load resulted in an error page Change-Id: I3e59dc488429d776f7c8e083b6d0489fb30a65fc Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Rename WebEngineLoadRequest to WebEngineLoadingInfoKirill Burtsev2021-06-041-19/+19
| | | | | | | | | | | | Rename it, since it's not a real request (in a sense that there is nothing to accept or reject), and it is also emitted on loading start and failure. [ChangeLog][QWebEngineQuick] WebEngineLoadRequest is renamed to WebEngineLoadingInfo Change-Id: I75b25da456eb4507451014070525a6a8e9d6753d Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* WebEngineView: rename navigationHistory to historyKirill Burtsev2021-06-041-1/+1
| | | | | | | | | | Match widgets API name for the same QWebEngineHistory class [ChangeLog][QWebEngineQuick][WebEngineView] 'navigationHistory' property is now just 'history' Change-Id: I78507929baa84c8be08f79050568d04868171b3f Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Merge WebEngineHistory's quick implementation into QWebEngineHistoryKirill Burtsev2021-06-041-8/+8
| | | | | | | | | | [ChangeLog][QWebEngineCore][QWebEngineHistory] New methods to access navigation history as a model through new class QWebEngineHistoryModel. [ChangeLog][QWebEngineQuick] QQuickWebEngineHistory is merged into QWebEngineHistory. Task-number: QTBUG-74585 Change-Id: I9f9a73bbaf3954282dfc220cfc2c4cb08a37fb73 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Move QQuickWebEngineNavigationRequest to CoreAllan Sandfeld Jensen2021-06-041-21/+21
| | | | | | | | | Adds navigationRequested() to QWebEnginePage and exposes more information about navigation requests than the old acceptNavigationRequest() method. Change-Id: Ibb8d750bacd1060c3086ffe2c85336abd216bab0 Reviewed-by: Kirill Burtsev <kirill.burtsev@qt.io>
* Move createWindow to a signalAllan Sandfeld Jensen2021-06-031-11/+12
| | | | | | | | | | | | | | Ports QQuickWebEngineNewViewRequest to QtWebEngineCore. [ChangeLog][QtWebEngineQuick][WebEngineView] WebEngineView::NewViewRequested is now handled with WebEngineView::acceptAsNewView() instead of with WebEngineNewViewRequest::openIn(). Task-number: QTBUG-74587 Change-Id: I9b27128948076e13f2c228458e1e7491df12153d Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Fix public api testMichal Klocek2021-05-221-48/+49
| | | | | | | | | | | Since d27d2b5d72 in qtbase enum properties are now fully-qualified when introspected. Update the implementation and remove use of deprecated methods from metatypes. Change-Id: Ib5dd8344fa55d701c5292655913e1c3c1ea3774c Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Merge remote-tracking branch 'origin/5.15' into devAllan Sandfeld Jensen2021-04-131-0/+2
|\ | | | | | | Change-Id: Ia01415e5a44b1df9ed8b3966ff3b39a414b1563c
| * Notify canGoBack/canGoForward changes based on web actionsJüri Valdmann2021-03-221-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before, QQuickWebEngineView's canGoBack/canGoForward change signals are based on urlChanged. But the urlChanged signal may be emitted slightly before the value of canGoBack/canGoForwad actually changes, resulting in a missed change notification. After, they get their own signals, which are forwarded from the QQuickWebEngineAction::enabledChanged signal of the respective web actions. Fixes: QTBUG-91565 Change-Id: Id411eb146c776e2824fd2447660e8857974da32e Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Fix 'WebEngine' ambiguity for Qt6Michal Klocek2021-04-131-2/+2
| | | | | | | | | | | | | | | | | | 'WebEngine' is a qml module, however name itself is ambiguous. Thefore now with Qt6 and with cmake port name the module as WebEngineQuick. Change-Id: I948672dd5d389a01c6a31ec871459164fd989c0f Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Move QQuickWebEngineLoadRequest to core as a base api typeKirill Burtsev2021-03-031-8/+19
| | | | | | | | | | | | | | | | | | | | | | Prepare it to be used in widgets api for load status change. Turn it into simple value type which is allowed to be copied, stored and spied upon. [ChangeLog] Move WebEngineLoadRequest as a basic type into QtWebEngineCore Task-number: QTBUG-74585 Change-Id: Ie182da02a539a89323b8bbec07f1daa700309e70 Reviewed-by: Michal Klocek <michal.klocek@qt.io>