summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorMichal Klocek <michal.klocek@qt.io>2020-08-21 15:19:55 +0200
committerMichal Klocek <michal.klocek@qt.io>2020-09-02 17:41:20 +0200
commitc4a4a38062ba04b0986f53a0e307c60cf97e6fb8 (patch)
treeeceaaeecf2fda5eca72eb1d472e5fadf757729b6 /src/core
parent0870cc93ad3240f5898f231c8f8b8fd82035206d (diff)
Move qwebenginesettings to core
Just moves qwebenginesettings to core. [ChangeLog] QWebEngineSettings is moved to QtWebEngieCore Change-Id: I7f623bce98213669a4b844f3377aa13e7f3dbd96 Reviewed-by: Michael BrĂ¼ning <michael.bruning@qt.io>
Diffstat (limited to 'src/core')
-rw-r--r--src/core/api/core_api.pro6
-rw-r--r--src/core/api/qwebenginesettings.cpp246
-rw-r--r--src/core/api/qwebenginesettings.h152
-rw-r--r--src/core/doc/src/qwebenginesettings_lgpl.qdoc301
4 files changed, 703 insertions, 2 deletions
diff --git a/src/core/api/core_api.pro b/src/core/api/core_api.pro
index 885b81f70..e1a716955 100644
--- a/src/core/api/core_api.pro
+++ b/src/core/api/core_api.pro
@@ -54,7 +54,8 @@ HEADERS = \
qwebenginecontextmenurequest.h \
qwebenginecontextmenurequest_p.h \
qwebenginedownloadrequest.h \
- qwebenginedownloadrequest_p.h
+ qwebenginedownloadrequest_p.h \
+ qwebenginesettings.h
SOURCES = \
qtwebenginecoreglobal.cpp \
@@ -72,7 +73,8 @@ SOURCES = \
qwebengineurlscheme.cpp \
qwebengineurlschemehandler.cpp \
qwebenginecontextmenurequest.cpp \
- qwebenginedownloadrequest.cpp
+ qwebenginedownloadrequest.cpp \
+ qwebenginesettings.cpp
# Chromium headers included are not remotely clean
CONFIG -= warning_clean
diff --git a/src/core/api/qwebenginesettings.cpp b/src/core/api/qwebenginesettings.cpp
new file mode 100644
index 000000000..f405921a6
--- /dev/null
+++ b/src/core/api/qwebenginesettings.cpp
@@ -0,0 +1,246 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtWebEngine module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qwebenginesettings.h"
+#include "web_engine_settings.h"
+
+QT_BEGIN_NAMESPACE
+
+using QtWebEngineCore::WebEngineSettings;
+
+static WebEngineSettings::Attribute toWebEngineAttribute(QWebEngineSettings::WebAttribute attribute)
+{
+ switch (attribute) {
+ case QWebEngineSettings::AutoLoadImages:
+ return WebEngineSettings::AutoLoadImages;
+ case QWebEngineSettings::JavascriptEnabled:
+ return WebEngineSettings::JavascriptEnabled;
+ case QWebEngineSettings::JavascriptCanOpenWindows:
+ return WebEngineSettings::JavascriptCanOpenWindows;
+ case QWebEngineSettings::JavascriptCanAccessClipboard:
+ return WebEngineSettings::JavascriptCanAccessClipboard;
+ case QWebEngineSettings::LinksIncludedInFocusChain:
+ return WebEngineSettings::LinksIncludedInFocusChain;
+ case QWebEngineSettings::LocalStorageEnabled:
+ return WebEngineSettings::LocalStorageEnabled;
+ case QWebEngineSettings::LocalContentCanAccessRemoteUrls:
+ return WebEngineSettings::LocalContentCanAccessRemoteUrls;
+ case QWebEngineSettings::XSSAuditingEnabled:
+ return WebEngineSettings::XSSAuditingEnabled;
+ case QWebEngineSettings::SpatialNavigationEnabled:
+ return WebEngineSettings::SpatialNavigationEnabled;
+ case QWebEngineSettings::LocalContentCanAccessFileUrls:
+ return WebEngineSettings::LocalContentCanAccessFileUrls;
+ case QWebEngineSettings::HyperlinkAuditingEnabled:
+ return WebEngineSettings::HyperlinkAuditingEnabled;
+ case QWebEngineSettings::ScrollAnimatorEnabled:
+ return WebEngineSettings::ScrollAnimatorEnabled;
+ case QWebEngineSettings::ErrorPageEnabled:
+ return WebEngineSettings::ErrorPageEnabled;
+ case QWebEngineSettings::PluginsEnabled:
+ return WebEngineSettings::PluginsEnabled;
+ case QWebEngineSettings::FullScreenSupportEnabled:
+ return WebEngineSettings::FullScreenSupportEnabled;
+ case QWebEngineSettings::ScreenCaptureEnabled:
+ return WebEngineSettings::ScreenCaptureEnabled;
+ case QWebEngineSettings::WebGLEnabled:
+ return WebEngineSettings::WebGLEnabled;
+ case QWebEngineSettings::Accelerated2dCanvasEnabled:
+ return WebEngineSettings::Accelerated2dCanvasEnabled;
+ case QWebEngineSettings::AutoLoadIconsForPage:
+ return WebEngineSettings::AutoLoadIconsForPage;
+ case QWebEngineSettings::TouchIconsEnabled:
+ return WebEngineSettings::TouchIconsEnabled;
+ case QWebEngineSettings::FocusOnNavigationEnabled:
+ return WebEngineSettings::FocusOnNavigationEnabled;
+ case QWebEngineSettings::PrintElementBackgrounds:
+ return WebEngineSettings::PrintElementBackgrounds;
+ case QWebEngineSettings::AllowRunningInsecureContent:
+ return WebEngineSettings::AllowRunningInsecureContent;
+ case QWebEngineSettings::AllowGeolocationOnInsecureOrigins:
+ return WebEngineSettings::AllowGeolocationOnInsecureOrigins;
+ case QWebEngineSettings::AllowWindowActivationFromJavaScript:
+ return WebEngineSettings::AllowWindowActivationFromJavaScript;
+ case QWebEngineSettings::ShowScrollBars:
+ return WebEngineSettings::ShowScrollBars;
+ case QWebEngineSettings::PlaybackRequiresUserGesture:
+ return WebEngineSettings::PlaybackRequiresUserGesture;
+ case QWebEngineSettings::WebRTCPublicInterfacesOnly:
+ return WebEngineSettings::WebRTCPublicInterfacesOnly;
+ case QWebEngineSettings::JavascriptCanPaste:
+ return WebEngineSettings::JavascriptCanPaste;
+ case QWebEngineSettings::DnsPrefetchEnabled:
+ return WebEngineSettings::DnsPrefetchEnabled;
+ case QWebEngineSettings::PdfViewerEnabled:
+ return WebEngineSettings::PdfViewerEnabled;
+ default:
+ return WebEngineSettings::UnsupportedInCoreSettings;
+ }
+}
+
+QWebEngineSettings::QWebEngineSettings(QWebEngineSettings *parentSettings)
+ : d_ptr(new WebEngineSettings(parentSettings ? parentSettings->d_func() : 0))
+{
+ Q_D(QWebEngineSettings);
+ d->scheduleApplyRecursively();
+}
+
+QWebEngineSettings::~QWebEngineSettings()
+{
+}
+
+/*!
+ Returns the settings for a web engine page that belongs to the default
+ profile. All web pages not specifically created with another profile belong
+ to the default profile.
+
+QWebEngineSettings *QWebEngineSettings::defaultSettings()
+{
+ return QWebEngineProfile::defaultProfile()->settings();
+}
+*/
+
+ASSERT_ENUMS_MATCH(WebEngineSettings::StandardFont, QWebEngineSettings::StandardFont)
+ASSERT_ENUMS_MATCH(WebEngineSettings::FixedFont, QWebEngineSettings::FixedFont)
+ASSERT_ENUMS_MATCH(WebEngineSettings::SerifFont, QWebEngineSettings::SerifFont)
+ASSERT_ENUMS_MATCH(WebEngineSettings::SansSerifFont, QWebEngineSettings::SansSerifFont)
+ASSERT_ENUMS_MATCH(WebEngineSettings::CursiveFont, QWebEngineSettings::CursiveFont)
+ASSERT_ENUMS_MATCH(WebEngineSettings::FantasyFont, QWebEngineSettings::FantasyFont)
+ASSERT_ENUMS_MATCH(WebEngineSettings::PictographFont, QWebEngineSettings::PictographFont)
+
+void QWebEngineSettings::setFontFamily(QWebEngineSettings::FontFamily which, const QString &family)
+{
+ Q_D(QWebEngineSettings);
+ d->setFontFamily(static_cast<WebEngineSettings::FontFamily>(which), family);
+}
+
+QString QWebEngineSettings::fontFamily(QWebEngineSettings::FontFamily which) const
+{
+ return d_ptr->fontFamily(static_cast<WebEngineSettings::FontFamily>(which));
+}
+
+void QWebEngineSettings::resetFontFamily(QWebEngineSettings::FontFamily which)
+{
+ d_ptr->resetFontFamily(static_cast<WebEngineSettings::FontFamily>(which));
+}
+
+ASSERT_ENUMS_MATCH(WebEngineSettings::DefaultFixedFontSize, QWebEngineSettings::DefaultFixedFontSize)
+ASSERT_ENUMS_MATCH(WebEngineSettings::DefaultFontSize, QWebEngineSettings::DefaultFontSize)
+ASSERT_ENUMS_MATCH(WebEngineSettings::MinimumFontSize, QWebEngineSettings::MinimumFontSize)
+ASSERT_ENUMS_MATCH(WebEngineSettings::MinimumLogicalFontSize, QWebEngineSettings::MinimumLogicalFontSize)
+
+void QWebEngineSettings::setFontSize(QWebEngineSettings::FontSize type, int size)
+{
+ Q_D(QWebEngineSettings);
+ d->setFontSize(static_cast<WebEngineSettings::FontSize>(type), size);
+}
+
+int QWebEngineSettings::fontSize(QWebEngineSettings::FontSize type) const
+{
+ Q_D(const QWebEngineSettings);
+ return d->fontSize(static_cast<WebEngineSettings::FontSize>(type));
+}
+
+void QWebEngineSettings::resetFontSize(QWebEngineSettings::FontSize type)
+{
+ Q_D(QWebEngineSettings);
+ d->resetFontSize(static_cast<WebEngineSettings::FontSize>(type));
+}
+
+void QWebEngineSettings::setDefaultTextEncoding(const QString &encoding)
+{
+ Q_D(QWebEngineSettings);
+ d->setDefaultTextEncoding(encoding);
+}
+
+QString QWebEngineSettings::defaultTextEncoding() const
+{
+ Q_D(const QWebEngineSettings);
+ return d->defaultTextEncoding();
+}
+
+ASSERT_ENUMS_MATCH(WebEngineSettings::DisallowUnknownUrlSchemes, QWebEngineSettings::DisallowUnknownUrlSchemes)
+ASSERT_ENUMS_MATCH(WebEngineSettings::AllowUnknownUrlSchemesFromUserInteraction, QWebEngineSettings::AllowUnknownUrlSchemesFromUserInteraction)
+ASSERT_ENUMS_MATCH(WebEngineSettings::AllowAllUnknownUrlSchemes, QWebEngineSettings::AllowAllUnknownUrlSchemes)
+
+QWebEngineSettings::UnknownUrlSchemePolicy QWebEngineSettings::unknownUrlSchemePolicy() const
+{
+ Q_D(const QWebEngineSettings);
+ WebEngineSettings::UnknownUrlSchemePolicy result = d->unknownUrlSchemePolicy();
+ Q_ASSERT(result != WebEngineSettings::InheritedUnknownUrlSchemePolicy);
+ return static_cast<QWebEngineSettings::UnknownUrlSchemePolicy>(result);
+}
+
+void QWebEngineSettings::setUnknownUrlSchemePolicy(QWebEngineSettings::UnknownUrlSchemePolicy policy)
+{
+ Q_D(QWebEngineSettings);
+ d->setUnknownUrlSchemePolicy(static_cast<WebEngineSettings::UnknownUrlSchemePolicy>(policy));
+}
+
+void QWebEngineSettings::resetUnknownUrlSchemePolicy()
+{
+ Q_D(QWebEngineSettings);
+ d->setUnknownUrlSchemePolicy(WebEngineSettings::InheritedUnknownUrlSchemePolicy);
+}
+
+void QWebEngineSettings::setAttribute(QWebEngineSettings::WebAttribute attr, bool on)
+{
+ Q_D(QWebEngineSettings);
+ WebEngineSettings::Attribute webEngineAttribute = toWebEngineAttribute(attr);
+ Q_ASSERT(webEngineAttribute != WebEngineSettings::UnsupportedInCoreSettings);
+ d->setAttribute(webEngineAttribute, on);
+}
+
+bool QWebEngineSettings::testAttribute(QWebEngineSettings::WebAttribute attr) const
+{
+ Q_D(const QWebEngineSettings);
+ WebEngineSettings::Attribute webEngineAttribute = toWebEngineAttribute(attr);
+ Q_ASSERT(webEngineAttribute != WebEngineSettings::UnsupportedInCoreSettings);
+ return d->testAttribute(webEngineAttribute);
+}
+
+void QWebEngineSettings::resetAttribute(QWebEngineSettings::WebAttribute attr)
+{
+ Q_D(QWebEngineSettings);
+ WebEngineSettings::Attribute webEngineAttribute = toWebEngineAttribute(attr);
+ Q_ASSERT(webEngineAttribute != WebEngineSettings::UnsupportedInCoreSettings);
+ d->resetAttribute(webEngineAttribute);
+}
+
+QT_END_NAMESPACE
diff --git a/src/core/api/qwebenginesettings.h b/src/core/api/qwebenginesettings.h
new file mode 100644
index 000000000..3b98c0fd7
--- /dev/null
+++ b/src/core/api/qwebenginesettings.h
@@ -0,0 +1,152 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtWebEngine module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QWEBENGINESETTINGS_H
+#define QWEBENGINESETTINGS_H
+
+#include <QtWebEngineCore/qtwebenginecoreglobal.h>
+#include <QtCore/qscopedpointer.h>
+#include <QtCore/qstring.h>
+
+namespace QtWebEngineCore {
+class WebEngineSettings;
+}
+
+QT_BEGIN_NAMESPACE
+
+class QIcon;
+class QPixmap;
+class QUrl;
+
+class Q_WEBENGINECORE_EXPORT QWebEngineSettings {
+public:
+ enum FontFamily {
+ StandardFont,
+ FixedFont,
+ SerifFont,
+ SansSerifFont,
+ CursiveFont,
+ FantasyFont,
+ PictographFont
+ };
+ enum WebAttribute {
+ AutoLoadImages,
+ JavascriptEnabled,
+ JavascriptCanOpenWindows,
+ JavascriptCanAccessClipboard,
+ LinksIncludedInFocusChain,
+ LocalStorageEnabled,
+ LocalContentCanAccessRemoteUrls,
+ XSSAuditingEnabled,
+ SpatialNavigationEnabled,
+ LocalContentCanAccessFileUrls,
+ HyperlinkAuditingEnabled,
+ ScrollAnimatorEnabled,
+ ErrorPageEnabled,
+ PluginsEnabled,
+ FullScreenSupportEnabled,
+ ScreenCaptureEnabled,
+ WebGLEnabled,
+ Accelerated2dCanvasEnabled,
+ AutoLoadIconsForPage,
+ TouchIconsEnabled,
+ FocusOnNavigationEnabled,
+ PrintElementBackgrounds,
+ AllowRunningInsecureContent,
+ AllowGeolocationOnInsecureOrigins,
+ AllowWindowActivationFromJavaScript,
+ ShowScrollBars,
+ PlaybackRequiresUserGesture,
+ WebRTCPublicInterfacesOnly,
+ JavascriptCanPaste,
+ DnsPrefetchEnabled,
+ PdfViewerEnabled,
+ };
+
+ enum FontSize {
+ MinimumFontSize,
+ MinimumLogicalFontSize,
+ DefaultFontSize,
+ DefaultFixedFontSize
+ };
+
+ enum UnknownUrlSchemePolicy {
+ DisallowUnknownUrlSchemes = 1,
+ AllowUnknownUrlSchemesFromUserInteraction,
+ AllowAllUnknownUrlSchemes
+ };
+
+ //TODO: see if we still need it
+ //static QWebEngineSettings *defaultSettings();
+
+ void setFontFamily(FontFamily which, const QString &family);
+ QString fontFamily(FontFamily which) const;
+ void resetFontFamily(FontFamily which);
+
+ void setFontSize(FontSize type, int size);
+ int fontSize(FontSize type) const;
+ void resetFontSize(FontSize type);
+
+ void setAttribute(WebAttribute attr, bool on);
+ bool testAttribute(WebAttribute attr) const;
+ void resetAttribute(WebAttribute attr);
+
+ void setDefaultTextEncoding(const QString &encoding);
+ QString defaultTextEncoding() const;
+
+ UnknownUrlSchemePolicy unknownUrlSchemePolicy() const;
+ void setUnknownUrlSchemePolicy(UnknownUrlSchemePolicy policy);
+ void resetUnknownUrlSchemePolicy();
+
+private:
+ Q_DISABLE_COPY(QWebEngineSettings)
+ typedef ::QtWebEngineCore::WebEngineSettings QWebEngineSettingsPrivate;
+ QWebEngineSettingsPrivate* d_func() { return d_ptr.data(); }
+ const QWebEngineSettingsPrivate* d_func() const { return d_ptr.data(); }
+ QScopedPointer<QWebEngineSettingsPrivate> d_ptr;
+ friend class QWebEnginePagePrivate;
+ friend class QWebEngineProfilePrivate;
+
+ ~QWebEngineSettings();
+ explicit QWebEngineSettings(QWebEngineSettings *parentSettings = Q_NULLPTR);
+};
+
+QT_END_NAMESPACE
+
+#endif // QWEBENGINESETTINGS_H
diff --git a/src/core/doc/src/qwebenginesettings_lgpl.qdoc b/src/core/doc/src/qwebenginesettings_lgpl.qdoc
new file mode 100644
index 000000000..a62abfbab
--- /dev/null
+++ b/src/core/doc/src/qwebenginesettings_lgpl.qdoc
@@ -0,0 +1,301 @@
+/*
+ Copyright (C) 2015 The Qt Company Ltd.
+ Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+// The documentation in this file was imported from QtWebKit and is thus constrained
+// by its LGPL license. Documentation written from scratch for new methods should be
+// placed inline in the code as usual.
+
+/*!
+ \class QWebEngineSettings
+ \since 5.4
+ \brief The QWebEngineSettings class provides an object to store the settings used
+ by QWebEnginePage.
+
+ \inmodule QtWebEngineCore
+
+ QWebEngineSettings allows configuration of browser properties, such as font sizes and
+ families, the location of a custom style sheet, and generic attributes, such as JavaScript
+ support. Individual attributes are set using the setAttribute() function. The
+ \l{QWebEngineSettings::WebAttribute}{WebAttribute} enum further describes each attribute.
+
+ Each QWebEnginePage object has its own QWebEngineSettings object, which configures the
+ settings for that page. If a setting is not configured for a web engine
+ page, it is looked up in the settings of the profile the page belongs to.
+
+ \sa QWebEnginePage::settings(), QWebEngineView::settings()
+*/
+
+/*!
+ \enum QWebEngineSettings::FontFamily
+
+ This enum describes the generic font families defined by CSS 2.
+ For more information see the
+ \l{http://www.w3.org/TR/REC-CSS2/fonts.html#generic-font-families}{CSS standard}.
+
+ \value StandardFont
+ \value FixedFont
+ \value SerifFont
+ \value SansSerifFont
+ \value CursiveFont
+ \value FantasyFont
+ \value PictographFont
+ (added in Qt 5.7)
+*/
+
+/*!
+ \enum QWebEngineSettings::FontSize
+
+ This enum describes the font sizes configurable through QWebEngineSettings:
+
+ \value MinimumFontSize The hard minimum font size.
+ \value MinimumLogicalFontSize The minimum logical font size that is applied
+ when zooming out.
+ \value DefaultFontSize The default font size for regular text.
+ \value DefaultFixedFontSize The default font size for fixed-pitch text.
+*/
+
+/*!
+ \enum QWebEngineSettings::WebAttribute
+
+ This enum type specifies settings for web pages:
+
+ \value AutoLoadImages
+ Automatically dowloads images for web pages. When this setting is
+ disabled, images are loaded from the cache. Enabled by default.
+ \value JavascriptEnabled
+ Enables the running of JavaScript programs in the
+ \l{QWebEngineScript::MainWorld}{MainWorld}. Enabled by default.
+ \value JavascriptCanOpenWindows
+ Allows JavaScript programs to open popup windows without user
+ interaction. Enabled by default.
+ \value JavascriptCanAccessClipboard
+ Allows JavaScript programs to read from and write to the clipboard.
+ Writing to the clipboard is always allowed if it is specifically requested by the user.
+ See JavascriptCanPaste to also allow pasting the content of the clipboard content from
+ JavaScript.
+ Disabled by default.
+ \value LinksIncludedInFocusChain
+ Includes hyperlinks in the keyboard focus chain. Enabled by default.
+ \value LocalStorageEnabled
+ Enables support for the HTML 5 local storage feature. Enabled by default.
+ \value LocalContentCanAccessRemoteUrls
+ Allows locally loaded documents to ignore cross-origin rules so that they can access
+ remote resources that would normally be blocked, because all remote resources are
+ considered cross-origin for a local file. Remote access that would not be blocked by
+ cross-origin rules is still possible when this setting is disabled (default).
+ Note that disabling this setting does not stop XMLHttpRequests or media elements in
+ local files from accessing remote content. Basically, it only stops some HTML
+ subresources, such as scripts, and therefore disabling this setting is not a safety
+ mechanism.
+ \value XSSAuditingEnabled
+ Obsolete and has no effect.
+ \value SpatialNavigationEnabled
+ Enables the Spatial Navigation feature, which means the ability to navigate between
+ focusable elements, such as hyperlinks and form controls, on a web page by using the
+ Left, Right, Up and Down arrow keys. For example, if a user presses the
+ Right key, heuristics determine whether there is an element they might be
+ trying to reach towards the right and which element they probably want.
+ Disabled by default.
+ \value LocalContentCanAccessFileUrls
+ Allows locally loaded documents to access other local URLs. Enabled by default.
+ \value HyperlinkAuditingEnabled
+ Enables support for the \c ping attribute for hyperlinks. Disabled by default.
+ \value ScrollAnimatorEnabled
+ Enables animated scrolling. Disabled by default.
+ \value ErrorPageEnabled
+ Enables displaying the built-in error pages of Chromium. Enabled by default.
+ \value PluginsEnabled
+ Enables support for Pepper plugins, such as the Flash player. Disabled by default.
+ See also \l{Pepper Plugin API}. (Added in Qt 5.6)
+ \value FullScreenSupportEnabled
+ Enables fullscreen support in an application. Disabled by default. (Added in Qt 5.6)
+ \value ScreenCaptureEnabled
+ Enables screen capture in an application. Disabled by default. (Added in Qt 5.7)
+ \value WebGLEnabled
+ Enables support for HTML 5 WebGL. Enabled by default if available. (Added in Qt 5.7)
+ \value Accelerated2dCanvasEnabled
+ Specifies whether the HTML5 2D canvas should be a OpenGL framebuffer.
+ This makes many painting operations faster, but slows down pixel access. Enabled by default if available. (Added in Qt 5.7)
+ \value AutoLoadIconsForPage
+ Automatically downloads icons for web pages. Enabled by default. (Added in Qt 5.7)
+ \value TouchIconsEnabled
+ Enables support for touch icons and precomposed touch icons
+ Disabled by default. (Added in Qt 5.7)
+ \value FocusOnNavigationEnabled
+ Gives focus to the view associated with the page, whenever a navigation operation occurs
+ (load, stop, reload, reload and bypass cache, forward, backward, set content, and so
+ on).
+ Disabled by default. (Added in Qt 5.8)
+ \value PrintElementBackgrounds
+ Turns on printing of CSS backgrounds when printing a web page.
+ Enabled by default. (Added in Qt 5.8)
+ \value AllowRunningInsecureContent
+ By default, HTTPS pages cannot run JavaScript, CSS, plugins or
+ web-sockets from HTTP URLs. This provides an override to get
+ the old insecure behavior.
+ Disabled by default. (Added in Qt 5.8)
+ \value AllowGeolocationOnInsecureOrigins
+ Since Qt 5.7, only secure origins such as HTTPS have been able to request
+ Geolocation features. This provides an override to allow non secure
+ origins to access Geolocation again.
+ Disabled by default. (Added in Qt 5.9)
+ \value AllowWindowActivationFromJavaScript
+ Allows activating windows by using the window.focus() JavaScript
+ method. Disabled by default.
+ (Added in Qt 5.10)
+ \value ShowScrollBars
+ Shows scroll bars.
+ Enabled by default. (Added in Qt 5.10)
+ \value PlaybackRequiresUserGesture
+ Inhibits playback of media content until the user interacts with
+ 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.
+ Disabled by default. (Added in Qt 5.11)
+ \value WebRTCPublicInterfacesOnly
+ Limits WebRTC to public IP addresses only. When disabled WebRTC may also use
+ local network IP addresses, but remote hosts can also see your local network
+ IP address.
+ Disabled by default. (Added in Qt 5.11)
+ \value DnsPrefetchEnabled Specifies whether WebEngine will try to pre-fetch DNS entries to
+ speed up browsing.
+ Disabled by default. (Added in Qt 5.12)
+ \value PdfViewerEnabled Specifies that PDF documents will be opened in the internal PDF viewer
+ instead of being downloaded.
+ Enabled by default. (Added in Qt 5.13)
+*/
+
+/*!
+ \enum QWebEngineSettings::UnknownUrlSchemePolicy
+ \since Qt 5.11
+
+ This enum describes how navigation requests to URLs with unknown schemes are handled.
+
+ \value DisallowUnknownUrlSchemes
+ Disallows all navigation requests to URLs with unknown schemes.
+ \value AllowUnknownUrlSchemesFromUserInteraction
+ Allows navigation requests to URLs with unknown schemes that are issued from
+ user-interaction (like a mouse-click), whereas other navigation requests (for example
+ from JavaScript) are suppressed.
+ \value AllowAllUnknownUrlSchemes
+ Allows all navigation requests to URLs with unknown schemes.
+
+ \sa unknownUrlSchemePolicy setUnknownUrlSchemePolicy resetUnknownUrlSchemePolicy
+*/
+
+/*!
+ \fn void QWebEngineSettings::setFontSize(FontSize type, int size)
+ Sets the font size for \a type to \a size in pixels.
+*/
+
+/*!
+ \fn int QWebEngineSettings::fontSize(FontSize type) const
+ Returns the default font size for \a type in pixels.
+*/
+
+/*!
+ \fn void QWebEngineSettings::resetFontSize(FontSize type)
+ Resets the font size for \a type to the size specified in the profile that
+ the page belongs to.
+*/
+
+/*!
+ \fn void QWebEngineSettings::setDefaultTextEncoding(const QString& encoding)
+ Specifies the default text encoding system.
+
+ The value of \a encoding must be a string describing an encoding such as "utf-8" or
+ "iso-8859-1". If left empty, a default value will be used. For a more
+ extensive list of encoding names see \l{QTextCodec}.
+
+ \sa defaultTextEncoding()
+*/
+
+/*!
+ \fn QString QWebEngineSettings::defaultTextEncoding() const
+ Returns the default text encoding.
+
+ \sa setDefaultTextEncoding()
+*/
+
+/*!
+ \fn void QWebEngineSettings::setFontFamily(FontFamily which, const QString& family)
+ Sets the actual font family to \a family for the specified generic family,
+ \a which.
+*/
+
+/*!
+ \fn QString QWebEngineSettings::fontFamily(FontFamily which) const
+ Returns the actual font family for the specified generic font family,
+ \a which.
+*/
+
+/*!
+ \fn void QWebEngineSettings::resetFontFamily(FontFamily which)
+ Resets the actual font family specified by \a which to the one specified
+ in the profile that the page belongs to.
+*/
+
+/*!
+ \fn QWebEngineSettings::UnknownUrlSchemePolicy QWebEngineSettings::unknownUrlSchemePolicy() const
+ \since Qt 5.11
+ Returns the currently selected policy for handling navigation requests to URLs with
+ unknown schemes. Default is \l{QWebEngineSettings::AllowUnknownUrlSchemesFromUserInteraction}.
+ \sa setUnknownUrlSchemePolicy resetUnknownUrlSchemePolicy
+*/
+
+/*!
+ \fn void QWebEngineSettings::setUnknownUrlSchemePolicy(QWebEngineSettings::UnknownUrlSchemePolicy policy)
+ \since Qt 5.11
+ Sets the policy for handling navigation requests to URLs with unknown schemes to \a policy.
+ Default is \l{QWebEngineSettings::AllowUnknownUrlSchemesFromUserInteraction}.
+ \sa unknownUrlSchemePolicy resetUnknownUrlSchemePolicy
+*/
+
+/*!
+ \fn void QWebEngineSettings::resetUnknownUrlSchemePolicy()
+ \since Qt 5.11
+ Removes the policy for handling navigation requests to URLs with unknown schemes.
+ \sa unknownUrlSchemePolicy setUnknownUrlSchemePolicy
+*/
+
+/*!
+ \fn void QWebEngineSettings::setAttribute(WebAttribute attribute, bool on)
+
+ Enables or disables the specified \a attribute feature depending on the
+ value of \a on.
+*/
+
+/*!
+ \fn bool QWebEngineSettings::testAttribute(WebAttribute attribute) const
+
+ Returns \c true if \a attribute is enabled; otherwise returns \c false.
+*/
+
+/*!
+ \fn void QWebEngineSettings::resetAttribute(WebAttribute attribute)
+
+ Resets the setting of \a attribute to the value specified in the
+ profile that the page belongs to.
+*/