summaryrefslogtreecommitdiffstats
path: root/src/webenginewidgets
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2020-04-10 09:56:03 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2020-04-10 09:56:03 +0200
commitbcc1ea10c7fc5e2e5192d0e56c626c855dbe8eac (patch)
tree390c71d3c9dc60ab05ee08fe3bf835d79a2b4a0a /src/webenginewidgets
parentbebc5a1c6ff9968bf8b06ca74a76b0618a57700b (diff)
parent9136c16ae640aec8ab393237ce1a1c7f89c8bb1d (diff)
Merge remote-tracking branch 'origin/5.14' into 5.15
Diffstat (limited to 'src/webenginewidgets')
-rw-r--r--src/webenginewidgets/api/qwebenginepage.cpp17
-rw-r--r--src/webenginewidgets/doc/src/qwebenginesettings_lgpl.qdoc8
2 files changed, 19 insertions, 6 deletions
diff --git a/src/webenginewidgets/api/qwebenginepage.cpp b/src/webenginewidgets/api/qwebenginepage.cpp
index ad6196850..55fa6a078 100644
--- a/src/webenginewidgets/api/qwebenginepage.cpp
+++ b/src/webenginewidgets/api/qwebenginepage.cpp
@@ -2372,7 +2372,9 @@ void QWebEnginePage::javaScriptAlert(const QUrl &securityOrigin, const QString &
{
Q_UNUSED(securityOrigin);
#if QT_CONFIG(messagebox)
- QMessageBox::information(view(), QStringLiteral("Javascript Alert - %1").arg(url().toString()), msg);
+ QMessageBox::information(view(),
+ QStringLiteral("Javascript Alert - %1").arg(url().toString()),
+ msg.toHtmlEscaped());
#else
Q_UNUSED(msg);
#endif // QT_CONFIG(messagebox)
@@ -2382,7 +2384,11 @@ bool QWebEnginePage::javaScriptConfirm(const QUrl &securityOrigin, const QString
{
Q_UNUSED(securityOrigin);
#if QT_CONFIG(messagebox)
- return (QMessageBox::information(view(), QStringLiteral("Javascript Confirm - %1").arg(url().toString()), msg, QMessageBox::Ok, QMessageBox::Cancel) == QMessageBox::Ok);
+ return (QMessageBox::information(view(),
+ QStringLiteral("Javascript Confirm - %1").arg(url().toString()),
+ msg.toHtmlEscaped(),
+ QMessageBox::Ok,
+ QMessageBox::Cancel) == QMessageBox::Ok);
#else
Q_UNUSED(msg);
return false;
@@ -2395,7 +2401,12 @@ bool QWebEnginePage::javaScriptPrompt(const QUrl &securityOrigin, const QString
#if QT_CONFIG(inputdialog)
bool ret = false;
if (result)
- *result = QInputDialog::getText(view(), QStringLiteral("Javascript Prompt - %1").arg(url().toString()), msg, QLineEdit::Normal, defaultValue, &ret);
+ *result = QInputDialog::getText(view(),
+ QStringLiteral("Javascript Prompt - %1").arg(url().toString()),
+ msg.toHtmlEscaped(),
+ QLineEdit::Normal,
+ defaultValue.toHtmlEscaped(),
+ &ret);
return ret;
#else
Q_UNUSED(msg);
diff --git a/src/webenginewidgets/doc/src/qwebenginesettings_lgpl.qdoc b/src/webenginewidgets/doc/src/qwebenginesettings_lgpl.qdoc
index 7043469a0..b83da9440 100644
--- a/src/webenginewidgets/doc/src/qwebenginesettings_lgpl.qdoc
+++ b/src/webenginewidgets/doc/src/qwebenginesettings_lgpl.qdoc
@@ -174,9 +174,11 @@
Enabled by default. (Added in Qt 5.10)
\value PlaybackRequiresUserGesture
Inhibits playback of media content until the user interacts with
- the page. This is similar to how Chrome on Android behaves, while
- the default behavior when it is disabled is similar to Chrome on desktops.
- (Added in Qt 5.11)
+ the page. By default, WebEngine uses Chromium settings, as described
+ in \l {Autoplay Policy Changes}. This is similar to how Chrome on
+ Android behaves, while the default behavior when it is disabled is
+ similar to Chrome on desktops. To overwrite the default behavior,
+ disable this setting. (Added in Qt 5.11)
\value JavascriptCanPaste
Enables JavaScript \c{execCommand("paste")}. This also requires
enabling JavascriptCanAccessClipboard.