summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Update dependencies on 'dev' in qt/qtwebviewHEADdevQt Submodule Update Bot25 hours1-2/+2
| | | | | Change-Id: I7500011183ea32363258cfa3cf6a18b50b389fd1 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Fix runJavaScript test after C++ api mergeMichal Klocek6 days2-26/+9
| | | | | | | | | | With C++ api we can now drop QQuick dependency from QWebView tests. Rewrite the test so it does not use QQuickWebView. Change-Id: I92f4f43c39a0987908e2e97358a620cd9dfcb7b9 Reviewed-by: Moss Heim <moss.heim@qt.io>
* Port Q_ENUMS to Q_ENUMAhmad Samir6 days1-1/+2
| | | | | | | | | | | Q_ENUM does what Q_ENUMS did plus declaring two friend functions, so the behavior should be the same. Q_ENUMS has been deprecated since at least Qt 6. Pick-to: 6.10 6.8 6.5 Change-Id: Ia431a7b70450ec958c55db0a672cb55a3dba2cc8 Reviewed-by: Moss Heim <moss.heim@qt.io>
* Update dependencies on 'dev' in qt/qtwebviewQt Submodule Update Bot9 days1-2/+2
| | | | | Change-Id: Ib8192cc5eed95ed748ed753dd986ed56f975152d Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on 'dev' in qt/qtwebviewQt Submodule Update Bot9 days1-2/+2
| | | | | Change-Id: I8907772440bc9d388ce1d90f83286867be829f7f Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on 'dev' in qt/qtwebviewQt Submodule Update Bot12 days1-2/+2
| | | | | Change-Id: I15812fe14ab24106fe2554072f2e669a8c9b884d Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Add runJavascript() to C++ APIKaloyan Chehlarski13 days16-104/+101
| | | | | | | | | | | | | | | | | The API follows what we have in WebEngine, with an optional std::function callback. No world ID argument is provided, however; most of the backends don't support the concept. The new function is not exposed to QML, since we cannot expose std::function arguments. Instead, the existing QML API is kept, and calls to it simply redirect to the C++ implementation. Also removes runJavaScriptPrivate() from QWebView, and its related implementation details in the plugins. Task-number: QTBUG-131837 Change-Id: Idc1e492916e17caa3f061c0b2738b3c735837cf8 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Remove Q_SLOTS from backendsKaloyan Chehlarski13 days5-9/+2
| | | | | | | | | | All functions that used to be slots are called directly now, and keeping the Q_SLOTS around is unnecessary (and caused build failures on macOS) Task-number: QTBUG-131837 Change-Id: I75e59769bd0e570faba4226810e2513c6ac9e048 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Windows: Make updateWindowGeometry() call in initialize() syncKaloyan Chehlarski13 days1-3/+1
| | | | | | | | | This avoids a race condition in at least one test, where quickly creating and destroying WebView instances would trigger an ERROR_INVALID_STATE for the controller object. Change-Id: I10ca9a9fcee6e523b6c42dea1e184d976214ba85 Reviewed-by: Moss Heim <moss.heim@qt.io>
* Update dependencies on 'dev' in qt/qtwebviewQt Submodule Update Bot13 days1-2/+2
| | | | | Change-Id: I63c89449ca65bf4231f45012de4aedbff092e4d5 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Clean up and rename QAbstractWebView and QAbstractWebViewSettingsMichal Klocek13 days22-62/+58
| | | | | | | | These are really just private implementations. Task-number: QTBUG-131837 Change-Id: I0f70456ff78aa85a519e41d5b0e31b7086e8fc93 Reviewed-by: Moss Heim <moss.heim@qt.io>
* Clean up and rename qabstractwebview_p.h to qwebview_p.hMichal Klocek13 days11-12/+11
| | | | | | | | Prepare for proper private class for QWebView. Task-number: QTBUG-131837 Change-Id: I7303055370ff946cbc7be94ea54a4c57a57021ca Reviewed-by: Moss Heim <moss.heim@qt.io>
* Make QWebView a public classKaloyan Chehlarski13 days3-51/+54
| | | | | | Task-number: QTBUG-131837 Change-Id: I7d22b93e4011c7a5706e62864cbdf37068bafb64 Reviewed-by: Moss Heim <moss.heim@qt.io>
* Make QWebViewLoadRequest a public classKaloyan Chehlarski13 days14-107/+115
| | | | | | | | | | | Move LoadStatus enum from QWebView class to QWebLoadRequest class. Small adjustments to fix compile issues. Task-number: QTBUG-131837 Change-Id: I79b6a48b0426b177133502f75fb34af9d2120e46 Reviewed-by: Moss Heim <moss.heim@qt.io>
* Rename qwebview_p.h qwebviewloadrequest_p.hMichal Klocek13 days16-25/+28
| | | | | | | This class just removes _p suffix and fixes include headers. Change-Id: I4cc819631f9f8f969264da99f0e32b8b56735704 Reviewed-by: Moss Heim <moss.heim@qt.io>
* Make QWebViewSettings a public classKaloyan Chehlarski13 days7-101/+137
| | | | | | | | | Move QWebViewSettings out of qwebview_p.h and make it public. Task-number: QTBUG-131837 Change-Id: I233ec3a5a3a2cb2441f05292a4d8c246d26f9eed Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Add QQuickView as a backend view for qtwebengineMichal Klocek13 days3-62/+33
| | | | | | | | | | | | | | | | | | | | | | In case we want create to QWebView directly (so no QQuickWebView), webengine backend should create QQuickView (subclass of QQuickWindow) instead on QQuickWindow, which will take care of creating QQmlEngine to display the "WebView" quick item. Use LoadFromModule() call to create WebEngineView. Remove WebViewFactory workaround and run webview tests without QQuickWebView to test new setup. Note QWebEnginePrivate class most likely should be split up into to two classes to make it nicer and avoid branching in logic, so this should be revisited after c++ API merge. Change-Id: Id240efc794528cdbccd92751a370fef722b04703 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Update dependencies on 'dev' in qt/qtwebviewQt Submodule Update Bot2025-11-281-2/+2
| | | | | Change-Id: Ib6c6bda3d86013ebc2cd12cfbbd8f6d6d963c43d Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Cleanup QQuickWebView initializationMichal Klocek2025-11-288-9/+17
| | | | | | | | | | | | | | In case of QQuickWebview with web engine backend, we need to pass qt quick parent item. So far it was was done by setting parent for QWebView and then extracting it on web engine plugin backend's initialization. Add initialize() call instead. For time being use just QObject as parameter as it is only used by webengine to pass parent QQuickItem. Change-Id: I8d84313e93e2ad67ec1f008bee532f20b0d0a68e Reviewed-by: Moss Heim <moss.heim@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Darwin: Protect against use after freeMichal Klocek2025-11-281-12/+31
| | | | | | | | | In case 'plugin' get destroyed, make sure late callbacks do not use deleted objects. Done-by: Kaloyan Chehlarski <kaloyan.chehlarski@qt.io> Change-Id: I347d3ba8b0d570491fe252a090150b5e3cac6292 Reviewed-by: Moss Heim <moss.heim@qt.io>
* Emit signals only on public class (pimpl wise)Michal Klocek2025-11-289-169/+99
| | | | | | | | | | | | | | | | | | | | | | So far we emitted signals on qabstractwebview and then reemited it later from qwebview to quickwebview. Make emit directly from qwebview. Note this patch changes the expected progress to 100 for failed load. As this code was removed from QWebView::onLoadingChanged. if (loadRequest.m_status == QWebView::LoadFailedStatus) m_progress = 0; Note on windows plugin the loading progress is just boolean, moreover if it 'not loading' the load progress is 100, which would now give wrong value on first initialization (100), therefore add m_progress as workaround. Task-number: QTBUG-131837 Change-Id: I9cd003be3185ad956d35bbdbcf01a0349421a1d4 Reviewed-by: Moss Heim <moss.heim@qt.io>
* WASM: Replace Quick-exclusive geometry hooksKaloyan Chehlarski2025-11-286-113/+33
| | | | | | | | | | | | | | | | | | | | The WASM backend relies on injecting an iframe into the generated webpage, and then using Qt Quick ItemChange events to pass down the correct geometry to the iframe's size. This meant that several non-plugin classes would have ugly Q_OS_WASM ifdefs, and that the WASM backend didn't work properly with C++. This change removes all of the existing geometry change code, and replaces it with a single JavaScript function that gets run when the iframe is created. The JavaScript code installs a ResizeObserver on the clientArea object (which represents the QWebView), and changes the iframe's dimensions as needed. Remove also obsolete now nativeWindowChanged(). Task-number: QTBUG-131837 Change-Id: I484a4b65406fa6b22ce969393d06e3c7b4dc3663 Reviewed-by: Moss Heim <moss.heim@qt.io>
* Use QWebView as parent window in backendsMichal Klocek2025-11-277-7/+35
| | | | | | | | | | | | | | | | | | | | | Each backend besides QtWebEngine, provides native window to be set by setContainedWindow in QQuickWebView. The android backend will have QWebView as parent window, the same as darwin plugin. Wasm and Webview2 do not create native child window. Note the wasm in handled in follow up commit. Note we do note make use of qquickwindow for webengine in this commit, we barely just store the pointer, or create the window if plugin was created without the qquickwindow. Change-Id: Ie98dc0103e353c280ebcb7add3c66f43d3618314 Reviewed-by: Moss Heim <moss.heim@qt.io>
* Pass the pointer to QWebView for private counterpartMichal Klocek2025-11-2720-31/+34
| | | | | | | | | QAbstarctWebView is going to be base class of pimpl for QWebView. Change-Id: I58636bc5017092e1b9360d05109a305d49899043 Reviewed-by: Kaloyan Chehlarski <kaloyan.chehlarski@qt.io> Reviewed-by: Moss Heim <moss.heim@qt.io>
* Make QWebView a QWindowMichal Klocek2025-11-273-42/+35
| | | | | | | | | | | | | We plan QWebView to become public c++ api, make it a QWindow not QAbstractWebView, which is going to base class of private implmentation. The fact that is now QWindow is used in follow up patches. Task-number: QTBUG-131837 Change-Id: I449f4b47462e09d31c716bbbc198a446f0f3b064 Reviewed-by: Moss Heim <moss.heim@qt.io> Reviewed-by: Kaloyan Chehlarski <kaloyan.chehlarski@qt.io>
* Cleanup. Remove null intefaceMichal Klocek2025-11-271-58/+1
| | | | | | | | | Running webview wihout plugin should be simply fatal. Task-number: QTBUG-131837 Change-Id: I223a64e7aad98d8bf1f81a3b71af2effcce454f6 Reviewed-by: Moss Heim <moss.heim@qt.io> Reviewed-by: Kaloyan Chehlarski <kaloyan.chehlarski@qt.io>
* Update dependencies on 'dev' in qt/qtwebviewQt Submodule Update Bot2025-11-261-2/+2
| | | | | Change-Id: I093236df057b1a36a9a08194c2ed1cbfd73df5e6 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on 'dev' in qt/qtwebviewQt Submodule Update Bot2025-11-251-2/+2
| | | | | Change-Id: I16f4aed2e252d41ed5329fbb61d11c9865586a43 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on 'dev' in qt/qtwebviewQt Submodule Update Bot2025-11-211-2/+2
| | | | | Change-Id: I5fb3b6740c02b2f55b5315104ad593e222f67f50 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Android: Ensure loadHtml() adds a history entryKaloyan Chehlarski2025-11-201-1/+2
| | | | | | | | | This is necessary because subsequent calls to url() will otherwise return about:blank, even when the user has provided a baseUrl argument. Change-Id: I092ebd7f1b8a9b6b92eab184f8b5ae8fc9826fe5 Reviewed-by: Moss Heim <moss.heim@qt.io>
* Android: Fix QWebView::url() implementationKaloyan Chehlarski2025-11-201-0/+22
| | | | | | | | | | | The C++ class was calling a getUrl() function that needed to, but wasn't defined in QtAndroidWebViewController.java. This only failed at runtime, and inadequate testing didn't catch it. Amends 501c7464d7771fbc15db4d326d65fda367695a3e Change-Id: I12f2bf16a48e2f5ea4325daed1e68321fd26a8e5 Reviewed-by: Moss Heim <moss.heim@qt.io>
* Update dependencies on 'dev' in qt/qtwebviewQt Submodule Update Bot2025-11-191-2/+2
| | | | | Change-Id: I91da61a2d32ce98dc0c62604f5b03de1ac2eee84 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on 'dev' in qt/qtwebviewQt Submodule Update Bot2025-11-181-2/+2
| | | | | Change-Id: Id87fd634c224df9c9272e05d54a12ac3ea738b21 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on 'dev' in qt/qtwebviewQt Submodule Update Bot2025-11-151-2/+2
| | | | | Change-Id: I007164c39749be7eb4cda546a8afe64372791319 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on 'dev' in qt/qtwebviewQt Submodule Update Bot2025-11-141-2/+2
| | | | | Change-Id: I8fba13f023225d68de8c910eb38cbf86dbadc423 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Minibrowser: Make sure icons aren't rendered in blackKaloyan Chehlarski2025-11-131-0/+3
| | | | | | | | | | | | | The default Qt Quick style has changed, resulting in icons being rendered in all black. Qt Quick docs state: The icon color is specified by default so that it matches the text color in different states. In order to use an icon with the original colors, set the color to "transparent". Pick-to: 6.10 Change-Id: I3a3c3494268708be05b209c98fb43f8afa0536e3 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Update dependencies on 'dev' in qt/qtwebviewQt Submodule Update Bot2025-11-121-2/+2
| | | | | Change-Id: I10832865bfd1e64cc2b5c60715466fd449e543ea Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on 'dev' in qt/qtwebviewQt Submodule Update Bot2025-11-121-2/+2
| | | | | Change-Id: I756bc3d486f94c022f2753178db66d94d14cc063 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Windows: Do not set native window as visible by defaultKaloyan Chehlarski2025-11-071-1/+0
| | | | | | | | | | In cases where a WebView is created, but its window is not embedded anywhere, having setVisible(true) would cause the window to get shown in the center of the screen with way to close or hide it. Pick-to: 6.10 Change-Id: If82ee8bef07d0204e700d2a2e790625e57bfadde Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* QT_NO_AS_CONST: rename "QT_NO_AS_CONST" to "QT_NO_QASCONST"Eren Bursali2025-11-061-1/+1
| | | | | | | | | QT_NO_AS_CONST got renamed in qtbase.git in commit 03baf08d2bb9 Task-number: QTBUG-141558 Change-Id: Ief106e5f72961f9fbf8822a99d71421f0153446f Reviewed-by: Kai Köhne <kai.koehne@qt.io>
* Update dependencies on 'dev' in qt/qtwebviewQt Submodule Update Bot2025-11-061-2/+2
| | | | | Change-Id: Ic1248c7ea8385ee3a9fcf1f534ab1c908986ff47 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on 'dev' in qt/qtwebviewQt Submodule Update Bot2025-11-011-2/+2
| | | | | Change-Id: I6ae8f947af26d604747c0d4826d360bae248846d Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Fix documentation details for Qt Webview on WindowsMorteza Jamshidi2025-10-311-1/+5
| | | | | | | | Added details about backends supports for Qt Webview on Windows Task-number: QTBUG-75747 Change-Id: I8b8bcbed150eb68afb61859f5e87e01b14631199 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* Update dependencies on 'dev' in qt/qtwebviewQt Submodule Update Bot2025-10-311-2/+2
| | | | | Change-Id: Ia1c0039c33f9e4fef044287a71d0a6a56f66b904 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Darwin: Return user agent when no custom one is setKaloyan Chehlarski2025-10-301-1/+1
| | | | | | | | The plugin previously returned an empty string when no custom agent was set. Change-Id: Ibf6f6ba87e9535532e609e6a5764f632d5e7974d Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Cleanup. Rename getSettings() to settings() in private classesKaloyan Chehlarski2025-10-2816-26/+25
| | | | | | Task-number: QTBUG-131837 Change-Id: If86e9f707abcc0ef5916ea4c938fe59f6f270a7c Reviewed-by: Moss Heim <moss.heim@qt.io>
* Update dependencies on 'dev' in qt/qtwebviewQt Submodule Update Bot2025-10-281-2/+2
| | | | | Change-Id: I426ff5921cf466e1f72d22d7dff4e36b0452309c Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Add url() virtual method to private classesKaloyan Chehlarski2025-10-2712-2/+28
| | | | | | Task-number: QTBUG-131837 Change-Id: I28c33c9c688c4218a350524b254ca893a6dfd950 Reviewed-by: Moss Heim <moss.heim@qt.io>
* Update dependencies on 'dev' in qt/qtwebviewQt Submodule Update Bot2025-10-241-2/+2
| | | | | Change-Id: I4c411eb36b94e87dd7ed20f3a3c0882c6de2ff36 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Cleanup. Remove QWebViewInterface classMichal Klocek2025-10-235-65/+4
| | | | | | | | It is not used anywhere. Task-number: QTBUG-131837 Change-Id: Ic8993e608fc555f69fc8c05a8e9243ea33fa5ce6 Reviewed-by: Moss Heim <moss.heim@qt.io>