summaryrefslogtreecommitdiffstats
path: root/src/webenginequick
Commit message (Collapse)AuthorAgeFilesLines
* Add Vulkan rendering supportPeter Varga2022-11-101-1/+4
| | | | | | | | | | Updates 3rdparty: * 8b7ce4ef70d Make GrVkImage external Task-number: QTBUG-107669 Change-Id: If7fbe1f20538598dd1d4f3a67be17c9f7d06a3cd Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Silence synqt.cpp warnings-turned-errorsMarc Mutz2022-11-021-0/+4
| | | | | | | | | | Says syncqt.cpp: ERROR: [...]/render_widget_host_view_qt_delegate_quickwindow.h does not include QT_BEGIN_NAMESPACE Pick-to: 6.4 6.2 Change-Id: I4109c493bbf25a6f7c65e35e9c697f15c7f0ac3f Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Fix compilation 6.3 against 6.4Michal Klocek2022-10-311-1/+7
| | | | | | | | | | Check if type registrations should be in Qt namespace. This amends 5208245d2ccabbc07ecf6b845cfa3d971d2ed7e5. Pick-to: 6.4 Change-Id: I3f349a4aedac4410b1a581264d1e8877ba0bcf44 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Speculative fix for MSVCAllan Sandfeld Jensen2022-10-201-6/+0
| | | | | | | | | | Remove special code for MSVC, as it now produces warnings. Task-number: QTBUG-107778 Change-Id: I2b821693cb00ec5d1efc3cd7ed3a545e47a2b9d3 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Port from container::count() and length() to size() - V4Marc Mutz2022-10-114-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a semantic patch using ClangTidyTransformator as in qtbase/df9d882d41b741fef7c5beeddb0abe9d904443d8, but extended to handle typedefs and accesses through pointers, too: const std::string o = "object"; auto hasTypeIgnoringPointer = [](auto type) { return anyOf(hasType(type), hasType(pointsTo(type))); }; auto derivedFromAnyOfClasses = [&](ArrayRef<StringRef> classes) { auto exprOfDeclaredType = [&](auto decl) { return expr(hasTypeIgnoringPointer(hasUnqualifiedDesugaredType(recordType(hasDeclaration(decl))))).bind(o); }; return exprOfDeclaredType(cxxRecordDecl(isSameOrDerivedFrom(hasAnyName(classes)))); }; auto renameMethod = [&] (ArrayRef<StringRef> classes, StringRef from, StringRef to) { return makeRule(cxxMemberCallExpr(on(derivedFromAnyOfClasses(classes)), callee(cxxMethodDecl(hasName(from), parameterCountIs(0)))), changeTo(cat(access(o, cat(to)), "()")), cat("use '", to, "' instead of '", from, "'")); }; renameMethod(<classes>, "count", "size"); renameMethod(<classes>, "length", "size"); a.k.a qt-port-to-std-compatible-api V4 with config Scope: 'Container'. Change-Id: I3e6fef8eca212da0c4f0b464545ba96183b4476f Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Fix logic in bindViewAndDelegateItemMartin Negyokru2022-10-071-3/+9
| | | | | | | | | | | Updating adapterClient is required to Bind correctly. Bring back old logic from 6.3. Fixes: QTBUG-105953 Pick-to: 6.4 Change-Id: I8845948db379c24902df0dd2dad96982a1455531 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Port from qAsConst() to std::as_const()Marc Mutz2022-10-071-1/+1
| | | | | | | | | | | | | | 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-122-0/+48
| | | | | | | | | | | | | | | | | | 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>
* Fix moc's namespace for qquickwebenginesingletonMichal Klocek2022-09-021-1/+2
| | | | | | | Fixes: QTBUG-106090 Pick-to: 6.4 6.3 Change-Id: If0572c92e5b9fe6ae44c2d93d38dfa0f68289994 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Change the license of all CMakeLists.txt and *.cmake files to BSDLucie Gérard2022-08-263-3/+3
| | | | | | Task-number: QTBUG-105718 Change-Id: I2ad190e5536cdbdc8d2656e61892545d66911a02 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Use SPDX license identifiersLucie Gérard2022-07-082-59/+6
| | | | | | | | | | | Ammend 9b9d789fcb8f63a8998f1eefe44f2a1c8156c362 : some files were still missing SPDX headers Pick-to: 6.4 Task-number: QTBUG-67283 Task-number: QTBUG-104589 Change-Id: Ia4d2aae636bbdb1a99c422e3b8d3f097c3af34d6 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Doc: Do not advertise Qt module includeKai Köhne2022-07-083-15/+0
| | | | | | | | | People should rather use class includes, like they are advertised in each class documentation. Pick-to: 6.4 Change-Id: I3fc26c2ff01e35595959878c392dcafa2527d29f Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Add license headers to cmake filesLucie Gérard2022-07-073-0/+9
| | | | | | | | | | | | CMakeLists.txt and .cmake files of significant size (more than 2 lines according to our check in tst_license.pl) now have the copyright and license header. Existing copyright statements remain intact Task-number: QTBUG-88621 Change-Id: I118bd63694cfe2c9a413af4a38828a31727f8e86 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Various clean-upsPeter Varga2022-06-242-2/+3
| | | | | | Pick-to: 6.4 Change-Id: I53e04a247a25149d9f29135484c0528c706de7d8 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Use SPDX license identifiersLucie Gérard2022-06-2271-2541/+142
| | | | | | | | | | | 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>
* Cleanup item delegate logicAllan Sandfeld Jensen2022-06-223-46/+42
| | | | | | | | | Remove two indirect values we can calculate without tracking, and clean up naming in webenginequick. Pick-to: 6.4 Change-Id: Ibfab7013f314b428dca707036fe5f027558dff72 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
* Update .clang-format and fix messed up stylePeter Varga2022-06-222-14/+19
| | | | | | | | | | | | | | | | - Make sure clang-format doesn't reformat SPDX-License-Identifier (see https://code.qt.io/cgit/qt/qt5.git/commit/?id=6a4dab1134b10b432f69819018fef2044520e0ca ) - Fix C++ version to C++17 (see https://code.qt.io/cgit/qt/qt5.git/commit/?id=fe9efd359498dc342257908f6c9c2183e95fc05d ) - Update _clang_format to avoid adding a space in list-initialization (see https://code.qt.io/cgit/qt/qt5.git/commit/?id=fc7251edfaf782f184030a5787fe3a88feef6083 ) - Disable indentation for preprocessing directives. - Fix indentation of UIDelegatasManager macros and prevent formatting them. Pick-to: 6.4 Change-Id: Ieb59c993ee715430ebc2830828e488b9f62ec727 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Support HTML5 <datalist> elementPeter Varga2022-06-196-15/+292
| | | | | | | | | | | | | | | | | 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>
* Protect against default profile being deleted before its pagesAllan Sandfeld Jensen2022-06-131-0/+2
| | | | | | | | | Can really only happen in QML on exit. Pick-to: 6.3 6.4 Task-number: QTBUG-99445 Change-Id: I1a04d57b6c4c40ae264b5519d2e41c57bca79a61 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* 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. Pick-to: 6.4 Change-Id: Idf7f3baba33e5188f206f5be1b8a0bfd75e79d03 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* Create a RWHV delegate in coreAllan Sandfeld Jensen2022-06-0910-769/+394
| | | | | | | | | | This is adapting the Quick code for shared use with widgets, and allows us to use it from QWebEnginePage. Pick-to: 6.4 Fixes: QTBUG-96377 Change-Id: I3f09c1a949eff86d80fbe6c513dc66e3f9f2f611 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Add QtWebChannel dependency to QtWebEngineMarco Bubke2022-06-071-0/+1
| | | | | | | Missing parameter types from QtWebChannel. Change-Id: Idc0807658384b4af455d5c84ac91db877cd0e70b Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Include moc filesAllan Sandfeld Jensen2022-05-3111-0/+19
| | | | | | | | 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>
* Doc: Use find_package(Qt6 REQUIRED COMPONENTS ...) idiomKai Köhne2022-05-161-1/+1
| | | | | | | | | | | Using REQUIRED as a prefix instead of suffix works better with OPTIONAL_COMPONENTS, and is also the order in the CMake manual. Pick-to: 6.3 Task-number: QTBUG-98867 Change-Id: I57928fb56e2a154d91873dc869f6d314a7ea5fce Reviewed-by: Rui Oliveira Reviewed-by: Jörg Bornemann <joerg.bornemann@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>
* Fix touch input for html's popup in quick implKirill Burtsev2022-05-121-6/+8
| | | | | | | | | | | | | | Ammends 292f573f4e. Now that touch events are forwarded to popup delegate also instead of synthesized mouse events, the bug with touch event being ignored became present. Also extend testing of touch events for html popups. Task-number: QTBUG-79254 Fixes: QTBUG-103217 Pick-to: 6.2 6.3 Change-Id: I097a6617493355c7603fef8eb41025e299a6e809 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Cleanup custom touch handles implementationMichal Klocek2022-05-108-150/+62
| | | | | | | | Do not introduce extra class nor dummy QML element. Fix docs. Change-Id: I9848f6865cd585779d89fe387ad97c27e7450eb9 Reviewed-by: Kirill Burtsev <kirill.burtsev@qt.io>
* Add QtQuick dependency to QtWebEngineMarco Bubke2022-05-091-0/+2
| | | | | | | | | | QQuickItem is referenced as prototype but there is no dependency declared to QtQuick where it is defined. Pick-to: 6.3 6.2 Change-Id: Ib024123b032fdadf3fe24a5a420b2c122d6594b7 Reviewed-by: Michal Klocek <michal.klocek@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Use qualified imports to avoid prototype loopsMarco Bubke2022-05-093-7/+6
| | | | | | | | | | In the designer model we don't use import order to simplify the meta type system. There are only very few places where we get a prototype chain loop. In most cases qualified imports are used. Pick-to: 6.3 6.2 Change-Id: If4baac38cabb7773f58c0d326806fd6fd5612a99 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Quick: Add support for replacing touch handles with delegatesBalazs Egedi2022-05-0410-23/+304
| | | | | | Task-number: QTBUG-85043 Change-Id: I1c87aff352e07eb309d5ba8747b9e50a191d478e Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Clean up documentationAllan Sandfeld Jensen2022-05-031-1/+1
| | | | | | | | Make naming consistent, and fix a few links Pick-to: 6.3 Change-Id: I5b42ba92f8747d6bd86b1e84f74f6b15c80f444c Reviewed-by: Kirill Burtsev <kirill.burtsev@qt.io>
* Introduce http status code domain for loading infoKirill Burtsev2022-04-181-0/+2
| | | | | | | | | | | | | | | | 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>
* 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-105-3/+238
| | | | | | | | | | | | | | 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>
* Adapt to moving of type registrations into the Qt namespaceUlf Hermann2022-02-101-2/+2
| | | | | Change-Id: I46259b81a75d050e6fb3554ee2b13e76bb90cd3b Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Fix crash on WebEngine(View|Profile).userScripts.collection getKirill Burtsev2022-02-1010-21/+179
| | | | | | | | | | | | | | | 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>
* Fix accumulation of compositor-observer bindings for skia-on-glKirill Burtsev2022-02-041-1/+0
| | | | | | | | | | | | | One of Compositor's derived classes, DisplaySkiaOutputDevice, was missing call to 'unbind' from its observer, leading to not releasing binding from global cache on destroy. Since unbind is done on destroy, remove all explicit calls to unbind from derived classes, and just do them in their base implementations. Ammends b117909825. Pick-to: 6.2 6.3 Change-Id: I75c909eaa22ca1946ad67aa5093a8ee268c3562b Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Michal Klocek <michal.klocek@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-262-3/+4
| | | | | | | | | 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-233-3/+21
| | | | | | | | Fixed CodeChecker warnings, added missing documentation. Pick-to: 6.3 Change-Id: I723ea2b0952ded52f513a3cd53ac443b727f1e58 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Update documentationAllan Sandfeld Jensen2021-12-071-4/+0
| | | | | | | | | The signal is updated much faster for paused media now. Pick-to: 6.2 5.15 Fixes: QTBUG-98918 Change-Id: Ifa3b54e212436a7c93e101dc244d7edcbf473b63 Reviewed-by: Michal Klocek <michal.klocek@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>
* Clean up build optionsMichal Klocek2021-10-282-5/+1
| | | | | | | | | | | | | | We can configure webenigne repository with FEATURE_qtpdf_build and FEATURE_qtwebegine_build so make them public. The handling is still affected by QTBUG-96936,however private vs public features will most likely get better handling soon. Fix build summary to better reflect build options. Pick-to: 6.2 Change-Id: Ic6ef54a68b68d0f05c520a058665e6294efbe041 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>