summaryrefslogtreecommitdiffstats
path: root/src/webenginequick/api/qquickwebenginesettings.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Add setting to trim accessibility identifiersKaloyan Chehlarski12 days1-0/+23
| | | | | | | | | | | | | | | | | | | By default, Qt's accessibility code will provide an object's full accessible hierarchy inside the Identifier string that's passed to a screen reader or automation software. This may be undesirable for users who use WebEngine for automated testing. This change adds a new QWebEngineSetting that disables this behavior, and instead makes sure that the HTML 'id' attribute is passed cleanly to accessibility software. When there is no 'id' attribute, the default Qt behavior still applies, and the Identifier string is still the full object hierarchy. Fixes: QTBUG-134762 Change-Id: Ica0b626c05b5cdca0bad83280ba15183ff9480f6 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Add setting to enable back/forward cacheSzabolcs David2025-02-101-0/+22
| | | | | | | | | | Implement an option to speed up back/forward navigation with bfcache feature. (Disabled by default.) Fixes: QTBUG-131324 Change-Id: I5ddb45b6a23ef587e868162b26368f5bc4933742 Reviewed-by: Moss Heim <moss.heim@qt.io> Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
* Rename JSTouchEventsEnabled to TouchEventsApiEnabledAllan Sandfeld Jensen2025-01-151-7/+7
| | | | | | | | | Api-review Pick-to: 6.9 Change-Id: I06c5400c50f30c7473bee8e82f9f63fad2875930 Reviewed-by: Michal Klocek <michal.klocek@qt.io> Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
* Correct behavior of JavscriptCanAccessClipboardMoss Heim2024-11-041-6/+14
| | | | | | | | | | | | | | | | Previously, sanitized clipboard writes were only enabled with JavascriptCanPaste AND JavascriptCanAccessClipboard enabled. This broke backward compatibility with code that expected it to only be enabled by JavascriptCanAccessClipboard. This compatibility is now restored. In the permission manager, all writes and reads are still controlled by ClipboardReadWrite. Pick-to: 6.8 Fixes: QTBUG-130599 Change-Id: I03dc2ea739782e475faacc0900804708c37763cc Reviewed-by: Michal Klocek <michal.klocek@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Add setting for JS touch events APIMartin Negyokru2024-10-291-0/+27
| | | | | | | | | | | | | | | | | | Currently we enable the touch events API by default if a touch screen is detected by the system. Some websites use this api to decide if they are on a mobile device or desktop and base their design on it. This can cause unwanted results on touch screen laptops or other setups that emulate a fake touch device. Add option to explicitly set the touch events API. Keep old behavior if the option is not used. [ChangeLog][Settings] Added JSTouchEventsEnabled setting Task-number: QTBUG-115764 Change-Id: Ica860f54557ee21f00c63a3d30f9074a0278bc8c Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Add PreferCSSMarginsForPrinting to QWebEngineSettingsSzabolcs David2024-10-211-0/+22
| | | | | | | | | | | | Add an option to choose between margins of the specified QPageLayout and the margins of the @media rules of CSS. [ChangeLog] New API added to QWebEngineSettings to optionally prefer CSS margin rules over QPageLayout for printing results. Task-number: QTBUG-58669 Change-Id: Idfec2deca0d326ea9339f67bce937e24ae5128f2 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Add PrintHeaderAndFooter to WebEngineSettingsSzabolcs David2024-10-171-0/+24
| | | | | | | | | | Allow users to generate basic header and footer when printing. Pages will contain the URL, title, date and the page number. Add corresponding WebEngineSettings flags to the Core and Quick APIs. Task-number: QTBUG-70125 Change-Id: Icadd15c16267a204c900aa6895db73b2172e47bc Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
* Doc: Replace \instantiates with \nativetypePaul Wicking2024-08-201-1/+1
| | | | | | | | | | | Since the implementation of the `\nativetype`-command in QDoc, the `\instantiates`-command is deprecated. Replace the use of the deprecated command in favor of its replacement. Pick-to: 6.8 Task-number: QTBUG-128216 Change-Id: I10cad9942e34301ded99c7014c1c70375e0698e1 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* Doc: Fix linking warnings for Qt WebEngineTopi Reinio2024-07-311-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes the following warnings: src/core/doc/src/qwebenginepage_lgpl.qdoc:464: (qdoc) warning: Can't link to 'QWebEnginePage::action(WebAction action)' src/core/api/qwebenginewebauthuxrequest.cpp:109: (qdoc) warning: Can't link to 'WebEngineWebAuthUxRequest.PinEntryReason.Challenge' src/core/api/qwebenginewebauthuxrequest.cpp:113: (qdoc) warning: Can't link to 'WebEngineWebAuthUxRequest.WebAuthUxState.CollectPin' src/core/api/qwebenginewebauthuxrequest.cpp:141: (qdoc) warning: Can't link to 'WebEngineWebAuthUxRequest.PinEntryReason.Challenge' src/webenginequick/api/qquickwebengineprofile.cpp:498: (qdoc) warning: Can't link to 'storageName()' src/webenginequick/api/qquickwebenginescriptcollection.cpp:119: (qdoc) warning: Undocumented return value src/webenginequick/doc/src/webengineview_lgpl.qdoc:879: (qdoc) warning: Can't link to 'WebEngineSettings::JavascriptCanPaste' src/webenginequick/doc/src/webengineview_lgpl.qdoc:880: (qdoc) warning: Can't link to 'WebEngineSettings::JavascriptCanAccessClipboard' In addition, drop remaining references to 'Pepper Plugin API' as that documentation was removed in 9d5f94b7f4b954bbe7e261d184420e237c704557. Pick-to: 6.8 Change-Id: I41fcddcc909b703705f2c32c2c3860872da60a72 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* QWebEnginePermission: Post-API reviewKaloyan Chehlarski2024-07-031-2/+2
| | | | | | | | | | | | | | | This commit contains fixes for the issues found during the API review of the new permissions API. In particular: - All new enums are now scoped - Replaced isTransient with its opposite, isPersistent - Renamed Feature to PermissionType - Made origin() return a non-const QUrl - Renamed PersistentPermissionsPolicy members to be more concise - Fixed a couple of bugs in the implementation - Updated documentation Change-Id: Idf84e1c9ba3ae803ef4686e1caa7f3e6c198c87d Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Make ImageAnimationPolicy a scoped enumAllan Sandfeld Jensen2024-06-201-9/+10
| | | | | | Pick-to: 6.8 Change-Id: I2c03c6d56d18f37e60b287c337c67718178fbb2b Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
* Add QWebEnginePermission and rewrite permissions APIKaloyan Chehlarski2024-06-031-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With the addition of permission persistence, it's now important for us to have an API for querying previously granted/denied permissions, so that they can be revoked at a later point. This change does the bulk of the work to get us there, by introducing a new type representing a single permission for a given URL/Feature pair. This type holds no information about the permission's state; it is simply an accessor object which allows its user to query the current status of the permission, grant/deny it, or reset it back to its initial state (so, delete it from storage). This provides application developers an easy way to store/modify lists of permissions without having to define their own custom types. A subsequent change will expand the API to provide a list of all permissions for a given profile. The current API (in QWebEnginePage and QQuickWebEngineView) has been marked as deprecated, but has not been disabled to ensure a smooth transition for developers. [ChangeLog][QtWebEngineCore][QWebEnginePage] Deprecated old permissions API [ChangeLog][QtWebEngineQuick][WebEngineView] Deprecated old permissions API [ChangeLog][QtWebEngineCore] Added new API for querying and modifying website permissions. [ChangeLog][QtWebEngineQuick] Added new API for querying and modifying website permissions. Pick-to: 6.8 Change-Id: I8661cdc26bbd6dcde6403d29cc083bcea1a49ccc Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Add setting method to set image animation policyAnu Aliyas2024-03-071-0/+38
| | | | | | | | - 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>
* Recommend against JsCanPaste/CanAccessClipboardMoss Heim2024-02-261-0/+8
| | | | | | | | | Now that we have the ClipboardReadWrite feature, we can recommend against enabling these features globally and use the feature permission instead. Change-Id: Id8113383c3d5c50d2e7da3ace0e5c5eb38684d03 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Add scroll animator to QML APIAllan Sandfeld Jensen2024-02-011-0/+21
| | | | | | | | | | 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>
* Add QWebEngineSettings::ForceDarkModeMartin Negyokru2023-09-281-0/+21
| | | | | | | | | 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>
* Rename disableReadingFromCanvas to follow naming styleAllan Sandfeld Jensen2023-08-101-10/+12
| | | | | | | | | | | 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>
* Add QWebEngineSettings::DisableReadingFromCanvasAnu Aliyas2023-04-241-0/+22
| | | | | | | | - disables reading from canvas. Fixes: QTBUG-84486 Change-Id: I3e181bfa6e351dea8dfa61f8010bafb94ea8a77d Reviewed-by: Michael Brüning <michael.bruning@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>
* Include moc filesAllan Sandfeld Jensen2022-05-311-0/+2
| | | | | | | | Faster to build and gives smaller binaries Fixes: QTBUG-103291 Change-Id: Iab52995e03c13a4c5b185750028c449a19d98d93 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* Add NavigateOnDrop settingsAllan Sandfeld Jensen2022-05-131-1/+23
| | | | | | | | | | 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>
* Clean up quick APIPeter Varga2021-07-191-5/+1
| | | | | | Pick-to: 6.2 Change-Id: I9407d407b203b8e2bb13768e5a899624ea47282a Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Doc: Fix documentation issues for Qt WebEngineTopi Reinio2021-07-011-19/+12
| | | | | | | | | | 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>
* Fix 'WebEngine' ambiguity for Qt6Michal Klocek2021-04-131-0/+765
'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>