summaryrefslogtreecommitdiffstats
path: root/src/webenginewidgets/api/qwebengineview_p.h
Commit message (Collapse)AuthorAgeFilesLines
* Add default styled icons to actionsAnu Aliyas2024-01-061-1/+1
| | | | | | | | | - Added a default icon to action using the newly introduced QWebEngineViewPrivate::webActionIcon() Fixes: QTBUG-119722 Pick-to: 6.6 6.7 Change-Id: I4ee9b4380ead80d991756147bfef40f0f17c0849 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Include what you need: <QPointer>Marc Mutz2023-10-161-0/+2
| | | | | | | | | | | | | | | | | | | | | | | All these TUs relied on transitive includes of qpointer.h, maybe to a large extent via qevent.h, though, given that qevent.h is more or less the only public QtBase header that includes qpointer.h, something else seems to be at play here. Said qevent.h actually needs QPointer in-name-only, so a forward declaration would suffice. Prepare for qevent.h dropping the include. The algorithm I used was: If the TU mentions 'passiveGrabbers', the name of the QEvent function that returns QPointers, and the TU doesn't have qpointer.h included explicitly, include it. That may produce False Positives, but better safe than sorry. Otherwise, in src/, add an include to all source and header files which mention QPointer. Exception: if foo.h of a foo.cpp already includes it, don't include again. Task-number: QTBUG-117670 Change-Id: I7c18d8cfea4eb65eb7b518b03eedf3750dd45916 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Add touchSelectionMenu for widgetsMartin Negyokru2022-12-121-0/+6
| | | | | | | | | [ChangeLog][QWebEngineWidgets] Added touch selection menu. Task-number: QTBUG-100418 Task-number: QTBUG-91712 Change-Id: Iffb994e429b92389e64cd6a93a0b034d6aa07f66 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Add touchHandles for widgetsMartin Negyokru2022-08-291-0/+3
| | | | | | | Task-number: QTBUG-100418 Task-number: QTBUG-91712 Change-Id: I69131d3c7c4511ea3114df7a9300bf6ff1a59fee Reviewed-by: Allan Sandfeld Jensen <allan.jensen@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>
* Cleanup item delegate logicAllan Sandfeld Jensen2022-06-221-1/+1
| | | | | | | | | 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>
* Support HTML5 <datalist> elementPeter Varga2022-06-191-0/+9
| | | | | | | | | | | | | | | | | 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>
* Create a RWHV delegate in coreAllan Sandfeld Jensen2022-06-091-23/+7
| | | | | | | | | | 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>
* Disconnect safelyAllan Sandfeld Jensen2021-09-301-0/+1
| | | | | | Pick-to: 6.2 Change-Id: Ic1c25724ea2d6c2241ab2665703380002efae8c3 Reviewed-by: Kirill Burtsev <kirill.burtsev@qt.io>
* Clean up coding style in API header filesAllan Sandfeld Jensen2021-08-181-1/+1
| | | | | | Pick-to: 6.2 Change-Id: Ifa5892415a1e0b8ce9b6bfa10719aba618e3b799 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Return printToPdf to QWebEnginePageAllan Sandfeld Jensen2021-08-091-5/+1
| | | | | | | | | It doesn't use QPrinter and can be done using QtGui classes only. Pick-to: 6.2 Change-Id: I0e14563c1bb5e93d9803bb1a807f702b1a2a5315 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Kirill Burtsev <kirill.burtsev@qt.io>
* Various clean-ups around QWebEngineViewPeter Varga2021-07-131-6/+6
| | | | | | Pick-to: 6.2 Change-Id: I16f27054871f63526946101e07cb0dcf4aa3b390 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Switch printToPdf to std::functionAllan Sandfeld Jensen2021-06-241-2/+1
| | | | | | Pick-to: 6.2 Change-Id: I2660e60665542681bc9b0a479ce7fd9d93b896ae Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Switch QWebEngineCallbacks in QWebEnginePage to std::functionAllan Sandfeld Jensen2021-06-171-2/+5
| | | | | | Pick-to: 6.2 Change-Id: I5b0c1c7ef0966c3cff79184aa0733b59208d6890 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Drop printsupport dependency from coreSzabolcs David2021-06-031-0/+8
| | | | | | | | | Prevent linkage of core to widgets by moving printing API from QWebEnginePage to View and using QPagedPaintDevice (the QtGui ancestor of QPrinter) where it's needed. Change-Id: I6ea96edb495b0dcaaa584bbe72632fda025c18d3 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Add WebEngineWidgets, WebEngineQuick modules cmake buildMichal Klocek2021-05-191-1/+1
| | | | | | | | | Fix some library dependencies and make proper header includes in core. Task-number: QTBUG-91760 Change-Id: I415361dd42ef2cc39716ce3f5f56e6e8556ac4c8 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Drop dependency on QWebEngineView in pageMichal Klocek2020-11-241-10/+24
| | | | | | | Introduce temporarily PageView interface and DummyDelegate. Change-Id: I3a3d57435c98b31a15fb6d777045e141d007486f Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Move styled icons from page to viewMichal Klocek2020-11-231-0/+1
| | | | | | | | | Styles are bound to widgets, add styled action's icon on QWebEngineView::pageAction(). Change-Id: Ica7b1688c34c51e746a3b4707a6181c0d45c882a Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Move page's view and widget bindings to viewMichal Klocek2020-11-201-0/+3
| | | | | Change-Id: Ia60a1b864bb173bfd12a94ac4791477a88ea0842 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Move dialogs from view to pageMichal Klocek2020-11-201-1/+10
| | | | | Change-Id: Ib0f0ccca0d94c6c8f19d7d359bbf79110ba04f3e Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Merge all webenginecontextmenudata wrappers into one classMichal Klocek2020-08-121-5/+4
| | | | | | | | | | | | | | | | | | | | | | Introduce new class qwebenginecontextmenurequest in core which merges: * qquickwebenginecontextmenurequest * qwebenginecontextmenudata * implictly shared webenginecontextdata Unfortunately new class has to be QObject, since we want to reuse it qml. Q_GADGET can be used only as a value type, however we need to know if request is accepted or not in qml, therefore it must be passed as pointer. Since we use QObject now, class is no longer implicitly shared, however we only allocate request once and reuse the object for every new request (it is still copied in qml just to keep it aligned with other request handlers) [ChangleLog] QWebEngineContextMenuRequest is replacement for QWebEngineContextMenuData Change-Id: Ib387ec2065361a4bacc20675ca7352ab75a0e436 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Move QMenu handling from page to viewMichal Klocek2020-08-121-1/+21
| | | | | | | | [ChangeLog] createStandardContextMenu is moved from QWebEnginePage to QWebEngineView Change-Id: I08a7a1f7e55ca7396547006523cdec250a3ad117 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Invalidate accessible interfaces on destruction of view or pagePeter Varga2020-02-271-0/+1
| | | | | | | | | | | | | | | | | | | | | | | The RenderWidgetHostViewQtDelegate(Widget|Quick)Accessible interfaces are forwarding their queries to the WebEngineView. In case of widget, the view also forwards the query to the page. The accessible interfaces may outlive the view and page. The interfaces are not supposed to be used after the destruction of the underlying objects. Thus, set the RenderWidgetHostViewQtDelegate and WebEngineView accessible interfaces invalid if the corresponding pointers are null. Also fix querying the root accessible interface of the web page when the render frame host is not available. This fixes crash when QT_LOGGING_RULES="qt.accessibility.cache.debug=true" is set and logger tries to pretty-print QAccessibleInterfaces during destruction. Task-number: QTBUG-78284 Change-Id: If18af0605061fcd82d019d0042dbf1c9d3a910be Reviewed-by: Kirill Burtsev <kirill.burtsev@qt.io>
* Fix widget accessibility on macOSPeter Varga2020-01-241-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | macOS Accessibility queries the window for the focused accessibility element. The window forwards the query to the widget with active focus. This widget is the RWHVQtDelegateWidget if a web element is focused in QWebEngineView. Therefore, a QAccessibleWidget interface has been implemented for the RWHVQtDelegateWidget to forward the request to the QWebEngineView. The focused accessibility element expected to be returned by the QAccessibleInterface::focusChild() method. In case of the macOS accessibility backend, it is called by the accessibilityFocusedUIElement() NSAccessibility API function. It expects the focused web accessibility element otherwise VoiceOver won't focus properly. The focused web accessiblity element is looked up by the new BrowserAccessibilityQt::focusChild() method. RenderWidgetHostviewQtDelegateWidget::focusChild() and QWebengineViewAccessible::focusChild() methods have been also implemented to forward it. This patch depends on a focusChild() fix in qtbase: a132e02540 Fix QAccessibleWidget::focusChild() to return focused descendant Microsoft Narrator also uses focusChild() to query the current focused element when it starts but it is still functional without this fix. Task-number: QTBUG-78284 Task-number: QTBUG-81539 Change-Id: I3c4861e58622ccbb5046c60c4efcc19842400a88 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Fix QWebEngineView::setPage not deleting old pageJüri Valdmann2019-04-171-0/+1
| | | | | | | | | | | Also fix QWebEnginePage::setView not deleting old page Also fix wrong page being deleted if it's parented to the view. Fixes: QTBUG-75131 Fixes: QTBUG-75175 Change-Id: Ie4dfb15b3182de7aa3a94cddcac54ea40a86121b Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Stop showing speculative framesJüri Valdmann2018-10-291-4/+7
| | | | | | | | | | | | | | | | | | | | | Chromium creates "speculative" frames (RenderFrameHost and company) for pending cross-process navigations (and maybe other navigations too). For example, a redirect from http://qt.io to https://qt.io will trigger this, as described in the bug report. These speculative frames are loading in the background and only shown once they are officially ready (as decided by the RenderFrameHostManager and signaled to WebContentsObserver::RenderViewHostChanged). At least, this is how it's supposed to work and how it works in Chrome. In WebEngine, however, we actually show these speculative frames as soon as they are created and before they are ready. This runs into the problem that the if the speculative frame is dropped (instead of committed), then Chromium will not ask us to re-show the old frame (since it hasn't actually asked to us to show the new frame, it naturally assumes we are still showing the old one). Fixes: QTBUG-68727 Change-Id: I9d53035ce60e3a002d5412d4473d940a32644b5d Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Fix QWebEngineView changed properties emit on setPageKirill Burtsev2018-10-011-1/+4
| | | | | | | | | | QWebEngineView now also emits url, title, icon and selection changes on setPage in the save way when url changes. Before, those updates were only forwarded from current page. Fixes: QTBUG-69300 Change-Id: If827205094423bc00064a123ddb143b6002d2e7c Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Avoid reattach of page before deleting itAllan Sandfeld Jensen2018-09-051-1/+1
| | | | | | | | | Also fixes potential double delete if you do delete a view's implied page. Change-Id: Ib74128c0801f992694f4a5d8c148974039a6c7b2 Reviewed-by: Michal Klocek <michal.klocek@qt.io> Reviewed-by: Zakor Tamas <ztamas@inf.u-szeged.hu>
* Replace Q_DECL_OVERRIDE with overrideKevin Funk2017-09-211-3/+3
| | | | | Change-Id: I5fb337a83bfc98c23b2f3cd51839feb40fad010e Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Remove QWebEngineViewPrivate::m_pendingContextMenuEventJoerg Bornemann2017-09-111-1/+0
| | | | | | | | | | | | | | | | | | | | | This flag was set in QWebEngineView::contextMenuEvent and checked in QWebEnginePage::contextMenuRequested. The latter would bail out if the flag was not set. When the user pressed Shift-F10, the key event was received by RenderWidgetHostViewQtDelegateWidget::event and forwarded to Chromium. Blink's default event handler invoked the context menu, and our callback QWebEnginePage::contextMenuRequested was called. But nothing happened, because m_pendingContextMenuEvent has never been set. There is no reason to have this flag. React on every context menu request just like in the QtQuick implementation. Now pressing Shift-F10 invokes the context menu on web pages. Task-number: QTBUG-58306 Change-Id: I2db1b17604e5521e44613297120a964cc4e4d544 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Prevent crash with overridden drag 'n drop event handlersJoerg Bornemann2016-10-261-0/+1
| | | | | | | | | | | | | | Suppose the user overrides QWebEngineView::dragEnterEvent without calling the base implementation and without overriding dragLeaveEvent. Then our implementation will notify chromium about the drag leave without having ever seen a drag entering and crash. Only notify chromium about leave/drop/move events if we've notified it about the drag enter before. Also, catch the case where the user overrides dragLeaveEvent without calling the base implementation. Task-number: QTBUG-54896 Change-Id: Ib958040e5fa7ecab86bac9b724d478c81a521fcc Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Unify license header usage.Jani Heikkinen2016-02-011-11/+14
| | | | | | | | | Update files using old header.LGPL3 to use header.LGPL Update files using old header.FLD to use new header.FDL Update files using old header.BSD to use new header.BSD Change-Id: I36a67aaa8c3ca6c7946308defc9c03c3571a7d23 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* Add private header warningKai Koehne2015-07-241-0/+11
| | | | | Change-Id: I95ae03b34631f166d2eed68e20282eb624ff408a Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-161-7/+7
| | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Change-Id: Ieb6bac7a1be5c25eb7cb917495b58b6a870ca6d4 Reviewed-by: Pierre Rossi <pierre.rossi@theqtcompany.com>
* Enable building Qt WebEngine without accessiblity enabled.Michael Brüning2015-01-231-1/+2
| | | | | | | | | | | | | This adds guards that for QT_NO_ACCESSIBILITY being not defined around the code that uses accessibility types. It disables the quicknanobrowser and quicktestbrowser examples which need Qt QuickControls, which has a hard dependency to accessibility being enabled. Task-number: QTBUG-43305 Change-Id: Ifa39e3ce447ebc2124f52e00b29b1d7d2231035e Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
* Update License Headers for Qt WebEngine to LGPLv3.Zeno Albisser2014-08-211-15/+10
| | | | | | | Change-Id: Idbe0eafb51d77cc00e3a93179b81770724d5bfaa Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com> Reviewed-by: Tuukka Turunen <tuukka.turunen@digia.com> Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
* Don't inherit from Qt private typesJocelyn Turcotte2014-08-041-2/+2
| | | | | | | | | | | | | Do the d_ptr magic ourselves to avoid having to include private headers from qtcore, qtgui and qtdeclarative. It is hackish to hide QObject's d_ptr member to have the macros working in a public class, but if anything goes wrong we just need to replace the private macro convenience while maintaining the binary compatibility of the stored extra opaque pointer. Change-Id: Idb92f4f902826bef9068a5c2ef6ea31fc3fa15b2 Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Fix the indexOfChild function for the web documentFrederik Gladhorn2014-07-111-0/+1
| | | | | Change-Id: I37a32bd5dd8760bc91173968a620a1932ae67b4e Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Fix duplicate document roleFrederik Gladhorn2014-07-111-1/+1
| | | | | | | | The blink root element already has document as role. By setting it in the webview we'd get two documents in the hierarchy. Change-Id: Ie14e57b4e2050dbd9495c4fa94de4e2faebc02c1 Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Widget based accessibility glue codeFrederik Gladhorn2014-07-101-0/+16
| | | | | | | | | With this patch the accessibility hierarchy inside webengine becomes available when navigating from QWidget based web views. Change-Id: Ib3625a6ec93b4d3f298fb845ab85209b348349ba Reviewed-by: Zeno Albisser <zeno.albisser@digia.com> Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Moving sources to src part 1: Move files.Jocelyn Turcotte2013-11-281-0/+67
This only move files without adjusting any paths. This moves: - lib/quick -> src/webengine/api (API files) lib/quick -> src/webengine (other files) This contains the main QtWebEngine module library since <ec7b2ee70a8b2db7fb87f50671a001ddd54697b0>. - lib/widgets -> src/webenginewidgets Also rename this directory to match its module name and rename Api to api. - lib -> src/core - process -> src/process - resources -> src/core/resources - tools/* -> tools/scripts/ The build directory is spread as follow: - build/build.pro -> src/core/gyp_run.pro - build/qmake_extras/* -> src/core/ (for the host and target .pro files) - build/qmake -> tools/qmake - Build related scripts -> tools/buildscripts Change-Id: I0cded1de772c99c0c1da6536c9afea353236b4a1 Reviewed-by: Zeno Albisser <zeno.albisser@digia.com> Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com> Reviewed-by: Andras Becsi <andras.becsi@digia.com>