summaryrefslogtreecommitdiffstats
path: root/src/webenginequick/api
Commit message (Collapse)AuthorAgeFilesLines
* Fix logic in bindViewAndDelegateItemMartin Negyokru2022-10-111-3/+9
| | | | | | | | | | | | Updating adapterClient is required to Bind correctly. Bring back old logic from 6.3. Fixes: QTBUG-105953 Change-Id: I8845948db379c24902df0dd2dad96982a1455531 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> (cherry picked from commit e995556338da4d381c457ddd978440f5099af496) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix moc's namespace for qquickwebenginesingletonMichal Klocek2022-09-021-1/+2
| | | | | | | | Fixes: QTBUG-106090 Change-Id: If0572c92e5b9fe6ae44c2d93d38dfa0f68289994 Reviewed-by: Michael Brüning <michael.bruning@qt.io> (cherry picked from commit 945398a4a76245682cd03e45beabd38d766476c3) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Various clean-upsPeter Varga2022-06-241-1/+0
| | | | | | | Change-Id: I53e04a247a25149d9f29135484c0528c706de7d8 Reviewed-by: Michal Klocek <michal.klocek@qt.io> (cherry picked from commit 8c113ad54b39d26c011a8a127b8dac6c401a9ef3) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Use SPDX license identifiersLucie Gérard2022-06-2337-1406/+74
| | | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. License files are organized under LICENSES directory. Task-number: QTBUG-67283 Change-Id: I869ffda1080e283f231eb0dc4477b260f2054d99 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit 9b9d789fcb8f63a8998f1eefe44f2a1c8156c362) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Cleanup item delegate logicAllan Sandfeld Jensen2022-06-222-43/+39
| | | | | | | | | | Remove two indirect values we can calculate without tracking, and clean up naming in webenginequick. Change-Id: Ibfab7013f314b428dca707036fe5f027558dff72 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu> (cherry picked from commit 4495d477e0093933d711978da08b5a90afef08ff) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Support HTML5 <datalist> elementPeter Varga2022-06-202-0/+18
| | | | | | | | | | | | | | | | | | 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 Change-Id: I155d02d6dbc9d88fbca4bc5f55b76c19d0ba7a9d Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> (cherry picked from commit 19c6b0a22f20a33c8c1fd4bdea29468fa8b4e10e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Protect against default profile being deleted before its pagesAllan Sandfeld Jensen2022-06-141-0/+2
| | | | | | | | | | Can really only happen in QML on exit. Task-number: QTBUG-99445 Change-Id: I1a04d57b6c4c40ae264b5519d2e41c57bca79a61 Reviewed-by: Michal Klocek <michal.klocek@qt.io> (cherry picked from commit 45c217646e3742070af15267df8fdb40c2a6c81a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Switch from QT_NO macros to feature checksAllan Sandfeld Jensen2022-06-102-4/+4
| | | | | | | | | | | | This is safer by ensuring we are checking for a feature that is defined. For some reason, the openssl feature is a private feature, so we need to include the private header to access it. Change-Id: Idf7f3baba33e5188f206f5be1b8a0bfd75e79d03 Reviewed-by: Marc Mutz <marc.mutz@qt.io> (cherry picked from commit be4c684be7c2fa91f7df3d7cccfb6999aecfc967) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Create a RWHV delegate in coreAllan Sandfeld Jensen2022-06-103-111/+70
| | | | | | | | | | | This is adapting the Quick code for shared use with widgets, and allows us to use it from QWebEnginePage. Fixes: QTBUG-96377 Change-Id: I3f09c1a949eff86d80fbe6c513dc66e3f9f2f611 Reviewed-by: Michal Klocek <michal.klocek@qt.io> (cherry picked from commit 5d1ef38f9f6815807596d0606cf7ed06b7930aac) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Include moc filesAllan Sandfeld Jensen2022-05-3110-0/+17
| | | | | | | | Faster to build and gives smaller binaries Fixes: QTBUG-103291 Change-Id: Iab52995e03c13a4c5b185750028c449a19d98d93 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* Implement File System Access permission APISzabolcs David2022-05-263-0/+11
| | | | | | | | | | | | 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>
* Keep page's zoom level on loading new urlsKirill Burtsev2022-05-152-6/+13
| | | | | | | | | | | | Ammends d236c5a8a3. Zoom level was set as a temporal one, which is invalidated each time when a renderer process or widget are changed (on new navigation, for example), so it needs to be reapplied. Pick-to: 6.3 6.2 5.15 Fixes: QTBUG-101030 Change-Id: Iecff9686fbe2b79e99b46f67cab92f66127be085 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Add NavigateOnDrop settingsAllan Sandfeld Jensen2022-05-132-2/+28
| | | | | | | | | | 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>
* Cleanup custom touch handles implementationMichal Klocek2022-05-104-93/+40
| | | | | | | | Do not introduce extra class nor dummy QML element. Fix docs. Change-Id: I9848f6865cd585779d89fe387ad97c27e7450eb9 Reviewed-by: Kirill Burtsev <kirill.burtsev@qt.io>
* Quick: Add support for replacing touch handles with delegatesBalazs Egedi2022-05-045-22/+239
| | | | | | Task-number: QTBUG-85043 Change-Id: I1c87aff352e07eb309d5ba8747b9e50a191d478e Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Fix a few code checker warningsAllan Sandfeld Jensen2022-03-301-1/+1
| | | | | Change-Id: I0eb2cb362759e9a02a61993574906fc1e4b8ffeb Reviewed-by: Kirill Burtsev <kirill.burtsev@qt.io>
* Adaptations for Chrome 98Allan Sandfeld Jensen2022-03-292-0/+6
| | | | | Change-Id: I607604f85a111a69da77ca949dddf3399b9721b3 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
* Fix transitive includesShawn Rutledge2022-03-211-1/+2
| | | | | Change-Id: I6c7dfe29305548c3d68f8d26f46c9bea277d101d Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Add userScript docs for qml landMichal Klocek2022-03-103-1/+112
| | | | | | | | | | | | | | WebEngineScript docs were missing after moving classes to core. Moreover we changed WebEngineScript to be a qml value type and we introduced WebEngineScriptCollection to mirror C++ class. Add the documentation for WebEngineScript, WebEngineScriptCollection and WebEngine.script() method. Task-number: QTBUG-100404 Pick-to: 6.2 6.3 Change-Id: Ifed1bd1fa398a8634df0dc1bd44111e1a09ded04 Reviewed-by: Kirill Burtsev <kirill.burtsev@qt.io>
* Add QML test for basic profiles and fix the docs accordinglyKirill Burtsev2022-02-171-10/+11
| | | | | | | | | Amends d0ff107c00. Ensure default values for profile settings match the docs. Also fix doc's issues after off-the-record toggle to off by default. Pick-to: 6.2 6.3 Change-Id: I558a77dbec82d7f2b335b1a2ceca74ab66a1a6e9 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Fix crash on WebEngine(View|Profile).userScripts.collection getKirill Burtsev2022-02-109-20/+178
| | | | | | | | | | | | | | | To create a javascript list on 'collection' method qml engine is needed for a qml scope, but it's only available for objects, which are created by the QML Engine itself. The only object in hierarchy of classes is an actual WebEngineView, so get it from there on collection init. Also implement delayed initialization of scripts collection for the usage of default profile through WebEngine singleton, and for the reason that it's not really needed until really asked by user code. Pick-to: 6.2 6.3 Fixes: QTBUG-96597 Change-Id: I61e76652a5d0fd5609070fd541816503908f2dc8 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Guard against favicon provider being removed before ViewKirill Burtsev2022-01-281-1/+1
| | | | | | | | | | | Avoid using dangling pointer on view's destruction in case favicon provider was removed first by QML engine. Just use a QPointer since it's not used for anything much else internally in a WebEngineView. Pick-to: 6.2 6.3 Fixes: QTBUG-100032 Change-Id: I0560798a02bed02b0aabee61e1b0ae41a6e87d8a Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* webenginequick: Avoid deprecated QQmlListReference ctorFabian Kosmale2022-01-261-1/+2
| | | | | | | | | This doesn't modify the signature of appendExtraItems (which no longer requires the engine pointer) to keep the change minimal. Pick-to: 6.3 Change-Id: I2a649cd8d8e68c4c6e1a607d881f9180ac931032 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* FIXUP: Add onTouchSelectionMenuRequested QML handlerBalazs Egedi2021-12-232-3/+5
| | | | | | | | Fixed CodeChecker warnings, added missing documentation. Pick-to: 6.3 Change-Id: I723ea2b0952ded52f513a3cd53ac443b727f1e58 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Do not access accessibility from qt post routinesMichal Klocek2021-11-161-1/+5
| | | | | | | | | | | | | | | | | | | It seems accessing accessibility from qt post routines ends badly since caches are gone already. Add closingDown() function to web context, which is similar to QCoreApplication::closingDown(), however return true on post routine. Guard delete accessibility calls. Note the widget part is not necessary, but added for completeness, since only qml can release profiles due to garbage collection. Fixes: QTBUG-90904 Pick-to: 6.2 6.2.2 5.15 Change-Id: Ic0e7115cd17eb58f3d58f70fefbc197dfb7a6493 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* FaviconImageResponseRunnable: fix -Werror=deprecatedMarc Mutz2021-11-161-2/+2
| | | | | | | | | | C++20 deprecates [=]'s implicit capture of this, but the replacement [=, this] isn't available in C++17. So, need to bite the bullet and list every captured variable manually. Pick-to: 6.2 Change-Id: I47c62f9bf93e5d7b6c64cdbdac73bdcc9ecab8b5 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Doc: Fix qdoc warnings and enable zero warning limitVenugopal Shivashankar2021-11-151-4/+4
| | | | | Change-Id: Ifa2914e7bca9c224670a1891785d0ba8262cd61b Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Add onTouchSelectionMenuRequested QML handlerBalazs Egedi2021-10-265-0/+334
| | | | | | Task-number: QTBUG-85043 Change-Id: Iecd2f5ae20fcf031937a1d44cc154f2e2a3ff52f Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Fix "We mean it." warningsPeter Varga2021-09-231-0/+11
| | | | | | Pick-to: 6.2 Change-Id: I70a491617faff31901162cb382b388a7594816fa Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Fix drag and drop againAllan Sandfeld Jensen2021-09-101-4/+4
| | | | | | | | | | Return the right QObjects Fixes: QTBUG-96308 Change-Id: If04be10fe19db6b8c0552c7df588961c711c1250 Reviewed-by: Michael Brüning <michael.bruning@qt.io> (cherry picked from commit e85e4ab275fb0a0c072f19ed3d5c5b5b46de8321) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix handling of new window requestKirill Burtsev2021-09-052-13/+9
| | | | | | | | | | | | | | | | | | | | Fixes heap-use-after-free for WebContentsAdapter, which is replaced in the case, when new window set to be opened and adopted by the same page, which triggered this request: for example, when 'this' is returned by 'createWindow' override. Achieve this by scheduling 'deleteLater' on an old adapter. This was already implemented that way for internal 'adoptWebContents', but was overlooked for page's 'createWindow' API. So just unify handling logic. Also, adapt 'customUserAgentInNewTab' test, since adopting existing WebContents from different profile is not supposed to work, and now enforced by the check in 'adoptWebContents'. Unfortunately, test should also be blacklisted, since it's appeared that custom user agent is still not reliably set for newly created window. Task-number: QTBUG-76249 Fixes: QTBUG-94772 Pick-to: 6.2 Change-Id: Ic9dff33eae99cc242a294d45a92be96306cef93d Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Restore enums for QQuickWebEngineView from old-new API classesKirill Burtsev2021-08-262-2/+51
| | | | | | | | | 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-184-23/+23
| | | | | | | | Match new api within the page API. Pick-to: 6.2 Change-Id: Ib2af2f5270f368813cecab8f1c6b7366d3b7172f Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Hide unneeded Quick C++ APIsKirill Burtsev2021-08-175-6/+6
| | | | | | | | They are not supposed to be a part of public Quick API Pick-to: 6.2 Change-Id: Ib04ea022192d0eec559c28a48bc87fabda932564 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* WebEngineNavigationRequest: add accept/reject and deprecate setActionKirill Burtsev2021-07-212-6/+7
| | | | | | | | | | | | 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>
* Get rid of Quick's TestSupport APIPeter Varga2021-07-203-84/+4
| | | | | | | | | | | - 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>
* Clean up quick APIPeter Varga2021-07-1920-129/+117
| | | | | | Pick-to: 6.2 Change-Id: I9407d407b203b8e2bb13768e5a899624ea47282a Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Merge UI2DelegatesManager into UIDelegatesManagerBalazs Egedi2021-07-182-3/+1
| | | | | | | | | | Drop Quick Controls 1 support. Task-number: QTBUG-93666 Pick-to: 6.2 Change-Id: I68580ef4649141d3d1507fd207088794e7764d2a Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu> Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Get rid of private methods of QWebEngineNewWindowRequestPeter Varga2021-07-121-4/+6
| | | | | | Pick-to: 6.2 Change-Id: I40072b45ceffa1a2c92027a4c01239974b8ac498 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Remove outdated QT_VERSION_CHECKsAllan Sandfeld Jensen2021-07-093-12/+0
| | | | | | Pick-to: 6.2 Change-Id: I4c4b78af0bd7da5912b5e0136f9cfdb3c4268a7e Reviewed-by: Kirill Burtsev <kirill.burtsev@qt.io>
* Fix Qt include conventions in public headersFriedemann Kleint2021-07-092-5/+5
| | | | | | | | Specify the module and use the .h files. Pick-to: 6.2 Change-Id: I7c2bb1a635d10e25c874f18736120efde6ce2ca4 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* QWebEngineQuick: Fix export macrosFriedemann Kleint2021-07-0815-24/+24
| | | | | | | | | Add Quick to the name. Pick-to: 6.2 Change-Id: I898f946d2dc6b306314330d3d3fbbfc8a3001557 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Remove QQuickWebEngineFormValidationMessageRequestAllan Sandfeld Jensen2021-07-073-156/+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-063-80/+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-065-18/+170
| | | | | | | 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>
* Fix enums access in qml for api typesKirill Burtsev2021-07-011-1/+19
| | | | | | | | | | Add missing namespace qml registration for WebEngineLoadingInfo, CertificateError Pick-to: 6.2 Change-Id: I154070df3ab685b36d000cdfc064a074d002afc0 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Doc: Fix documentation issues for Qt WebEngineTopi Reinio2021-07-015-32/+23
| | | | | | | | | | API and documentation changes since 5.15 caused multiple warnings from QDoc; this change addresses most of them. Some warnings indicate missing documentation, those issues still remain. Pick-to: 6.2 Change-Id: I96be38b7daac37a7e35c149b4b3ec3f18c4415c9 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Remove Quick Controls 1 UIDelegates and introduce UIDelegates testBalazs Egedi2021-07-012-23/+1
| | | | | | | | | | | - Renamed Controls2Delegates to ControlsDelegates - Removed option to use Quick Controls 1 delegates - Added test to check if controls are shown Task-number: QTBUG-93666 Change-Id: Iccca948615309285db7fc57d14fb1cdcdef28051 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
* Fix C++ documentation references to QtWebEngineQuickAllan Sandfeld Jensen2021-06-231-1/+1
| | | | | | Pick-to: 6.2 Change-Id: Ic43fb3fb8c5e12fd14b19979749a2f1d5015644a Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Use new qml registration system and new qml cmake apiMichal Klocek2021-06-2312-291/+276
| | | | | | | | | | | | | | | | | To be able to use the new qml cmake api, which can also now generate plugin stubs and do the metatype registration, a project has to use specific project file structure, otherwise the meta type registration generator will fail to include properly headers. Shuffle a bit file locations for test_support and change how qml modules are built. We still need to keep plugin.cpp for ithe quick module plugin, because we use image providers and this requires the qml engine instance to register. Pick-to: 6.2 Change-Id: I083b58dac4edc586efca9fae821e5ea645cc2092 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>