| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
| |
These are really just private implementations.
Task-number: QTBUG-131837
Change-Id: I0f70456ff78aa85a519e41d5b0e31b7086e8fc93
Reviewed-by: Moss Heim <moss.heim@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
| |
This class just removes _p suffix and fixes include headers.
Change-Id: I4cc819631f9f8f969264da99f0e32b8b56735704
Reviewed-by: Moss Heim <moss.heim@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
| |
Task-number: QTBUG-131837
Change-Id: If86e9f707abcc0ef5916ea4c938fe59f6f270a7c
Reviewed-by: Moss Heim <moss.heim@qt.io>
|
| |
|
|
|
|
| |
Task-number: QTBUG-131837
Change-Id: I28c33c9c688c4218a350524b254ca893a6dfd950
Reviewed-by: Moss Heim <moss.heim@qt.io>
|
| |
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Skip percent encodig in case of setHtml call with baseUrl
with non data scheme. See for reference:
https://developer.android.com/reference/android/webkit/WebView#
loadDataWithBaseURL(java.lang.String,%20java.lang.String,
%20java.lang.String,%20java.lang.String,%20java.lang.String)
Add test case to cover the issue, note this skips the
webenigne backend as it requires qmlengine to function.
This will be cleaned up in follow up patches.
Note the base url setting is not supported on "webview2".
Fixes: QTBUG-136082
Fixes: QTBUG-134723
Pick-to: 6.10 6.9 6.8
Change-Id: I6891ec9271fcf3ee78048a6b040d39b818087fa4
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
All the backends implement url(), however it is never
used. The loadingChanged signal delivers
url which is used later by qquickwebview.
Make it less confusing and remove unused code paths.
Note actually loadingChanged should be required interface.
Change-Id: If410845a39b09c2ec4e8ffb177d334d807561860
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As referenced in android docs:
https://developer.android.com/reference/android/webkit/WebView
loaded HTML data has to be base64 encoded or use
url encoding.
To keep things aligned with webengine backend use
percent encoding, however "base64" would also give
correct result (unfortunately webengine assumes
percent encoding).
Fixes: QTBUG-129303
Pick-to: 6.8
Change-Id: Ided7ef12324d5b4854240700e5de7183069ad34a
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix handling of loadingChanged as this should come from
WebViewClient observer. This fixes flaky tests,
as they assumed 2 signals coming, but in reality
3 were emitted. In case 3rd did not come in time
test would pass.
Adjust the title test to match how it works on android.
Fix load result logic, as error assumes no load success signal
emitted and has to be one of
* LoadStartedStatus,
* LoadStoppedStatus,
* LoadSucceededStatus,
* LoadFailedStatus
Fixes: QTBUG-102712
Fixes: QTBUG-108752
Pick-to: 6.8
Change-Id: Ie3c729fa854ad1e6270a8276c1f2428af6c2614e
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Deals with:
* src/plugins/android/qandroidwebview_p.h:26:1: error: no template named 'JObject';
did you mean 'TestQTNamespace::QtJniTypes::JObject'?
* src/plugins/android/qandroidwebview.cpp:313:1: error: reference to 'QtJniMethods' is ambiguous
Pick-to: 6.8
Change-Id: I6c90b4c93ffac240708b3bdc6e4b22a3a3b41cfa
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
|
| |
|
|
|
| |
Change-Id: Iacea0f1b0376e04a6d43f453f7103e0ee624b43c
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Declare used types, use modern variadic template APIs, and native
method declarations to get rid of all hand-crafted signature
strings.
In the native methods, cast the id (that was previously created
via reinterpret_cast from 'this', pointing to the private) back to
the private pointer directly, and only maintain a set of privates
to make sure that the id we get is still representing an alive
private.
Remove some dead (commented) code, and simplify JNI_OnLoad.
Change-Id: Ie8711e5f072edde5781b33941aee4e37b8213ea2
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This prevents threading issues when calling object functions in a lambda
run on the android main thread, when the QJniObject was instantiated on
the Qt main thread.
As a drive-by, store the id as a 64bit value on the C++ side. jlong is
always a 64bit type, even on 32bit Android systems, so we can't use
quintptr without truncating data.
Change-Id: I96d983eb9b2e99338768d30f7000ec9e75d3fea6
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
|
| |
|
|
|
|
|
|
|
| |
The operator jobject() should be removed from declared QtJniTypes in
qtbase, as it's dangerous. Prepare for that by calling object(), which
returns the wrapped jobject as well.
Change-Id: I73c52a94f604568f0ba13a4fa32a0856c6cfd1fd
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When calling the (old and outdated) variadic argument overloads of
callMethod (as opposed to the variadic template overloads), then we
cannot pass complex types.
That types declared via the Q_DECLARE_JNI_CLASS macro are trivial was an
implementation detail that we shouldn't rely on as long as those types
are not part of the public API. Cast explicitly to jobject so that we
can make those types proper QJniObjects.
Updating this code to use the new variadic template overloads is for a
follow-up commit.
Change-Id: I8bb2706f2cbe198f7fc4091a1f881c1198de4491
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
QtAndroidWebViewController constructor blocks a qGuiThread until
the WebView is created and configured in UI thread. Such an
implementation can easily lead to the deadlock (For example in the case
of handling InputConnection - it is exactly the opposite. UI thread is
blocked and waits for handling event by qGuiThread). That's why we need
to lock AndroidDeadlockProtector before blocking qGuiThread.
This implementation resolves potential deadlock using
AndroidDeadlockProtector. If protector cannot by locked, qGuiThread will
handle events to make it possible.
Fixes: QTBUG-82810
Pick-to: 6.5 6.4 6.2 5.15
Change-Id: I71aaea9ceb7c41b818ed533ce41c70b5c0e8d7de
Reviewed-by: Michal Klocek <michal.klocek@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
|
|
| |
The cookie API that was added in 317e13cb2d97 missed the registration
and implementation for the native java functions needed for notifying
when a cookie got added/removed.
Fixes: QTBUG-102801
Pick-to: 6.3
Change-Id: I7594f75abba17b6ff1843d5349af085f90aae9b1
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
| |
Pick-to: 6.2
Change-Id: I4cd3c9384014d698f160fe57d81c7d9d8aa83a4c
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
| |
|
|
|
|
|
|
|
|
| |
Rename Android package name org.qtproject.qt5.android to
org.qtproject.qt.android to avoid inconsistency with Qt 6 name.
Also, we include the major version number in the jar target.
Task-number: QTBUG-86969
Change-Id: If887ac62ff480986f70434e5ab898d0bb9f19606
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
| |
|
|
|
|
|
|
| |
This is required to remove the ; from the macro with Qt 6.
Task-number: QTBUG-82978
Change-Id: Iba7f98e41459f95a4fb6dffd9e6d1996722d92e8
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
|
| |
|
|
|
|
|
|
| |
Update instance of old code using JNI_VERSION_1_4 to make the code
consistent.
Change-Id: I7f6d074411b3ab5093e45333279b3bd47492ff61
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
|
| |
|
|
|
|
|
|
|
| |
The httpUserAgent property allows to get and set the User Agent.
Task-number: QTBUG-68746
Change-Id: I12fb5da00b14ecba53e71c532f2c8401f8f2a009
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
|
|
|
This removes the hard build dependency to QtWebEngine, which opens up
the possibility for QtWebEngine, or others, to provide their own plugin.
Another benefit of having the backends loaded at run-time, is that we
can provide an alternative for developers that wants to publish their
application in the App Store, where shipping QtWebEngine isn't an option,
due to store policies, and where we already have an alternative/experimental
backend that can be used.
[ChangeLog][WebView] QtWebView will now load its backends at run-time.
Task-number: QTBUG-63137
Change-Id: I581940fe4c3b5e6bb41896367d3163ac8bc7b6b9
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
|