summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@theqtcompany.com>2016-03-21 10:52:33 +0100
committerLiang Qi <liang.qi@theqtcompany.com>2016-03-21 10:52:33 +0100
commitc2687689ba42d6021ae3f220d9fd240609489d3a (patch)
treee96236e1590d9197200c4c51a1a353197a9de385
parent6d5b9ba008bba20f1c0a1642af5f5b7182f3e890 (diff)
parent5c4ae298b0a3d75c4c5ea8aef0595914ab25607f (diff)
Merge remote-tracking branch 'origin/5.6.0' into 5.6
Conflicts: src/3rdparty Change-Id: Icbe7ea849b6ccdcee1ea1beccf86309ffb1ed578
-rw-r--r--dist/changes-5.6.02
m---------src/3rdparty0
-rw-r--r--src/process/process.pro18
-rw-r--r--src/webengine/api/qquickwebenginecertificateerror.cpp15
-rw-r--r--src/webengine/doc/images/qtwebengine-architecture.pngbin11325 -> 8098 bytes
-rw-r--r--src/webengine/doc/images/qtwebengine-model.pngbin0 -> 8656 bytes
-rw-r--r--src/webengine/doc/images/qtwebenginewidgets-model.pngbin0 -> 9749 bytes
-rw-r--r--src/webengine/doc/qtwebengine.qdocconf2
-rw-r--r--src/webengine/doc/src/qtwebengine-index.qdoc2
-rw-r--r--src/webengine/doc/src/qtwebengine-modules.qdoc2
-rw-r--r--src/webengine/doc/src/qtwebengine-overview.qdoc106
-rw-r--r--src/webengine/doc/src/qtwebengine-platform-notes.qdoc22
-rw-r--r--src/webengine/doc/src/webengineview.qdoc130
-rw-r--r--src/webenginewidgets/api/qwebenginepage.h6
-rw-r--r--src/webenginewidgets/doc/src/qtwebkitportingguide.qdoc13
-rw-r--r--src/webenginewidgets/doc/src/qwebenginepage_lgpl.qdoc50
-rw-r--r--src/webenginewidgets/doc/src/qwebengineview_lgpl.qdoc9
17 files changed, 298 insertions, 79 deletions
diff --git a/dist/changes-5.6.0 b/dist/changes-5.6.0
index f6495942a..a4999f320 100644
--- a/dist/changes-5.6.0
+++ b/dist/changes-5.6.0
@@ -21,7 +21,7 @@ information about a particular change.
- Chromium Snapshot:
* The Chromium version has been updated to 45.0.2554.101.
- * In addition security fixes from Chromium 46, 47 and 48 have been merged.
+ * In addition security fixes from Chromium 46 - 49 have been merged.
- General:
* The WebEngineCore module now contains shared C++ API.
diff --git a/src/3rdparty b/src/3rdparty
-Subproject 5c5c957c847e6f23ba010bb504920b472da57b0
+Subproject cbe3845eff59c2d1726ed3dc0f934f7f483a127
diff --git a/src/process/process.pro b/src/process/process.pro
index 6174e53bf..eab11189e 100644
--- a/src/process/process.pro
+++ b/src/process/process.pro
@@ -8,23 +8,9 @@ load(qt_build_paths)
contains(QT_CONFIG, qt_framework) {
# Deploy the QtWebEngineProcess app bundle into the QtWebEngineCore framework.
DESTDIR = $$MODULE_BASE_OUTDIR/lib/QtWebEngineCore.framework/Versions/5/Helpers
- # FIXME: remove the following workaround with proper rpath handling or
- # patching of the installed QtWebEngineProcess binary.
- # Since QtWebEngineCore is now built as a framework, we need to pull
- # in and fixup its dependencies as well.
+
QT += webenginecore
- QMAKE_POST_LINK = \
- "xcrun install_name_tool -change " \
- "`xcrun otool -X -L $(TARGET) | grep QtWebEngineCore | cut -d ' ' -f 1` " \
- "@executable_path/../../../../QtWebEngineCore " \
- "$(TARGET); "
- linked_frameworks = QtQuick QtQml QtNetwork QtCore QtGui QtWebChannel
- for (current_framework, linked_frameworks) {
- QMAKE_POST_LINK += "xcrun install_name_tool -change " \
- "`xcrun otool -X -L $(TARGET) | grep $${current_framework} | cut -d ' ' -f 1` " \
- "@executable_path/../../../../../../../$${current_framework}.framework/$${current_framework} " \
- "$(TARGET);"
- }
+ QMAKE_RPATHDIR += @loader_path/../../../../../../../../Frameworks
} else {
CONFIG -= app_bundle
win32: DESTDIR = $$MODULE_BASE_OUTDIR/bin
diff --git a/src/webengine/api/qquickwebenginecertificateerror.cpp b/src/webengine/api/qquickwebenginecertificateerror.cpp
index ea9b2bc11..7b06696d2 100644
--- a/src/webengine/api/qquickwebenginecertificateerror.cpp
+++ b/src/webengine/api/qquickwebenginecertificateerror.cpp
@@ -66,8 +66,19 @@ public:
\brief A utility type for ignoring certificate errors or rejecting erroneous certificates.
- This QML type contains information about a certificate error that occurred and provides a way
- to ignore the error or reject the certificate.
+ This QML type contains information about a certificate error that occurred. The \l error
+ property holds the reason that the error occurred and the \l description property holds a
+ short localized description of the error. The \l url property holds the URL that triggered
+ the error.
+
+ The certificate can be rejected by calling \l rejectCertificate, which will stop loading the
+ web engine request. By default, an invalid certificate will be automatically rejected.
+
+ The certificate error can be ignored by calling \l ignoreCertificateError, which will
+ resume loading the request.
+
+ It is possible to defer the decision of rejecting a certificate by calling \l defer,
+ which is useful when waiting for user input.
\sa WebEngineView::certificateError
*/
diff --git a/src/webengine/doc/images/qtwebengine-architecture.png b/src/webengine/doc/images/qtwebengine-architecture.png
index 37ca2da16..1c94d385f 100644
--- a/src/webengine/doc/images/qtwebengine-architecture.png
+++ b/src/webengine/doc/images/qtwebengine-architecture.png
Binary files differ
diff --git a/src/webengine/doc/images/qtwebengine-model.png b/src/webengine/doc/images/qtwebengine-model.png
new file mode 100644
index 000000000..0bbd556f1
--- /dev/null
+++ b/src/webengine/doc/images/qtwebengine-model.png
Binary files differ
diff --git a/src/webengine/doc/images/qtwebenginewidgets-model.png b/src/webengine/doc/images/qtwebenginewidgets-model.png
new file mode 100644
index 000000000..c334b84c9
--- /dev/null
+++ b/src/webengine/doc/images/qtwebenginewidgets-model.png
Binary files differ
diff --git a/src/webengine/doc/qtwebengine.qdocconf b/src/webengine/doc/qtwebengine.qdocconf
index 2fbdef93e..e151b78a4 100644
--- a/src/webengine/doc/qtwebengine.qdocconf
+++ b/src/webengine/doc/qtwebengine.qdocconf
@@ -69,7 +69,7 @@ exampledirs += . \
imagedirs += images
navigation.landingpage = "Qt WebEngine"
-navigation.cppclassespage = "Qt WebEngine C++ Classes"
+navigation.cppclassespage = "Qt WebEngine C++ Classes and Namespaces"
navigation.qmltypespage = "Qt WebEngine QML Types"
Cpp.ignoretokens += Q_WEBENGINE_EXPORT QWEBENGINEWIDGETS_EXPORT
diff --git a/src/webengine/doc/src/qtwebengine-index.qdoc b/src/webengine/doc/src/qtwebengine-index.qdoc
index e30976ef3..c064b035e 100644
--- a/src/webengine/doc/src/qtwebengine-index.qdoc
+++ b/src/webengine/doc/src/qtwebengine-index.qdoc
@@ -61,7 +61,7 @@
\section1 API References
\list
- \li \l{Qt WebEngine C++ Classes}
+ \li \l{Qt WebEngine C++ Classes and Namespaces}
\li \l{Qt WebEngine QML Types}
\endlist
*/
diff --git a/src/webengine/doc/src/qtwebengine-modules.qdoc b/src/webengine/doc/src/qtwebengine-modules.qdoc
index 451165b26..cf4d760f1 100644
--- a/src/webengine/doc/src/qtwebengine-modules.qdoc
+++ b/src/webengine/doc/src/qtwebengine-modules.qdoc
@@ -27,7 +27,7 @@
/*!
\page qtwebengine-modules.html
- \title Qt WebEngine C++ Classes
+ \title Qt WebEngine C++ Classes and Namespaces
\brief Provides functionality for rendering regions of dynamic web content.
\e {Qt WebEngine} provides functionality for rendering regions of dynamic web content.
diff --git a/src/webengine/doc/src/qtwebengine-overview.qdoc b/src/webengine/doc/src/qtwebengine-overview.qdoc
index 53ff4b462..9dc78a736 100644
--- a/src/webengine/doc/src/qtwebengine-overview.qdoc
+++ b/src/webengine/doc/src/qtwebengine-overview.qdoc
@@ -46,6 +46,13 @@
application to use Qt WebEngine widgets, see \l{Porting from Qt WebKit to Qt WebEngine}. For new
applications, we recommend using Qt Quick and the WebEngineView QML type.
+ For more information about the requirements for building Qt WebEngine from source on the
+ supported platforms and for other platform-specific information, see
+ \l{Qt WebEngine Platform Notes}.
+
+ The \l {Qt WebChannel} module can be used to create a bi-directional communication channel
+ between QObject objects on the C++ side and JavaScript on the QML side.
+
\section1 Qt WebEngine Architecture
\image qtwebengine-architecture.png
@@ -53,14 +60,38 @@
The functionality in Qt WebEngine is divided into the following modules:
\list
- \li \l{Qt WebEngine Widgets}, which provides a web browser engine and C++ classes to render
- web content and to interact with it
- \li \l{Qt WebEngine}, which provides QML types for rendering web content within a QML
- application
- \li \l{Qt WebEngine Core}, which provides common API used by Qt WebEngine and
- Qt WebEngine Widgets
+ \li \l{Qt WebEngine Widgets} for creating widget-based web applications
+ \li \l{Qt WebEngine} for creating Qt Quick based web applications
+ \li \l{Qt WebEngine Core} for interacting with Chromium
\endlist
+ Page rendering and JavaScript execution are separated from the GUI process into the Qt WebEngine
+ Process. It is a library that must be shipped with the application if the Qt libraries are
+ bundled into the application.
+
+ \section2 Qt WebEngine Widgets
+
+ \image qtwebenginewidgets-model.png
+
+ A \e {web engine view} is the main widget component of the Qt WebEngine module. It can be used
+ in various applications to load web content. Within a view, a \e {web engine page} holds a main
+ frame that is responsible for web content, the \e history of navigated links, and \e actions.
+ The view and page are quite similar, as they provide a set of common functions.
+
+ All pages belong to a \e {web engine profile} that contains shared \e settings, \e scripts, and
+ \e cookies. Profiles can be used to isolate pages from each other. A typical use case is a
+ dedicated profile for a \e {private browsing} mode, where no information is permanently saved.
+
+ \section2 Qt WebEngine
+
+ \image qtwebengine-model.png
+
+ The Qt WebEngine QML implementation contains the same elements as the C++ implementation,
+ except that there is no separately accessible web engine page. The supported page functionality
+ is integrated into the web engine view.
+
+ \section2 Qt WebEngine Core
+
The Qt WebEngine core is based on the \l {Chromium Project}. Chromium provides its own network
and painting engines and is developed tightly together with its dependent modules, and
therefore Qt WebEngine provides better and more reliable support for the latest HTML5
@@ -73,12 +104,32 @@
\l{https://chromium.googlesource.com/chromium/src/+/master/docs/chromium_browser_vs_google_chrome.md}{overview}
that is part of the documentation in the \l {Chromium Project} upstream source tree.
+ This version of Qt WebEngine is based on Chromium snapshot version 45.0.2554.101, with
+ additional security fixes from the 46, 47 and 48 branches of the \l {Chromium Project}.
+
+ \section2 Qt WebEngine Process
+
+ The Qt WebEngine Process renders web pages and executes JavaScript.
+
Chromium is tightly integrated to the \l{Qt Quick Scene Graph}{Qt Quick scene graph}, which is
based on OpenGL ES 2.0 or OpenGL 2.0 for its rendering. This provides you with one-pass
compositing of web content and all the Qt Quick UI. The integration to Chromium is transparent
to developers, who just work with Qt and JavaScript.
- To expose QObjects to JavaScript, developers can use the \l {Qt WebChannel} module.
+ The document object model (DOM) of a page is constructed when the document is ready, typically
+ when the page is completely loaded. Therefore, executing scripts as soon as a document is
+ created is not suitable for DOM operations, where one has to wait until the DOM is ready.
+
+ In addition, an injected script shares the same \e world as the other scripts executed on the
+ page, which might lead to conflicts. To avoid this, the Chromium API for
+ \e{Content Script Extensions} is implemented by \e {web engine script}. It specifies the
+ script to run, the injection point, and the world where the script is run. This enables
+ accessing the DOM to manipulate it within a world.
+
+ Because the render process is separated from the GUI process, they should ideally share an
+ OpenGL context to enable one process to access the resources uploaded by the other, such as
+ images or textures. However, some inter-process communication is needed for safety and
+ reliability, because it enables restarting a crashed process.
\section1 Embedding Web Content into Widget Based Applications
@@ -92,23 +143,48 @@
view->show();
\endcode
- An instance of QWebEngineView has one QWebEnginePage. QWebEnginePage provides access to the
- page's navigation history and the ability to run JavaScript code in the context of the page's
- main frame and enables customization of handlers for specific events like showing custom
- authentication dialogs.
+ An instance of QWebEngineView has one QWebEnginePage. QWebEnginePage can have a
+ QWebEngineHistory that provides access to the page's navigation history and several QAction
+ objects that apply actions on the web page. In addition, a QWebEnginePage has the ability to
+ run JavaScript code in the context of the page's main frame and to enable customization of
+ handlers for specific events like showing custom authentication dialogs.
+
+ Each QWebEnginePage belongs to a QWebEngineProfile that can have a QWebEngineSettings
+ for specifying page settings, a QWebEngineScriptCollection for running scripts on the page, and
+ a QWebEngineCookieStore for accessing the HTTP cookies of Chromium. A QWebEnginePage can also
+ directly point to a script collection or cookie store.
\section1 Embedding Web Content into Qt Quick Applications
- The WebEngineView QML type allows QML applications to render regions of dynamic web content. A
- \e{WebEngineView} type may share the screen with other QML types or encompass the full screen
- as specified within the QML application.
+ The WebEngineView QML type allows Qt Quick applications to render regions of dynamic web
+ content. A \e{WebEngineView} type may share the screen with other QML types or encompass the
+ full screen as specified within the Qt Quick application.
+
+ To make sure that OpenGL context can be shared between the GUI and render processes, the web
+ engine must be initialized by using \l QtWebEngine::initialize in the application main source
+ file, as illustrated by the following code snippet:
+
+ \code
+ int main(int argc, char **argv)
+ {
+ Application app(argc, argv);
+
+ QtWebEngine::initialize();
+
+ QQmlApplicationEngine appEngine;
+ appEngine.load(QUrl("qrc:/main.qml"));
+
+ return app.exec();
+ }
+ \endcode
An application can load pages into the WebEngineView, using either an URL or HTML string, and
navigate within session history. By default, links to different pages load within the same
WebEngineView object, but web sites may request them to be opened as a new tab, window, or
dialog.
- The following sample QML application loads a web page and responds to session history context:
+ The following sample QML application loads a web page using the \l{WebEngineView::}{url}
+ property:
\qml
import QtQuick 2.1
diff --git a/src/webengine/doc/src/qtwebengine-platform-notes.qdoc b/src/webengine/doc/src/qtwebengine-platform-notes.qdoc
index 1e0fb584d..e37817e0e 100644
--- a/src/webengine/doc/src/qtwebengine-platform-notes.qdoc
+++ b/src/webengine/doc/src/qtwebengine-platform-notes.qdoc
@@ -31,6 +31,19 @@
\brief Contains information about issues that are specific to the Qt WebEngine module.
+ \section1 Target Platforms
+
+ Qt WebEngine does try to support all \l{Supported Platforms} of Qt. However, due to
+ different requirements of Chromium this is not always possible. Known limitations are:
+
+ \list
+ \li Qt WebEngine currently supports only Windows, Linux, and OS X.
+
+ \li On Windows, Qt WebEngine only supports Windows Vista or newer as target platform.
+ Due to use of newer API in Chromium, Windows XP is not supported. WinRT is
+ not supported, either.
+ \endlist
+
\section1 Building Qt WebEngine from Source
The requirements for building Qt 5 modules from source are listed separately for each supported
@@ -72,11 +85,11 @@
The MIME type is important because it determines which embeds the plugin is used for.
- This process has been automated for the Adobe Flash Player Plugin.
+ This process has been automated for the Pepper Flash player plugin.
- \section2 Adobe Flash Player Plugin Support
+ \section2 Pepper Flash Player Plugin Support
- The Adobe Flash player plugin can be loaded automatically if it is installed in one of the
+ The Pepper Flash player plugin can be loaded automatically if it is installed in one of the
following locations, depending on the platform:
\list
@@ -97,7 +110,8 @@
\endcode
\endlist
- You can also load the Flash player from a specific location by using command line arguments:
+ You can also load the Pepper Flash player from a specific location by using command line
+ arguments:
\code
--ppapi-flash-path=./libpepflashplayer.so
diff --git a/src/webengine/doc/src/webengineview.qdoc b/src/webengine/doc/src/webengineview.qdoc
index 0ce2f77be..fc21480ad 100644
--- a/src/webengine/doc/src/webengineview.qdoc
+++ b/src/webengine/doc/src/webengineview.qdoc
@@ -34,11 +34,126 @@
may share the screen with other QML types, such as a TabView, or fill the screen, as specified
within the QML application.
- \section1 Rendering to OpenGL Surface
+ \section2 Initializing Web Engine
+
+ For the web engine view to be rendered, the web engine must be initialized by using
+ \l QtWebEngine::initialize in the application main source file, as illustrated by the
+ following code snippet:
+
+ \code
+ int main(int argc, char **argv)
+ {
+ Application app(argc, argv);
+
+ QtWebEngine::initialize();
+
+ QQmlApplicationEngine appEngine;
+ appEngine.load(QUrl("qrc:/main.qml"));
+
+ return app.exec();
+ }
+ \endcode
+
+ \section2 Loading Web Pages
+
+ An application can load pages into the WebEngineView, using either the \l url property or the
+ \l loadHtml method and navigate within the view's session history. The history is represented
+ by a WebEngineHistory data model that is held by the \l navigationHistory property.
+
+ The following sample QML application loads a web page using the \c url property:
+
+ \qml
+ import QtQuick 2.1
+ import QtQuick.Controls 1.1
+ import QtWebEngine 1.1
+
+ ApplicationWindow {
+ width: 1280
+ height: 720
+ visible: true
+ WebEngineView {
+ id: webview
+ url: "http://www.qt.io"
+ anchors.fill: parent
+ }
+ }
+ \endqml
+
+ The \l loadingChanged() signal is emitted when loading a page begins, ends, or fails. The
+ \l loading property holds whether the HTML page is currently loading and the load status is
+ reflected in the \l LoadStatus property.
+
+ The title of an HTML page can be accessed with the \l title property. Additionally, a web
+ page may specify an icon, which can be accessed using the \l icon property. The \l zoomFactor
+ property holds the overall size of the contents of the web page.
+
+ If a certificate error is raised while loading a web page, the \l certificateError() signal is
+ emitted. Certificate errors are handled by using the methods of the WebEngineCertificateError
+ type.
+
+ \section2 Interaction
+
+ By default, links to different pages load within the same WebEngineView object, but web sites
+ may request them to be opened as a new tab, window, or dialog. The \l newViewRequested() signal
+ is emitted when a request to load the page in a separate web engine view is issued. The
+ NewViewDestination property describes how the new view should be opened. In addition, the
+ WebEngineNewViewRequest utility type can be used to load web pages in separate web engine views.
+
+ The \l findText() method can be used to search for a string on a web page, using the options
+ described by \l FindFlags.
+
+ The \l setActiveFocusOnPress() method can be used to create a UI element that should not get
+ focus. This can be useful in a hybrid UI.
+
+ The \l linkHovered() signal is emitted when a mouse pointer passes over a link and thus
+ corresponds to the \c{mouseover} DOM event.
+
+ Actions, such as selecting and editing content, can be performed on a web page by using the
+ \l triggerWebAction() method. The available actions are described by the \l WebAction property.
+
+ The \l backgroundColorChanged() signal is emitted when the web page background color changes.
+
+ \section2 User Scripts
+
+ During the loading of a page, so called \e {user scripts} can be injected in the JavaScript
+ engine at different points. The script objects attached to the web engine view are held by the
+ \l userScripts property and injected by using the WebEngineScript type. Scripts can also be run
+ by using the runJavaScript() method in the same world as other scripts that are part of the
+ loaded site.
+
+ The \l webChannel property can be used to expose a WebChannel instance in the JavaScript context
+ of the page it is rendering as \c qt.webChannelTransport.
+
+ \section2 Fullscreen Mode
+
+ A web page can request through the JavaScript API to be loaded in fullscreen mode. The
+ \l fullScreenRequested() signal is emitted when the web page issues the request. The
+ WebEngineFullScreenRequest utility type can be used to toggle fullscreen requests. The
+ \l fullScreenCancelled method can be used to notify the browser engine when the windowing
+ system forces the application to leave fullscreen mode.
+
+ \section2 Profiles
+
+ Web engine views can be isolated from each other by using the WebEngineProfile type. A profile
+ contains settings, scripts, and the list of visited links shared by all views that belong to the
+ profile. For example, a dedicated profile could be created for a \e {private browsing} mode. The
+ current profile for the view is held by the \l profile property and the current settings are
+ held by the \l settings property. The settings are specified by using the WebEngineSettings
+ type.
+
+ \section2 Platform Features
+
+ Web pages can request access to platform features, such as geolocation or audio and video
+ capture devices. The \l featurePermissionRequested() signal is emitted when a web page requests
+ to make use of a resource. The supported platform features are described by the \l Feature
+ property. If users grant the permission, the \l grantFeaturePermission() method is used to set
+ it to \e granted.
+
+ \section2 Rendering to OpenGL Surface
When using a QQuickRenderControl to render a Qt Quick user interface to an OpenGL surface, the
WebEngineView type is not rendered correctly. The web engine view attempts to use a global
- OpenGL context created by \l QtWebEngine::initialize(), but there is no public API for accessing
+ OpenGL context created by \l QtWebEngine::initialize, but there is no public API for accessing
that context in order to share it with the \c QQuickRenderControl context.
To have the web engine view rendered correctly, it is possible to manually create a new
@@ -418,15 +533,8 @@
This signal is emitted when an invalid certificate error is raised while loading a given request.
- The certificate error can be rejected by calling WebEngineCertificateError::rejectCertificate,
- which will stop loading the request.
-
- The certificate error can be ignored by calling
- WebEngineCertificateError::ignoreCertificateError, which will resume loading the request.
-
- It is possible to defer the decision of rejecting the given certificate by calling
- WebEngineCertificateError::defer, which is useful when waiting for user input.
- By default, the invalid certificate will be automatically rejected.
+ The certificate error can be handled by using the methods of the WebEngineCertificateError
+ type.
The corresponding handler is \c onCertificateError.
diff --git a/src/webenginewidgets/api/qwebenginepage.h b/src/webenginewidgets/api/qwebenginepage.h
index 83faaf42e..811003dd0 100644
--- a/src/webenginewidgets/api/qwebenginepage.h
+++ b/src/webenginewidgets/api/qwebenginepage.h
@@ -37,9 +37,9 @@
#ifndef QWEBENGINEPAGE_H
#define QWEBENGINEPAGE_H
-#include <qtwebenginewidgetsglobal.h>
-#include <qwebenginecertificateerror.h>
-#include <qwebenginecallback.h>
+#include <QtWebEngineWidgets/qtwebenginewidgetsglobal.h>
+#include <QtWebEngineWidgets/qwebenginecertificateerror.h>
+#include <QtWebEngineCore/qwebenginecallback.h>
#include <QtCore/qobject.h>
#include <QtCore/qurl.h>
diff --git a/src/webenginewidgets/doc/src/qtwebkitportingguide.qdoc b/src/webenginewidgets/doc/src/qtwebkitportingguide.qdoc
index 065e5a18b..62d81733f 100644
--- a/src/webenginewidgets/doc/src/qtwebkitportingguide.qdoc
+++ b/src/webenginewidgets/doc/src/qtwebkitportingguide.qdoc
@@ -94,8 +94,17 @@
\section1 QWebFrame Has Been Merged into QWebEnginePage
- It is not possible to access sub-frames. Methods of the main QWebFrame are
- now available directly through the QWebEnginePage itself.
+ HTML frames can be used to divide web pages into several areas where the content can be
+ represented individually.
+
+ In Qt WebKit, QWebFrame represents a frame inside a web page. Each QWebPage object contains at
+ least one frame, the main frame, obtained using QWebPage::mainFrame(). Additional frames will
+ be created for the HTML \c <frame> element, which defines the appearance and contents of a
+ single frame, or the \c <iframe> element, which inserts a frame within a block of text.
+
+ In Qt WebEngine, frame handling has been merged into the QWebEnginePage class. All child frames
+ are now considered part of the content, and only accessible through JavaScript. Methods of the
+ QWebFrame class, such as \c load() are now available directly through the QWebEnginePage itself.
\b {Qt WebKit}
\code
diff --git a/src/webenginewidgets/doc/src/qwebenginepage_lgpl.qdoc b/src/webenginewidgets/doc/src/qwebenginepage_lgpl.qdoc
index aac5228d6..508c9f861 100644
--- a/src/webenginewidgets/doc/src/qwebenginepage_lgpl.qdoc
+++ b/src/webenginewidgets/doc/src/qwebenginepage_lgpl.qdoc
@@ -30,8 +30,8 @@
\since 5.4
\inmodule QtWebEngineWidgets
- A web engine page holds a main frame responsible for web content, the history
- of navigated links, and actions.
+ A \e {web engine page} holds the contents of an HTML document, the history of navigated
+ links, and actions.
QWebEnginePage's API is very similar to QWebEngineView, as you are still provided with
common functions like action() (known as
@@ -42,7 +42,7 @@
the HTML content readily available, you can use setHtml().
The QWebEnginePage class also offers methods to retrieve both the URL currently
- loaded by its main frame (see url()) as well as the URL originally requested
+ loaded by the page (see url()) as well as the URL originally requested
to be loaded (see requestedUrl()). These methods make possible the retrieval
of the URL before and after a DNS resolution or a redirection occurs during
the load process. The requestedUrl() also matches to the URL added to the
@@ -61,6 +61,22 @@
have been loaded completely, independent of script execution or page rendering.
Its argument, either \c true or \c false, indicates whether or not the load
operation succeeded.
+
+ An HTML document is loaded in a \e {main frame} within the web page. If it references
+ \e {child frames} (as defined by the \c <frame> or \c <iframe> elements), they are considered
+ part of the content. Child frames are individually accessible only through JavaScript.
+
+ Web sites define \e {security origin} for safely accessing each other's resources for
+ client-side scripting or databases. An origin consist of a host name, a scheme, and a port
+ number. For example, the sites \c http://www.example.com/my/page.html and
+ \c http://www.example.com/my/overview.html are allowed to share the same database or access
+ each other's documents when used in HTML frame sets and JavaScript. At the same time,
+ \c http://www.malicious.com/evil.html is prevented from accessing the resources of
+ \c http://www.example.com/, because they are of a different security origin.
+ By default, local schemes like \c file:// and \c qrc:// are considered to be in the same
+ security origin, and can access each other's resources. Local resources are by default
+ restricted from accessing remote content, which means that \c file:// will not be able to
+ access \c http://domain.com/foo.html.
*/
/*!
@@ -273,7 +289,7 @@
\since 5.5
This function is called upon receiving a request to navigate to the specified \a url by means of
the specified navigation type \a type. \a isMainFrame indicates whether the request corresponds
- to the main frame or a sub frame. If the function returns \c true, the navigation request is
+ to the main frame or a child frame. If the function returns \c true, the navigation request is
accepted and \c url is loaded. The default implementation accepts all navigation requests.
This function is called for absolute URLs that are prefixed with \c {http://} or \c {https://}
@@ -524,14 +540,14 @@
/*!
\property QWebEnginePage::title
- \brief the title of the frame as defined by the HTML &lt;title&gt; element
+ \brief the title of the page as defined by the HTML \c <title> element
\sa titleChanged()
*/
/*!
\property QWebEnginePage::url
- \brief the URL of the frame currently viewed
+ \brief the URL of the page currently viewed
Setting this property clears the view and loads the URL.
@@ -542,14 +558,14 @@
/*!
\property QWebEnginePage::iconUrl
- \brief the URL of the icon associated with the frame currently viewed.
+ \brief the URL of the icon associated with the page currently viewed.
\sa iconUrlChanged()
*/
/*!
\property QWebEnginePage::requestedUrl
- \brief the URL that was originally requested to be loaded by the frame
+ \brief the URL that was originally requested to be loaded by the page
that is currently viewed
\note The URL may differ from the one returned by url(), which is the actual
@@ -560,7 +576,7 @@
/*!
\fn void QWebEnginePage::load(const QUrl &url)
- Loads \a url into this frame.
+ Loads \a url into this page.
\note The view remains the same until enough data has arrived to display the new URL.
@@ -569,7 +585,7 @@
/*!
\fn void QWebEnginePage::setHtml(const QString &html, const QUrl &baseUrl)
- Sets the content of this page's main frame to \a html. \a baseUrl is optional and used to resolve relative
+ Sets the content of this page to \a html. \a baseUrl is optional and used to resolve relative
URLs in the document, such as referenced images or stylesheets.
The \a html is loaded immediately; external objects are loaded asynchronously.
@@ -585,7 +601,7 @@
This is a convenience function equivalent to setContent(html, "text/html", baseUrl).
- \note This method will not affect session or global history for the frame.
+ \note This method will not affect session or global history for the page.
\warning This function works only for HTML, for other mime types (such as XHTML and SVG)
setContent() should be used instead.
@@ -595,7 +611,7 @@
/*!
\fn void QWebEnginePage::setContent(const QByteArray &data, const QString &mimeType, const QUrl &baseUrl)
- Sets the content of this page's main frame to the specified content \a data. If the \a mimeType argument
+ Sets the content of this page to \a data. If the \a mimeType argument
is empty, it is currently assumed that the content is HTML but in future versions we may introduce
auto-detection.
@@ -603,14 +619,14 @@
The \a data is loaded immediately; external objects are loaded asynchronously.
- \note This method will not affect session or global history for the frame.
+ \note This method will not affect session or global history for the page.
\sa toHtml(), setHtml()
*/
/*!
\property QWebEnginePage::zoomFactor
- \brief the zoom factor for the main frame
+ \brief the zoom factor for the page content
*/
/*!
@@ -675,7 +691,7 @@
/*!
\fn void QWebEnginePage::titleChanged(const QString &title)
- This signal is emitted whenever the title of the main frame changes.
+ This signal is emitted whenever the title of the page changes.
The \a title string specifies the new title.
\sa title()
@@ -684,7 +700,7 @@
/*!
\fn void QWebEnginePage::urlChanged(const QUrl &url)
- This signal is emitted with the URL of the main frame when the main frame's title is
+ This signal is emitted with the URL of the page when the page title is
received. The new URL is specified by \a url.
\sa url()
@@ -693,7 +709,7 @@
/*!
\fn void QWebEnginePage::iconUrlChanged(const QUrl &url)
- This signal is emitted when the icon ("favicon") associated with the main frame is
+ This signal is emitted when the icon ("favicon") associated with the page is
found or changed. The new URL is specified by \a url.
diff --git a/src/webenginewidgets/doc/src/qwebengineview_lgpl.qdoc b/src/webenginewidgets/doc/src/qwebengineview_lgpl.qdoc
index 07fb5f1cd..d7ecdb246 100644
--- a/src/webenginewidgets/doc/src/qwebengineview_lgpl.qdoc
+++ b/src/webenginewidgets/doc/src/qwebengineview_lgpl.qdoc
@@ -311,7 +311,7 @@
/*!
\fn void QWebEngineView::titleChanged(const QString &title)
- This signal is emitted whenever the \a title of the main frame changes.
+ This signal is emitted whenever the \a title of the view changes.
\sa title()
*/
@@ -360,10 +360,9 @@
/*!
\fn void QWebEngineView::loadProgress(int progress)
- This signal is emitted every time an element in the web page
- completes loading and the overall loading progress advances.
-
- This signal tracks the progress of all child frames.
+ This signal is emitted every time an element in the web view
+ completes loading, such as an embedded image or a script. Therefore, it
+ tracks the collective progress of loading the web view.
The current value is provided by \a progress and scales from 0 to 100,
which is the default range of QProgressBar.