summaryrefslogtreecommitdiffstats
path: root/src/quick/qquickwebview.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Add runJavascript() to C++ APIKaloyan Chehlarski2025-12-011-33/+18
| | | | | | | | | | | | | | | | | 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>
* Clean up and rename qabstractwebview_p.h to qwebview_p.hMichal Klocek2025-12-011-1/+1
| | | | | | | | Prepare for proper private class for QWebView. Task-number: QTBUG-131837 Change-Id: I7303055370ff946cbc7be94ea54a4c57a57021ca Reviewed-by: Moss Heim <moss.heim@qt.io>
* Make QWebViewLoadRequest a public classKaloyan Chehlarski2025-12-011-1/+1
| | | | | | | | | | | 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 Klocek2025-12-011-1/+2
| | | | | | | This class just removes _p suffix and fixes include headers. Change-Id: I4cc819631f9f8f969264da99f0e32b8b56735704 Reviewed-by: Moss Heim <moss.heim@qt.io>
* Cleanup QQuickWebView initializationMichal Klocek2025-11-281-1/+2
| | | | | | | | | | | | | | 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>
* WASM: Replace Quick-exclusive geometry hooksKaloyan Chehlarski2025-11-281-55/+1
| | | | | | | | | | | | | | | | | | | | 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-271-3/+2
| | | | | | | | | | | | | | | | | | | | | 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>
* Make QWebView a QWindowMichal Klocek2025-11-271-5/+7
| | | | | | | | | | | | | 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. Rename getSettings() to settings() in private classesKaloyan Chehlarski2025-10-281-1/+1
| | | | | | Task-number: QTBUG-131837 Change-Id: If86e9f707abcc0ef5916ea4c938fe59f6f270a7c Reviewed-by: Moss Heim <moss.heim@qt.io>
* Remove WinRT plugin sourcesKaloyan Chehlarski2025-10-171-2/+0
| | | | | | | | The plugin has not been maintained or tested in years, and has now been replaced by the WebView2 plugin. Change-Id: I96147164ba99364d679ba3b64bfc51853c1972a6 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* CRA mark src/Moss Heim2025-10-091-0/+1
| | | | | | | | | Some winrt plugin functions do data parsing but since this plugin is defunct, it is still marked with default security level. Fixes: QTBUG-135784 Change-Id: I99739cc762b1801fee65df7e08be17443cad157d Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Make use of the new Window container classesChristian Strømme2025-03-181-11/+53
| | | | | | | | | | | | | | | | | With the new window container classes we no longer need our own implementation here in QtWebView, the new one is also much more powerful with better integration into the Qt scene(s). Also took the opportunity to get rid of the over complicated interfaces. Note: While wasm isn't officially supported, some support code was left to make sure it functions to a similar degree as before. Once wasm has better support for using the Window container the remaining code can be removed. Change-Id: If4af9a546bc230aa9fa69ba3fb6dfb8fcf1f0be6 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* Doc: Add missing documentation for the settings APIChristian Strømme2022-11-241-0/+10
| | | | | | | This was missed when the API was added in be675d3721ff2eba Change-Id: I8c5eeb2233316b6ad850c2f285495c675e18f1d8 Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* Add settings API for QtWebViewChristian Strømme2022-10-271-1/+9
| | | | | | | | | | | | | Adds API and implementation for changing the settings of the WebView. [ChangeLog][General] Added settings API to make it possible to modify some of the WebView's built-in functionality. Task-number: QTBUG-97487 Task-number: QTBUG-98549 Change-Id: Ia121175ec08c96f56fd2148b02dccbc963fff244 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Use SPDX license identifiersLucie Gérard2022-06-101-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: I0f719de9e6e1fd4a7c50a247831e5a768e08df14 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Use up-to date LGPL license headerKai Köhne2022-02-141-11/+14
| | | | | | | | | | | | | Remove usages of outdated LGPL3 header that references LICENSES.LGPLv3 instead of LICENSES.LGPL3. Use BSD instead in the examples, updated LGPL otherwise. Also remove the now unreferenced LICENSE.LGPLv3, LICENSE.GPLv2 files, and instead the newly referenced files instead. Pick-to: 6.2 6.3 Change-Id: I01e1325ee2c7a147e095c08b370b88ded9a8daff Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* Add support functions to manage cookiesAgnieszka Jaworska2021-12-141-0/+54
| | | | | | | | | Setting and deleting cookies, changes for android, darwin and webengine plugins Pick-to: 6.3 Task-number: QTBUG-96204 Change-Id: I4f79d34384e490b70a1e9f89196dd113733d5fe1 Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* Use new qml cmake apis and new qml registrationMichal Klocek2021-07-191-0/+351
Move quick sources to sepatrate qml module so new qml registration system can be used. This drops dependency of QWebView module on Quick. Pick-to: 6.2 Change-Id: I10adb5e898ae2ffe4a46f37d759983047ea89483 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>