summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
m---------src/3rdparty0
-rw-r--r--src/core/access_token_store_qt.cpp7
-rw-r--r--src/core/access_token_store_qt.h6
-rw-r--r--src/core/api/core_api.pro4
-rw-r--r--src/core/api/qtwebenginecoreglobal.cpp11
-rw-r--r--src/core/authentication_dialog_controller_p.h3
-rw-r--r--src/core/browser_accessibility_manager_qt.cpp5
-rw-r--r--src/core/browser_accessibility_manager_qt.h15
-rw-r--r--src/core/browser_accessibility_qt.cpp4
-rw-r--r--src/core/browser_context_adapter.cpp21
-rw-r--r--src/core/browser_context_adapter.h5
-rw-r--r--src/core/browser_context_adapter_client.h8
-rw-r--r--src/core/browser_context_qt.cpp90
-rw-r--r--src/core/browser_context_qt.h45
-rw-r--r--src/core/certificate_error_controller.cpp3
-rw-r--r--src/core/certificate_error_controller.h3
-rw-r--r--src/core/chrome_qt.gyp58
-rw-r--r--src/core/chromium_gpu_helper.cpp7
-rw-r--r--src/core/chromium_overrides.cpp8
-rw-r--r--src/core/common/qt_messages.h3
-rw-r--r--src/core/common/user_script_data.h3
-rw-r--r--src/core/config/common.pri4
-rw-r--r--src/core/config/desktop_linux.pri4
-rw-r--r--src/core/config/embedded_linux.pri4
-rw-r--r--src/core/config/embedded_qnx.pri1
-rw-r--r--src/core/config/linux.pri19
-rw-r--r--src/core/config/mac_osx.pri8
-rw-r--r--src/core/config/windows.pri11
-rw-r--r--src/core/content_browser_client_qt.cpp138
-rw-r--r--src/core/content_browser_client_qt.h18
-rw-r--r--src/core/content_client_qt.cpp9
-rw-r--r--src/core/content_client_qt.h1
-rw-r--r--src/core/content_main_delegate_qt.cpp19
-rw-r--r--src/core/content_main_delegate_qt.h3
-rw-r--r--src/core/cookie_monster_delegate_qt.cpp70
-rw-r--r--src/core/cookie_monster_delegate_qt.h9
-rw-r--r--src/core/core_common.pri1
-rw-r--r--src/core/core_gyp_generator.pro63
-rw-r--r--src/core/core_module.pro8
-rw-r--r--src/core/delegated_frame_node.cpp129
-rw-r--r--src/core/delegated_frame_node.h7
-rw-r--r--src/core/desktop_screen_qt.cpp31
-rw-r--r--src/core/desktop_screen_qt.h20
-rw-r--r--src/core/dev_tools_http_handler_delegate_qt.cpp17
-rw-r--r--src/core/dev_tools_http_handler_delegate_qt.h2
-rw-r--r--src/core/doc/src/qtwebenginecore-index.qdoc1
-rw-r--r--src/core/doc/src/qtwebenginecore-module.qdoc1
-rw-r--r--src/core/download_manager_delegate_qt.cpp48
-rw-r--r--src/core/download_manager_delegate_qt.h4
-rw-r--r--src/core/file_picker_controller.cpp8
-rw-r--r--src/core/file_picker_controller.h8
-rw-r--r--src/core/gl_context_qt.cpp24
-rw-r--r--src/core/gl_context_qt.h6
-rw-r--r--src/core/gl_surface_qt.cpp88
-rw-r--r--src/core/gl_surface_qt.h2
-rw-r--r--src/core/global_descriptors_qt.h10
-rw-r--r--src/core/gyp_run.pro18
-rw-r--r--src/core/javascript_dialog_manager_qt.cpp10
-rw-r--r--src/core/javascript_dialog_manager_qt.h10
-rw-r--r--src/core/media_capture_devices_dispatcher.cpp62
-rw-r--r--src/core/media_capture_devices_dispatcher.h8
-rw-r--r--src/core/network_delegate_qt.cpp14
-rw-r--r--src/core/network_delegate_qt.h9
-rw-r--r--src/core/ozone_platform_eglfs.cpp26
-rw-r--r--src/core/ozone_platform_eglfs.h23
-rw-r--r--src/core/pdfium_printing_wrapper_qt.cpp231
-rw-r--r--src/core/pdfium_printing_wrapper_qt.h66
-rw-r--r--src/core/permission_manager_qt.cpp33
-rw-r--r--src/core/permission_manager_qt.h12
-rw-r--r--src/core/print_view_manager_base_qt.cpp5
-rw-r--r--src/core/print_view_manager_base_qt.h4
-rw-r--r--src/core/print_view_manager_qt.cpp34
-rw-r--r--src/core/print_view_manager_qt.h8
-rw-r--r--src/core/printing_message_filter_qt.cpp16
-rw-r--r--src/core/printing_message_filter_qt.h8
-rw-r--r--src/core/proxy_config_service_qt.cpp5
-rw-r--r--src/core/proxy_config_service_qt.h5
-rw-r--r--src/core/qtwebengine.gypi12
-rw-r--r--src/core/qtwebengine_extras.gypi17
-rw-r--r--src/core/render_widget_host_view_qt.cpp82
-rw-r--r--src/core/render_widget_host_view_qt.h28
-rw-r--r--src/core/render_widget_host_view_qt_delegate.h19
-rw-r--r--src/core/renderer/content_renderer_client_qt.cpp237
-rw-r--r--src/core/renderer/content_renderer_client_qt.h14
-rw-r--r--src/core/renderer/pepper/pepper_flash_clipboard_message_filter_qt.cpp401
-rw-r--r--src/core/renderer/pepper/pepper_flash_clipboard_message_filter_qt.h108
-rw-r--r--src/core/renderer/pepper/pepper_flash_renderer_host_qt.cpp77
-rw-r--r--src/core/renderer/pepper/pepper_renderer_host_factory_qt.cpp50
-rw-r--r--src/core/renderer/pepper/pepper_renderer_host_factory_qt.h2
-rw-r--r--src/core/renderer/render_frame_observer_qt.cpp20
-rw-r--r--src/core/renderer/render_frame_observer_qt.h12
-rw-r--r--src/core/renderer/render_view_observer_qt.cpp34
-rw-r--r--src/core/renderer/render_view_observer_qt.h7
-rw-r--r--src/core/renderer/user_resource_controller.cpp68
-rw-r--r--src/core/renderer/user_resource_controller.h19
-rw-r--r--src/core/renderer/web_channel_ipc_transport.cpp19
-rw-r--r--src/core/renderer/web_channel_ipc_transport.h13
-rw-r--r--src/core/renderer_host/pepper/pepper_flash_browser_host_qt.cpp (renamed from src/core/renderer/pepper/pepper_flash_browser_host_qt.cpp)0
-rw-r--r--src/core/renderer_host/pepper/pepper_flash_browser_host_qt.h (renamed from src/core/renderer/pepper/pepper_flash_browser_host_qt.h)0
-rw-r--r--src/core/renderer_host/pepper/pepper_host_factory_qt.cpp (renamed from src/core/renderer/pepper/pepper_host_factory_qt.cpp)20
-rw-r--r--src/core/renderer_host/pepper/pepper_host_factory_qt.h (renamed from src/core/renderer/pepper/pepper_host_factory_qt.h)2
-rw-r--r--src/core/renderer_host/pepper/pepper_isolated_file_system_message_filter.cpp (renamed from src/core/renderer/pepper/pepper_isolated_file_system_message_filter.cpp)0
-rw-r--r--src/core/renderer_host/pepper/pepper_isolated_file_system_message_filter.h (renamed from src/core/renderer/pepper/pepper_isolated_file_system_message_filter.h)0
-rw-r--r--src/core/renderer_host/resource_dispatcher_host_delegate_qt.cpp (renamed from src/core/resource_dispatcher_host_delegate_qt.cpp)3
-rw-r--r--src/core/renderer_host/resource_dispatcher_host_delegate_qt.h (renamed from src/core/resource_dispatcher_host_delegate_qt.h)8
-rw-r--r--src/core/renderer_host/user_resource_controller_host.cpp (renamed from src/core/user_resource_controller_host.cpp)0
-rw-r--r--src/core/renderer_host/user_resource_controller_host.h (renamed from src/core/user_resource_controller_host.h)0
-rw-r--r--src/core/renderer_host/web_channel_ipc_transport_host.cpp (renamed from src/core/web_channel_ipc_transport_host.cpp)0
-rw-r--r--src/core/renderer_host/web_channel_ipc_transport_host.h (renamed from src/core/web_channel_ipc_transport_host.h)2
-rw-r--r--src/core/resource_bundle_qt.cpp70
-rw-r--r--src/core/resource_context_qt.cpp3
-rw-r--r--src/core/resources/resources.gyp4
-rw-r--r--src/core/surface_factory_qt.cpp8
-rw-r--r--src/core/type_conversion.cpp2
-rw-r--r--src/core/type_conversion.h2
-rw-r--r--src/core/url_request_context_getter_qt.cpp73
-rw-r--r--src/core/url_request_context_getter_qt.h14
-rw-r--r--src/core/user_script.cpp105
-rw-r--r--src/core/user_script.h3
-rw-r--r--src/core/web_contents_adapter.cpp128
-rw-r--r--src/core/web_contents_adapter.h14
-rw-r--r--src/core/web_contents_adapter_client.h167
-rw-r--r--src/core/web_contents_adapter_p.h9
-rw-r--r--src/core/web_contents_delegate_qt.cpp13
-rw-r--r--src/core/web_contents_delegate_qt.h25
-rw-r--r--src/core/web_contents_view_qt.cpp26
-rw-r--r--src/core/web_engine_context.cpp31
-rw-r--r--src/core/web_engine_context.h18
-rw-r--r--src/core/web_engine_library_info.cpp82
-rw-r--r--src/core/web_engine_settings.cpp3
-rw-r--r--src/core/web_engine_settings.h2
-rw-r--r--src/core/web_engine_visited_links_manager.cpp1
-rw-r--r--src/core/web_event_factory.cpp556
-rw-r--r--src/core/yuv_video_node.cpp31
-rw-r--r--src/core/yuv_video_node.h9
-rw-r--r--src/process/process.pro6
-rw-r--r--src/src.pro13
-rw-r--r--src/tools/qwebengine_convert_dict/qwebengine_convert_dict.pro8
-rw-r--r--src/webengine/api/qquickwebenginecertificateerror.cpp7
-rw-r--r--src/webengine/api/qquickwebenginecertificateerror_p.h1
-rw-r--r--src/webengine/api/qquickwebenginecontextmenudata.cpp209
-rw-r--r--src/webengine/api/qquickwebenginecontextmenurequest.cpp274
-rw-r--r--src/webengine/api/qquickwebenginecontextmenurequest_p.h (renamed from src/webengine/api/qquickwebenginecontextmenudata_p.h)75
-rw-r--r--src/webengine/api/qquickwebenginedialogrequests.cpp856
-rw-r--r--src/webengine/api/qquickwebenginedialogrequests_p.h265
-rw-r--r--src/webengine/api/qquickwebenginedownloaditem.cpp27
-rw-r--r--src/webengine/api/qquickwebenginedownloaditem_p.h11
-rw-r--r--src/webengine/api/qquickwebenginedownloaditem_p_p.h1
-rw-r--r--src/webengine/api/qquickwebengineprofile.cpp104
-rw-r--r--src/webengine/api/qquickwebengineprofile.h9
-rw-r--r--src/webengine/api/qquickwebenginescript.cpp5
-rw-r--r--src/webengine/api/qquickwebenginesettings.cpp68
-rw-r--r--src/webengine/api/qquickwebenginesettings_p.h12
-rw-r--r--src/webengine/api/qquickwebengineview.cpp349
-rw-r--r--src/webengine/api/qquickwebengineview_p.h25
-rw-r--r--src/webengine/api/qquickwebengineview_p_p.h64
-rw-r--r--src/webengine/doc/qtwebengine.qdocconf2
-rw-r--r--src/webengine/doc/snippets/qtwebengine_build_snippet.qdoc8
-rw-r--r--src/webengine/doc/snippets/qtwebengine_webengineview_newviewrequested.qml10
-rw-r--r--src/webengine/doc/src/external-resources.qdoc25
-rw-r--r--src/webengine/doc/src/qtwebengine-3rdparty.qdoc15371
-rw-r--r--src/webengine/doc/src/qtwebengine-features.qdoc109
-rw-r--r--src/webengine/doc/src/qtwebengine-index.qdoc1
-rw-r--r--src/webengine/doc/src/qtwebengine-module.qdoc44
-rw-r--r--src/webengine/doc/src/qtwebengine-overview.qdoc11
-rw-r--r--src/webengine/doc/src/qtwebengine-platform-notes.qdoc8
-rw-r--r--src/webengine/doc/src/qtwebengine-qmlmodule.qdoc4
-rw-r--r--src/webengine/doc/src/qwebengine-licensing.qdoc2
-rw-r--r--src/webengine/doc/src/webengineview.qdoc96
-rw-r--r--src/webengine/plugin/dependencies.json7
-rw-r--r--src/webengine/plugin/experimental/experimental.pro13
-rw-r--r--src/webengine/plugin/experimental/plugin.cpp83
-rw-r--r--src/webengine/plugin/experimental/qmldir3
-rw-r--r--src/webengine/plugin/plugin.cpp36
-rw-r--r--src/webengine/plugin/plugin.pro2
-rw-r--r--src/webengine/plugin/plugins.qmltypes251
-rw-r--r--src/webengine/plugin/testsupport/plugin.cpp2
-rw-r--r--src/webengine/render_widget_host_view_qt_delegate_quick.cpp30
-rw-r--r--src/webengine/render_widget_host_view_qt_delegate_quick.h5
-rw-r--r--src/webengine/render_widget_host_view_qt_delegate_quickwindow.cpp17
-rw-r--r--src/webengine/render_widget_host_view_qt_delegate_quickwindow.h5
-rw-r--r--src/webengine/ui/AuthenticationDialog.qml16
-rw-r--r--src/webengine/ui/ColorDialog.qml2
-rw-r--r--src/webengine/ui/FilePicker.qml2
-rw-r--r--src/webengine/ui/Menu.qml2
-rw-r--r--src/webengine/ui/MessageBubble.qml52
-rw-r--r--src/webengine/ui/PromptDialog.qml34
-rw-r--r--src/webengine/ui/ToolTip.qml91
-rw-r--r--src/webengine/ui/qmldir2
-rw-r--r--src/webengine/ui/ui.pro5
-rw-r--r--src/webengine/ui2/AlertDialog.qml98
-rw-r--r--src/webengine/ui2/AuthenticationDialog.qml135
-rw-r--r--src/webengine/ui2/ConfirmDialog.qml111
-rw-r--r--src/webengine/ui2/Menu.qml57
-rw-r--r--src/webengine/ui2/MenuItem.qml44
-rw-r--r--src/webengine/ui2/MenuSeparator.qml42
-rw-r--r--src/webengine/ui2/PromptDialog.qml114
-rw-r--r--src/webengine/ui2/ToolTip.qml45
-rw-r--r--src/webengine/ui2/information.pngbin0 -> 254 bytes
-rw-r--r--src/webengine/ui2/qmldir2
-rw-r--r--src/webengine/ui2/question.pngbin0 -> 257 bytes
-rw-r--r--src/webengine/ui2/ui2.pro18
-rw-r--r--src/webengine/ui_delegates_manager.cpp235
-rw-r--r--src/webengine/ui_delegates_manager.h44
-rw-r--r--src/webengine/webengine.pro24
-rw-r--r--src/webenginewidgets/api/qwebenginecertificateerror.cpp2
-rw-r--r--src/webenginewidgets/api/qwebenginecertificateerror.h1
-rw-r--r--src/webenginewidgets/api/qwebenginecontextmenudata.cpp41
-rw-r--r--src/webenginewidgets/api/qwebenginecontextmenudata.h2
-rw-r--r--src/webenginewidgets/api/qwebenginedownloaditem.cpp32
-rw-r--r--src/webenginewidgets/api/qwebenginedownloaditem.h9
-rw-r--r--src/webenginewidgets/api/qwebenginedownloaditem_p.h1
-rw-r--r--src/webenginewidgets/api/qwebenginepage.cpp230
-rw-r--r--src/webenginewidgets/api/qwebenginepage.h18
-rw-r--r--src/webenginewidgets/api/qwebenginepage_p.h7
-rw-r--r--src/webenginewidgets/api/qwebengineprofile.cpp90
-rw-r--r--src/webenginewidgets/api/qwebengineprofile.h5
-rw-r--r--src/webenginewidgets/api/qwebenginescript.cpp3
-rw-r--r--src/webenginewidgets/api/qwebenginescriptcollection.cpp2
-rw-r--r--src/webenginewidgets/api/qwebenginesettings.cpp7
-rw-r--r--src/webenginewidgets/api/qwebenginesettings.h5
-rw-r--r--src/webenginewidgets/doc/snippets/qtwebenginewidgets_build_snippet.qdoc (renamed from src/webenginewidgets/doc/snippets/qtwebengine_build_snippet.qdoc)0
-rw-r--r--src/webenginewidgets/doc/src/qtwebenginewidgets-index.qdoc1
-rw-r--r--src/webenginewidgets/doc/src/qtwebenginewidgets-module.qdoc4
-rw-r--r--src/webenginewidgets/doc/src/qwebenginepage_lgpl.qdoc5
-rw-r--r--src/webenginewidgets/doc/src/qwebenginesettings_lgpl.qdoc13
-rw-r--r--src/webenginewidgets/doc/src/qwebengineview_lgpl.qdoc17
-rw-r--r--src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp183
-rw-r--r--src/webenginewidgets/render_widget_host_view_qt_delegate_widget.h25
-rw-r--r--src/webenginewidgets/webenginewidgets.pro2
230 files changed, 7015 insertions, 17784 deletions
diff --git a/src/3rdparty b/src/3rdparty
-Subproject 881a7672e23192eaf7e1ac2f94e086b560104f1
+Subproject f5a732820b31651bafc60cd64f85b85c7f82532
diff --git a/src/core/access_token_store_qt.cpp b/src/core/access_token_store_qt.cpp
index 6c4cbc610..5b8fe83f7 100644
--- a/src/core/access_token_store_qt.cpp
+++ b/src/core/access_token_store_qt.cpp
@@ -47,6 +47,7 @@
#include "base/message_loop/message_loop.h"
#include "base/strings/utf_string_conversions.h"
#include "content/public/browser/browser_thread.h"
+#include "content/public/browser/storage_partition.h"
#include "browser_context_qt.h"
#include "browser_context_adapter.h"
@@ -67,7 +68,7 @@ AccessTokenStoreQt::~AccessTokenStoreQt()
{
}
-void AccessTokenStoreQt::LoadAccessTokens(const LoadAccessTokensCallbackType& callback)
+void AccessTokenStoreQt::LoadAccessTokens(const LoadAccessTokensCallback& callback)
{
BrowserThread::PostTaskAndReply(BrowserThread::UI, FROM_HERE
, base::Bind(&AccessTokenStoreQt::performWorkOnUIThread, this)
@@ -76,10 +77,10 @@ void AccessTokenStoreQt::LoadAccessTokens(const LoadAccessTokensCallbackType& ca
void AccessTokenStoreQt::performWorkOnUIThread()
{
- m_systemRequestContext = WebEngineContext::current()->defaultBrowserContext()->browserContext()->GetRequestContext();
+ m_systemRequestContext = content::BrowserContext::GetDefaultStoragePartition(WebEngineContext::current()->defaultBrowserContext()->browserContext())->GetURLRequestContext();
}
-void AccessTokenStoreQt::respondOnOriginatingThread(const LoadAccessTokensCallbackType& callback)
+void AccessTokenStoreQt::respondOnOriginatingThread(const LoadAccessTokensCallback& callback)
{
callback.Run(m_accessTokenSet, m_systemRequestContext);
m_systemRequestContext = 0;
diff --git a/src/core/access_token_store_qt.h b/src/core/access_token_store_qt.h
index 0f45fd3a0..973f304c0 100644
--- a/src/core/access_token_store_qt.h
+++ b/src/core/access_token_store_qt.h
@@ -58,16 +58,16 @@ public:
AccessTokenStoreQt();
~AccessTokenStoreQt();
- virtual void LoadAccessTokens(const LoadAccessTokensCallbackType& request) Q_DECL_OVERRIDE;
+ virtual void LoadAccessTokens(const LoadAccessTokensCallback& request) Q_DECL_OVERRIDE;
virtual void SaveAccessToken(const GURL& serverUrl, const base::string16& accessToken) Q_DECL_OVERRIDE;
private:
void performWorkOnUIThread();
- void respondOnOriginatingThread(const LoadAccessTokensCallbackType& callback);
+ void respondOnOriginatingThread(const LoadAccessTokensCallback& callback);
net::URLRequestContextGetter *m_systemRequestContext;
- AccessTokenSet m_accessTokenSet;
+ AccessTokenMap m_accessTokenSet;
DISALLOW_COPY_AND_ASSIGN(AccessTokenStoreQt);
};
diff --git a/src/core/api/core_api.pro b/src/core/api/core_api.pro
index 6e2d606b2..37f8885bb 100644
--- a/src/core/api/core_api.pro
+++ b/src/core/api/core_api.pro
@@ -15,9 +15,7 @@ CONFIG -= create_prl
# Copy this logic from qt_module.prf so that the intermediate library can be
# created to the same rules as the final module linking in core_module.pro.
!host_build:if(win32|mac):!macx-xcode {
- contains(QT_CONFIG, simulator_and_device): CONFIG += simulator_and_device
- contains(QT_CONFIG, debug_and_release):CONFIG += debug_and_release
- contains(QT_CONFIG, build_all):CONFIG += build_all
+ qtConfig(debug_and_release): CONFIG += debug_and_release build_all
}
DEFINES += \
diff --git a/src/core/api/qtwebenginecoreglobal.cpp b/src/core/api/qtwebenginecoreglobal.cpp
index f5d1e6d39..072f27967 100644
--- a/src/core/api/qtwebenginecoreglobal.cpp
+++ b/src/core/api/qtwebenginecoreglobal.cpp
@@ -40,16 +40,20 @@
#include "qtwebenginecoreglobal_p.h"
#include <QGuiApplication>
-#include <QOpenGLContext>
+#ifndef QT_NO_OPENGL
+# include <QOpenGLContext>
+#endif
#include <QThread>
+#ifndef QT_NO_OPENGL
QT_BEGIN_NAMESPACE
Q_GUI_EXPORT void qt_gl_set_global_share_context(QOpenGLContext *context);
Q_GUI_EXPORT QOpenGLContext *qt_gl_global_share_context();
QT_END_NAMESPACE
+#endif
namespace QtWebEngineCore {
-
+#ifndef QT_NO_OPENGL
static QOpenGLContext *shareContext;
static void deleteShareContext()
@@ -58,6 +62,7 @@ static void deleteShareContext()
shareContext = 0;
}
+#endif
// ### Qt 6: unify this logic and Qt::AA_ShareOpenGLContexts.
// QtWebEngine::initialize was introduced first and meant to be called
// after the QGuiApplication creation, when AA_ShareOpenGLContexts fills
@@ -65,6 +70,7 @@ static void deleteShareContext()
QWEBENGINE_PRIVATE_EXPORT void initialize()
{
+#ifndef QT_NO_OPENGL
#ifdef Q_OS_WIN32
qputenv("QT_D3DCREATE_MULTITHREADED", "1");
#endif
@@ -100,5 +106,6 @@ QWEBENGINE_PRIVATE_EXPORT void initialize()
// Classes like QOpenGLWidget check for the attribute
app->setAttribute(Qt::AA_ShareOpenGLContexts);
+#endif // QT_NO_OPENGL
}
} // namespace QtWebEngineCore
diff --git a/src/core/authentication_dialog_controller_p.h b/src/core/authentication_dialog_controller_p.h
index 2acc588e1..af5d92530 100644
--- a/src/core/authentication_dialog_controller_p.h
+++ b/src/core/authentication_dialog_controller_p.h
@@ -41,7 +41,8 @@
#define AUTHENTICATION_DIALOG_CONTROLLER_P_H
#include "base/memory/ref_counted.h"
-#include "resource_dispatcher_host_delegate_qt.h"
+
+#include "renderer_host/resource_dispatcher_host_delegate_qt.h"
namespace QtWebEngineCore {
diff --git a/src/core/browser_accessibility_manager_qt.cpp b/src/core/browser_accessibility_manager_qt.cpp
index bd3c5e7d9..730786bbd 100644
--- a/src/core/browser_accessibility_manager_qt.cpp
+++ b/src/core/browser_accessibility_manager_qt.cpp
@@ -82,8 +82,9 @@ QAccessibleInterface *BrowserAccessibilityManagerQt::rootParentAccessible()
return QAccessible::queryAccessibleInterface(m_parentObject);
}
-void BrowserAccessibilityManagerQt::NotifyAccessibilityEvent(ui::AXEvent event_type,
- BrowserAccessibility* node)
+void BrowserAccessibilityManagerQt::NotifyAccessibilityEvent(BrowserAccessibilityEvent::Source source,
+ ui::AXEvent event_type,
+ BrowserAccessibility* node)
{
BrowserAccessibilityQt *iface = static_cast<BrowserAccessibilityQt*>(node);
diff --git a/src/core/browser_accessibility_manager_qt.h b/src/core/browser_accessibility_manager_qt.h
index 4ff9fb699..da50de9cb 100644
--- a/src/core/browser_accessibility_manager_qt.h
+++ b/src/core/browser_accessibility_manager_qt.h
@@ -59,15 +59,14 @@ public:
class BrowserAccessibilityManagerQt : public BrowserAccessibilityManager
{
public:
- BrowserAccessibilityManagerQt(
- QObject* parentObject,
- const ui::AXTreeUpdate& initialTree,
- BrowserAccessibilityDelegate* delegate,
- BrowserAccessibilityFactory* factory = new BrowserAccessibilityFactoryQt());
+ BrowserAccessibilityManagerQt(QObject* parentObject,
+ const ui::AXTreeUpdate& initialTree,
+ BrowserAccessibilityDelegate* delegate,
+ BrowserAccessibilityFactory* factory = new BrowserAccessibilityFactoryQt());
- void NotifyAccessibilityEvent(
- ui::AXEvent event_type,
- BrowserAccessibility* node) Q_DECL_OVERRIDE;
+ void NotifyAccessibilityEvent(BrowserAccessibilityEvent::Source source,
+ ui::AXEvent event_type,
+ BrowserAccessibility* node) Q_DECL_OVERRIDE;
QAccessibleInterface *rootParentAccessible();
diff --git a/src/core/browser_accessibility_qt.cpp b/src/core/browser_accessibility_qt.cpp
index fecbac111..30e6efc2e 100644
--- a/src/core/browser_accessibility_qt.cpp
+++ b/src/core/browser_accessibility_qt.cpp
@@ -418,7 +418,7 @@ QAccessible::State BrowserAccessibilityQt::state() const
state.expanded = true;
if (s & (1 << ui::AX_STATE_FOCUSABLE))
state.focusable = true;
- if (s & (1 << ui::AX_STATE_FOCUSED))
+ if (manager()->GetFocus() == this)
state.focused = true;
if (s & (1 << ui::AX_STATE_HASPOPUP))
state.hasPopup = true;
@@ -480,7 +480,7 @@ QStringList BrowserAccessibilityQt::actionNames() const
void BrowserAccessibilityQt::doAction(const QString &actionName)
{
if (actionName == QAccessibleActionInterface::setFocusAction())
- manager()->SetFocus(this, true);
+ manager()->SetFocus(*this);
}
QStringList BrowserAccessibilityQt::keyBindingsForAction(const QString &actionName) const
diff --git a/src/core/browser_context_adapter.cpp b/src/core/browser_context_adapter.cpp
index 24e2dc2c2..3396f73ef 100644
--- a/src/core/browser_context_adapter.cpp
+++ b/src/core/browser_context_adapter.cpp
@@ -41,17 +41,21 @@
#include "content/browser/web_contents/web_contents_impl.h"
#include "content/public/browser/browser_thread.h"
+
#include "browser_context_qt.h"
#include "content_client_qt.h"
#include "download_manager_delegate_qt.h"
#include "permission_manager_qt.h"
+#include "type_conversion.h"
#include "web_engine_context.h"
#include "web_engine_visited_links_manager.h"
#include "url_request_context_getter_qt.h"
-#include "user_resource_controller_host.h"
+#include "renderer_host/user_resource_controller_host.h"
#include "net/proxy/proxy_service.h"
+#include "components/keyed_service/content/browser_context_dependency_manager.h"
+
#include <QCoreApplication>
#include <QDir>
#include <QString>
@@ -78,6 +82,8 @@ BrowserContextAdapter::BrowserContextAdapter(bool offTheRecord)
, m_visitedLinksPolicy(TrackVisitedLinksOnDisk)
, m_httpCacheMaxSize(0)
{
+ WebEngineContext::current(); // Ensure the WebEngineContext has been initialized
+ content::BrowserContext::Initialize(m_browserContext.data(), toFilePath(dataPath()));
}
BrowserContextAdapter::BrowserContextAdapter(const QString &storageName)
@@ -89,12 +95,15 @@ BrowserContextAdapter::BrowserContextAdapter(const QString &storageName)
, m_visitedLinksPolicy(TrackVisitedLinksOnDisk)
, m_httpCacheMaxSize(0)
{
+ WebEngineContext::current(); // Ensure the WebEngineContext has been initialized
+ content::BrowserContext::Initialize(m_browserContext.data(), toFilePath(dataPath()));
}
BrowserContextAdapter::~BrowserContextAdapter()
{
if (m_downloadManagerDelegate)
content::BrowserThread::DeleteSoon(content::BrowserThread::UI, FROM_HERE, m_downloadManagerDelegate.take());
+ BrowserContextDependencyManager::GetInstance()->DestroyBrowserContextServices(m_browserContext.data());
}
void BrowserContextAdapter::setStorageName(const QString &storageName)
@@ -482,19 +491,19 @@ void BrowserContextAdapter::clearHttpCache()
m_browserContext->url_request_getter_->clearHttpCache();
}
-void BrowserContextAdapter::setSpellCheckLanguage(const QString &language)
+void BrowserContextAdapter::setSpellCheckLanguages(const QStringList &languages)
{
#if defined(ENABLE_SPELLCHECK)
- m_browserContext->setSpellCheckLanguage(language);
+ m_browserContext->setSpellCheckLanguages(languages);
#endif
}
-QString BrowserContextAdapter::spellCheckLanguage() const
+QStringList BrowserContextAdapter::spellCheckLanguages() const
{
#if defined(ENABLE_SPELLCHECK)
- return m_browserContext->spellCheckLanguage();
+ return m_browserContext->spellCheckLanguages();
#else
- return QString();
+ return QStringList();
#endif
}
diff --git a/src/core/browser_context_adapter.h b/src/core/browser_context_adapter.h
index a6e5a2a3e..39b9db61c 100644
--- a/src/core/browser_context_adapter.h
+++ b/src/core/browser_context_adapter.h
@@ -108,9 +108,8 @@ public:
QString httpUserAgent() const;
void setHttpUserAgent(const QString &userAgent);
- QStringList spellCheckLanguages(const QStringList &acceptLanguages);
- void setSpellCheckLanguage(const QString &language);
- QString spellCheckLanguage() const;
+ void setSpellCheckLanguages(const QStringList &language);
+ QStringList spellCheckLanguages() const;
void setSpellCheckEnabled(bool enabled);
bool isSpellCheckEnabled() const;
diff --git a/src/core/browser_context_adapter_client.h b/src/core/browser_context_adapter_client.h
index 2df8c21cb..faba08591 100644
--- a/src/core/browser_context_adapter_client.h
+++ b/src/core/browser_context_adapter_client.h
@@ -69,6 +69,13 @@ public:
MimeHtmlSaveFormat
};
+ enum DownloadType {
+ Attachment = 0,
+ DownloadAttribute,
+ UserRequested,
+ SavePage
+ };
+
struct DownloadItemInfo {
const quint32 id;
const QUrl url;
@@ -80,6 +87,7 @@ public:
QString path;
int savePageFormat;
bool accepted;
+ int downloadType;
};
virtual ~BrowserContextAdapterClient() { }
diff --git a/src/core/browser_context_qt.cpp b/src/core/browser_context_qt.cpp
index 1c326fb83..a6801e1d7 100644
--- a/src/core/browser_context_qt.cpp
+++ b/src/core/browser_context_qt.cpp
@@ -54,31 +54,31 @@
#include "content/public/browser/storage_partition.h"
#include "net/proxy/proxy_config_service.h"
-#if defined(ENABLE_SPELLCHECK)
#include "base/base_paths.h"
-#include "base/prefs/pref_member.h"
-#include "base/prefs/pref_service.h"
-#include "base/prefs/testing_pref_store.h"
-#include "base/prefs/pref_service.h"
-#include "base/prefs/pref_service_factory.h"
-#include "base/prefs/pref_registry_simple.h"
+#include "components/prefs/pref_member.h"
+#include "components/prefs/pref_service.h"
+#include "components/prefs/testing_pref_store.h"
+#include "components/prefs/pref_service.h"
+#include "components/prefs/pref_service_factory.h"
+#include "components/prefs/pref_registry_simple.h"
#include "components/user_prefs/user_prefs.h"
+#if defined(ENABLE_SPELLCHECK)
#include "chrome/common/pref_names.h"
#include "chrome/browser/spellchecker/spellcheck_service.h"
#endif
namespace QtWebEngineCore {
-#if defined(ENABLE_SPELLCHECK)
BrowserContextQt::BrowserContextQt(BrowserContextAdapter *adapter)
: m_adapter(adapter),
m_prefStore(new TestingPrefStore())
{
m_prefStore->SetInitializationCompleted();
- base::PrefServiceFactory factory;
+ PrefServiceFactory factory;
factory.set_user_prefs(m_prefStore);
scoped_refptr<PrefRegistrySimple> registry(new PrefRegistrySimple());
+#if defined(ENABLE_SPELLCHECK)
// Initial spellcheck settings
registry->RegisterListPref(prefs::kSpellCheckDictionaries, new base::ListValue());
registry->RegisterStringPref(prefs::kAcceptLanguages, std::string());
@@ -86,15 +86,10 @@ BrowserContextQt::BrowserContextQt(BrowserContextAdapter *adapter)
registry->RegisterBooleanPref(prefs::kSpellCheckUseSpellingService, false);
registry->RegisterBooleanPref(prefs::kEnableContinuousSpellcheck, false);
registry->RegisterBooleanPref(prefs::kEnableAutoSpellCorrect, false);
+#endif //ENABLE_SPELLCHECK
m_prefService = factory.Create(std::move(registry.get()));
user_prefs::UserPrefs::Set(this, m_prefService.get());
}
-#else
-BrowserContextQt::BrowserContextQt(BrowserContextAdapter *adapter)
- : m_adapter(adapter)
-{
-}
-#endif //ENABLE_SPELLCHECK
BrowserContextQt::~BrowserContextQt()
{
@@ -102,6 +97,16 @@ BrowserContextQt::~BrowserContextQt()
content::BrowserThread::DeleteSoon(content::BrowserThread::IO, FROM_HERE, resourceContext.release());
}
+PrefService* BrowserContextQt::GetPrefs()
+{
+ return m_prefService.get();
+}
+
+const PrefService* BrowserContextQt::GetPrefs() const
+{
+ return m_prefService.get();
+}
+
base::FilePath BrowserContextQt::GetPath() const
{
return toFilePath(m_adapter->dataPath());
@@ -122,24 +127,15 @@ net::URLRequestContextGetter *BrowserContextQt::GetRequestContext()
return url_request_getter_.get();
}
-net::URLRequestContextGetter *BrowserContextQt::GetRequestContextForRenderProcess(int)
-{
- return GetRequestContext();
-}
-
-net::URLRequestContextGetter *BrowserContextQt::GetMediaRequestContext()
-{
- return GetRequestContext();
-}
-
-net::URLRequestContextGetter *BrowserContextQt::GetMediaRequestContextForRenderProcess(int)
+net::URLRequestContextGetter *BrowserContextQt::CreateMediaRequestContext()
{
- return GetRequestContext();
+ return url_request_getter_.get();
}
-net::URLRequestContextGetter *BrowserContextQt::GetMediaRequestContextForStoragePartition(const base::FilePath&, bool)
+net::URLRequestContextGetter *BrowserContextQt::CreateMediaRequestContextForStoragePartition(const base::FilePath&, bool)
{
- return GetRequestContext();
+ Q_UNIMPLEMENTED();
+ return nullptr;
}
content::ResourceContext *BrowserContextQt::GetResourceContext()
@@ -177,7 +173,7 @@ content::SSLHostStateDelegate* BrowserContextQt::GetSSLHostStateDelegate()
return sslHostStateDelegate.get();
}
-scoped_ptr<content::ZoomLevelDelegate> BrowserContextQt::CreateZoomLevelDelegate(const base::FilePath&)
+std::unique_ptr<content::ZoomLevelDelegate> BrowserContextQt::CreateZoomLevelDelegate(const base::FilePath&)
{
return nullptr;
}
@@ -200,6 +196,15 @@ net::URLRequestContextGetter *BrowserContextQt::CreateRequestContext(content::Pr
return url_request_getter_.get();
}
+net::URLRequestContextGetter *BrowserContextQt::CreateRequestContextForStoragePartition(
+ const base::FilePath& partition_path, bool in_memory,
+ content::ProtocolHandlerMap* protocol_handlers,
+ content::URLRequestInterceptorScopedVector request_interceptors)
+{
+ Q_UNIMPLEMENTED();
+ return nullptr;
+}
+
#if defined(ENABLE_SPELLCHECK)
void BrowserContextQt::failedToLoadDictionary(const std::string &language)
{
@@ -208,18 +213,27 @@ void BrowserContextQt::failedToLoadDictionary(const std::string &language)
<< "Make sure that correct bdic file is in:" << toQt(WebEngineLibraryInfo::getPath(base::DIR_APP_DICTIONARIES).value());
}
-void BrowserContextQt::setSpellCheckLanguage(const QString &language)
+void BrowserContextQt::setSpellCheckLanguages(const QStringList &languages)
{
- base::ListValue dictionaries;
- dictionaries.AppendString(language.toStdString());
- m_prefService->Set(prefs::kSpellCheckDictionaries, dictionaries);
+ StringListPrefMember dictionaries_pref;
+ dictionaries_pref.Init(prefs::kSpellCheckDictionaries, m_prefService.get());
+ std::vector<std::string> dictionaries;
+ dictionaries.reserve(languages.size());
+ for (const auto &language : languages)
+ dictionaries.push_back(language.toStdString());
+ dictionaries_pref.SetValue(dictionaries);
}
-QString BrowserContextQt::spellCheckLanguage() const
+QStringList BrowserContextQt::spellCheckLanguages() const
{
- std::string dictionary;
- m_prefService->GetList(prefs::kSpellCheckDictionaries)->GetString(0, &dictionary);
- return QString::fromStdString(dictionary);
+ QStringList spellcheck_dictionaries;
+ for (const auto &value : *m_prefService->GetList(prefs::kSpellCheckDictionaries)) {
+ std::string dictionary;
+ if (value->GetAsString(&dictionary))
+ spellcheck_dictionaries.append(QString::fromStdString(dictionary));
+ }
+
+ return spellcheck_dictionaries;
}
void BrowserContextQt::setSpellCheckEnabled(bool enabled)
diff --git a/src/core/browser_context_qt.h b/src/core/browser_context_qt.h
index e2156f147..ca65552be 100644
--- a/src/core/browser_context_qt.h
+++ b/src/core/browser_context_qt.h
@@ -40,20 +40,18 @@
#ifndef BROWSER_CONTEXT_QT_H
#define BROWSER_CONTEXT_QT_H
-#include "content/public/browser/browser_context.h"
+#include "chrome/browser/profiles/profile.h"
#include "content/public/browser/content_browser_client.h"
#include "content/public/browser/resource_context.h"
#include "net/url_request/url_request_context.h"
#include <QtCore/qcompilerdetection.h> // Needed for Q_DECL_OVERRIDE
-#if defined(ENABLE_SPELLCHECK)
QT_BEGIN_NAMESPACE
class QStringList;
QT_END_NAMESPACE
class TestingPrefStore;
class PrefService;
-#endif
namespace QtWebEngineCore {
@@ -62,39 +60,50 @@ class PermissionManagerQt;
class SSLHostStateDelegateQt;
class URLRequestContextGetterQt;
-class BrowserContextQt : public content::BrowserContext
+class BrowserContextQt : public Profile
{
public:
explicit BrowserContextQt(BrowserContextAdapter *);
virtual ~BrowserContextQt();
+ // BrowserContext implementation:
virtual base::FilePath GetPath() const Q_DECL_OVERRIDE;
base::FilePath GetCachePath() const;
virtual bool IsOffTheRecord() const Q_DECL_OVERRIDE;
- virtual net::URLRequestContextGetter *GetRequestContext() Q_DECL_OVERRIDE;
- virtual net::URLRequestContextGetter *GetRequestContextForRenderProcess(int) Q_DECL_OVERRIDE;
- virtual net::URLRequestContextGetter *GetMediaRequestContext() Q_DECL_OVERRIDE;
- virtual net::URLRequestContextGetter *GetMediaRequestContextForRenderProcess(int) Q_DECL_OVERRIDE;
- virtual net::URLRequestContextGetter *GetMediaRequestContextForStoragePartition(const base::FilePath&, bool) Q_DECL_OVERRIDE;
+ net::URLRequestContextGetter *GetRequestContext();
+
+ virtual net::URLRequestContextGetter *CreateMediaRequestContext() Q_DECL_OVERRIDE;
+ virtual net::URLRequestContextGetter *CreateMediaRequestContextForStoragePartition(const base::FilePath& partition_path, bool in_memory) Q_DECL_OVERRIDE;
+
virtual content::ResourceContext *GetResourceContext() Q_DECL_OVERRIDE;
virtual content::DownloadManagerDelegate *GetDownloadManagerDelegate() Q_DECL_OVERRIDE;
virtual content::BrowserPluginGuestManager* GetGuestManager() Q_DECL_OVERRIDE;
virtual storage::SpecialStoragePolicy *GetSpecialStoragePolicy() Q_DECL_OVERRIDE;
virtual content::PushMessagingService* GetPushMessagingService() Q_DECL_OVERRIDE;
virtual content::SSLHostStateDelegate* GetSSLHostStateDelegate() Q_DECL_OVERRIDE;
- net::URLRequestContextGetter *CreateRequestContext(content::ProtocolHandlerMap *protocol_handlers, content::URLRequestInterceptorScopedVector request_interceptors);
- virtual scoped_ptr<content::ZoomLevelDelegate> CreateZoomLevelDelegate(const base::FilePath& partition_path) Q_DECL_OVERRIDE;
+ net::URLRequestContextGetter *CreateRequestContext(
+ content::ProtocolHandlerMap *protocol_handlers,
+ content::URLRequestInterceptorScopedVector request_interceptors) Q_DECL_OVERRIDE;
+ net::URLRequestContextGetter* CreateRequestContextForStoragePartition(
+ const base::FilePath& partition_path, bool in_memory,
+ content::ProtocolHandlerMap* protocol_handlers,
+ content::URLRequestInterceptorScopedVector request_interceptors) Q_DECL_OVERRIDE;
+ virtual std::unique_ptr<content::ZoomLevelDelegate> CreateZoomLevelDelegate(const base::FilePath& partition_path) Q_DECL_OVERRIDE;
virtual content::PermissionManager *GetPermissionManager() Q_DECL_OVERRIDE;
virtual content::BackgroundSyncController* GetBackgroundSyncController() Q_DECL_OVERRIDE;
+ // Profile implementation:
+ PrefService* GetPrefs() override;
+ const PrefService* GetPrefs() const override;
+
BrowserContextAdapter *adapter() { return m_adapter; }
#if defined(ENABLE_SPELLCHECK)
void failedToLoadDictionary(const std::string& language) override;
- void setSpellCheckLanguage(const QString &language);
- QString spellCheckLanguage() const;
+ void setSpellCheckLanguages(const QStringList &languages);
+ QStringList spellCheckLanguages() const;
void setSpellCheckEnabled(bool enabled);
bool isSpellCheckEnabled() const;
#endif
@@ -102,15 +111,13 @@ public:
private:
friend class ContentBrowserClientQt;
friend class WebContentsAdapter;
- scoped_ptr<content::ResourceContext> resourceContext;
+ std::unique_ptr<content::ResourceContext> resourceContext;
scoped_refptr<URLRequestContextGetterQt> url_request_getter_;
- scoped_ptr<PermissionManagerQt> permissionManager;
- scoped_ptr<SSLHostStateDelegateQt> sslHostStateDelegate;
+ std::unique_ptr<PermissionManagerQt> permissionManager;
+ std::unique_ptr<SSLHostStateDelegateQt> sslHostStateDelegate;
BrowserContextAdapter *m_adapter;
-#if defined(ENABLE_SPELLCHECK)
scoped_refptr<TestingPrefStore> m_prefStore;
- scoped_ptr<PrefService> m_prefService;
-#endif
+ std::unique_ptr<PrefService> m_prefService;
friend class BrowserContextAdapter;
DISALLOW_COPY_AND_ASSIGN(BrowserContextQt);
diff --git a/src/core/certificate_error_controller.cpp b/src/core/certificate_error_controller.cpp
index 65bba733a..18835a5c7 100644
--- a/src/core/certificate_error_controller.cpp
+++ b/src/core/certificate_error_controller.cpp
@@ -66,6 +66,7 @@ ASSERT_ENUMS_MATCH(CertificateErrorController::CertificateNonUniqueName, net::ER
ASSERT_ENUMS_MATCH(CertificateErrorController::CertificateWeakKey, net::ERR_CERT_WEAK_KEY)
ASSERT_ENUMS_MATCH(CertificateErrorController::CertificateNameConstraintViolation, net::ERR_CERT_NAME_CONSTRAINT_VIOLATION)
ASSERT_ENUMS_MATCH(CertificateErrorController::CertificateValidityTooLong, net::ERR_CERT_VALIDITY_TOO_LONG)
+ASSERT_ENUMS_MATCH(CertificateErrorController::CertificateTransparencyRequired, net::ERR_CERTIFICATE_TRANSPARENCY_REQUIRED)
ASSERT_ENUMS_MATCH(CertificateErrorController::CertificateErrorEnd, net::ERR_CERT_END)
void CertificateErrorControllerPrivate::accept(bool accepted)
@@ -174,6 +175,8 @@ QString CertificateErrorController::errorString() const
return getQStringForMessageId(IDS_CERT_ERROR_NAME_CONSTRAINT_VIOLATION_DESCRIPTION);
case CertificateValidityTooLong:
return getQStringForMessageId(IDS_CERT_ERROR_VALIDITY_TOO_LONG_DESCRIPTION);
+ case CertificateTransparencyRequired:
+ return getQStringForMessageId(IDS_CERT_ERROR_CERTIFICATE_TRANSPARENCY_REQUIRED_DESCRIPTION);
case CertificateUnableToCheckRevocation: // Deprecated in Chromium.
default:
break;
diff --git a/src/core/certificate_error_controller.h b/src/core/certificate_error_controller.h
index 27f18946f..554281644 100644
--- a/src/core/certificate_error_controller.h
+++ b/src/core/certificate_error_controller.h
@@ -71,8 +71,9 @@ public:
CertificateWeakKey = -211,
CertificateNameConstraintViolation = -212,
CertificateValidityTooLong = -213,
+ CertificateTransparencyRequired = -214,
- CertificateErrorEnd = -214 // not an error, just an enum boundary
+ CertificateErrorEnd = -215 // not an error, just an enum boundary
};
CertificateError error() const;
diff --git a/src/core/chrome_qt.gyp b/src/core/chrome_qt.gyp
index f2d7c5831..89f1fe188 100644
--- a/src/core/chrome_qt.gyp
+++ b/src/core/chrome_qt.gyp
@@ -2,8 +2,6 @@
'variables': {
'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/chrome',
'chrome_spellchecker_sources': [
- '<(DEPTH)/base/prefs/testing_pref_store.cc',
- '<(DEPTH)/base/prefs/testing_pref_store.h',
'<(DEPTH)/chrome/browser/spellchecker/feedback.cc',
'<(DEPTH)/chrome/browser/spellchecker/feedback.h',
'<(DEPTH)/chrome/browser/spellchecker/feedback_sender.cc',
@@ -63,6 +61,7 @@
'type': 'static_library',
'dependencies': [
'chrome_resources',
+ '<(chromium_src_dir)/components/components_resources.gyp:components_resources',
'<(chromium_src_dir)/components/components_strings.gyp:components_strings',
],
'include_dirs': [
@@ -70,43 +69,60 @@
'<(chromium_src_dir)',
'<(chromium_src_dir)/skia/config',
'<(chromium_src_dir)/third_party/skia/include/core',
- # Needed to include grit-generated files in localized_error.cc:
- '<(SHARED_INTERMEDIATE_DIR)/chrome',
- '<(SHARED_INTERMEDIATE_DIR)/components/strings',
],
'sources': [
'<(DEPTH)/chrome/browser/media/desktop_media_list.h',
'<(DEPTH)/chrome/browser/media/desktop_streams_registry.cc',
'<(DEPTH)/chrome/browser/media/desktop_streams_registry.h',
+ '<(DEPTH)/chrome/browser/profiles/profile.cc',
+ '<(DEPTH)/chrome/browser/profiles/profile.h',
'<(DEPTH)/chrome/common/chrome_switches.cc',
'<(DEPTH)/chrome/common/chrome_switches.h',
- '<(DEPTH)/chrome/common/localized_error.cc',
- '<(DEPTH)/chrome/common/localized_error.h',
+ '<(DEPTH)/components/prefs/testing_pref_store.cc',
+ '<(DEPTH)/components/prefs/testing_pref_store.h',
+ '<(DEPTH)/extensions/common/constants.cc',
+ '<(DEPTH)/extensions/common/constants.h',
+ '<(DEPTH)/extensions/common/url_pattern.cc',
+ '<(DEPTH)/extensions/common/url_pattern.h',
],
'conditions': [
+ ['OS == "win"', {
+ # crbug.com/167187 fix size_t to int truncations
+ 'msvs_disabled_warnings': [4267, ],
+ }],
+ ['enable_plugins==1', {
+ 'sources': [
+ '<(DEPTH)/chrome/browser/renderer_host/pepper/pepper_flash_clipboard_message_filter.cc',
+ '<(DEPTH)/chrome/browser/renderer_host/pepper/pepper_flash_clipboard_message_filter.h',
+ '<(DEPTH)/chrome/renderer/pepper/pepper_flash_font_file_host.cc',
+ '<(DEPTH)/chrome/renderer/pepper/pepper_flash_font_file_host.h',
+ '<(DEPTH)/chrome/renderer/pepper/pepper_shared_memory_message_filter.cc',
+ '<(DEPTH)/chrome/renderer/pepper/pepper_shared_memory_message_filter.h',
+ ],
+ }],
+ ['enable_pdf==1', {
+ 'dependencies': [
+ '<(chromium_src_dir)/pdf/pdf.gyp:pdf',
+ '<(chromium_src_dir)/components/components.gyp:pdf_renderer',
+ '<(chromium_src_dir)/components/components.gyp:pdf_browser',
+ ],
+ }],
['enable_spellcheck==1', {
'sources': [ '<@(chrome_spellchecker_sources)' ],
'include_dirs': [
- '<(chromium_src_dir)/third_party/WebKit',
+ '<(chromium_src_dir)/third_party/WebKit',
],
'dependencies': [
- '<(chromium_src_dir)/components/components.gyp:keyed_service_content',
- '<(chromium_src_dir)/components/components.gyp:keyed_service_core',
- '<(chromium_src_dir)/components/components.gyp:pref_registry',
- '<(chromium_src_dir)/components/components.gyp:user_prefs',
- '<(chromium_src_dir)/third_party/hunspell/hunspell.gyp:hunspell',
- '<(chromium_src_dir)/third_party/icu/icu.gyp:icui18n',
- '<(chromium_src_dir)/third_party/icu/icu.gyp:icuuc',
+ '<(chromium_src_dir)/chrome/tools/convert_dict/convert_dict.gyp:convert_dict',
+ '<(chromium_src_dir)/third_party/hunspell/hunspell.gyp:hunspell',
+ '<(chromium_src_dir)/third_party/icu/icu.gyp:icui18n',
+ '<(chromium_src_dir)/third_party/icu/icu.gyp:icuuc',
],
'defines': [
'__STDC_CONSTANT_MACROS',
'__STDC_FORMAT_MACROS',
],
'conditions': [
- ['OS == "win"', {
- # crbug.com/167187 fix size_t to int truncations
- 'msvs_disabled_warnings': [4267, ],
- }],
[ 'OS != "mac"', {
'sources/': [
['exclude', '_mac\\.(cc|cpp|mm?)$'],
@@ -116,6 +132,8 @@
'sources!': [
'<(DEPTH)/chrome/renderer/spellchecker/platform_spelling_engine.cc',
'<(DEPTH)/chrome/renderer/spellchecker/platform_spelling_engine.h',
+ '<(DEPTH)/chrome/browser/spellchecker/spellcheck_message_filter_platform.h',
+ '<(DEPTH)/chrome/browser/spellchecker/spellcheck_message_filter_platform_mac.cc',
],
}],
],
@@ -134,7 +152,7 @@
'<(DEPTH)/chrome/browser/printing/printer_query.h',
],
'dependencies': [
- '<(chromium_src_dir)/third_party/mojo/mojo_public.gyp:mojo_cpp_bindings',
+ '<(chromium_src_dir)/mojo/mojo_public.gyp:mojo_cpp_bindings',
],
'include_dirs': [
'<(chromium_src_dir)/extensions',
diff --git a/src/core/chromium_gpu_helper.cpp b/src/core/chromium_gpu_helper.cpp
index 349506dbd..d1133f5c2 100644
--- a/src/core/chromium_gpu_helper.cpp
+++ b/src/core/chromium_gpu_helper.cpp
@@ -50,13 +50,14 @@
#include "gpu/command_buffer/service/mailbox_manager.h"
#include "gpu/command_buffer/service/texture_manager.h"
-#include "content/common/gpu/gpu_channel_manager.h"
#include "content/gpu/gpu_child_thread.h"
+#include "gpu/ipc/service/gpu_channel_manager.h"
#ifdef Q_OS_QNX
#include "content/common/gpu/stream_texture_qnx.h"
#endif
+// FIXME: Try using content::GpuChildThread::current()
base::MessageLoop *gpu_message_loop()
{
return content::GpuChildThread::instance()->message_loop();
@@ -64,13 +65,13 @@ base::MessageLoop *gpu_message_loop()
gpu::SyncPointManager *sync_point_manager()
{
- content::GpuChannelManager *gpuChannelManager = content::GpuChildThread::instance()->ChannelManager();
+ gpu::GpuChannelManager *gpuChannelManager = content::GpuChildThread::instance()->ChannelManager();
return gpuChannelManager->sync_point_manager();
}
gpu::gles2::MailboxManager *mailbox_manager()
{
- content::GpuChannelManager *gpuChannelManager = content::GpuChildThread::instance()->ChannelManager();
+ gpu::GpuChannelManager *gpuChannelManager = content::GpuChildThread::instance()->ChannelManager();
return gpuChannelManager->mailbox_manager();
}
diff --git a/src/core/chromium_overrides.cpp b/src/core/chromium_overrides.cpp
index 18596c337..882f5b1dd 100644
--- a/src/core/chromium_overrides.cpp
+++ b/src/core/chromium_overrides.cpp
@@ -119,9 +119,9 @@ void RenderWidgetHostViewBase::GetDefaultScreenInfo(blink::WebScreenInfo* result
namespace content {
// content/common/font_list.h
-scoped_ptr<base::ListValue> GetFontList_SlowBlocking()
+std::unique_ptr<base::ListValue> GetFontList_SlowBlocking()
{
- scoped_ptr<base::ListValue> font_list(new base::ListValue);
+ std::unique_ptr<base::ListValue> font_list(new base::ListValue);
QFontDatabase database;
for (auto family : database.families()){
@@ -166,9 +166,9 @@ namespace net {
class SSLPrivateKey { };
class X509Certificate;
-scoped_ptr<SSLPrivateKey> FetchClientCertPrivateKey(X509Certificate* certificate)
+std::unique_ptr<SSLPrivateKey> FetchClientCertPrivateKey(X509Certificate* certificate)
{
- return scoped_ptr<SSLPrivateKey>();
+ return std::unique_ptr<SSLPrivateKey>();
}
} // namespace net
diff --git a/src/core/common/qt_messages.h b/src/core/common/qt_messages.h
index b8991a2b3..2c971aab2 100644
--- a/src/core/common/qt_messages.h
+++ b/src/core/common/qt_messages.h
@@ -16,6 +16,9 @@ IPC_STRUCT_TRAITS_BEGIN(UserScriptData)
IPC_STRUCT_TRAITS_MEMBER(injectForSubframes)
IPC_STRUCT_TRAITS_MEMBER(worldId)
IPC_STRUCT_TRAITS_MEMBER(scriptId)
+ IPC_STRUCT_TRAITS_MEMBER(globs)
+ IPC_STRUCT_TRAITS_MEMBER(excludeGlobs)
+ IPC_STRUCT_TRAITS_MEMBER(urlPatterns)
IPC_STRUCT_TRAITS_END()
diff --git a/src/core/common/user_script_data.h b/src/core/common/user_script_data.h
index 943d61798..8d98890e3 100644
--- a/src/core/common/user_script_data.h
+++ b/src/core/common/user_script_data.h
@@ -60,6 +60,9 @@ struct UserScriptData {
bool injectForSubframes;
uint worldId;
uint64_t scriptId;
+ std::vector<std::string> globs;
+ std::vector<std::string> excludeGlobs;
+ std::vector<std::string> urlPatterns;
};
QT_BEGIN_NAMESPACE
diff --git a/src/core/config/common.pri b/src/core/config/common.pri
index 5822bc589..01c942976 100644
--- a/src/core/config/common.pri
+++ b/src/core/config/common.pri
@@ -2,10 +2,10 @@
# Trigger Qt-specific build conditions.
GYP_CONFIG += use_qt=1
+# Enable printing. We enable preview because we use preview logic even if we don't support preview.
+GYP_CONFIG += enable_basic_printing=1 enable_print_preview=1
# We do not want to ship more external binary blobs, so let v8 embed its startup data.
GYP_CONFIG += v8_use_external_startup_data=0
-# Disable printing since we don't support it yet
-GYP_CONFIG += enable_basic_printing=1 enable_print_preview=0
# WebSpeech requires Google API keys and adds dependencies on speex and flac.
GYP_CONFIG += enable_web_speech=0
# We do not use or even include the extensions
diff --git a/src/core/config/desktop_linux.pri b/src/core/config/desktop_linux.pri
index de0fbbc6b..a72452b90 100644
--- a/src/core/config/desktop_linux.pri
+++ b/src/core/config/desktop_linux.pri
@@ -4,9 +4,11 @@ include(linux.pri)
GYP_CONFIG += \
desktop_linux=1 \
- enable_widevine=1
+ enable_widevine=1 \
+ enable_pdf=1
clang {
+ GYP_CONFIG += werror=
GYP_CONFIG += clang=1 host_clang=1 clang_use_chrome_plugins=0 make_clang_dir=/usr
linux-clang-libc++: GYP_CONFIG += use_system_libcxx=1
} else {
diff --git a/src/core/config/embedded_linux.pri b/src/core/config/embedded_linux.pri
index 4cb7d89fb..7a909f1e2 100644
--- a/src/core/config/embedded_linux.pri
+++ b/src/core/config/embedded_linux.pri
@@ -15,9 +15,10 @@ GYP_CONFIG += \
enable_google_now=0 \
enable_language_detection=0 \
enable_managed_users=0 \
+ enable_pdf=0 \
enable_plugin_installation=0 \
enable_plugins=0 \
- enable_printing=0 \
+ enable_print_preview=0 \
enable_session_service=0 \
enable_task_manager=0 \
enable_themes=0 \
@@ -38,5 +39,6 @@ GYP_CONFIG += \
use_x11=0 \
v8_use_snapshot=false \
want_separate_host_toolset=1 \
+ angle_enable_gl=0 \
WEBENGINE_CONFIG *= reduce_binary_size
diff --git a/src/core/config/embedded_qnx.pri b/src/core/config/embedded_qnx.pri
index c05e8bb59..3effdb816 100644
--- a/src/core/config/embedded_qnx.pri
+++ b/src/core/config/embedded_qnx.pri
@@ -5,6 +5,7 @@ include(common.pri)
GYP_CONFIG += \
disable_nacl=1 \
enable_basic_printing=0 \
+ enable_pdf=0 \
enable_plugins=0 \
enable_webrtc=0 \
use_ash=0 \
diff --git a/src/core/config/linux.pri b/src/core/config/linux.pri
index a318e170c..fc2b124fb 100644
--- a/src/core/config/linux.pri
+++ b/src/core/config/linux.pri
@@ -1,4 +1,5 @@
include(common.pri)
+QT_FOR_CONFIG += gui-private
# linux_use_bundled_gold currently relies on a hardcoded relative path from chromium/src/out/(Release|Debug)
# Disable it along with the -Wl,--threads flag just in case gold isn't installed on the system.
@@ -22,19 +23,24 @@ GYP_CONFIG += \
use_openssl=1
use?(nss) {
- GYP_CONFIG += use_nss_certs=1 \
+ GYP_CONFIG += \
+ use_nss_certs=1 \
+ use_nss_verifier=1 \
use_openssl_certs=0
} else {
- GYP_CONFIG += use_nss_certs=0 \
+ GYP_CONFIG += \
+ use_nss_certs=0 \
+ use_nss_verifier=0 \
use_openssl_certs=1
}
gcc:!clang: greaterThan(QT_GCC_MAJOR_VERSION, 5): GYP_CONFIG += no_delete_null_pointer_checks=1
-contains(QT_CONFIG, system-zlib): use?(system_minizip): GYP_CONFIG += use_system_zlib=1
-contains(QT_CONFIG, system-png): GYP_CONFIG += use_system_libpng=1
-contains(QT_CONFIG, system-jpeg): GYP_CONFIG += use_system_libjpeg=1
-contains(QT_CONFIG, system-harfbuzz): GYP_CONFIG += use_system_harfbuzz=1
+qtConfig(system-zlib): use?(system_minizip): GYP_CONFIG += use_system_zlib=1
+qtConfig(system-png): GYP_CONFIG += use_system_libpng=1
+qtConfig(system-jpeg): GYP_CONFIG += use_system_libjpeg=1
+qtConfig(system-harfbuzz): GYP_CONFIG += use_system_harfbuzz=1
+!qtConfig(glib): GYP_CONFIG += use_glib=0
contains(QT_CONFIG, pulseaudio) {
GYP_CONFIG += use_pulseaudio=1
} else {
@@ -45,7 +51,6 @@ contains(QT_CONFIG, alsa) {
} else {
GYP_CONFIG += use_alsa=0
}
-!contains(QT_CONFIG, glib): GYP_CONFIG += use_glib=0
use?(system_libevent): GYP_CONFIG += use_system_libevent=1
use?(system_libwebp): GYP_CONFIG += use_system_libwebp=1
use?(system_libsrtp): GYP_CONFIG += use_system_libsrtp=1
diff --git a/src/core/config/mac_osx.pri b/src/core/config/mac_osx.pri
index c447add4a..be037cbde 100644
--- a/src/core/config/mac_osx.pri
+++ b/src/core/config/mac_osx.pri
@@ -25,11 +25,17 @@ GYP_CONFIG += \
mac_deployment_target=\"$${QMAKE_MACOSX_DEPLOYMENT_TARGET}\" \
make_clang_dir=\"$${QMAKE_CLANG_DIR}\" \
clang_use_chrome_plugins=0 \
- enable_widevine=1
+ enable_widevine=1 \
+ enable_pdf=1
# Force touch API is used in 49-based Chromium, which is included starting with 10.10.3 SDK, so we
# disable the API usage if the SDK version is lower.
!isMinOSXSDKVersion(10, 10, 3): GYP_CONFIG += disable_force_touch=1
+# Pass a supported -fstack-protect flag depending on Xcode version.
+lessThan(QMAKE_XCODE_VERSION, 6.3) {
+ GYP_CONFIG += use_xcode_stack_protector_strong=0
+}
+
QMAKE_MAC_SDK_PATH = "$$eval(QMAKE_MAC_SDK.$${QMAKE_MAC_SDK}.path)"
exists($$QMAKE_MAC_SDK_PATH): GYP_CONFIG += mac_sdk_path=\"$${QMAKE_MAC_SDK_PATH}\"
diff --git a/src/core/config/windows.pri b/src/core/config/windows.pri
index a99bc5303..5b9551b5a 100644
--- a/src/core/config/windows.pri
+++ b/src/core/config/windows.pri
@@ -6,7 +6,8 @@ GYP_CONFIG += \
disable_nacl=1 \
remoting=0 \
use_ash=0 \
- enable_widevine=1
+ enable_widevine=1 \
+ enable_pdf=1
# Libvpx build needs additional search path on Windows.
GYP_ARGS += "-D qtwe_chromium_obj_dir=\"$$OUT_PWD/$$getConfigDir()/obj/$${getChromiumSrcDir()}\""
@@ -17,7 +18,7 @@ GYP_ARGS += "-D perl_exe=\"perl.exe\" -D bison_exe=\"bison.exe\" -D gperf_exe=\"
# Gyp's parallel processing is broken on Windows
GYP_ARGS += "--no-parallel"
-contains(QT_CONFIG, angle) {
+qtConfig(angle) {
CONFIG(release, debug|release) {
GYP_ARGS += "-D qt_egl_library=\"libEGL.lib\" -D qt_glesv2_library=\"libGLESv2.lib\""
} else {
@@ -56,9 +57,7 @@ msvc:contains(QT_ARCH, "i386"):!usingMSVC32BitCrossCompiler() {
}
msvc {
- equals(MSVC_VER, 12.0) {
- MSVS_VERSION = 2013
- } else:equals(MSVC_VER, 14.0) {
+ equals(MSVC_VER, 14.0) {
MSVS_VERSION = 2015
} else {
fatal("Visual Studio compiler version \"$$MSVC_VER\" is not supported by Qt WebEngine")
@@ -66,7 +65,7 @@ msvc {
GYP_ARGS += "-G msvs_version=$$MSVS_VERSION"
- isBuildingOnWin32(): GYP_ARGS += "-D windows_sdk_path=\"C:/Program Files/Windows Kits/8.1\""
+ isBuildingOnWin32(): GYP_ARGS += "-D windows_sdk_path=\"C:/Program Files/Windows Kits/10\""
} else {
fatal("Qt WebEngine for Windows can only be built with the Microsoft Visual Studio C++ compiler")
diff --git a/src/core/content_browser_client_qt.cpp b/src/core/content_browser_client_qt.cpp
index fd6bd1f86..c3800e9ff 100644
--- a/src/core/content_browser_client_qt.cpp
+++ b/src/core/content_browser_client_qt.cpp
@@ -39,14 +39,19 @@
#include "content_browser_client_qt.h"
+#include "base/memory/ptr_util.h"
#include "base/message_loop/message_loop.h"
#include "base/threading/thread_restrictions.h"
#if defined(ENABLE_SPELLCHECK)
#include "chrome/browser/spellchecker/spellcheck_message_filter.h"
+#if defined(USE_BROWSER_SPELLCHECKER)
+#include "chrome/browser/spellchecker/spellcheck_message_filter_platform.h"
+#endif
#endif
#include "content/browser/renderer_host/render_view_host_delegate.h"
#include "content/public/browser/browser_main_parts.h"
#include "content/public/browser/child_process_security_policy.h"
+#include "content/public/browser/geolocation_delegate.h"
#include "content/public/browser/client_certificate_delegate.h"
#include "content/public/browser/media_observer.h"
#include "content/public/browser/quota_permission_context.h"
@@ -59,7 +64,7 @@
#include "content/public/common/main_function_params.h"
#include "content/public/common/url_constants.h"
#include "ui/base/ui_base_switches.h"
-#include "ui/gfx/screen.h"
+#include "ui/display/screen.h"
#include "ui/gl/gl_context.h"
#include "ui/gl/gl_implementation.h"
#include "ui/gl/gl_share_group.h"
@@ -80,21 +85,28 @@
#if defined(ENABLE_BASIC_PRINTING)
#include "printing_message_filter_qt.h"
#endif // defined(ENABLE_BASIC_PRINTING)
-#include "resource_dispatcher_host_delegate_qt.h"
-#include "user_resource_controller_host.h"
+#include "renderer_host/resource_dispatcher_host_delegate_qt.h"
+#include "renderer_host/user_resource_controller_host.h"
#include "web_contents_delegate_qt.h"
#include "web_engine_context.h"
#include "web_engine_library_info.h"
+#if defined(Q_OS_LINUX)
+#include "global_descriptors_qt.h"
+#include "ui/base/resource/resource_bundle.h"
+#endif
+
#if defined(ENABLE_PLUGINS)
#include "content/public/browser/browser_ppapi_host.h"
#include "ppapi/host/ppapi_host.h"
-#include "renderer/pepper/pepper_host_factory_qt.h"
+#include "renderer_host/pepper/pepper_host_factory_qt.h"
#endif
#include <QGuiApplication>
#include <QLocale>
-#include <QOpenGLContext>
+#ifndef QT_NO_OPENGL
+# include <QOpenGLContext>
+#endif
#include <qpa/qplatformnativeinterface.h>
QT_BEGIN_NAMESPACE
@@ -212,9 +224,9 @@ private:
base::TimeTicks m_timerScheduledTime;
};
-scoped_ptr<base::MessagePump> messagePumpFactory()
+std::unique_ptr<base::MessagePump> messagePumpFactory()
{
- return scoped_ptr<base::MessagePump>(new MessagePumpForUIQt);
+ return base::WrapUnique(new MessagePumpForUIQt);
}
} // namespace
@@ -245,8 +257,9 @@ public:
int PreCreateThreads() Q_DECL_OVERRIDE
{
base::ThreadRestrictions::SetIOAllowed(true);
- // Like ChromeBrowserMainExtraPartsAura::PreCreateThreads does.
- gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, new DesktopScreenQt);
+ // Like ChromeBrowserMainExtraPartsViews::PreCreateThreads does.
+ display::Screen::SetScreenInstance(new DesktopScreenQt);
+
return 0;
}
@@ -254,16 +267,16 @@ private:
DISALLOW_COPY_AND_ASSIGN(BrowserMainPartsQt);
};
-class QtShareGLContext : public gfx::GLContext {
+class QtShareGLContext : public gl::GLContext {
public:
QtShareGLContext(QOpenGLContext *qtContext)
- : gfx::GLContext(0)
+ : gl::GLContext(0)
, m_handle(0)
{
QString platform = qApp->platformName().toLower();
QPlatformNativeInterface *pni = QGuiApplication::platformNativeInterface();
if (platform == QLatin1String("xcb")) {
- if (gfx::GetGLImplementation() == gfx::kGLImplementationEGLGLES2)
+ if (gl::GetGLImplementation() == gl::kGLImplementationEGLGLES2)
m_handle = pni->nativeResourceForContext(QByteArrayLiteral("eglcontext"), qtContext);
else
m_handle = pni->nativeResourceForContext(QByteArrayLiteral("glxcontext"), qtContext);
@@ -275,7 +288,7 @@ public:
|| platform == QLatin1String("wayland-egl"))
m_handle = pni->nativeResourceForContext(QByteArrayLiteral("eglcontext"), qtContext);
else if (platform == QLatin1String("windows")) {
- if (gfx::GetGLImplementation() == gfx::kGLImplementationEGLGLES2)
+ if (gl::GetGLImplementation() == gl::kGLImplementationEGLGLES2)
m_handle = pni->nativeResourceForContext(QByteArrayLiteral("eglContext"), qtContext);
else
m_handle = pni->nativeResourceForContext(QByteArrayLiteral("renderingcontext"), qtContext);
@@ -291,12 +304,12 @@ public:
virtual bool WasAllocatedUsingRobustnessExtension() { return false; }
// We don't care about the rest, this context shouldn't be used except for its handle.
- virtual bool Initialize(gfx::GLSurface *, gfx::GpuPreference) Q_DECL_OVERRIDE { Q_UNREACHABLE(); return false; }
- virtual bool MakeCurrent(gfx::GLSurface *) Q_DECL_OVERRIDE { Q_UNREACHABLE(); return false; }
- virtual void ReleaseCurrent(gfx::GLSurface *) Q_DECL_OVERRIDE { Q_UNREACHABLE(); }
- virtual bool IsCurrent(gfx::GLSurface *) Q_DECL_OVERRIDE { Q_UNREACHABLE(); return false; }
+ virtual bool Initialize(gl::GLSurface *, gl::GpuPreference) Q_DECL_OVERRIDE { Q_UNREACHABLE(); return false; }
+ virtual bool MakeCurrent(gl::GLSurface *) Q_DECL_OVERRIDE { Q_UNREACHABLE(); return false; }
+ virtual void ReleaseCurrent(gl::GLSurface *) Q_DECL_OVERRIDE { Q_UNREACHABLE(); }
+ virtual bool IsCurrent(gl::GLSurface *) Q_DECL_OVERRIDE { Q_UNREACHABLE(); return false; }
virtual void OnSetSwapInterval(int) Q_DECL_OVERRIDE { Q_UNREACHABLE(); }
- virtual scoped_refptr<gfx::GPUTimingClient> CreateGPUTimingClient() Q_DECL_OVERRIDE
+ virtual scoped_refptr<gl::GPUTimingClient> CreateGPUTimingClient() Q_DECL_OVERRIDE
{
return nullptr;
}
@@ -305,9 +318,9 @@ private:
void *m_handle;
};
-class ShareGroupQtQuick : public gfx::GLShareGroup {
+class ShareGroupQtQuick : public gl::GLShareGroup {
public:
- virtual gfx::GLContext* GetContext() Q_DECL_OVERRIDE { return m_shareContextQtQuick.get(); }
+ virtual gl::GLContext* GetContext() Q_DECL_OVERRIDE { return m_shareContextQtQuick.get(); }
virtual void AboutToAddFirstContext() Q_DECL_OVERRIDE;
private:
@@ -316,12 +329,14 @@ private:
void ShareGroupQtQuick::AboutToAddFirstContext()
{
+#ifndef QT_NO_OPENGL
// This currently has to be setup by ::main in all applications using QQuickWebEngineView with delegated rendering.
QOpenGLContext *shareContext = qt_gl_global_share_context();
if (!shareContext) {
qFatal("QWebEngine: OpenGL resource sharing is not set up in QtQuick. Please make sure to call QtWebEngine::initialize() in your main() function.");
}
m_shareContextQtQuick = make_scoped_refptr(new QtShareGLContext(shareContext));
+#endif
}
class QuotaPermissionContextQt : public content::QuotaPermissionContext {
@@ -353,7 +368,7 @@ ContentBrowserClientQt *ContentBrowserClientQt::Get()
content::BrowserMainParts *ContentBrowserClientQt::CreateBrowserMainParts(const content::MainFunctionParams&)
{
- m_browserMainParts = new BrowserMainPartsQt;
+ m_browserMainParts = new BrowserMainPartsQt();
return m_browserMainParts;
}
@@ -367,8 +382,12 @@ void ContentBrowserClientQt::RenderProcessWillLaunch(content::RenderProcessHost*
host->AddFilter(new BrowserMessageFilterQt(id));
#endif
#if defined(ENABLE_SPELLCHECK)
+ // SpellCheckMessageFilter is required for both Hunspell and Native configurations.
host->AddFilter(new SpellCheckMessageFilter(id));
#endif
+#if defined(Q_OS_MACOS) && defined(USE_BROWSER_SPELLCHECKER)
+ host->AddFilter(new SpellCheckMessageFilterPlatform(id));
+#endif
#if defined(ENABLE_BASIC_PRINTING)
host->AddFilter(new PrintingMessageFilterQt(host->GetID()));
#endif // defined(ENABLE_BASIC_PRINTING)
@@ -380,7 +399,7 @@ void ContentBrowserClientQt::ResourceDispatcherHostCreated()
content::ResourceDispatcherHost::Get()->SetDelegate(m_resourceDispatcherHostDelegate.get());
}
-gfx::GLShareGroup *ContentBrowserClientQt::GetInProcessGpuShareGroup()
+gl::GLShareGroup *ContentBrowserClientQt::GetInProcessGpuShareGroup()
{
if (!m_shareGroupQtQuick.get())
m_shareGroupQtQuick = new ShareGroupQtQuick;
@@ -398,14 +417,41 @@ void ContentBrowserClientQt::OverrideWebkitPrefs(content::RenderViewHost *rvh, c
static_cast<WebContentsDelegateQt*>(webContents->GetDelegate())->overrideWebPreferences(webContents, web_prefs);
}
-content::AccessTokenStore *ContentBrowserClientQt::CreateAccessTokenStore()
-{
- return new AccessTokenStoreQt;
-}
+namespace {
+
+// A provider of services needed by Geolocation.
+class GeolocationDelegateQt : public content::GeolocationDelegate {
+public:
+ GeolocationDelegateQt() {}
+ content::AccessTokenStore* CreateAccessTokenStore() final
+ {
+ return new AccessTokenStoreQt;
+ }
+
+ content::LocationProvider* OverrideSystemLocationProvider() final
+ {
+#ifdef QT_USE_POSITIONING
+ if (!m_location_provider)
+ m_location_provider = base::WrapUnique(new LocationProviderQt);
+ return m_location_provider.get();
+#else
+ return nullptr;
+#endif
+ }
-net::URLRequestContextGetter* ContentBrowserClientQt::CreateRequestContext(content::BrowserContext* browser_context, content::ProtocolHandlerMap* protocol_handlers, content::URLRequestInterceptorScopedVector request_interceptors)
+private:
+#ifdef QT_USE_POSITIONING
+ std::unique_ptr<LocationProviderQt> m_location_provider;
+#endif
+
+ DISALLOW_COPY_AND_ASSIGN(GeolocationDelegateQt);
+};
+
+} // anonymous namespace
+
+content::GeolocationDelegate *ContentBrowserClientQt::CreateGeolocationDelegate()
{
- return static_cast<BrowserContextQt*>(browser_context)->CreateRequestContext(protocol_handlers, std::move(request_interceptors));
+ return new GeolocationDelegateQt;
}
content::QuotaPermissionContext *ContentBrowserClientQt::CreateQuotaPermissionContext()
@@ -437,20 +483,11 @@ void ContentBrowserClientQt::AllowCertificateError(content::WebContents *webCont
void ContentBrowserClientQt::SelectClientCertificate(content::WebContents * /*webContents*/,
net::SSLCertRequestInfo * /*certRequestInfo*/,
- scoped_ptr<content::ClientCertificateDelegate> delegate)
+ std::unique_ptr<content::ClientCertificateDelegate> delegate)
{
delegate->ContinueWithCertificate(nullptr);
}
-content::LocationProvider *ContentBrowserClientQt::OverrideSystemLocationProvider()
-{
-#ifdef QT_USE_POSITIONING
- return new LocationProviderQt;
-#else
- return 0; // Leave it up to Chromium to figure something out.
-#endif
-}
-
std::string ContentBrowserClientQt::GetApplicationLocale()
{
return WebEngineLibraryInfo::getApplicationLocale();
@@ -470,11 +507,28 @@ void ContentBrowserClientQt::AppendExtraCommandLineSwitches(base::CommandLine* c
command_line->AppendSwitchASCII(switches::kLang, GetApplicationLocale());
}
+#if defined(Q_OS_LINUX)
+void ContentBrowserClientQt::GetAdditionalMappedFilesForChildProcess(const base::CommandLine& command_line, int child_process_id, content::FileDescriptorInfo* mappings)
+{
+ const std::string &locale = GetApplicationLocale();
+ const base::FilePath &locale_file_path = ui::ResourceBundle::GetSharedInstance().GetLocaleFilePath(locale, true);
+ if (locale_file_path.empty())
+ return;
+
+ // Open pak file of the current locale in the Browser process and pass its file descriptor to the sandboxed
+ // Renderer Process. FileDescriptorInfo is responsible for closing the file descriptor.
+ int flags = base::File::FLAG_OPEN | base::File::FLAG_READ;
+ base::File locale_file = base::File(locale_file_path, flags);
+ mappings->Transfer(kWebEngineLocale, base::ScopedFD(locale_file.TakePlatformFile()));
+}
+#endif
+
#if defined(ENABLE_PLUGINS)
- void ContentBrowserClientQt::DidCreatePpapiPlugin(content::BrowserPpapiHost* browser_host) {
- browser_host->GetPpapiHost()->AddHostFactoryFilter(
- scoped_ptr<ppapi::host::HostFactory>(new QtWebEngineCore::PepperHostFactoryQt(browser_host)));
- }
+void ContentBrowserClientQt::DidCreatePpapiPlugin(content::BrowserPpapiHost* browser_host)
+{
+ browser_host->GetPpapiHost()->AddHostFactoryFilter(
+ base::WrapUnique(new QtWebEngineCore::PepperHostFactoryQt(browser_host)));
+}
#endif
content::DevToolsManagerDelegate* ContentBrowserClientQt::GetDevToolsManagerDelegate()
diff --git a/src/core/content_browser_client_qt.h b/src/core/content_browser_client_qt.h
index 2b023db5f..47b880643 100644
--- a/src/core/content_browser_client_qt.h
+++ b/src/core/content_browser_client_qt.h
@@ -41,9 +41,7 @@
#define CONTENT_BROWSER_CLIENT_QT_H
#include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
#include "content/public/browser/content_browser_client.h"
-#include "third_party/WebKit/public/platform/modules/notifications/WebNotificationPermission.h"
#include <QtCore/qcompilerdetection.h> // Needed for Q_DECL_OVERRIDE
@@ -68,7 +66,7 @@ class WebContents;
struct MainFunctionParams;
}
-namespace gfx {
+namespace gl {
class GLShareGroup;
}
@@ -87,9 +85,9 @@ public:
virtual content::BrowserMainParts* CreateBrowserMainParts(const content::MainFunctionParams&) Q_DECL_OVERRIDE;
virtual void RenderProcessWillLaunch(content::RenderProcessHost* host) Q_DECL_OVERRIDE;
virtual void ResourceDispatcherHostCreated() Q_DECL_OVERRIDE;
- virtual gfx::GLShareGroup* GetInProcessGpuShareGroup() Q_DECL_OVERRIDE;
+ virtual gl::GLShareGroup* GetInProcessGpuShareGroup() Q_DECL_OVERRIDE;
virtual content::MediaObserver* GetMediaObserver() Q_DECL_OVERRIDE;
- virtual content::AccessTokenStore* CreateAccessTokenStore() Q_DECL_OVERRIDE;
+ virtual content::GeolocationDelegate* CreateGeolocationDelegate() Q_DECL_OVERRIDE;
virtual content::QuotaPermissionContext *CreateQuotaPermissionContext() Q_DECL_OVERRIDE;
virtual void OverrideWebkitPrefs(content::RenderViewHost *, content::WebPreferences *) Q_DECL_OVERRIDE;
virtual void AllowCertificateError(content::WebContents* web_contents,
@@ -104,22 +102,24 @@ public:
content::CertificateRequestResultType* result) Q_DECL_OVERRIDE;
virtual void SelectClientCertificate(content::WebContents* web_contents,
net::SSLCertRequestInfo* cert_request_info,
- scoped_ptr<content::ClientCertificateDelegate> delegate) Q_DECL_OVERRIDE;
- content::LocationProvider* OverrideSystemLocationProvider() Q_DECL_OVERRIDE;
+ std::unique_ptr<content::ClientCertificateDelegate> delegate) Q_DECL_OVERRIDE;
content::DevToolsManagerDelegate *GetDevToolsManagerDelegate() Q_DECL_OVERRIDE;
- virtual net::URLRequestContextGetter *CreateRequestContext(content::BrowserContext *browser_context, content::ProtocolHandlerMap *protocol_handlers, content::URLRequestInterceptorScopedVector request_interceptorss) Q_DECL_OVERRIDE;
virtual std::string GetApplicationLocale() Q_DECL_OVERRIDE;
std::string GetAcceptLangs(content::BrowserContext* context) Q_DECL_OVERRIDE;
virtual void AppendExtraCommandLineSwitches(base::CommandLine* command_line, int child_process_id) Q_DECL_OVERRIDE;
+#if defined(Q_OS_LINUX)
+ virtual void GetAdditionalMappedFilesForChildProcess(const base::CommandLine& command_line, int child_process_id, content::FileDescriptorInfo* mappings) Q_DECL_OVERRIDE;
+#endif
+
#if defined(ENABLE_PLUGINS)
virtual void DidCreatePpapiPlugin(content::BrowserPpapiHost* browser_host) Q_DECL_OVERRIDE;
#endif
private:
BrowserMainPartsQt* m_browserMainParts;
- scoped_ptr<ResourceDispatcherHostDelegateQt> m_resourceDispatcherHostDelegate;
+ std::unique_ptr<ResourceDispatcherHostDelegateQt> m_resourceDispatcherHostDelegate;
scoped_refptr<ShareGroupQtQuick> m_shareGroupQtQuick;
};
diff --git a/src/core/content_client_qt.cpp b/src/core/content_client_qt.cpp
index 2afd8c3ae..5d51f65aa 100644
--- a/src/core/content_client_qt.cpp
+++ b/src/core/content_client_qt.cpp
@@ -92,8 +92,6 @@ const char kPpapiFlashVersion[] = "ppapi-flash-version";
const char kPpapiWidevinePath[] = "ppapi-widevine-path";
}
-static const base::FilePath::CharType kWidevineCdmBaseDirectory[] = FILE_PATH_LITERAL("WidevineCDM");
-
static const char kWidevineCdmPluginExtension[] = "";
static const int32_t kWidevineCdmPluginPermissions = ppapi::PERMISSION_DEV
@@ -248,11 +246,9 @@ void AddPepperWidevine(std::vector<content::PepperPluginInfo>* plugins)
// Add the supported codecs as if they came from the component manifest.
std::vector<std::string> codecs;
- codecs.push_back(kCdmSupportedCodecVorbis);
codecs.push_back(kCdmSupportedCodecVp8);
codecs.push_back(kCdmSupportedCodecVp9);
#if defined(USE_PROPRIETARY_CODECS)
- codecs.push_back(kCdmSupportedCodecAac);
codecs.push_back(kCdmSupportedCodecAvc1);
#endif // defined(USE_PROPRIETARY_CODECS)
std::string codec_string =
@@ -297,6 +293,11 @@ base::StringPiece ContentClientQt::GetDataResource(int resource_id, ui::ScaleFac
return ResourceBundle::GetSharedInstance().GetRawDataResourceForScale(resource_id, scale_factor);
}
+base::RefCountedMemory *ContentClientQt::GetDataResourceBytes(int resource_id) const
+{
+ return ResourceBundle::GetSharedInstance().LoadDataResourceBytes(resource_id);
+}
+
base::string16 ContentClientQt::GetLocalizedString(int message_id) const
{
return l10n_util::GetStringUTF16(message_id);
diff --git a/src/core/content_client_qt.h b/src/core/content_client_qt.h
index 6a5584cc7..4fd539bf3 100644
--- a/src/core/content_client_qt.h
+++ b/src/core/content_client_qt.h
@@ -56,6 +56,7 @@ public:
#endif
virtual base::StringPiece GetDataResource(int, ui::ScaleFactor) const Q_DECL_OVERRIDE;
+ virtual base::RefCountedMemory* GetDataResourceBytes(int resource_id) const Q_DECL_OVERRIDE;
virtual std::string GetUserAgent() const Q_DECL_OVERRIDE { return getUserAgent(); }
virtual base::string16 GetLocalizedString(int message_id) const Q_DECL_OVERRIDE;
virtual std::string GetProduct() const Q_DECL_OVERRIDE;
diff --git a/src/core/content_main_delegate_qt.cpp b/src/core/content_main_delegate_qt.cpp
index 8bd07ef75..095e54caa 100644
--- a/src/core/content_main_delegate_qt.cpp
+++ b/src/core/content_main_delegate_qt.cpp
@@ -59,7 +59,9 @@
#include "base/cpu.h"
#endif
-#include <QLocale>
+#if defined(OS_LINUX)
+#include "ui/base/ui_base_switches.h"
+#endif
namespace QtWebEngineCore {
@@ -110,6 +112,12 @@ void ContentMainDelegateQt::PreSandboxStartup()
logging::LoggingSettings settings;
settings.logging_dest = DetermineLogMode(*parsedCommandLine);
logging::InitLogging(settings);
+ // view the logs with process/thread IDs and timestamps
+ logging::SetLogItems(true, //enable_process_id
+ true, //enable_thread_id
+ true, //enable_timestamp
+ false //enable_tickcount
+ );
if (logging::GetMinLogLevel() >= logging::LOG_INFO) {
if (parsedCommandLine->HasSwitch(switches::kLoggingLevel)) {
@@ -129,6 +137,15 @@ content::ContentBrowserClient *ContentMainDelegateQt::CreateContentBrowserClient
content::ContentRendererClient *ContentMainDelegateQt::CreateContentRendererClient()
{
+#if defined(OS_LINUX)
+ base::CommandLine *parsedCommandLine = base::CommandLine::ForCurrentProcess();
+
+ if (parsedCommandLine->HasSwitch(switches::kLang)) {
+ const std::string &locale = parsedCommandLine->GetSwitchValueASCII(switches::kLang);
+ ui::ResourceBundle::GetSharedInstance().ReloadLocaleResources(locale);
+ }
+#endif
+
return new ContentRendererClientQt;
}
diff --git a/src/core/content_main_delegate_qt.h b/src/core/content_main_delegate_qt.h
index dd7f38f69..3cb3b3bb3 100644
--- a/src/core/content_main_delegate_qt.h
+++ b/src/core/content_main_delegate_qt.h
@@ -42,7 +42,6 @@
#include "content/public/app/content_main_delegate.h"
-#include "base/memory/scoped_ptr.h"
#include <QtCore/qcompilerdetection.h>
#include "content_browser_client_qt.h"
@@ -63,7 +62,7 @@ public:
bool BasicStartupComplete(int* /*exit_code*/) Q_DECL_OVERRIDE;
private:
- scoped_ptr<ContentBrowserClientQt> m_browserClient;
+ std::unique_ptr<ContentBrowserClientQt> m_browserClient;
};
} // namespace QtWebEngineCore
diff --git a/src/core/cookie_monster_delegate_qt.cpp b/src/core/cookie_monster_delegate_qt.cpp
index 5a4c8e707..4e52f562a 100644
--- a/src/core/cookie_monster_delegate_qt.cpp
+++ b/src/core/cookie_monster_delegate_qt.cpp
@@ -40,6 +40,7 @@
#include "cookie_monster_delegate_qt.h"
#include "base/bind.h"
+#include "base/memory/ptr_util.h"
#include "content/public/browser/browser_thread.h"
#include "net/cookies/cookie_util.h"
@@ -55,11 +56,14 @@ static GURL sourceUrlForCookie(const QNetworkCookie &cookie) {
}
static void onSetCookieCallback(QWebEngineCookieStorePrivate *client, qint64 callbackId, bool success) {
- client->onSetCallbackResult(callbackId, success);
+
+ content::BrowserThread::PostTask(content::BrowserThread::UI, FROM_HERE,
+ base::Bind(&QWebEngineCookieStorePrivate::onSetCallbackResult, base::Unretained(client), callbackId, success));
}
static void onDeleteCookiesCallback(QWebEngineCookieStorePrivate *client, qint64 callbackId, int numCookies) {
- client->onDeleteCallbackResult(callbackId, numCookies);
+ content::BrowserThread::PostTask(content::BrowserThread::UI, FROM_HERE,
+ base::Bind(&QWebEngineCookieStorePrivate::onDeleteCallbackResult, base::Unretained(client), callbackId, numCookies));
}
static void onGetAllCookiesCallback(QWebEngineCookieStorePrivate *client, qint64 callbackId, const net::CookieList& cookies) {
@@ -67,14 +71,14 @@ static void onGetAllCookiesCallback(QWebEngineCookieStorePrivate *client, qint64
for (auto&& cookie: cookies)
rawCookies += toQt(cookie).toRawForm() % QByteArrayLiteral("\n");
- client->onGetAllCallbackResult(callbackId, rawCookies);
+ content::BrowserThread::PostTask(content::BrowserThread::UI, FROM_HERE,
+ base::Bind(&QWebEngineCookieStorePrivate::onGetAllCallbackResult, base::Unretained(client), callbackId, rawCookies));
}
CookieMonsterDelegateQt::CookieMonsterDelegateQt()
: m_client(0)
- , m_cookieMonster(0)
+ , m_cookieMonster(nullptr)
{
-
}
CookieMonsterDelegateQt::~CookieMonsterDelegateQt()
@@ -84,13 +88,21 @@ CookieMonsterDelegateQt::~CookieMonsterDelegateQt()
bool CookieMonsterDelegateQt::hasCookieMonster()
{
- return m_cookieMonster.get();
+ return m_cookieMonster;
}
void CookieMonsterDelegateQt::getAllCookies(quint64 callbackId)
{
net::CookieMonster::GetCookieListCallback callback = base::Bind(&onGetAllCookiesCallback, m_client->d_func(), callbackId);
- m_cookieMonster->GetAllCookiesAsync(callback);
+
+ content::BrowserThread::PostTask(content::BrowserThread::IO, FROM_HERE,
+ base::Bind(&CookieMonsterDelegateQt::GetAllCookiesOnIOThread, this, callback));
+}
+
+void CookieMonsterDelegateQt::GetAllCookiesOnIOThread(const net::CookieMonster::GetCookieListCallback& callback)
+{
+ if (m_cookieMonster)
+ m_cookieMonster->GetAllCookiesAsync(callback);
}
void CookieMonsterDelegateQt::setCookie(quint64 callbackId, const QNetworkCookie &cookie, const QUrl &origin)
@@ -102,12 +114,22 @@ void CookieMonsterDelegateQt::setCookie(quint64 callbackId, const QNetworkCookie
if (callbackId != CallbackDirectory::NoCallbackId)
callback = base::Bind(&onSetCookieCallback, m_client->d_func(), callbackId);
+ GURL gurl = origin.isEmpty() ? sourceUrlForCookie(cookie) : toGurl(origin);
+
+ content::BrowserThread::PostTask(content::BrowserThread::IO, FROM_HERE,
+ base::Bind(&CookieMonsterDelegateQt::SetCookieOnIOThread, this,
+ gurl, cookie.toRawForm().toStdString(), callback));
+}
+
+void CookieMonsterDelegateQt::SetCookieOnIOThread(
+ const GURL& url, const std::string& cookie_line,
+ const net::CookieMonster::SetCookiesCallback& callback)
+{
net::CookieOptions options;
options.set_include_httponly();
- GURL gurl = origin.isEmpty() ? sourceUrlForCookie(cookie) : toGurl(origin);
-
- m_cookieMonster->SetCookieWithOptionsAsync(gurl, cookie.toRawForm().toStdString(), options, callback);
+ if (m_cookieMonster)
+ m_cookieMonster->SetCookieWithOptionsAsync(url, cookie_line, options, callback);
}
void CookieMonsterDelegateQt::deleteCookie(const QNetworkCookie &cookie, const QUrl &origin)
@@ -117,7 +139,15 @@ void CookieMonsterDelegateQt::deleteCookie(const QNetworkCookie &cookie, const Q
GURL gurl = origin.isEmpty() ? sourceUrlForCookie(cookie) : toGurl(origin);
- m_cookieMonster->DeleteCookieAsync(gurl, cookie.name().toStdString(), base::Closure());
+ content::BrowserThread::PostTask(content::BrowserThread::IO, FROM_HERE,
+ base::Bind(&CookieMonsterDelegateQt::DeleteCookieOnIOThread, this,
+ gurl, cookie.name().toStdString()));
+}
+
+void CookieMonsterDelegateQt::DeleteCookieOnIOThread(const GURL& url, const std::string& cookie_name)
+{
+ if (m_cookieMonster)
+ m_cookieMonster->DeleteCookieAsync(url, cookie_name, base::Closure());
}
void CookieMonsterDelegateQt::deleteSessionCookies(quint64 callbackId)
@@ -126,7 +156,14 @@ void CookieMonsterDelegateQt::deleteSessionCookies(quint64 callbackId)
Q_ASSERT(m_client);
net::CookieMonster::DeleteCallback callback = base::Bind(&onDeleteCookiesCallback, m_client->d_func(), callbackId);
- m_cookieMonster->DeleteSessionCookiesAsync(callback);
+ content::BrowserThread::PostTask(content::BrowserThread::IO, FROM_HERE,
+ base::Bind(&CookieMonsterDelegateQt::DeleteSessionCookiesOnIOThread, this, callback));
+}
+
+void CookieMonsterDelegateQt::DeleteSessionCookiesOnIOThread(const net::CookieMonster::DeleteCallback& callback)
+{
+ if (m_cookieMonster)
+ m_cookieMonster->DeleteSessionCookiesAsync(callback);
}
void CookieMonsterDelegateQt::deleteAllCookies(quint64 callbackId)
@@ -135,7 +172,14 @@ void CookieMonsterDelegateQt::deleteAllCookies(quint64 callbackId)
Q_ASSERT(m_client);
net::CookieMonster::DeleteCallback callback = base::Bind(&onDeleteCookiesCallback, m_client->d_func(), callbackId);
- m_cookieMonster->DeleteAllAsync(callback);
+ content::BrowserThread::PostTask(content::BrowserThread::IO, FROM_HERE,
+ base::Bind(&CookieMonsterDelegateQt::DeleteAllOnIOThread, this, callback));
+}
+
+void CookieMonsterDelegateQt::DeleteAllOnIOThread(const net::CookieMonster::DeleteCallback& callback)
+{
+ if (m_cookieMonster)
+ m_cookieMonster->DeleteAllAsync(callback);
}
void CookieMonsterDelegateQt::setCookieMonster(net::CookieMonster* monster)
diff --git a/src/core/cookie_monster_delegate_qt.h b/src/core/cookie_monster_delegate_qt.h
index 2ff5eeaa6..f47dc86df 100644
--- a/src/core/cookie_monster_delegate_qt.h
+++ b/src/core/cookie_monster_delegate_qt.h
@@ -66,7 +66,7 @@ static const char* const kCookieableSchemes[] =
class QWEBENGINE_EXPORT CookieMonsterDelegateQt: public net::CookieMonsterDelegate {
QPointer<QWebEngineCookieStore> m_client;
- scoped_refptr<net::CookieMonster> m_cookieMonster;
+ net::CookieMonster *m_cookieMonster;
public:
CookieMonsterDelegateQt();
~CookieMonsterDelegateQt();
@@ -84,6 +84,13 @@ public:
bool canSetCookie(const QUrl &firstPartyUrl, const QByteArray &cookieLine, const QUrl &url);
void OnCookieChanged(const net::CanonicalCookie& cookie, bool removed, ChangeCause cause) override;
+
+private:
+ void GetAllCookiesOnIOThread(const net::CookieMonster::GetCookieListCallback& callback);
+ void SetCookieOnIOThread(const GURL& url, const std::string& cookie_line, const net::CookieMonster::SetCookiesCallback& callback);
+ void DeleteCookieOnIOThread(const GURL& url, const std::string& cookie_name);
+ void DeleteSessionCookiesOnIOThread(const net::CookieMonster::DeleteCallback& callback);
+ void DeleteAllOnIOThread(const net::CookieMonster::DeleteCallback& callback);
};
}
diff --git a/src/core/core_common.pri b/src/core/core_common.pri
index 9c29aea71..721e8c71a 100644
--- a/src/core/core_common.pri
+++ b/src/core/core_common.pri
@@ -10,3 +10,4 @@ CHROMIUM_SRC_DIR = $$QTWEBENGINE_ROOT/$$getChromiumSrcDir()
INCLUDEPATH += $$CHROMIUM_SRC_DIR
qtHaveModule(positioning):QT += positioning
+qtHaveModule(printsupport):QT += printsupport
diff --git a/src/core/core_gyp_generator.pro b/src/core/core_gyp_generator.pro
index 7351b108c..2fae21c4d 100644
--- a/src/core/core_gyp_generator.pro
+++ b/src/core/core_gyp_generator.pro
@@ -10,10 +10,18 @@ TEMPLATE = lib
include(core_common.pri)
+macos {
+ # This fixes namespace builds on macOS. Specifically namespace ambiguity issues between Qt and
+ # Chromium forward declarations of NSString.
+ forward_declaration_macro = $$shell_quote(\"Q_FORWARD_DECLARE_OBJC_CLASS(name)=class name;\")
+} else {
+ forward_declaration_macro = "Q_FORWARD_DECLARE_OBJC_CLASS=QT_FORWARD_DECLARE_CLASS"
+}
+
# Defining keywords such as 'signal' clashes with the chromium code base.
DEFINES += QT_NO_KEYWORDS \
QT_USE_QSTRINGBUILDER \
- Q_FORWARD_DECLARE_OBJC_CLASS=QT_FORWARD_DECLARE_CLASS \
+ $$forward_declaration_macro \
QTWEBENGINECORE_VERSION_STR=\\\"$$MODULE_VERSION\\\" \
BUILDING_CHROMIUM
@@ -25,8 +33,7 @@ RCC_DIR = $$OUT_PWD/$$getConfigDir()/.rcc
# whenever we are cross compiling.
cross_compile: DEFINES += QTWEBENGINE_EMBEDDED_SWITCHES
-contains(QT_CONFIG, egl): CONFIG += egl
-else: DEFINES += QT_NO_EGL
+qtConfig(egl): CONFIG += egl
RESOURCES += devtools.qrc
@@ -74,30 +81,28 @@ SOURCES = \
render_view_observer_host_qt.cpp \
render_widget_host_view_qt.cpp \
renderer/content_renderer_client_qt.cpp \
- renderer/pepper/pepper_flash_browser_host_qt.cpp \
- renderer/pepper/pepper_flash_clipboard_message_filter_qt.cpp \
renderer/pepper/pepper_flash_renderer_host_qt.cpp \
- renderer/pepper/pepper_host_factory_qt.cpp \
- renderer/pepper/pepper_isolated_file_system_message_filter.cpp \
renderer/pepper/pepper_renderer_host_factory_qt.cpp \
renderer/render_frame_observer_qt.cpp \
renderer/render_view_observer_qt.cpp \
renderer/user_resource_controller.cpp \
renderer/web_channel_ipc_transport.cpp \
+ renderer_host/pepper/pepper_flash_browser_host_qt.cpp \
+ renderer_host/pepper/pepper_host_factory_qt.cpp \
+ renderer_host/pepper/pepper_isolated_file_system_message_filter.cpp \
+ renderer_host/resource_dispatcher_host_delegate_qt.cpp \
+ renderer_host/user_resource_controller_host.cpp \
+ renderer_host/web_channel_ipc_transport_host.cpp \
resource_bundle_qt.cpp \
resource_context_qt.cpp \
- resource_dispatcher_host_delegate_qt.cpp \
ssl_host_state_delegate_qt.cpp \
- stream_video_node.cpp \
surface_factory_qt.cpp \
type_conversion.cpp \
url_request_context_getter_qt.cpp \
url_request_custom_job.cpp \
url_request_custom_job_delegate.cpp \
url_request_qrc_job_qt.cpp \
- user_resource_controller_host.cpp \
user_script.cpp \
- web_channel_ipc_transport_host.cpp \
web_contents_adapter.cpp \
web_contents_delegate_qt.cpp \
web_contents_view_qt.cpp \
@@ -106,8 +111,7 @@ SOURCES = \
web_engine_library_info.cpp \
web_engine_settings.cpp \
web_engine_visited_links_manager.cpp \
- web_event_factory.cpp \
- yuv_video_node.cpp
+ web_event_factory.cpp
HEADERS = \
access_token_store_qt.h \
@@ -143,6 +147,7 @@ HEADERS = \
file_picker_controller.h \
gl_context_qt.h \
gl_surface_qt.h \
+ global_descriptors_qt.h \
javascript_dialog_controller_p.h \
javascript_dialog_controller.h \
javascript_dialog_manager_qt.h \
@@ -157,29 +162,27 @@ HEADERS = \
render_widget_host_view_qt.h \
render_widget_host_view_qt_delegate.h \
renderer/content_renderer_client_qt.h \
- renderer/pepper/pepper_flash_browser_host_qt.h \
- renderer/pepper/pepper_flash_clipboard_message_filter_qt.h \
renderer/pepper/pepper_flash_renderer_host_qt.h \
- renderer/pepper/pepper_host_factory_qt.h \
- renderer/pepper/pepper_isolated_file_system_message_filter.h \
renderer/pepper/pepper_renderer_host_factory_qt.h \
renderer/render_frame_observer_qt.h \
renderer/render_view_observer_qt.h \
renderer/user_resource_controller.h \
renderer/web_channel_ipc_transport.h \
+ renderer_host/pepper/pepper_flash_browser_host_qt.h \
+ renderer_host/pepper/pepper_host_factory_qt.h \
+ renderer_host/pepper/pepper_isolated_file_system_message_filter.h \
+ renderer_host/resource_dispatcher_host_delegate_qt.h \
+ renderer_host/user_resource_controller_host.h \
+ renderer_host/web_channel_ipc_transport_host.h \
resource_context_qt.h \
- resource_dispatcher_host_delegate_qt.h \
ssl_host_state_delegate_qt.h \
- stream_video_node.h \
surface_factory_qt.h \
type_conversion.h \
url_request_context_getter_qt.h \
url_request_custom_job.h \
url_request_custom_job_delegate.h \
url_request_qrc_job_qt.h \
- user_resource_controller_host.h \
user_script.h \
- web_channel_ipc_transport_host.h \
web_contents_adapter.h \
web_contents_adapter_client.h \
web_contents_adapter_p.h \
@@ -190,11 +193,25 @@ HEADERS = \
web_engine_library_info.h \
web_engine_settings.h \
web_engine_visited_links_manager.h \
- web_event_factory.h \
- yuv_video_node.h
+ web_event_factory.h
+
+contains(QT_CONFIG, opengl) {
+ SOURCES += \
+ yuv_video_node.cpp \
+ stream_video_node.cpp
+
+ HEADERS += \
+ yuv_video_node.h \
+ stream_video_node.h
+}
qtHaveModule(positioning) {
SOURCES += location_provider_qt.cpp
HEADERS += location_provider_qt.h
DEFINES += QT_USE_POSITIONING=1
}
+
+qtHaveModule(printsupport) {
+ SOURCES += pdfium_printing_wrapper_qt.cpp
+ HEADERS += pdfium_printing_wrapper_qt.h
+}
diff --git a/src/core/core_module.pro b/src/core/core_module.pro
index 3b9dab457..65e46dcec 100644
--- a/src/core/core_module.pro
+++ b/src/core/core_module.pro
@@ -40,9 +40,9 @@ win32-msvc* {
# and doesn't let Chromium get access to libc symbols through dlsym.
CONFIG -= bsymbolic_functions
-contains(QT_CONFIG, egl): CONFIG += egl
+qtConfig(egl): CONFIG += egl
-linux: contains(QT_CONFIG, separate_debug_info): QMAKE_POST_LINK="cd $(DESTDIR) && $(STRIP) --strip-unneeded $(TARGET)"
+linux:qtConfig(separate_debug_info): QMAKE_POST_LINK="cd $(DESTDIR) && $(STRIP) --strip-unneeded $(TARGET)"
REPACK_DIR = $$OUT_PWD/$$getConfigDir()/gen/repack
# Duplicated from resources/resources.gyp
@@ -58,7 +58,7 @@ resources.files = $$REPACK_DIR/qtwebengine_resources.pak \
icu.files = $$OUT_PWD/$$getConfigDir()/icudtl.dat
!debug_and_release|!build_all|CONFIG(release, debug|release) {
- contains(QT_CONFIG, qt_framework) {
+ qtConfig(framework) {
locales.version = Versions
locales.path = Resources/qtwebengine_locales
resources.version = Versions
@@ -83,7 +83,7 @@ icu.files = $$OUT_PWD/$$getConfigDir()/icudtl.dat
}
}
- !contains(QT_CONFIG, qt_framework):!force_independent {
+ !qtConfig(framework):!force_independent {
#
# Copy essential files to the qtbase build directory for non-prefix builds
#
diff --git a/src/core/delegated_frame_node.cpp b/src/core/delegated_frame_node.cpp
index 8d0b8166a..44e37aeb6 100644
--- a/src/core/delegated_frame_node.cpp
+++ b/src/core/delegated_frame_node.cpp
@@ -59,7 +59,6 @@
#include "cc/output/delegated_frame_data.h"
#include "cc/quads/debug_border_draw_quad.h"
#include "cc/quads/draw_quad.h"
-#include "cc/quads/io_surface_draw_quad.h"
#include "cc/quads/render_pass_draw_quad.h"
#include "cc/quads/solid_color_draw_quad.h"
#include "cc/quads/stream_video_draw_quad.h"
@@ -71,13 +70,22 @@
#include "ui/gl/gl_context.h"
#include "ui/gl/gl_fence.h"
-#include <QOpenGLContext>
-#include <QOpenGLFunctions>
-#include <QSGSimpleRectNode>
-#include <QSGSimpleTextureNode>
+#ifndef QT_NO_OPENGL
+# include <QOpenGLContext>
+# include <QOpenGLFunctions>
+# include <QSGFlatColorMaterial>
+#endif
#include <QSGTexture>
#include <private/qsgadaptationlayer_p.h>
+#if (QT_VERSION >= QT_VERSION_CHECK(5, 8, 0))
+#include <QSGImageNode>
+#include <QSGRectangleNode>
+#else
+#include <QSGSimpleRectNode>
+#include <QSGSimpleTextureNode>
+#endif
+
#if !defined(QT_NO_EGL)
#include <EGL/egl.h>
#include <EGL/eglext.h>
@@ -91,8 +99,20 @@
#define GL_TEXTURE_RECTANGLE 0x84F5
#endif
-namespace QtWebEngineCore {
+#ifndef GL_LINEAR
+#define GL_LINEAR 0x2601
+#endif
+
+#ifndef GL_RGBA
+#define GL_RGBA 0x1908
+#endif
+#ifndef GL_RGB
+#define GL_RGB 0x1907
+#endif
+
+namespace QtWebEngineCore {
+#ifndef QT_NO_OPENGL
class MailboxTexture : public QSGTexture, protected QOpenGLFunctions {
public:
MailboxTexture(const gpu::MailboxHolder &mailboxHolder, const QSize textureSize);
@@ -122,7 +142,7 @@ private:
#endif
friend class DelegatedFrameNode;
};
-
+#endif // QT_NO_OPENGL
class ResourceHolder {
public:
ResourceHolder(const cc::TransferableResource &resource);
@@ -196,22 +216,23 @@ static QSGNode *buildLayerChain(QSGNode *chainParent, const cc::SharedQuadState
return layerChain;
}
-static void waitChromiumSync(gfx::TransferableFence *sync)
+#ifndef QT_NO_OPENGL
+static void waitChromiumSync(gl::TransferableFence *sync)
{
// Chromium uses its own GL bindings and stores in in thread local storage.
// For that reason, let chromium_gpu_helper.cpp contain the producing code that will run in the Chromium
// GPU thread, and put the sync consuming code here that will run in the QtQuick SG or GUI thread.
switch (sync->type) {
- case gfx::TransferableFence::NoSync:
+ case gl::TransferableFence::NoSync:
break;
- case gfx::TransferableFence::EglSync:
+ case gl::TransferableFence::EglSync:
#ifdef EGL_KHR_reusable_sync
{
static bool resolved = false;
static PFNEGLCLIENTWAITSYNCKHRPROC eglClientWaitSyncKHR = 0;
if (!resolved) {
- if (gfx::GLSurfaceQt::HasEGLExtension("EGL_KHR_fence_sync")) {
+ if (gl::GLSurfaceQt::HasEGLExtension("EGL_KHR_fence_sync")) {
QOpenGLContext *context = QOpenGLContext::currentContext();
eglClientWaitSyncKHR = (PFNEGLCLIENTWAITSYNCKHRPROC)context->getProcAddress("eglClientWaitSyncKHR");
}
@@ -224,7 +245,7 @@ static void waitChromiumSync(gfx::TransferableFence *sync)
}
#endif
break;
- case gfx::TransferableFence::ArbSync:
+ case gl::TransferableFence::ArbSync:
typedef void (QOPENGLF_APIENTRYP WaitSyncPtr)(GLsync sync, GLbitfield flags, GLuint64 timeout);
static WaitSyncPtr glWaitSync_ = 0;
if (!glWaitSync_) {
@@ -237,22 +258,22 @@ static void waitChromiumSync(gfx::TransferableFence *sync)
}
}
-static void deleteChromiumSync(gfx::TransferableFence *sync)
+static void deleteChromiumSync(gl::TransferableFence *sync)
{
// Chromium uses its own GL bindings and stores in in thread local storage.
// For that reason, let chromium_gpu_helper.cpp contain the producing code that will run in the Chromium
// GPU thread, and put the sync consuming code here that will run in the QtQuick SG or GUI thread.
switch (sync->type) {
- case gfx::TransferableFence::NoSync:
+ case gl::TransferableFence::NoSync:
break;
- case gfx::TransferableFence::EglSync:
+ case gl::TransferableFence::EglSync:
#ifdef EGL_KHR_reusable_sync
{
static bool resolved = false;
static PFNEGLDESTROYSYNCKHRPROC eglDestroySyncKHR = 0;
if (!resolved) {
- if (gfx::GLSurfaceQt::HasEGLExtension("EGL_KHR_fence_sync")) {
+ if (gl::GLSurfaceQt::HasEGLExtension("EGL_KHR_fence_sync")) {
QOpenGLContext *context = QOpenGLContext::currentContext();
eglDestroySyncKHR = (PFNEGLDESTROYSYNCKHRPROC)context->getProcAddress("eglDestroySyncKHR");
}
@@ -267,7 +288,7 @@ static void deleteChromiumSync(gfx::TransferableFence *sync)
}
#endif
break;
- case gfx::TransferableFence::ArbSync:
+ case gl::TransferableFence::ArbSync:
typedef void (QOPENGLF_APIENTRYP DeleteSyncPtr)(GLsync sync);
static DeleteSyncPtr glDeleteSync_ = 0;
if (!glDeleteSync_) {
@@ -355,6 +376,7 @@ void MailboxTexture::fetchTexture(gpu::gles2::MailboxManager *mailboxManager)
#endif
}
}
+#endif //QT_NO_OPENGL
ResourceHolder::ResourceHolder(const cc::TransferableResource &resource)
: m_resource(resource)
@@ -368,7 +390,7 @@ QSharedPointer<QSGTexture> ResourceHolder::initTexture(bool quadNeedsBlending, R
if (!texture) {
if (m_resource.is_software) {
Q_ASSERT(apiDelegate);
- scoped_ptr<cc::SharedBitmap> sharedBitmap = content::HostSharedBitmapManager::current()->GetSharedBitmapFromId(m_resource.size, m_resource.mailbox_holder.mailbox);
+ std::unique_ptr<cc::SharedBitmap> sharedBitmap = content::HostSharedBitmapManager::current()->GetSharedBitmapFromId(m_resource.size, m_resource.mailbox_holder.mailbox);
// QSG interprets QImage::hasAlphaChannel meaning that a node should enable blending
// to draw it but Chromium keeps this information in the quads.
// The input format is currently always Format_ARGB32_Premultiplied, so assume that all
@@ -379,8 +401,12 @@ QSharedPointer<QSGTexture> ResourceHolder::initTexture(bool quadNeedsBlending, R
QImage image(sharedBitmap->pixels(), m_resource.size.width(), m_resource.size.height(), format);
texture.reset(apiDelegate->createTextureFromImage(image.copy()));
} else {
+#ifndef QT_NO_OPENGL
texture.reset(new MailboxTexture(m_resource.mailbox_holder, toQt(m_resource.size)));
static_cast<MailboxTexture *>(texture.data())->setHasAlphaChannel(quadNeedsBlending);
+#else
+ Q_UNREACHABLE();
+#endif
}
m_texture = texture;
}
@@ -416,12 +442,12 @@ RectClipNode::RectClipNode(const QRectF &rect)
DelegatedFrameNode::DelegatedFrameNode()
: m_numPendingSyncPoints(0)
-#if defined(USE_X11)
+#if defined(USE_X11) && !defined(QT_NO_OPENGL)
, m_contextShared(true)
#endif
{
setFlag(UsePreprocess);
-#if defined(USE_X11)
+#if defined(USE_X11) && !defined(QT_NO_OPENGL)
QOpenGLContext *currentContext = QOpenGLContext::currentContext() ;
QOpenGLContext *sharedContext = qt_gl_global_share_context();
if (!QOpenGLContext::areSharing(currentContext, sharedContext)) {
@@ -443,6 +469,7 @@ DelegatedFrameNode::~DelegatedFrameNode()
void DelegatedFrameNode::preprocess()
{
+#ifndef QT_NO_OPENGL
// With the threaded render loop the GUI thread has been unlocked at this point.
// We can now wait for the Chromium GPU thread to produce textures that will be
// rendered on our quads and fetch the IDs from the mailboxes we were given.
@@ -465,6 +492,7 @@ void DelegatedFrameNode::preprocess()
// Proceed with the actual update.
pair.second->updateTexture();
}
+#endif
}
static YUVVideoMaterial::ColorSpace toQt(cc::YUVVideoDrawQuad::ColorSpace color_space)
@@ -576,8 +604,8 @@ void DelegatedFrameNode::commit(ChromiumCompositorData *chromiumCompositorData,
if (!layer)
continue;
- // Only QSGImageNode currently supports QSGLayer textures.
- QSGImageNode *imageNode = apiDelegate->createImageNode();
+ // Only QSGInternalImageNode currently supports QSGLayer textures.
+ QSGInternalImageNode *imageNode = apiDelegate->createImageNode();
imageNode->setTargetRect(toQt(quad->rect));
imageNode->setInnerTargetRect(toQt(quad->rect));
imageNode->setTexture(layer);
@@ -588,8 +616,8 @@ void DelegatedFrameNode::commit(ChromiumCompositorData *chromiumCompositorData,
const cc::TextureDrawQuad *tquad = cc::TextureDrawQuad::MaterialCast(quad);
ResourceHolder *resource = findAndHoldResource(tquad->resource_id(), resourceCandidates);
- QSGSimpleTextureNode *textureNode = new QSGSimpleTextureNode;
- textureNode->setTextureCoordinatesTransform(tquad->y_flipped ? QSGSimpleTextureNode::MirrorVertically : QSGSimpleTextureNode::NoTransform);
+ QSGTextureNode *textureNode = apiDelegate->createTextureNode();
+ textureNode->setTextureCoordinatesTransform(tquad->y_flipped ? QSGTextureNode::MirrorVertically : QSGTextureNode::NoTransform);
textureNode->setRect(toQt(quad->rect));
textureNode->setFiltering(resource->transferableResource().filter == GL_LINEAR ? QSGTexture::Linear : QSGTexture::Nearest);
textureNode->setTexture(initAndHoldTexture(resource, quad->ShouldDrawWithBlending(), apiDelegate));
@@ -597,7 +625,7 @@ void DelegatedFrameNode::commit(ChromiumCompositorData *chromiumCompositorData,
break;
} case cc::DrawQuad::SOLID_COLOR: {
const cc::SolidColorDrawQuad *scquad = cc::SolidColorDrawQuad::MaterialCast(quad);
- QSGSimpleRectNode *rectangleNode = new QSGSimpleRectNode;
+ QSGRectangleNode *rectangleNode = apiDelegate->createRectangleNode();
// Qt only supports MSAA and this flag shouldn't be needed.
// If we ever want to use QSGRectangleNode::setAntialiasing for this we should
@@ -608,12 +636,13 @@ void DelegatedFrameNode::commit(ChromiumCompositorData *chromiumCompositorData,
rectangleNode->setColor(toQt(scquad->color));
currentLayerChain->appendChildNode(rectangleNode);
break;
+#ifndef QT_NO_OPENGL
} case cc::DrawQuad::DEBUG_BORDER: {
const cc::DebugBorderDrawQuad *dbquad = cc::DebugBorderDrawQuad::MaterialCast(quad);
QSGGeometryNode *geometryNode = new QSGGeometryNode;
QSGGeometry *geometry = new QSGGeometry(QSGGeometry::defaultAttributes_Point2D(), 4);
- geometry->setDrawingMode(GL_LINE_LOOP);
+ geometry->setDrawingMode(QSGGeometry::DrawLineLoop);
geometry->setLineWidth(dbquad->width);
// QSGGeometry::updateRectGeometry would actually set the corners in the following order:
// top-left, bottom-left, top-right, bottom-right, leading to a nice criss cross, instead
@@ -632,17 +661,19 @@ void DelegatedFrameNode::commit(ChromiumCompositorData *chromiumCompositorData,
geometryNode->setFlags(QSGNode::OwnsGeometry | QSGNode::OwnsMaterial);
currentLayerChain->appendChildNode(geometryNode);
break;
+#endif
} case cc::DrawQuad::TILED_CONTENT: {
const cc::TileDrawQuad *tquad = cc::TileDrawQuad::MaterialCast(quad);
ResourceHolder *resource = findAndHoldResource(tquad->resource_id(), resourceCandidates);
- QSGSimpleTextureNode *textureNode = new QSGSimpleTextureNode;
+ QSGTextureNode *textureNode = apiDelegate->createTextureNode();
textureNode->setRect(toQt(quad->rect));
textureNode->setSourceRect(toQt(tquad->tex_coord_rect));
textureNode->setFiltering(resource->transferableResource().filter == GL_LINEAR ? QSGTexture::Linear : QSGTexture::Nearest);
textureNode->setTexture(initAndHoldTexture(resource, quad->ShouldDrawWithBlending(), apiDelegate));
currentLayerChain->appendChildNode(textureNode);
break;
+#ifndef QT_NO_OPENGL
} case cc::DrawQuad::YUV_VIDEO_CONTENT: {
const cc::YUVVideoDrawQuad *vquad = cc::YUVVideoDrawQuad::MaterialCast(quad);
ResourceHolder *yResource = findAndHoldResource(vquad->y_plane_resource_id(), resourceCandidates);
@@ -658,8 +689,10 @@ void DelegatedFrameNode::commit(ChromiumCompositorData *chromiumCompositorData,
initAndHoldTexture(uResource, quad->ShouldDrawWithBlending()),
initAndHoldTexture(vResource, quad->ShouldDrawWithBlending()),
aResource ? initAndHoldTexture(aResource, quad->ShouldDrawWithBlending()) : 0,
- toQt(vquad->ya_tex_coord_rect), toQt(vquad->uv_tex_coord_rect),
- toQt(vquad->ya_tex_size), toQt(vquad->uv_tex_size), toQt(vquad->color_space));
+ toQt(vquad->ya_tex_coord_rect), toQt(vquad->uv_tex_coord_rect),
+ toQt(vquad->ya_tex_size), toQt(vquad->uv_tex_size),
+ toQt(vquad->color_space),
+ vquad->resource_multiplier, vquad->resource_offset);
videoNode->setRect(toQt(quad->rect));
currentLayerChain->appendChildNode(videoNode);
break;
@@ -675,23 +708,10 @@ void DelegatedFrameNode::commit(ChromiumCompositorData *chromiumCompositorData,
svideoNode->setTextureMatrix(toQt(squad->matrix.matrix()));
currentLayerChain->appendChildNode(svideoNode);
break;
-#endif
- }
- case cc::DrawQuad::IO_SURFACE_CONTENT: {
- const cc::IOSurfaceDrawQuad *ioquad = cc::IOSurfaceDrawQuad::MaterialCast(quad);
- ResourceHolder *resource = findAndHoldResource(ioquad->io_surface_resource_id(), resourceCandidates);
- MailboxTexture *texture = static_cast<MailboxTexture *>(initAndHoldTexture(resource, quad->ShouldDrawWithBlending()));
- texture->setTarget(GL_TEXTURE_RECTANGLE);
-
- bool flip = ioquad->orientation != cc::IOSurfaceDrawQuad::FLIPPED;
- StreamVideoNode *svideoNode = new StreamVideoNode(texture, flip, RectangleTarget);
- QMatrix4x4 matrix;
- matrix.scale(ioquad->io_surface_size.width(), ioquad->io_surface_size.height());
- svideoNode->setRect(toQt(ioquad->rect));
- svideoNode->setTextureMatrix(matrix);
- currentLayerChain->appendChildNode(svideoNode);
- break;
- }
+#endif // GL_OES_EGL_image_external
+#endif // QT_NO_OPENGL
+ } case cc::DrawQuad::SURFACE_CONTENT:
+ Q_UNREACHABLE();
default:
qWarning("Unimplemented quad material: %d", quad->material);
}
@@ -727,7 +747,8 @@ QSGTexture *DelegatedFrameNode::initAndHoldTexture(ResourceHolder *resource, boo
void DelegatedFrameNode::fetchAndSyncMailboxes(QList<MailboxTexture *> &mailboxesToFetch)
{
- QList<gfx::TransferableFence> transferredFences;
+#ifndef QT_NO_OPENGL
+ QList<gl::TransferableFence> transferredFences;
{
QMutexLocker lock(&m_mutex);
@@ -759,7 +780,7 @@ void DelegatedFrameNode::fetchAndSyncMailboxes(QList<MailboxTexture *> &mailboxe
m_textureFences.swap(transferredFences);
}
- Q_FOREACH (gfx::TransferableFence sync, transferredFences) {
+ Q_FOREACH (gl::TransferableFence sync, transferredFences) {
// We need to wait on the fences on the Qt current context, and
// can therefore not use GLFence routines that uses a different
// concept of current context.
@@ -822,25 +843,33 @@ void DelegatedFrameNode::fetchAndSyncMailboxes(QList<MailboxTexture *> &mailboxe
currentContext->makeCurrent(surface);
}
#endif
+#else
+ Q_UNUSED(mailboxesToFetch)
+#endif //QT_NO_OPENGL
}
void DelegatedFrameNode::pullTexture(DelegatedFrameNode *frameNode, MailboxTexture *texture)
{
+#ifndef QT_NO_OPENGL
gpu::gles2::MailboxManager *mailboxManager = mailbox_manager();
gpu::SyncToken &syncToken = texture->mailboxHolder().sync_token;
if (syncToken.HasData())
mailboxManager->PullTextureUpdates(syncToken);
texture->fetchTexture(mailboxManager);
- if (!!gfx::GLContext::GetCurrent() && gfx::GLFence::IsSupported()) {
+ if (!!gl::GLContext::GetCurrent() && gl::GLFence::IsSupported()) {
// Create a fence on the Chromium GPU-thread and context
- gfx::GLFence *fence = gfx::GLFence::Create();
+ gl::GLFence *fence = gl::GLFence::Create();
// But transfer it to something generic since we need to read it using Qt's OpenGL.
frameNode->m_textureFences.append(fence->Transfer());
delete fence;
}
if (--frameNode->m_numPendingSyncPoints == 0)
base::MessageLoop::current()->PostTask(FROM_HERE, base::Bind(&DelegatedFrameNode::fenceAndUnlockQt, frameNode));
+#else
+ Q_UNUSED(frameNode)
+ Q_UNUSED(texture)
+#endif
}
void DelegatedFrameNode::fenceAndUnlockQt(DelegatedFrameNode *frameNode)
diff --git a/src/core/delegated_frame_node.h b/src/core/delegated_frame_node.h
index 005f4c768..36ec20f1d 100644
--- a/src/core/delegated_frame_node.h
+++ b/src/core/delegated_frame_node.h
@@ -40,7 +40,6 @@
#ifndef DELEGATED_FRAME_NODE_H
#define DELEGATED_FRAME_NODE_H
-#include "base/memory/scoped_ptr.h"
#include "cc/quads/render_pass.h"
#include "cc/resources/transferable_resource.h"
#include "gpu/command_buffer/service/sync_point_manager.h"
@@ -74,7 +73,7 @@ class ChromiumCompositorData : public QSharedData {
public:
ChromiumCompositorData() : frameDevicePixelRatio(1) { }
QHash<unsigned, QSharedPointer<ResourceHolder> > resourceHolders;
- scoped_ptr<cc::DelegatedFrameData> frameData;
+ std::unique_ptr<cc::DelegatedFrameData> frameData;
qreal frameDevicePixelRatio;
};
@@ -104,8 +103,8 @@ private:
int m_numPendingSyncPoints;
QWaitCondition m_mailboxesFetchedWaitCond;
QMutex m_mutex;
- QList<gfx::TransferableFence> m_textureFences;
- scoped_ptr<gpu::SyncPointClient> m_syncPointClient;
+ QList<gl::TransferableFence> m_textureFences;
+ std::unique_ptr<gpu::SyncPointClient> m_syncPointClient;
#if defined(USE_X11)
bool m_contextShared;
QScopedPointer<QOffscreenSurface> m_offsurface;
diff --git a/src/core/desktop_screen_qt.cpp b/src/core/desktop_screen_qt.cpp
index 0904aec59..f18a27ed7 100644
--- a/src/core/desktop_screen_qt.cpp
+++ b/src/core/desktop_screen_qt.cpp
@@ -39,6 +39,9 @@
#include "desktop_screen_qt.h"
+#include "ui/display/display.h"
+#include "ui/gfx/geometry/point.h"
+
namespace QtWebEngineCore {
gfx::Point DesktopScreenQt::GetCursorScreenPoint()
@@ -47,10 +50,10 @@ gfx::Point DesktopScreenQt::GetCursorScreenPoint()
return gfx::Point();
}
-gfx::NativeWindow DesktopScreenQt::GetWindowUnderCursor()
+bool DesktopScreenQt::IsWindowUnderCursor(gfx::NativeWindow)
{
Q_UNREACHABLE();
- return gfx::NativeWindow();
+ return false;
}
gfx::NativeWindow DesktopScreenQt::GetWindowAtScreenPoint(const gfx::Point& point)
@@ -65,42 +68,42 @@ int DesktopScreenQt::GetNumDisplays() const
return 0;
}
-std::vector<gfx::Display> DesktopScreenQt::GetAllDisplays() const
+std::vector<display::Display> DesktopScreenQt::GetAllDisplays() const
{
Q_UNREACHABLE();
- return std::vector<gfx::Display>();
+ return std::vector<display::Display>();
}
-gfx::Display DesktopScreenQt::GetDisplayNearestWindow(gfx::NativeView window) const
+display::Display DesktopScreenQt::GetDisplayNearestWindow(gfx::NativeView window) const
{
// RenderViewHostImpl::OnStartDragging uses this to determine
// the scale factor for the view.
- return gfx::Display();
+ return display::Display();
}
-gfx::Display DesktopScreenQt::GetDisplayNearestPoint(const gfx::Point& point) const
+display::Display DesktopScreenQt::GetDisplayNearestPoint(const gfx::Point& point) const
{
Q_UNREACHABLE();
- return gfx::Display();
+ return display::Display();
}
-gfx::Display DesktopScreenQt::GetDisplayMatching(const gfx::Rect& match_rect) const
+display::Display DesktopScreenQt::GetDisplayMatching(const gfx::Rect& match_rect) const
{
Q_UNREACHABLE();
- return gfx::Display();
+ return display::Display();
}
-gfx::Display DesktopScreenQt::GetPrimaryDisplay() const
+display::Display DesktopScreenQt::GetPrimaryDisplay() const
{
- return gfx::Display();
+ return display::Display();
}
-void DesktopScreenQt::AddObserver(gfx::DisplayObserver* observer)
+void DesktopScreenQt::AddObserver(display::DisplayObserver* observer)
{
Q_UNREACHABLE();
}
-void DesktopScreenQt::RemoveObserver(gfx::DisplayObserver* observer)
+void DesktopScreenQt::RemoveObserver(display::DisplayObserver* observer)
{
Q_UNREACHABLE();
}
diff --git a/src/core/desktop_screen_qt.h b/src/core/desktop_screen_qt.h
index ec7fe2e32..0e7588ae2 100644
--- a/src/core/desktop_screen_qt.h
+++ b/src/core/desktop_screen_qt.h
@@ -40,26 +40,26 @@
#ifndef DESKTOP_SCREEN_QT_H
#define DESKTOP_SCREEN_QT_H
-#include "ui/gfx/screen.h"
+#include "ui/display/screen.h"
#include <QtGlobal>
namespace QtWebEngineCore {
-class DesktopScreenQt : public gfx::Screen {
+class DesktopScreenQt : public display::Screen {
public:
// Overridden from gfx::Screen:
virtual gfx::Point GetCursorScreenPoint() Q_DECL_OVERRIDE;
- virtual gfx::NativeWindow GetWindowUnderCursor() Q_DECL_OVERRIDE;
+ virtual bool IsWindowUnderCursor(gfx::NativeWindow) Q_DECL_OVERRIDE;
virtual gfx::NativeWindow GetWindowAtScreenPoint(const gfx::Point& point) Q_DECL_OVERRIDE;
virtual int GetNumDisplays() const Q_DECL_OVERRIDE;
- virtual std::vector<gfx::Display> GetAllDisplays() const Q_DECL_OVERRIDE;
- virtual gfx::Display GetDisplayNearestWindow(gfx::NativeView window) const Q_DECL_OVERRIDE;
- virtual gfx::Display GetDisplayNearestPoint(const gfx::Point& point) const Q_DECL_OVERRIDE;
- virtual gfx::Display GetDisplayMatching(const gfx::Rect& match_rect) const Q_DECL_OVERRIDE;
- virtual gfx::Display GetPrimaryDisplay() const Q_DECL_OVERRIDE;
- virtual void AddObserver(gfx::DisplayObserver* observer) Q_DECL_OVERRIDE;
- virtual void RemoveObserver(gfx::DisplayObserver* observer) Q_DECL_OVERRIDE;
+ virtual std::vector<display::Display> GetAllDisplays() const Q_DECL_OVERRIDE;
+ virtual display::Display GetDisplayNearestWindow(gfx::NativeView window) const Q_DECL_OVERRIDE;
+ virtual display::Display GetDisplayNearestPoint(const gfx::Point& point) const Q_DECL_OVERRIDE;
+ virtual display::Display GetDisplayMatching(const gfx::Rect& match_rect) const Q_DECL_OVERRIDE;
+ virtual display::Display GetPrimaryDisplay() const Q_DECL_OVERRIDE;
+ virtual void AddObserver(display::DisplayObserver* observer) Q_DECL_OVERRIDE;
+ virtual void RemoveObserver(display::DisplayObserver* observer) Q_DECL_OVERRIDE;
};
} // namespace QtWebEngineCore
diff --git a/src/core/dev_tools_http_handler_delegate_qt.cpp b/src/core/dev_tools_http_handler_delegate_qt.cpp
index f3ffcc86d..5fd35ee29 100644
--- a/src/core/dev_tools_http_handler_delegate_qt.cpp
+++ b/src/core/dev_tools_http_handler_delegate_qt.cpp
@@ -50,6 +50,7 @@
#include "base/command_line.h"
#include "base/files/file_path.h"
+#include "base/memory/ptr_util.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/utf_string_conversions.h"
#include "components/devtools_discovery/devtools_discovery_manager.h"
@@ -85,10 +86,10 @@ public:
: m_address(address), m_port(port), m_backlog(backlog)
{}
private:
- scoped_ptr<net::ServerSocket> CreateForHttpServer() override {
- scoped_ptr<net::ServerSocket> socket(new net::TCPServerSocket(nullptr, net::NetLog::Source()));
+ std::unique_ptr<net::ServerSocket> CreateForHttpServer() override {
+ std::unique_ptr<net::ServerSocket> socket(new net::TCPServerSocket(nullptr, net::NetLog::Source()));
if (socket->ListenWithAddressAndPort(m_address, m_port, m_backlog) != net::OK)
- return scoped_ptr<net::ServerSocket>();
+ return std::unique_ptr<net::ServerSocket>();
return socket;
}
@@ -178,18 +179,18 @@ DevToolsTargetDescriptor::List DevToolsDiscoveryProviderQt::GetDescriptors()
namespace QtWebEngineCore {
-scoped_ptr<DevToolsHttpHandler> createDevToolsHttpHandler()
+std::unique_ptr<DevToolsHttpHandler> createDevToolsHttpHandler()
{
DevToolsHttpHandlerDelegateQt *delegate = new DevToolsHttpHandlerDelegateQt();
if (!delegate->isValid()) {
delete delegate;
return nullptr;
}
- scoped_ptr<DevToolsHttpHandler::ServerSocketFactory> factory(new TCPServerSocketFactory(delegate->bindAddress().toStdString(), delegate->port(), 1));
+ std::unique_ptr<DevToolsHttpHandler::ServerSocketFactory> factory(new TCPServerSocketFactory(delegate->bindAddress().toStdString(), delegate->port(), 1));
// Ownership of the delegate is taken over the devtools http handler.
- scoped_ptr<DevToolsHttpHandler> handler(new DevToolsHttpHandler(std::move(factory), std::string(), delegate, base::FilePath(), base::FilePath(), std::string(), std::string()));
- DevToolsDiscoveryManager::GetInstance()->AddProvider(scoped_ptr<DevToolsDiscoveryManager::Provider>(new DevToolsDiscoveryProviderQt()));
- return handler;
+ std::unique_ptr<DevToolsHttpHandler> handler(new DevToolsHttpHandler(std::move(factory), std::string(), delegate, base::FilePath(), base::FilePath(), std::string(), std::string()));
+ DevToolsDiscoveryManager::GetInstance()->AddProvider(base::WrapUnique(new DevToolsDiscoveryProviderQt()));
+ return std::move(handler);
}
DevToolsHttpHandlerDelegateQt::DevToolsHttpHandlerDelegateQt()
diff --git a/src/core/dev_tools_http_handler_delegate_qt.h b/src/core/dev_tools_http_handler_delegate_qt.h
index 96a34a45a..6512146a5 100644
--- a/src/core/dev_tools_http_handler_delegate_qt.h
+++ b/src/core/dev_tools_http_handler_delegate_qt.h
@@ -56,7 +56,7 @@ class DevToolsHttpHandler;
namespace QtWebEngineCore {
-scoped_ptr<devtools_http_handler::DevToolsHttpHandler> createDevToolsHttpHandler();
+std::unique_ptr<devtools_http_handler::DevToolsHttpHandler> createDevToolsHttpHandler();
class DevToolsHttpHandlerDelegateQt : public devtools_http_handler::DevToolsHttpHandlerDelegate {
public:
diff --git a/src/core/doc/src/qtwebenginecore-index.qdoc b/src/core/doc/src/qtwebenginecore-index.qdoc
index 70af397ce..4d540e277 100644
--- a/src/core/doc/src/qtwebenginecore-index.qdoc
+++ b/src/core/doc/src/qtwebenginecore-index.qdoc
@@ -28,7 +28,6 @@
/*!
\page qtwebenginecore-index.html
\title Qt WebEngine Core
- \ingroup modules
\brief Provides common API shared by Qt WebEngine and Qt WebEngine Widgets.
diff --git a/src/core/doc/src/qtwebenginecore-module.qdoc b/src/core/doc/src/qtwebenginecore-module.qdoc
index 6dc2478fc..0ac20a794 100644
--- a/src/core/doc/src/qtwebenginecore-module.qdoc
+++ b/src/core/doc/src/qtwebenginecore-module.qdoc
@@ -32,6 +32,7 @@
\brief Provides public API shared by both QtWebEngine and QtWebEngineWidgets
\since 5.6
\ingroup qtwebengine-modules
+ \ingroup modules
To include the definitions of the module's classes, use the
following directive:
diff --git a/src/core/download_manager_delegate_qt.cpp b/src/core/download_manager_delegate_qt.cpp
index 857af2e18..2cbfd121b 100644
--- a/src/core/download_manager_delegate_qt.cpp
+++ b/src/core/download_manager_delegate_qt.cpp
@@ -56,6 +56,7 @@
#include "browser_context_adapter_client.h"
#include "browser_context_qt.h"
#include "type_conversion.h"
+#include "web_contents_delegate_qt.h"
#include "qtwebenginecoreglobal.h"
namespace QtWebEngineCore {
@@ -74,6 +75,7 @@ DownloadManagerDelegateQt::DownloadManagerDelegateQt(BrowserContextAdapter *cont
: m_contextAdapter(contextAdapter)
, m_currentId(0)
, m_weakPtrFactory(this)
+ , m_downloadType(BrowserContextAdapterClient::Attachment)
{
Q_ASSERT(m_contextAdapter);
}
@@ -115,6 +117,11 @@ bool DownloadManagerDelegateQt::DetermineDownloadTarget(content::DownloadItem* i
QString suggestedFilename = toQt(item->GetSuggestedFilename());
QString mimeTypeString = toQt(item->GetMimeType());
+ bool isAttachment = net::HttpContentDisposition(item->GetContentDisposition(), std::string()).is_attachment();
+
+ if (!isAttachment || !BrowserContextAdapterClient::UserRequested)
+ m_downloadType = BrowserContextAdapterClient::DownloadAttribute;
+
if (suggestedFilename.isEmpty())
suggestedFilename = toQt(net::HttpContentDisposition(item->GetContentDisposition(), std::string()).filename());
@@ -157,7 +164,8 @@ bool DownloadManagerDelegateQt::DetermineDownloadTarget(content::DownloadItem* i
mimeTypeString,
suggestedFilePath,
BrowserContextAdapterClient::UnknownSavePageFormat,
- false /* accepted */
+ false /* accepted */,
+ m_downloadType
};
Q_FOREACH (BrowserContextAdapterClient *client, clients) {
@@ -211,12 +219,30 @@ void DownloadManagerDelegateQt::ChooseSavePath(content::WebContents *web_content
if (clients.isEmpty())
return;
- const QString suggestedFileName
- = QFileInfo(toQt(suggested_path.AsUTF8Unsafe())).completeBaseName()
- + QStringLiteral(".mhtml");
- const QDir defaultDownloadDirectory
- = QStandardPaths::writableLocation(QStandardPaths::DownloadLocation);
- const QString suggestedFilePath = defaultDownloadDirectory.absoluteFilePath(suggestedFileName);
+ WebContentsDelegateQt *contentsDelegate = static_cast<WebContentsDelegateQt *>(
+ web_contents->GetDelegate());
+ const SavePageInfo &spi = contentsDelegate->savePageInfo();
+
+ bool acceptedByDefault = false;
+ QString suggestedFilePath = spi.requestedFilePath;
+ if (suggestedFilePath.isEmpty()) {
+ suggestedFilePath = QFileInfo(toQt(suggested_path.AsUTF8Unsafe())).completeBaseName()
+ + QStringLiteral(".mhtml");
+ } else {
+ acceptedByDefault = true;
+ }
+ if (QFileInfo(suggestedFilePath).isRelative()) {
+ const QDir downloadDir(QStandardPaths::writableLocation(QStandardPaths::DownloadLocation));
+ suggestedFilePath = downloadDir.absoluteFilePath(suggestedFilePath);
+ }
+
+ BrowserContextAdapterClient::SavePageFormat suggestedSaveFormat
+ = static_cast<BrowserContextAdapterClient::SavePageFormat>(spi.requestedFormat);
+ if (suggestedSaveFormat == BrowserContextAdapterClient::UnknownSavePageFormat)
+ suggestedSaveFormat = BrowserContextAdapterClient::MimeHtmlSaveFormat;
+
+ // Clear the delegate's SavePageInfo. It's only valid for the page currently being saved.
+ contentsDelegate->setSavePageInfo(SavePageInfo());
BrowserContextAdapterClient::DownloadItemInfo info = {
m_currentId + 1,
@@ -226,8 +252,9 @@ void DownloadManagerDelegateQt::ChooseSavePath(content::WebContents *web_content
0, /* receivedBytes */
QStringLiteral("application/x-mimearchive"),
suggestedFilePath,
- BrowserContextAdapterClient::MimeHtmlSaveFormat,
- false /* accepted */
+ suggestedSaveFormat,
+ acceptedByDefault,
+ BrowserContextAdapterClient::SavePage
};
Q_FOREACH (BrowserContextAdapterClient *client, clients) {
@@ -263,7 +290,8 @@ void DownloadManagerDelegateQt::OnDownloadUpdated(content::DownloadItem *downloa
toQt(download->GetMimeType()),
QString(),
BrowserContextAdapterClient::UnknownSavePageFormat,
- true /* accepted */
+ true /* accepted */,
+ m_downloadType
};
Q_FOREACH (BrowserContextAdapterClient *client, clients) {
diff --git a/src/core/download_manager_delegate_qt.h b/src/core/download_manager_delegate_qt.h
index e724b4e23..e603724e9 100644
--- a/src/core/download_manager_delegate_qt.h
+++ b/src/core/download_manager_delegate_qt.h
@@ -82,9 +82,10 @@ public:
bool can_save_as_complete,
const content::SavePackagePathPickedCallback &callback) Q_DECL_OVERRIDE;
-
void cancelDownload(quint32 downloadId);
+ void setDownloadType(int downloadType) { m_downloadType = downloadType; }
+
// Inherited from content::DownloadItem::Observer
void OnDownloadUpdated(content::DownloadItem *download) Q_DECL_OVERRIDE;
void OnDownloadDestroyed(content::DownloadItem *download) Q_DECL_OVERRIDE;
@@ -96,6 +97,7 @@ private:
uint64_t m_currentId;
base::WeakPtrFactory<DownloadManagerDelegateQt> m_weakPtrFactory;
+ int m_downloadType;
friend class DownloadManagerDelegateInstance;
DISALLOW_COPY_AND_ASSIGN(DownloadManagerDelegateQt);
diff --git a/src/core/file_picker_controller.cpp b/src/core/file_picker_controller.cpp
index 6c3889907..74b097ef6 100644
--- a/src/core/file_picker_controller.cpp
+++ b/src/core/file_picker_controller.cpp
@@ -111,20 +111,20 @@ void FilePickerController::filesSelectedInChooser(const QStringList &filesList,
if (this->m_mode == UploadFolder && !filesList.isEmpty()
&& QFileInfo(filesList.first()).isDir()) // Enumerate the directory
files = listRecursively(QDir(filesList.first()));
- rvh->FilesSelectedInChooser(toVector<content::FileChooserFileInfo>(files), static_cast<content::FileChooserParams::Mode>(this->m_mode));
+ rvh->GetMainFrame()->FilesSelectedInChooser(toVector<content::FileChooserFileInfo>(files), static_cast<content::FileChooserParams::Mode>(this->m_mode));
}
-QStringList FilePickerController::acceptedMimeTypes()
+QStringList FilePickerController::acceptedMimeTypes() const
{
return m_acceptedMimeTypes;
}
-FilePickerController::FileChooserMode FilePickerController::mode()
+FilePickerController::FileChooserMode FilePickerController::mode() const
{
return m_mode;
}
-QString FilePickerController::defaultFileName()
+QString FilePickerController::defaultFileName() const
{
return m_defaultFileName;
}
diff --git a/src/core/file_picker_controller.h b/src/core/file_picker_controller.h
index 6edee7713..14e8de42d 100644
--- a/src/core/file_picker_controller.h
+++ b/src/core/file_picker_controller.h
@@ -61,10 +61,9 @@ public:
};
FilePickerController(FileChooserMode mode, content::WebContents *contents, const QString &defaultFileName, const QStringList &acceptedMimeTypes, QObject * = 0);
- QStringList acceptedMimeTypes();
- QString defaultFileName();
- FileChooserMode mode();
- void filesSelectedInChooser(const QStringList &filesList, content::WebContents *contents);
+ QStringList acceptedMimeTypes() const;
+ QString defaultFileName() const;
+ FileChooserMode mode() const;
public Q_SLOTS:
void accepted(const QStringList &files);
@@ -72,6 +71,7 @@ public Q_SLOTS:
void rejected();
private:
+ void filesSelectedInChooser(const QStringList &filesList, content::WebContents *contents);
QString m_defaultFileName;
QStringList m_acceptedMimeTypes;
content::WebContents *m_contents;
diff --git a/src/core/gl_context_qt.cpp b/src/core/gl_context_qt.cpp
index b7d82e77a..a1855b060 100644
--- a/src/core/gl_context_qt.cpp
+++ b/src/core/gl_context_qt.cpp
@@ -63,11 +63,15 @@ namespace {
inline void *resourceForContext(const QByteArray &resource)
{
+#ifndef QT_NO_OPENGL
QOpenGLContext *shareContext = qt_gl_global_share_context();
if (!shareContext) {
qFatal("QWebEngine: OpenGL resource sharing is not set up in QtQuick. Please make sure to call QtWebEngine::initialize() in your main() function.");
}
return qApp->platformNativeInterface()->nativeResourceForContext(resource, shareContext);
+#else
+ return nullptr;
+#endif
}
inline void *resourceForIntegration(const QByteArray &resource)
@@ -89,19 +93,19 @@ void GLContextHelper::destroy()
contextHelper = 0;
}
-bool GLContextHelper::initializeContextOnBrowserThread(gfx::GLContext* context, gfx::GLSurface* surface)
+bool GLContextHelper::initializeContextOnBrowserThread(gl::GLContext* context, gl::GLSurface* surface)
{
- return context->Initialize(surface, gfx::PreferDiscreteGpu);
+ return context->Initialize(surface, gl::PreferDiscreteGpu);
}
-bool GLContextHelper::initializeContext(gfx::GLContext* context, gfx::GLSurface* surface)
+bool GLContextHelper::initializeContext(gl::GLContext* context, gl::GLSurface* surface)
{
bool ret = false;
Qt::ConnectionType connType = (QThread::currentThread() == qApp->thread()) ? Qt::DirectConnection : Qt::BlockingQueuedConnection;
QMetaObject::invokeMethod(contextHelper, "initializeContextOnBrowserThread", connType,
Q_RETURN_ARG(bool, ret),
- Q_ARG(gfx::GLContext*, context),
- Q_ARG(gfx::GLSurface*, surface));
+ Q_ARG(gl::GLContext*, context),
+ Q_ARG(gl::GLSurface*, surface));
return ret;
}
@@ -143,9 +147,11 @@ QT_END_NAMESPACE
#if defined(USE_OZONE) || defined(OS_WIN)
-namespace gfx {
+namespace gl {
-scoped_refptr<GLContext> GLContext::CreateGLContext(GLShareGroup* share_group, GLSurface* compatible_surface, GpuPreference gpu_preference)
+namespace init {
+
+scoped_refptr<GLContext> CreateGLContext(GLShareGroup* share_group, GLSurface* compatible_surface, GpuPreference gpu_preference)
{
#if defined(OS_WIN)
scoped_refptr<GLContext> context;
@@ -167,6 +173,8 @@ scoped_refptr<GLContext> GLContext::CreateGLContext(GLShareGroup* share_group, G
return context;
}
-} // namespace gfx
+} // namespace init
+
+} // namespace gl
#endif // defined(USE_OZONE) || defined(OS_WIN)
diff --git a/src/core/gl_context_qt.h b/src/core/gl_context_qt.h
index 2c04641d4..47cd7dc7f 100644
--- a/src/core/gl_context_qt.h
+++ b/src/core/gl_context_qt.h
@@ -42,7 +42,7 @@
#include <QObject>
-namespace gfx {
+namespace gl {
class GLContext;
class GLSurface;
}
@@ -54,7 +54,7 @@ class GLContextHelper : public QObject {
public:
static void initialize();
static void destroy();
- static bool initializeContext(gfx::GLContext* context, gfx::GLSurface* surface);
+ static bool initializeContext(gl::GLContext* context, gl::GLSurface* surface);
static void* getEGLConfig();
static void* getXConfig();
@@ -63,7 +63,7 @@ public:
static void* getNativeDisplay();
private:
- Q_INVOKABLE bool initializeContextOnBrowserThread(gfx::GLContext* context, gfx::GLSurface* surface);
+ Q_INVOKABLE bool initializeContextOnBrowserThread(gl::GLContext* context, gl::GLSurface* surface);
static GLContextHelper* contextHelper;
};
diff --git a/src/core/gl_surface_qt.cpp b/src/core/gl_surface_qt.cpp
index a82143525..74bb32d1f 100644
--- a/src/core/gl_surface_qt.cpp
+++ b/src/core/gl_surface_qt.cpp
@@ -50,12 +50,13 @@
#include "qtwebenginecoreglobal_p.h"
#include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
-#include "content/common/gpu/image_transport_surface.h"
+#include "gpu/ipc/service/image_transport_surface.h"
#include "ui/gl/egl_util.h"
#include "ui/gl/gl_context.h"
#include "ui/gl/gl_implementation.h"
#include "ui/gl/gl_surface_egl.h"
+#include "ui/gl/init/gl_initializer.h"
+#include "ui/gl/init/gl_factory.h"
#if defined(USE_X11)
#include "ui/gl/gl_surface_glx.h"
@@ -68,6 +69,7 @@ extern "C" {
#if defined(OS_WIN)
#include "ui/gl/gl_surface_wgl.h"
#include "ui/gl/gl_context_wgl.h"
+#include "ui/gl/vsync_provider_win.h"
#endif
// From ANGLE's egl/eglext.h.
@@ -78,7 +80,7 @@ extern "C" {
using ui::GetLastEGLErrorString;
-namespace gfx {
+namespace gl {
namespace {
@@ -313,7 +315,7 @@ bool GLSurfaceQtWGL::Initialize()
{
m_surfaceBuffer = new PbufferGLSurfaceWGL(m_size);
- return m_surfaceBuffer->Initialize();
+ return m_surfaceBuffer->Initialize(gl::GLSurface::SURFACE_DEFAULT);
}
void GLSurfaceQtWGL::Destroy()
@@ -368,8 +370,8 @@ bool GLSurfaceQtEGL::InitializeOneOff()
g_egl_surfaceless_context_supported = ExtensionsContain(g_extensions, "EGL_KHR_surfaceless_context");
if (g_egl_surfaceless_context_supported) {
- scoped_refptr<GLSurface> surface = new GLSurfacelessQtEGL(Size(1, 1));
- scoped_refptr<GLContext> context = GLContext::CreateGLContext(
+ scoped_refptr<GLSurface> surface = new GLSurfacelessQtEGL(gfx::Size(1, 1));
+ scoped_refptr<GLContext> context = init::CreateGLContext(
NULL, surface.get(), PreferIntegratedGpu);
if (!context->MakeCurrent(surface.get()))
@@ -387,31 +389,6 @@ bool GLSurfaceQtEGL::InitializeOneOff()
return true;
}
-bool GLSurface::InitializeOneOffInternal()
-{
- if (GetGLImplementation() == kGLImplementationOSMesaGL)
- return false;
-
- if (GetGLImplementation() == kGLImplementationEGLGLES2)
- return GLSurfaceQtEGL::InitializeOneOff();
-
- if (GetGLImplementation() == kGLImplementationDesktopGL) {
-#if defined(OS_WIN)
- return GLSurfaceQtWGL::InitializeOneOff();
-#elif defined(USE_X11)
- if (GLSurfaceQtGLX::InitializeOneOff())
- return true;
-#endif
- // Fallback to trying EGL with desktop GL.
- if (GLSurfaceQtEGL::InitializeOneOff()) {
- g_initializedEGL = true;
- return true;
- }
- }
-
- return false;
-}
-
EGLDisplay GLSurfaceEGL::GetHardwareDisplay()
{
return static_cast<EGLDisplay>(g_display);
@@ -584,12 +561,43 @@ void* GLSurfacelessQtEGL::GetShareHandle()
return NULL;
}
-// static
+namespace init {
+
+bool InitializeGLOneOffPlatform()
+{
+#if defined(OS_WIN)
+ VSyncProviderWin::InitializeOneOff();
+#endif
+
+ if (GetGLImplementation() == kGLImplementationOSMesaGL)
+ return false;
+
+ if (GetGLImplementation() == kGLImplementationEGLGLES2)
+ return GLSurfaceQtEGL::InitializeOneOff();
+
+ if (GetGLImplementation() == kGLImplementationDesktopGL) {
+#if defined(OS_WIN)
+ return GLSurfaceQtWGL::InitializeOneOff();
+#elif defined(USE_X11)
+ if (GLSurfaceQtGLX::InitializeOneOff())
+ return true;
+#endif
+ // Fallback to trying EGL with desktop GL.
+ if (GLSurfaceQtEGL::InitializeOneOff()) {
+ g_initializedEGL = true;
+ return true;
+ }
+ }
+
+ return false;
+}
+
scoped_refptr<GLSurface>
-GLSurface::CreateOffscreenGLSurface(const gfx::Size& size)
+CreateOffscreenGLSurface(const gfx::Size& size)
{
scoped_refptr<GLSurface> surface;
switch (GetGLImplementation()) {
+ case kGLImplementationDesktopGLCoreProfile:
case kGLImplementationDesktopGL: {
#if defined(OS_WIN)
surface = new GLSurfaceQtWGL(size);
@@ -623,14 +631,15 @@ GLSurface::CreateOffscreenGLSurface(const gfx::Size& size)
return NULL;
}
-// static
scoped_refptr<GLSurface>
-GLSurface::CreateViewGLSurface(gfx::AcceleratedWidget window)
+CreateViewGLSurface(gfx::AcceleratedWidget window)
{
QT_NOT_USED
return NULL;
}
+} // namespace init
+
std::string DriverEGL::GetPlatformExtensions()
{
EGLDisplay display = GLContextHelper::getEGLDisplay();
@@ -642,15 +651,16 @@ std::string DriverEGL::GetPlatformExtensions()
return str ? std::string(str) : "";
}
-} // namespace gfx
+} // namespace gl
-namespace content {
+namespace gpu {
class GpuCommandBufferStub;
class GpuChannelManager;
-scoped_refptr<gfx::GLSurface> ImageTransportSurface::CreateNativeSurface(GpuChannelManager*, GpuCommandBufferStub*, const gfx::GLSurfaceHandle&)
+scoped_refptr<gl::GLSurface> ImageTransportSurface::CreateNativeSurface(GpuChannelManager*, GpuCommandBufferStub*,
+ SurfaceHandle, gl::GLSurface::Format)
{
QT_NOT_USED
- return scoped_refptr<gfx::GLSurface>();
+ return scoped_refptr<gl::GLSurface>();
}
}
diff --git a/src/core/gl_surface_qt.h b/src/core/gl_surface_qt.h
index 33ea2a1da..9e0692c60 100644
--- a/src/core/gl_surface_qt.h
+++ b/src/core/gl_surface_qt.h
@@ -47,7 +47,7 @@
#include <QtCore/qcompilerdetection.h> // Needed for Q_DECL_OVERRIDE
-namespace gfx {
+namespace gl {
class GLSurfaceQt: public GLSurface {
public:
diff --git a/src/core/global_descriptors_qt.h b/src/core/global_descriptors_qt.h
new file mode 100644
index 000000000..e9d490a2e
--- /dev/null
+++ b/src/core/global_descriptors_qt.h
@@ -0,0 +1,10 @@
+#ifndef GLOBAL_DESCRIPTORS_QT_H
+#define GLOBAL_DESCRIPTORS_QT_H
+
+#include "content/public/common/content_descriptors.h"
+
+enum {
+ kWebEngineLocale = kContentIPCDescriptorMax + 1,
+};
+
+#endif // GLOBAL_DESCRIPTORS_QT_H
diff --git a/src/core/gyp_run.pro b/src/core/gyp_run.pro
index 4fab6cb97..233737751 100644
--- a/src/core/gyp_run.pro
+++ b/src/core/gyp_run.pro
@@ -24,7 +24,7 @@ GYP_CONFIG += disable_glibcxx_debug=1
!webcore_debug: GYP_CONFIG += remove_webcore_debug_symbols=1
!v8base_debug: GYP_CONFIG += remove_v8base_debug_symbols=1
-linux:contains(QT_CONFIG, separate_debug_info): GYP_CONFIG += linux_dump_symbols=1
+linux:qtConfig(separate_debug_info): GYP_CONFIG += linux_dump_symbols=1
force_debug_info {
win32: GYP_CONFIG += win_release_extra_cflags=-Zi
@@ -36,9 +36,7 @@ force_debug_info {
# Copy this logic from qt_module.prf so that ninja can run according
# to the same rules as the final module linking in core_module.pro.
!host_build:if(win32|mac):!macx-xcode {
- contains(QT_CONFIG, simulator_and_device): CONFIG += simulator_and_device
- contains(QT_CONFIG, debug_and_release):CONFIG += debug_and_release
- contains(QT_CONFIG, build_all):CONFIG += build_all
+ qtConfig(debug_and_release): CONFIG += debug_and_release build_all
}
cross_compile {
@@ -124,13 +122,19 @@ contains(WEBENGINE_CONFIG, reduce_binary_size): GYP_CONFIG += release_optimize=s
contains(WEBENGINE_CONFIG, no_spellcheck): {
GYP_CONFIG += enable_spellcheck=0
- osx: GYP_CONFIG += use_browser_spellchecker=0
+ macos: GYP_CONFIG += use_browser_spellchecker=0
} else {
GYP_CONFIG += enable_spellcheck=1
- osx: GYP_CONFIG += use_browser_spellchecker=1
+ macos {
+ contains(WEBENGINE_CONFIG, use_native_spellchecker) {
+ GYP_CONFIG += use_browser_spellchecker=1
+ } else {
+ GYP_CONFIG += use_browser_spellchecker=0
+ }
+ }
}
-!contains(QT_CONFIG, qt_framework): contains(QT_CONFIG, private_tests) {
+!qtConfig(framework):qtConfig(private_tests) {
GYP_CONFIG += qt_install_data=\"$$[QT_INSTALL_DATA/get]\"
GYP_CONFIG += qt_install_translations=\"$$[QT_INSTALL_TRANSLATIONS/get]\"
}
diff --git a/src/core/javascript_dialog_manager_qt.cpp b/src/core/javascript_dialog_manager_qt.cpp
index 80a28fb56..2844dba5d 100644
--- a/src/core/javascript_dialog_manager_qt.cpp
+++ b/src/core/javascript_dialog_manager_qt.cpp
@@ -55,10 +55,8 @@ JavaScriptDialogManagerQt *JavaScriptDialogManagerQt::GetInstance()
return base::Singleton<JavaScriptDialogManagerQt>::get();
}
-void JavaScriptDialogManagerQt::RunJavaScriptDialog(content::WebContents *webContents, const GURL &originUrl, const std::string &acceptLang, content::JavaScriptMessageType javascriptMessageType, const base::string16 &messageText, const base::string16 &defaultPromptText, const content::JavaScriptDialogManager::DialogClosedCallback &callback, bool *didSuppressMessage)
+void JavaScriptDialogManagerQt::RunJavaScriptDialog(content::WebContents *webContents, const GURL &originUrl, content::JavaScriptMessageType javascriptMessageType, const base::string16 &messageText, const base::string16 &defaultPromptText, const content::JavaScriptDialogManager::DialogClosedCallback &callback, bool *didSuppressMessage)
{
- Q_UNUSED(acceptLang);
-
WebContentsAdapterClient *client = WebContentsViewQt::from(static_cast<content::WebContentsImpl*>(webContents)->GetView())->client();
if (!client) {
if (didSuppressMessage)
@@ -70,10 +68,10 @@ void JavaScriptDialogManagerQt::RunJavaScriptDialog(content::WebContents *webCon
runDialogForContents(webContents, dialogType, toQt(messageText).toHtmlEscaped(), toQt(defaultPromptText).toHtmlEscaped(), toQt(originUrl.GetOrigin()), callback);
}
-void JavaScriptDialogManagerQt::RunBeforeUnloadDialog(content::WebContents *webContents, const base::string16 &messageText,
- bool isReload, const content::JavaScriptDialogManager::DialogClosedCallback &callback) {
+void JavaScriptDialogManagerQt::RunBeforeUnloadDialog(content::WebContents *webContents, bool isReload,
+ const content::JavaScriptDialogManager::DialogClosedCallback &callback) {
Q_UNUSED(isReload);
- runDialogForContents(webContents, WebContentsAdapterClient::UnloadDialog, toQt(messageText).toHtmlEscaped(), QString() , QUrl(), callback);
+ runDialogForContents(webContents, WebContentsAdapterClient::UnloadDialog, QString()/*toQt(messageText).toHtmlEscaped()*/, QString() , QUrl(), callback);
}
bool JavaScriptDialogManagerQt::HandleJavaScriptDialog(content::WebContents *contents, bool accept, const base::string16 *promptOverride)
diff --git a/src/core/javascript_dialog_manager_qt.h b/src/core/javascript_dialog_manager_qt.h
index aea5a5ec3..8ed86c994 100644
--- a/src/core/javascript_dialog_manager_qt.h
+++ b/src/core/javascript_dialog_manager_qt.h
@@ -61,12 +61,12 @@ public:
// For use with the Singleton helper class from chromium
static JavaScriptDialogManagerQt *GetInstance();
- virtual void RunJavaScriptDialog(content::WebContents *, const GURL &, const std::string &acceptLang, content::JavaScriptMessageType javascriptMessageType,
- const base::string16 &messageText, const base::string16 &defaultPromptText,
- const content::JavaScriptDialogManager::DialogClosedCallback &callback, bool *didSuppressMessage) Q_DECL_OVERRIDE;
+ virtual void RunJavaScriptDialog(content::WebContents *, const GURL &, content::JavaScriptMessageType javascriptMessageType,
+ const base::string16 &messageText, const base::string16 &defaultPromptText,
+ const content::JavaScriptDialogManager::DialogClosedCallback &callback, bool *didSuppressMessage) Q_DECL_OVERRIDE;
- virtual void RunBeforeUnloadDialog(content::WebContents *, const base::string16 &messageText, bool isReload,
- const content::JavaScriptDialogManager::DialogClosedCallback &callback) Q_DECL_OVERRIDE;
+ virtual void RunBeforeUnloadDialog(content::WebContents *, bool isReload,
+ const content::JavaScriptDialogManager::DialogClosedCallback &callback) Q_DECL_OVERRIDE;
virtual bool HandleJavaScriptDialog(content::WebContents *, bool accept, const base::string16 *promptOverride) Q_DECL_OVERRIDE;
virtual void CancelActiveAndPendingDialogs(content::WebContents *contents) Q_DECL_OVERRIDE { takeDialogForContents(contents); }
virtual void ResetDialogState(content::WebContents *contents) Q_DECL_OVERRIDE { takeDialogForContents(contents); }
diff --git a/src/core/media_capture_devices_dispatcher.cpp b/src/core/media_capture_devices_dispatcher.cpp
index 9683245a0..f06f0150f 100644
--- a/src/core/media_capture_devices_dispatcher.cpp
+++ b/src/core/media_capture_devices_dispatcher.cpp
@@ -60,6 +60,7 @@
#include "content/public/browser/web_contents.h"
#include "content/public/common/origin_util.h"
#include "content/public/common/media_stream_request.h"
+#include "media/audio/audio_device_description.h"
#include "media/audio/audio_manager_base.h"
#include "ui/base/l10n/l10n_util.h"
@@ -89,27 +90,34 @@ base::string16 getContentsUrl(content::WebContents *webContents)
}
// Based on chrome/browser/media/desktop_capture_access_handler.cc:
-scoped_ptr<content::MediaStreamUI> getDevicesForDesktopCapture(content::MediaStreamDevices &devices, content::DesktopMediaID mediaId
+std::unique_ptr<content::MediaStreamUI> getDevicesForDesktopCapture(content::MediaStreamDevices *devices, content::DesktopMediaID mediaId
, bool captureAudio, bool /*display_notification*/, base::string16 /*application_title*/)
{
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- scoped_ptr<content::MediaStreamUI> ui;
-
- // Add selected desktop source to the list.
- devices.push_back(content::MediaStreamDevice(
- content::MEDIA_DESKTOP_VIDEO_CAPTURE, mediaId.ToString(), "Screen"));
- if (captureAudio) {
- devices.push_back(content::MediaStreamDevice(
- content::MEDIA_DESKTOP_AUDIO_CAPTURE,
- media::AudioManagerBase::kLoopbackInputDeviceId, "System Audio"));
- }
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ std::unique_ptr<content::MediaStreamUI> ui;
+
+ // Add selected desktop source to the list.
+ devices->push_back(content::MediaStreamDevice(content::MEDIA_DESKTOP_VIDEO_CAPTURE, mediaId.ToString(), "Screen"));
+ if (captureAudio) {
+ if (mediaId.type == content::DesktopMediaID::TYPE_WEB_CONTENTS) {
+ devices->push_back(
+ content::MediaStreamDevice(content::MEDIA_DESKTOP_AUDIO_CAPTURE,
+ mediaId.ToString(), "Tab audio"));
+ } else {
+ // Use the special loopback device ID for system audio capture.
+ devices->push_back(content::MediaStreamDevice(
+ content::MEDIA_DESKTOP_AUDIO_CAPTURE,
+ media::AudioDeviceDescription::kLoopbackInputDeviceId,
+ "System Audio"));
+ }
+ }
- return std::move(ui);
+ return std::move(ui);
}
WebContentsAdapterClient::MediaRequestFlags mediaRequestFlagsForRequest(const content::MediaStreamRequest &request)
{
- WebContentsAdapterClient::MediaRequestFlags requestFlags;
+ WebContentsAdapterClient::MediaRequestFlags requestFlags = WebContentsAdapterClient::MediaNone;
if (request.audio_type == content::MEDIA_DEVICE_AUDIO_CAPTURE)
requestFlags |= WebContentsAdapterClient::MediaAudioCapture;
if (request.video_type == content::MEDIA_DEVICE_VIDEO_CAPTURE)
@@ -187,7 +195,7 @@ void MediaCaptureDevicesDispatcher::handleMediaAccessPermissionResponse(content:
BrowserThread::UI, FROM_HERE, base::Bind(&MediaCaptureDevicesDispatcher::ProcessQueuedAccessRequest, base::Unretained(this), webContents));
}
- callback.Run(devices, devices.empty() ? content::MEDIA_DEVICE_INVALID_STATE : content::MEDIA_DEVICE_OK, scoped_ptr<content::MediaStreamUI>());
+ callback.Run(devices, devices.empty() ? content::MEDIA_DEVICE_INVALID_STATE : content::MEDIA_DEVICE_OK, std::unique_ptr<content::MediaStreamUI>());
}
@@ -247,7 +255,7 @@ void MediaCaptureDevicesDispatcher::processDesktopCaptureAccessRequest(content::
, const content::MediaResponseCallback &callback)
{
content::MediaStreamDevices devices;
- scoped_ptr<content::MediaStreamUI> ui;
+ std::unique_ptr<content::MediaStreamUI> ui;
if (request.video_type != content::MEDIA_DESKTOP_VIDEO_CAPTURE) {
callback.Run(devices, content::MEDIA_DEVICE_INVALID_STATE, std::move(ui));
@@ -288,8 +296,8 @@ void MediaCaptureDevicesDispatcher::processDesktopCaptureAccessRequest(content::
request.audio_type == content::MEDIA_DESKTOP_AUDIO_CAPTURE);
ui = getDevicesForDesktopCapture(
- devices, mediaId, capture_audio, true,
- getContentsUrl(webContents));
+ &devices, mediaId, capture_audio, true,
+ getContentsUrl(webContents));
callback.Run(devices, devices.empty() ? content::MEDIA_DEVICE_INVALID_STATE : content::MEDIA_DEVICE_OK, std::move(ui));
}
@@ -316,16 +324,16 @@ void MediaCaptureDevicesDispatcher::processScreenCaptureAccessRequest(content::W
JavaScriptDialogManagerQt::GetInstance()->runDialogForContents(webContents, WebContentsAdapterClient::InternalAuthorizationDialog, message
, QString(), securityOrigin, dialogCallback, title);
} else
- callback.Run(content::MediaStreamDevices(), content::MEDIA_DEVICE_INVALID_STATE, scoped_ptr<content::MediaStreamUI>());
+ callback.Run(content::MediaStreamDevices(), content::MEDIA_DEVICE_INVALID_STATE, std::unique_ptr<content::MediaStreamUI>());
}
void MediaCaptureDevicesDispatcher::handleScreenCaptureAccessRequest(content::WebContents *webContents, bool userAccepted, const base::string16 &)
{
content::MediaStreamDevices devices;
- scoped_ptr<content::MediaStreamUI> ui;
+ std::unique_ptr<content::MediaStreamUI> ui;
if (userAccepted) {
content::DesktopMediaID screenId = content::DesktopMediaID(content::DesktopMediaID::TYPE_SCREEN, 0);
- ui = getDevicesForDesktopCapture(devices, screenId, false/*capture_audio*/, false/*display_notification*/, getContentsUrl(webContents));
+ ui = getDevicesForDesktopCapture(&devices, screenId, false/*capture_audio*/, false/*display_notification*/, getContentsUrl(webContents));
}
std::map<content::WebContents*, RequestsQueue>::iterator it =
m_pendingRequests.find(webContents);
@@ -416,13 +424,19 @@ void MediaCaptureDevicesDispatcher::OnMediaRequestStateChanged(int render_proces
page_request_id, security_origin, stream_type, state));
}
-void MediaCaptureDevicesDispatcher::updateMediaRequestStateOnUIThread(int render_process_id, int render_frame_id, int page_request_id
- , const GURL& security_origin, content::MediaStreamType stream_type, content::MediaRequestState state)
+void MediaCaptureDevicesDispatcher::updateMediaRequestStateOnUIThread(int render_process_id,
+ int render_frame_id,
+ int page_request_id,
+ const GURL& security_origin,
+ content::MediaStreamType stream_type,
+ content::MediaRequestState state)
{
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
+
// Track desktop capture sessions. Tracking is necessary to avoid unbalanced
// session counts since not all requests will reach MEDIA_REQUEST_STATE_DONE,
// but they will all reach MEDIA_REQUEST_STATE_CLOSING.
- if (stream_type == content::MEDIA_DESKTOP_VIDEO_CAPTURE) {
+ if (stream_type == content::MEDIA_DESKTOP_VIDEO_CAPTURE || stream_type == content::MEDIA_TAB_VIDEO_CAPTURE) {
if (state == content::MEDIA_REQUEST_STATE_DONE) {
DesktopCaptureSession session = { render_process_id, render_frame_id,
page_request_id };
diff --git a/src/core/media_capture_devices_dispatcher.h b/src/core/media_capture_devices_dispatcher.h
index b13a9da2c..b21d40b87 100644
--- a/src/core/media_capture_devices_dispatcher.h
+++ b/src/core/media_capture_devices_dispatcher.h
@@ -49,7 +49,6 @@
#include "web_contents_adapter_client.h"
#include "base/callback.h"
-#include "base/memory/scoped_ptr.h"
#include "base/memory/singleton.h"
#include "base/observer_list.h"
#include "content/public/browser/media_observer.h"
@@ -83,6 +82,11 @@ class MediaCaptureDevicesDispatcher : public content::MediaObserver,
virtual void OnMediaRequestStateChanged(int render_process_id, int render_frame_id, int page_request_id, const GURL& security_origin, content::MediaStreamType stream_type, content::MediaRequestState state) Q_DECL_OVERRIDE;
virtual void OnCreatingAudioStream(int /*render_process_id*/, int /*render_frame_id*/) Q_DECL_OVERRIDE { }
+ virtual void OnSetCapturingLinkSecured(int /*render_process_id*/,
+ int /*render_frame_id*/,
+ int /*page_request_id*/,
+ content::MediaStreamType /*stream_type*/,
+ bool /*is_secure*/) Q_DECL_OVERRIDE { }
DesktopStreamsRegistry *getDesktopStreamsRegistry();
@@ -118,7 +122,7 @@ class MediaCaptureDevicesDispatcher : public content::MediaObserver,
RequestsQueues m_pendingRequests;
- scoped_ptr<DesktopStreamsRegistry> m_desktopStreamsRegistry;
+ std::unique_ptr<DesktopStreamsRegistry> m_desktopStreamsRegistry;
content::NotificationRegistrar m_notificationsRegistrar;
diff --git a/src/core/network_delegate_qt.cpp b/src/core/network_delegate_qt.cpp
index ff0e8320c..ed54f2ec8 100644
--- a/src/core/network_delegate_qt.cpp
+++ b/src/core/network_delegate_qt.cpp
@@ -230,24 +230,18 @@ bool NetworkDelegateQt::OnCanSetCookie(const net::URLRequest& request,
return m_requestContextGetter->m_cookieDelegate->canSetCookie(toQt(request.first_party_for_cookies()), QByteArray::fromStdString(cookie_line), toQt(request.url()));
}
-void NetworkDelegateQt::OnResolveProxy(const GURL&, int, const net::ProxyService&, net::ProxyInfo*)
-{
-}
-
-void NetworkDelegateQt::OnProxyFallback(const net::ProxyServer&, int)
-{
-}
-int NetworkDelegateQt::OnBeforeSendHeaders(net::URLRequest*, const net::CompletionCallback&, net::HttpRequestHeaders*)
+int NetworkDelegateQt::OnBeforeStartTransaction(net::URLRequest *request, const net::CompletionCallback &callback, net::HttpRequestHeaders *headers)
{
return net::OK;
}
-void NetworkDelegateQt::OnBeforeSendProxyHeaders(net::URLRequest*, const net::ProxyInfo&, net::HttpRequestHeaders*)
+void NetworkDelegateQt::OnBeforeSendHeaders(net::URLRequest* request, const net::ProxyInfo& proxy_info,
+ const net::ProxyRetryInfoMap& proxy_retry_info, net::HttpRequestHeaders* headers)
{
}
-void NetworkDelegateQt::OnSendHeaders(net::URLRequest*, const net::HttpRequestHeaders&)
+void NetworkDelegateQt::OnStartTransaction(net::URLRequest *request, const net::HttpRequestHeaders &headers)
{
}
diff --git a/src/core/network_delegate_qt.h b/src/core/network_delegate_qt.h
index 1324e0da3..4ded56a9d 100644
--- a/src/core/network_delegate_qt.h
+++ b/src/core/network_delegate_qt.h
@@ -76,11 +76,10 @@ public:
virtual int OnBeforeURLRequest(net::URLRequest* request, const net::CompletionCallback& callback, GURL* newUrl) override;
virtual void OnURLRequestDestroyed(net::URLRequest* request) override;
virtual bool OnCanSetCookie(const net::URLRequest&, const std::string&, net::CookieOptions*) override;
- virtual void OnResolveProxy(const GURL&, int, const net::ProxyService&, net::ProxyInfo*) override;
- virtual void OnProxyFallback(const net::ProxyServer&, int) override;
- virtual int OnBeforeSendHeaders(net::URLRequest*, const net::CompletionCallback&, net::HttpRequestHeaders*) override;
- virtual void OnBeforeSendProxyHeaders(net::URLRequest*, const net::ProxyInfo&, net::HttpRequestHeaders*) override;
- virtual void OnSendHeaders(net::URLRequest*, const net::HttpRequestHeaders&) override;
+ virtual int OnBeforeStartTransaction(net::URLRequest *request, const net::CompletionCallback &callback, net::HttpRequestHeaders *headers) override;
+ virtual void OnBeforeSendHeaders(net::URLRequest* request, const net::ProxyInfo& proxy_info,
+ const net::ProxyRetryInfoMap& proxy_retry_info, net::HttpRequestHeaders* headers) override;
+ virtual void OnStartTransaction(net::URLRequest *request, const net::HttpRequestHeaders &headers) override;
virtual int OnHeadersReceived(net::URLRequest*, const net::CompletionCallback&, const net::HttpResponseHeaders*, scoped_refptr<net::HttpResponseHeaders>*, GURL*) override;
virtual void OnBeforeRedirect(net::URLRequest*, const GURL&) override;
virtual void OnResponseStarted(net::URLRequest*) override;
diff --git a/src/core/ozone_platform_eglfs.cpp b/src/core/ozone_platform_eglfs.cpp
index 6fea4259e..0b560da6c 100644
--- a/src/core/ozone_platform_eglfs.cpp
+++ b/src/core/ozone_platform_eglfs.cpp
@@ -42,7 +42,7 @@
#if defined(USE_OZONE)
#include "base/bind.h"
-#include "media/ozone/media_ozone_platform.h"
+#include "base/memory/ptr_util.h"
#include "ui/events/ozone/device/device_manager.h"
#include "ui/events/ozone/evdev/event_factory_evdev.h"
#include "ui/events/ozone/events_ozone.h"
@@ -57,15 +57,6 @@
#include "ui/platform_window/platform_window.h"
#include "ui/platform_window/platform_window_delegate.h"
-
-namespace media {
-
-MediaOzonePlatform* CreateMediaOzonePlatformEglfs() {
- return new MediaOzonePlatform;
-}
-
-}
-
namespace ui {
namespace {
@@ -157,11 +148,11 @@ GpuPlatformSupportHost* OzonePlatformEglfs::GetGpuPlatformSupportHost() {
return gpu_platform_support_host_.get();
}
-scoped_ptr<PlatformWindow> OzonePlatformEglfs::CreatePlatformWindow(
+std::unique_ptr<PlatformWindow> OzonePlatformEglfs::CreatePlatformWindow(
PlatformWindowDelegate* delegate,
const gfx::Rect& bounds)
{
- return make_scoped_ptr<PlatformWindow>(
+ return base::WrapUnique(
new EglfsWindow(delegate,
event_factory_ozone_.get(),
bounds));
@@ -171,7 +162,7 @@ ui::InputController* OzonePlatformEglfs::GetInputController() {
return input_controller_.get();
}
-scoped_ptr<ui::SystemInputInjector> OzonePlatformEglfs::CreateSystemInputInjector() {
+std::unique_ptr<ui::SystemInputInjector> OzonePlatformEglfs::CreateSystemInputInjector() {
return nullptr; // no input injection support.
}
@@ -179,14 +170,9 @@ ui::OverlayManagerOzone* OzonePlatformEglfs::GetOverlayManager() {
return overlay_manager_.get();
}
-scoped_ptr<ui::NativeDisplayDelegate> OzonePlatformEglfs::CreateNativeDisplayDelegate()
-{
- return scoped_ptr<NativeDisplayDelegate>(new NativeDisplayDelegateOzone());
-}
-
-base::ScopedFD OzonePlatformEglfs::OpenClientNativePixmapDevice() const
+std::unique_ptr<ui::NativeDisplayDelegate> OzonePlatformEglfs::CreateNativeDisplayDelegate()
{
- return base::ScopedFD();
+ return base::WrapUnique(new NativeDisplayDelegateOzone());
}
OzonePlatform* CreateOzonePlatformEglfs() { return new OzonePlatformEglfs; }
diff --git a/src/core/ozone_platform_eglfs.h b/src/core/ozone_platform_eglfs.h
index 3a2dfbcf0..cdc2bd1ce 100644
--- a/src/core/ozone_platform_eglfs.h
+++ b/src/core/ozone_platform_eglfs.h
@@ -61,28 +61,27 @@ class OzonePlatformEglfs : public OzonePlatform {
virtual ui::CursorFactoryOzone* GetCursorFactoryOzone() override;
virtual GpuPlatformSupport* GetGpuPlatformSupport() override;
virtual GpuPlatformSupportHost* GetGpuPlatformSupportHost() override;
- virtual scoped_ptr<PlatformWindow> CreatePlatformWindow(
+ virtual std::unique_ptr<PlatformWindow> CreatePlatformWindow(
PlatformWindowDelegate* delegate,
const gfx::Rect& bounds) override;
- virtual scoped_ptr<ui::NativeDisplayDelegate> CreateNativeDisplayDelegate() override;
- virtual base::ScopedFD OpenClientNativePixmapDevice() const override;
+ virtual std::unique_ptr<ui::NativeDisplayDelegate> CreateNativeDisplayDelegate() override;
virtual ui::InputController* GetInputController() override;
- virtual scoped_ptr<ui::SystemInputInjector> CreateSystemInputInjector() override;
+ virtual std::unique_ptr<ui::SystemInputInjector> CreateSystemInputInjector() override;
virtual ui::OverlayManagerOzone* GetOverlayManager() override;
private:
virtual void InitializeUI() override;
virtual void InitializeGPU() override;
- scoped_ptr<DeviceManager> device_manager_;
+ std::unique_ptr<DeviceManager> device_manager_;
- scoped_ptr<QtWebEngineCore::SurfaceFactoryQt> surface_factory_ozone_;
- scoped_ptr<CursorFactoryOzone> cursor_factory_ozone_;
- scoped_ptr<EventFactoryEvdev> event_factory_ozone_;
+ std::unique_ptr<QtWebEngineCore::SurfaceFactoryQt> surface_factory_ozone_;
+ std::unique_ptr<CursorFactoryOzone> cursor_factory_ozone_;
+ std::unique_ptr<EventFactoryEvdev> event_factory_ozone_;
- scoped_ptr<GpuPlatformSupport> gpu_platform_support_;
- scoped_ptr<GpuPlatformSupportHost> gpu_platform_support_host_;
- scoped_ptr<InputController> input_controller_;
- scoped_ptr<OverlayManagerOzone> overlay_manager_;
+ std::unique_ptr<GpuPlatformSupport> gpu_platform_support_;
+ std::unique_ptr<GpuPlatformSupportHost> gpu_platform_support_host_;
+ std::unique_ptr<InputController> input_controller_;
+ std::unique_ptr<OverlayManagerOzone> overlay_manager_;
DISALLOW_COPY_AND_ASSIGN(OzonePlatformEglfs);
};
diff --git a/src/core/pdfium_printing_wrapper_qt.cpp b/src/core/pdfium_printing_wrapper_qt.cpp
new file mode 100644
index 000000000..165ac743f
--- /dev/null
+++ b/src/core/pdfium_printing_wrapper_qt.cpp
@@ -0,0 +1,231 @@
+/****************************************************************************
+**
+** 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 "pdfium_printing_wrapper_qt.h"
+
+#include <QtCore/qhash.h>
+#include <QtGui/qimage.h>
+#include <QtGui/qpainter.h>
+#include <QtPrintSupport/qprinter.h>
+
+#include "third_party/pdfium/public/fpdf_doc.h"
+#include "third_party/pdfium/public/fpdfview.h"
+
+namespace QtWebEngineCore {
+int PdfiumPrintingWrapperQt::m_libraryUsers = 0;
+
+class PDFiumPageWrapper {
+public:
+ PDFiumPageWrapper(void *data, int pageIndex, int targetWidth, int targetHeight)
+ : m_pageData(FPDF_LoadPage(data, pageIndex))
+ , m_width(FPDF_GetPageWidth(m_pageData))
+ , m_height(FPDF_GetPageHeight(m_pageData))
+ , m_index(pageIndex)
+ , m_image(createImage(targetWidth, targetHeight))
+ {
+ }
+
+ PDFiumPageWrapper()
+ : m_pageData(nullptr)
+ , m_width(-1)
+ , m_height(-1)
+ , m_index(-1)
+ , m_image(QImage())
+ {
+ }
+
+ virtual ~PDFiumPageWrapper()
+ {
+ FPDF_ClosePage(m_pageData);
+ }
+
+ QImage image()
+ {
+ return m_image;
+ }
+
+private:
+ QImage createImage(int targetWidth, int targetHeight)
+ {
+ Q_ASSERT(m_pageData);
+ if (targetWidth <= 0)
+ targetWidth = m_width;
+
+ if (targetHeight <= 0)
+ targetHeight = m_height;
+
+ QImage image(targetWidth, targetHeight, QImage::Format_RGBA8888);
+ Q_ASSERT(!image.isNull());
+ image.fill(0xFFFFFFFF);
+
+ FPDF_BITMAP bitmap = FPDFBitmap_CreateEx(image.width(), image.height(),
+ FPDFBitmap_BGRA,
+ image.scanLine(0), image.bytesPerLine());
+ Q_ASSERT(bitmap);
+
+ FPDF_RenderPageBitmap(bitmap, m_pageData,
+ 0, 0, image.width(), image.height(),
+ 0, 0);
+ FPDFBitmap_Destroy(bitmap);
+ bitmap = nullptr;
+
+ // Map BGRA to RGBA as PDFium currently does not support RGBA bitmaps directly
+ for (int i = 0; i < image.height(); i++) {
+ uchar *pixels = image.scanLine(i);
+ for (int j = 0; j < image.width(); j++) {
+ qSwap(pixels[0], pixels[2]);
+ pixels += 4;
+ }
+ }
+ return image;
+ }
+
+private:
+ void *m_pageData;
+ int m_width;
+ int m_height;
+ int m_index;
+ QImage m_image;
+};
+
+
+PdfiumPrintingWrapperQt::PdfiumPrintingWrapperQt(const void *pdfData, size_t size, const char *password)
+{
+ Q_ASSERT(pdfData);
+ Q_ASSERT(size);
+ if (m_libraryUsers++ == 0)
+ FPDF_InitLibrary();
+
+ m_documentHandle = FPDF_LoadMemDocument(pdfData, static_cast<int>(size), password);
+ m_pageCount = FPDF_GetPageCount(m_documentHandle);
+}
+
+bool PdfiumPrintingWrapperQt::printOnPrinter(QPrinter &printer)
+{
+ if (!m_documentHandle || !m_pageCount) {
+ qWarning("Failure to print on printer %ls: invalid document.\n", qUtf16Printable(printer.printerName()));
+ return false;
+ }
+
+ int toPage = printer.toPage();
+ int fromPage = printer.fromPage();
+ bool ascendingOrder = true;
+
+ if (fromPage == 0 && toPage == 0) {
+ fromPage = 1;
+ toPage = m_pageCount;
+ }
+ fromPage = qMax(1, fromPage);
+ toPage = qMin(m_pageCount, toPage);
+
+ if (printer.pageOrder() == QPrinter::LastPageFirst) {
+ qSwap(fromPage, toPage);
+ ascendingOrder = false;
+ }
+
+ int documentCopies = printer.copyCount();
+ int pageCopies = 1;
+ if (printer.collateCopies()) {
+ pageCopies = documentCopies;
+ documentCopies = 1;
+ }
+
+ QRect printerPageRect = printer.pageRect();
+ int doubledPrinterWidth = 2 * printerPageRect.width();
+ int doubledPrinterHeight = 2 * printerPageRect.height();
+
+ QPainter painter;
+ if (!painter.begin(&printer)) {
+ qWarning("Failure to print on printer %ls: Could not open printer for painting.\n", qUtf16Printable(printer.printerName()));
+ return false;
+ }
+
+ QHash<int, PDFiumPageWrapper*> cachedPages;
+ for (int printedDocuments = 0; printedDocuments < documentCopies; printedDocuments++) {
+ int currentPageIndex = fromPage;
+ while (true) {
+ for (int printedPages = 0; printedPages < pageCopies; printedPages++) {
+ if (printer.printerState() == QPrinter::Aborted
+ || printer.printerState() == QPrinter::Error)
+ return false;
+
+ PDFiumPageWrapper *currentPageWrapper;
+ if (!cachedPages.contains(currentPageIndex - 1)) {
+ currentPageWrapper
+ = new PDFiumPageWrapper(m_documentHandle, currentPageIndex - 1
+ , doubledPrinterWidth, doubledPrinterHeight);
+ cachedPages.insert(currentPageIndex - 1, currentPageWrapper);
+ } else {
+ currentPageWrapper = cachedPages.value(currentPageIndex - 1);
+ }
+
+ QImage currentImage = currentPageWrapper->image();
+ painter.drawImage(printerPageRect, currentImage, currentImage.rect());
+ if (printedPages < pageCopies - 1)
+ printer.newPage();
+ }
+
+ if (currentPageIndex == toPage)
+ break;
+
+ if (ascendingOrder)
+ currentPageIndex++;
+ else
+ currentPageIndex--;
+
+ printer.newPage();
+ }
+ if (printedDocuments < documentCopies - 1)
+ printer.newPage();
+ }
+ painter.end();
+
+ qDeleteAll(cachedPages);
+
+ return true;
+}
+
+PdfiumPrintingWrapperQt::~PdfiumPrintingWrapperQt()
+{
+ FPDF_CloseDocument(m_documentHandle);
+ if (--m_libraryUsers == 0)
+ FPDF_DestroyLibrary();
+}
+
+}
diff --git a/src/core/pdfium_printing_wrapper_qt.h b/src/core/pdfium_printing_wrapper_qt.h
new file mode 100644
index 000000000..3aaf2b461
--- /dev/null
+++ b/src/core/pdfium_printing_wrapper_qt.h
@@ -0,0 +1,66 @@
+/****************************************************************************
+**
+** 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 PDFIUM_PRINTING_WRAPPER_QT_H
+#define PDFIUM_PRINTING_WRAPPER_QT_H
+
+#include <QtCore/qglobal.h>
+
+QT_BEGIN_NAMESPACE
+class QPrinter;
+QT_END_NAMESPACE
+
+namespace QtWebEngineCore {
+
+class PdfiumPrintingWrapperQt
+{
+public:
+ PdfiumPrintingWrapperQt(const void *pdfData, size_t size, const char *password = nullptr);
+ virtual ~PdfiumPrintingWrapperQt();
+ bool printOnPrinter(QPrinter &printer);
+ int pageCount() const { return m_pageCount; }
+
+private:
+ static int m_libraryUsers;
+ void *m_documentHandle;
+ int m_pageCount;
+};
+
+} // namespace QtWebEngineCore
+#endif // PDFIUM_PRINTING_WRAPPER_QT_H
diff --git a/src/core/permission_manager_qt.cpp b/src/core/permission_manager_qt.cpp
index 9603dc94c..f76f100e6 100644
--- a/src/core/permission_manager_qt.cpp
+++ b/src/core/permission_manager_qt.cpp
@@ -65,6 +65,7 @@ BrowserContextAdapter::PermissionType toQt(content::PermissionType type)
case content::PermissionType::PROTECTED_MEDIA_IDENTIFIER:
case content::PermissionType::MIDI:
case content::PermissionType::DURABLE_STORAGE:
+ case content::PermissionType::BACKGROUND_SYNC:
case content::PermissionType::NUM:
break;
}
@@ -85,7 +86,7 @@ void PermissionManagerQt::permissionRequestReply(const QUrl &origin, BrowserCont
{
QPair<QUrl, BrowserContextAdapter::PermissionType> key(origin, type);
m_permissions[key] = reply;
- content::PermissionStatus status = reply ? content::PERMISSION_STATUS_GRANTED : content::PERMISSION_STATUS_DENIED;
+ blink::mojom::PermissionStatus status = reply ? blink::mojom::PermissionStatus::GRANTED : blink::mojom::PermissionStatus::DENIED;
auto it = m_requests.begin();
while (it != m_requests.end()) {
if (it->origin == origin && it->type == type) {
@@ -109,14 +110,12 @@ bool PermissionManagerQt::checkPermission(const QUrl &origin, BrowserContextAdap
int PermissionManagerQt::RequestPermission(content::PermissionType permission,
content::RenderFrameHost *frameHost,
const GURL& requesting_origin,
- bool user_gesture,
- const base::Callback<void(content::PermissionStatus)>& callback)
+ const base::Callback<void(blink::mojom::PermissionStatus)>& callback)
{
- Q_UNUSED(user_gesture);
int request_id = ++m_requestIdCount;
BrowserContextAdapter::PermissionType permissionType = toQt(permission);
if (permissionType == BrowserContextAdapter::UnsupportedPermission) {
- callback.Run(content::PERMISSION_STATUS_DENIED);
+ callback.Run(blink::mojom::PermissionStatus::DENIED);
return kNoPendingOperation;
}
// Audio and video-capture should not come this way currently
@@ -140,25 +139,23 @@ int PermissionManagerQt::RequestPermission(content::PermissionType permission,
int PermissionManagerQt::RequestPermissions(const std::vector<content::PermissionType>& permissions,
content::RenderFrameHost* frameHost,
const GURL& requesting_origin,
- bool user_gesture,
- const base::Callback<void(const std::vector<content::PermissionStatus>&)>& callback)
+ const base::Callback<void(const std::vector<blink::mojom::PermissionStatus>&)>& callback)
{
NOTIMPLEMENTED() << "RequestPermissions has not been implemented in QtWebEngine";
- Q_UNUSED(user_gesture);
Q_UNUSED(frameHost);
- std::vector<content::PermissionStatus> result(permissions.size());
+ std::vector<blink::mojom::PermissionStatus> result(permissions.size());
for (content::PermissionType permission : permissions) {
const BrowserContextAdapter::PermissionType permissionType = toQt(permission);
if (permissionType == BrowserContextAdapter::UnsupportedPermission)
- result.push_back(content::PERMISSION_STATUS_DENIED);
+ result.push_back(blink::mojom::PermissionStatus::DENIED);
else {
QPair<QUrl, BrowserContextAdapter::PermissionType> key(toQt(requesting_origin), permissionType);
// TODO: Request permission from UI
if (m_permissions.contains(key) && m_permissions[key])
- result.push_back(content::PERMISSION_STATUS_GRANTED);
+ result.push_back(blink::mojom::PermissionStatus::GRANTED);
else
- result.push_back(content::PERMISSION_STATUS_DENIED);
+ result.push_back(blink::mojom::PermissionStatus::DENIED);
}
}
@@ -172,21 +169,21 @@ void PermissionManagerQt::CancelPermissionRequest(int request_id)
m_requests.remove(request_id);
}
-content::PermissionStatus PermissionManagerQt::GetPermissionStatus(
+blink::mojom::PermissionStatus PermissionManagerQt::GetPermissionStatus(
content::PermissionType permission,
const GURL& requesting_origin,
const GURL& /*embedding_origin*/)
{
const BrowserContextAdapter::PermissionType permissionType = toQt(permission);
if (permissionType == BrowserContextAdapter::UnsupportedPermission)
- return content::PERMISSION_STATUS_DENIED;
+ return blink::mojom::PermissionStatus::DENIED;
QPair<QUrl, BrowserContextAdapter::PermissionType> key(toQt(requesting_origin), permissionType);
if (!m_permissions.contains(key))
- return content::PERMISSION_STATUS_ASK;
+ return blink::mojom::PermissionStatus::ASK;
if (m_permissions[key])
- return content::PERMISSION_STATUS_GRANTED;
- return content::PERMISSION_STATUS_DENIED;
+ return blink::mojom::PermissionStatus::GRANTED;
+ return blink::mojom::PermissionStatus::DENIED;
}
void PermissionManagerQt::ResetPermission(
@@ -214,7 +211,7 @@ int PermissionManagerQt::SubscribePermissionStatusChange(
content::PermissionType permission,
const GURL& requesting_origin,
const GURL& /*embedding_origin*/,
- const base::Callback<void(content::PermissionStatus)>& callback)
+ const base::Callback<void(blink::mojom::PermissionStatus)>& callback)
{
int subscriber_id = ++m_subscriberIdCount;
RequestOrSubscription subscriber = {
diff --git a/src/core/permission_manager_qt.h b/src/core/permission_manager_qt.h
index ff35357d8..e4392b01c 100644
--- a/src/core/permission_manager_qt.h
+++ b/src/core/permission_manager_qt.h
@@ -64,12 +64,11 @@ public:
content::PermissionType permission,
content::RenderFrameHost* render_frame_host,
const GURL& requesting_origin,
- bool user_gesture,
- const base::Callback<void(content::PermissionStatus)>& callback) override;
+ const base::Callback<void(blink::mojom::PermissionStatus)>& callback) override;
void CancelPermissionRequest(int request_id) override;
- content::PermissionStatus GetPermissionStatus(
+ blink::mojom::PermissionStatus GetPermissionStatus(
content::PermissionType permission,
const GURL& requesting_origin,
const GURL& embedding_origin) override;
@@ -83,9 +82,8 @@ public:
const std::vector<content::PermissionType>& permission,
content::RenderFrameHost* render_frame_host,
const GURL& requesting_origin,
- bool user_gesture,
const base::Callback<void(
- const std::vector<content::PermissionStatus>&)>& callback) override;
+ const std::vector<blink::mojom::PermissionStatus>&)>& callback) override;
void RegisterPermissionUsage(
content::PermissionType permission,
@@ -96,7 +94,7 @@ public:
content::PermissionType permission,
const GURL& requesting_origin,
const GURL& embedding_origin,
- const base::Callback<void(content::PermissionStatus)>& callback) override;
+ const base::Callback<void(blink::mojom::PermissionStatus)>& callback) override;
void UnsubscribePermissionStatusChange(int subscription_id) override;
@@ -105,7 +103,7 @@ private:
struct RequestOrSubscription {
PermissionType type;
QUrl origin;
- base::Callback<void(content::PermissionStatus)> callback;
+ base::Callback<void(blink::mojom::PermissionStatus)> callback;
};
QHash<int, RequestOrSubscription> m_requests;
QHash<int, RequestOrSubscription> m_subscribers;
diff --git a/src/core/print_view_manager_base_qt.cpp b/src/core/print_view_manager_base_qt.cpp
index 3e12901b9..8c52e1b18 100644
--- a/src/core/print_view_manager_base_qt.cpp
+++ b/src/core/print_view_manager_base_qt.cpp
@@ -45,7 +45,6 @@
#include "web_engine_context.h"
#include "base/single_thread_task_runner.h"
-#include "base/thread_task_runner_handle.h"
#include "base/timer/timer.h"
#include "base/values.h"
#include "chrome/browser/chrome_notification_types.h"
@@ -246,7 +245,7 @@ void PrintViewManagerBaseQt::OnDidPrintPage(
#endif
// Only used when |metafile_must_be_valid| is true.
- scoped_ptr<base::SharedMemory> shared_buf;
+ std::unique_ptr<base::SharedMemory> shared_buf;
if (metafile_must_be_valid) {
if (!base::SharedMemory::IsHandleValid(params.metafile_data_handle)) {
NOTREACHED() << "invalid memory handle";
@@ -268,7 +267,7 @@ void PrintViewManagerBaseQt::OnDidPrintPage(
}
}
- scoped_ptr<printing::PdfMetafileSkia> metafile(new printing::PdfMetafileSkia);
+ std::unique_ptr<printing::PdfMetafileSkia> metafile(new printing::PdfMetafileSkia(printing::PDF_SKIA_DOCUMENT_TYPE));
if (metafile_must_be_valid) {
if (!metafile->InitFromData(shared_buf->memory(), params.data_size)) {
NOTREACHED() << "Invalid metafile header";
diff --git a/src/core/print_view_manager_base_qt.h b/src/core/print_view_manager_base_qt.h
index f1e001eee..a8b4b5fc8 100644
--- a/src/core/print_view_manager_base_qt.h
+++ b/src/core/print_view_manager_base_qt.h
@@ -42,8 +42,8 @@
#define PRINT_VIEW_MANAGER_BASE_QT_H
#include "base/memory/ref_counted.h"
-#include "base/prefs/pref_member.h"
#include "base/strings/string16.h"
+#include "components/prefs/pref_member.h"
#include "components/printing/browser/print_manager.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
@@ -97,7 +97,7 @@ protected:
int number_pages_; // Number of pages to print in the print job.
int cookie_;
- scoped_ptr<base::DictionaryValue> m_printSettings;
+ std::unique_ptr<base::DictionaryValue> m_printSettings;
// content::NotificationObserver implementation.
void Observe(int,
diff --git a/src/core/print_view_manager_qt.cpp b/src/core/print_view_manager_qt.cpp
index f657b8289..0231df8bd 100644
--- a/src/core/print_view_manager_qt.cpp
+++ b/src/core/print_view_manager_qt.cpp
@@ -43,14 +43,17 @@
#include "type_conversion.h"
#include "web_engine_context.h"
-#include <QtGui/QPageLayout>
-#include <QtGui/QPageSize>
+#include <QtGui/qpagelayout.h>
+#include <QtGui/qpagesize.h>
#include "base/values.h"
+#include "base/memory/ref_counted_memory.h"
#include "chrome/browser/printing/print_job_manager.h"
#include "chrome/browser/printing/printer_query.h"
#include "components/printing/common/print_messages.h"
+#include "content/browser/renderer_host/render_view_host_impl.h"
#include "content/public/browser/browser_thread.h"
+#include "content/public/common/web_preferences.h"
#include "printing/pdf_metafile_skia.h"
#include "printing/print_job_constants.h"
@@ -61,7 +64,7 @@ static const qreal kMicronsToMillimeter = 1000.0f;
static std::vector<char>
GetStdVectorFromHandle(base::SharedMemoryHandle handle, uint32_t data_size) {
- scoped_ptr<base::SharedMemory> shared_buf(
+ std::unique_ptr<base::SharedMemory> shared_buf(
new base::SharedMemory(handle, true));
if (!shared_buf->Map(data_size)) {
@@ -74,7 +77,7 @@ GetStdVectorFromHandle(base::SharedMemoryHandle handle, uint32_t data_size) {
static scoped_refptr<base::RefCountedBytes>
GetBytesFromHandle(base::SharedMemoryHandle handle, uint32_t data_size) {
- scoped_ptr<base::SharedMemory> shared_buf(
+ std::unique_ptr<base::SharedMemory> shared_buf(
new base::SharedMemory(handle, true));
if (!shared_buf->Map(data_size)) {
@@ -92,7 +95,7 @@ static void SavePdfFile(scoped_refptr<base::RefCountedBytes> data,
DCHECK_CURRENTLY_ON(content::BrowserThread::FILE);
DCHECK_GT(data->size(), 0U);
- printing::PdfMetafileSkia metafile;
+ printing::PdfMetafileSkia metafile(printing::PDF_SKIA_DOCUMENT_TYPE);
metafile.InitFromData(static_cast<const void*>(data->front()), data->size());
base::File file(path,
@@ -139,18 +142,19 @@ static base::DictionaryValue *createPrintSettingsFromQPageLayout(const QPageLayo
//Set page size attributes, chromium expects these in micrometers
QSizeF pageSizeInMilimeter = pageLayout.pageSize().size(QPageSize::Millimeter);
- scoped_ptr<base::DictionaryValue> sizeDict(new base::DictionaryValue);
+ std::unique_ptr<base::DictionaryValue> sizeDict(new base::DictionaryValue);
sizeDict->SetInteger(printing::kSettingMediaSizeWidthMicrons, pageSizeInMilimeter.width() * kMicronsToMillimeter);
sizeDict->SetInteger(printing::kSettingMediaSizeHeightMicrons, pageSizeInMilimeter.height() * kMicronsToMillimeter);
printSettings->Set(printing::kSettingMediaSize, std::move(sizeDict));
// Apply page margins
QMargins pageMarginsInPoints = pageLayout.marginsPoints();
- scoped_ptr<base::DictionaryValue> marginsDict(new base::DictionaryValue);
+ std::unique_ptr<base::DictionaryValue> marginsDict(new base::DictionaryValue);
marginsDict->SetInteger(printing::kSettingMarginTop, pageMarginsInPoints.top());
marginsDict->SetInteger(printing::kSettingMarginBottom, pageMarginsInPoints.bottom());
marginsDict->SetInteger(printing::kSettingMarginLeft, pageMarginsInPoints.left());
marginsDict->SetInteger(printing::kSettingMarginRight, pageMarginsInPoints.right());
+
printSettings->Set(printing::kSettingMarginsCustom, std::move(marginsDict));
printSettings->SetInteger(printing::kSettingMarginsType, printing::CUSTOM_MARGINS);
@@ -168,20 +172,20 @@ PrintViewManagerQt::~PrintViewManagerQt()
}
#if defined(ENABLE_BASIC_PRINTING)
-bool PrintViewManagerQt::PrintToPDF(const QPageLayout &pageLayout, const QString &filePath)
+bool PrintViewManagerQt::PrintToPDF(const QPageLayout &pageLayout, bool printInColor, const QString &filePath)
{
if (m_printSettings || !filePath.length())
return false;
m_pdfOutputPath = toFilePath(filePath);
- if (!PrintToPDFInternal(pageLayout)) {
+ if (!PrintToPDFInternal(pageLayout, printInColor)) {
resetPdfState();
return false;
}
return true;
}
-bool PrintViewManagerQt::PrintToPDFWithCallback(const QPageLayout &pageLayout, const PrintToPDFCallback& callback)
+bool PrintViewManagerQt::PrintToPDFWithCallback(const QPageLayout &pageLayout, bool printInColor, const PrintToPDFCallback& callback)
{
if (callback.is_null())
return false;
@@ -195,7 +199,7 @@ bool PrintViewManagerQt::PrintToPDFWithCallback(const QPageLayout &pageLayout, c
}
m_pdfPrintCallback = callback;
- if (!PrintToPDFInternal(pageLayout)) {
+ if (!PrintToPDFInternal(pageLayout, printInColor)) {
content::BrowserThread::PostTask(content::BrowserThread::UI,
FROM_HERE,
base::Bind(callback, std::vector<char>()));
@@ -206,13 +210,15 @@ bool PrintViewManagerQt::PrintToPDFWithCallback(const QPageLayout &pageLayout, c
return true;
}
-bool PrintViewManagerQt::PrintToPDFInternal(const QPageLayout &pageLayout)
+bool PrintViewManagerQt::PrintToPDFInternal(const QPageLayout &pageLayout, bool printInColor)
{
if (!pageLayout.isValid())
return false;
- m_printSettings.reset(createPrintSettingsFromQPageLayout(pageLayout));
- m_printSettings->SetInteger(printing::kSettingColor, printing::COLOR);
+ m_printSettings.reset(createPrintSettingsFromQPageLayout(pageLayout));
+ m_printSettings->SetBoolean(printing::kSettingShouldPrintBackgrounds
+ , web_contents()->GetRenderViewHost()->GetWebkitPreferences().should_print_backgrounds);
+ m_printSettings->SetInteger(printing::kSettingColor, printInColor ? printing::COLOR : printing::GRAYSCALE);
return Send(new PrintMsg_InitiatePrintPreview(routing_id(), false));
}
diff --git a/src/core/print_view_manager_qt.h b/src/core/print_view_manager_qt.h
index 88a499f1b..668516096 100644
--- a/src/core/print_view_manager_qt.h
+++ b/src/core/print_view_manager_qt.h
@@ -45,8 +45,8 @@
#include <QtWebEngineCore/qtwebenginecoreglobal.h>
#include "base/memory/ref_counted.h"
-#include "base/prefs/pref_member.h"
#include "base/strings/string16.h"
+#include "components/prefs/pref_member.h"
#include "components/printing/browser/print_manager.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
@@ -83,8 +83,8 @@ public:
typedef base::Callback<void(const std::vector<char> &result)> PrintToPDFCallback;
#if defined(ENABLE_BASIC_PRINTING)
// Method to print a page to a Pdf document with page size \a pageSize in location \a filePath.
- bool PrintToPDF(const QPageLayout& pageLayout, const QString& filePath);
- bool PrintToPDFWithCallback(const QPageLayout& pageLayout, const PrintToPDFCallback& callback);
+ bool PrintToPDF(const QPageLayout &pageLayout, bool printInColor, const QString &filePath);
+ bool PrintToPDFWithCallback(const QPageLayout &pageLayout, bool printInColor, const PrintToPDFCallback &callback);
#endif // ENABLE_BASIC_PRINTING
// PrintedPagesSource implementation.
@@ -109,7 +109,7 @@ protected:
void OnMetafileReadyForPrinting(const PrintHostMsg_DidPreviewDocument_Params& params);
#if defined(ENABLE_BASIC_PRINTING)
- bool PrintToPDFInternal(const QPageLayout &);
+ bool PrintToPDFInternal(const QPageLayout &, bool printInColor);
#endif //
base::FilePath m_pdfOutputPath;
diff --git a/src/core/printing_message_filter_qt.cpp b/src/core/printing_message_filter_qt.cpp
index ba4d5c6e6..a84ec491f 100644
--- a/src/core/printing_message_filter_qt.cpp
+++ b/src/core/printing_message_filter_qt.cpp
@@ -76,9 +76,6 @@ void PrintingMessageFilterQt::OverrideThreadForMessage(
bool PrintingMessageFilterQt::OnMessageReceived(const IPC::Message& message) {
bool handled = true;
IPC_BEGIN_MESSAGE_MAP(PrintingMessageFilterQt, message)
-#if defined(OS_WIN)
- IPC_MESSAGE_HANDLER(PrintHostMsg_DuplicateSection, OnDuplicateSection)
-#endif
IPC_MESSAGE_HANDLER(PrintHostMsg_IsPrintingEnabled, OnIsPrintingEnabled)
IPC_MESSAGE_HANDLER_DELAY_REPLY(PrintHostMsg_GetDefaultPrintSettings,
OnGetDefaultPrintSettings)
@@ -91,17 +88,6 @@ bool PrintingMessageFilterQt::OnMessageReceived(const IPC::Message& message) {
return handled;
}
-#if defined(OS_WIN)
-void PrintingMessageFilterQt::OnDuplicateSection(
- base::SharedMemoryHandle renderer_handle,
- base::SharedMemoryHandle* browser_handle) {
- // Duplicate the handle in this process right now so the memory is kept alive
- // (even if it is not mapped)
- base::SharedMemory shared_buf(renderer_handle, true, PeerHandle());
- shared_buf.GiveToProcess(base::GetCurrentProcessHandle(), browser_handle);
-}
-#endif
-
void PrintingMessageFilterQt::OnIsPrintingEnabled(bool* is_enabled) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
*is_enabled = true;
@@ -201,7 +187,7 @@ void PrintingMessageFilterQt::OnScriptedPrintReply(
void PrintingMessageFilterQt::OnUpdatePrintSettings(
int document_cookie, const base::DictionaryValue& job_settings,
IPC::Message* reply_msg) {
- scoped_ptr<base::DictionaryValue> new_settings(job_settings.DeepCopy());
+ std::unique_ptr<base::DictionaryValue> new_settings(job_settings.DeepCopy());
scoped_refptr<printing::PrinterQuery> printer_query;
printer_query = queue_->PopPrinterQuery(document_cookie);
diff --git a/src/core/printing_message_filter_qt.h b/src/core/printing_message_filter_qt.h
index 95d63f570..156a31250 100644
--- a/src/core/printing_message_filter_qt.h
+++ b/src/core/printing_message_filter_qt.h
@@ -44,7 +44,7 @@
#include <string>
#include "base/compiler_specific.h"
-#include "base/prefs/pref_member.h"
+#include "components/prefs/pref_member.h"
#include "content/public/browser/browser_message_filter.h"
#if defined(OS_WIN)
@@ -84,12 +84,6 @@ class PrintingMessageFilterQt : public content::BrowserMessageFilter {
private:
~PrintingMessageFilterQt() override;
-#if defined(OS_WIN)
- // Used to pass resulting EMF from renderer to browser in printing.
- void OnDuplicateSection(base::SharedMemoryHandle renderer_handle,
- base::SharedMemoryHandle* browser_handle);
-#endif
-
// GetPrintSettingsForRenderView must be called via PostTask and
// base::Bind. Collapse the settings-specific params into a
// struct to avoid running into issues with too many params
diff --git a/src/core/proxy_config_service_qt.cpp b/src/core/proxy_config_service_qt.cpp
index bd5d0375d..5bc30b6bc 100644
--- a/src/core/proxy_config_service_qt.cpp
+++ b/src/core/proxy_config_service_qt.cpp
@@ -69,7 +69,7 @@ net::ProxyServer ProxyConfigServiceQt::fromQNetworkProxy(const QNetworkProxy &qt
//================ Based on ChromeProxyConfigService =======================
-ProxyConfigServiceQt::ProxyConfigServiceQt(scoped_ptr<ProxyConfigService> baseService)
+ProxyConfigServiceQt::ProxyConfigServiceQt(std::unique_ptr<ProxyConfigService> baseService)
: m_baseService(baseService.release()),
m_registeredObserver(false)
{
@@ -109,7 +109,8 @@ net::ProxyConfigService::ConfigAvailability ProxyConfigServiceQt::GetLatestProxy
}
m_qtApplicationProxy = qtProxy;
m_qtProxyConfig = net::ProxyConfig();
- if (qtProxy.type() == QNetworkProxy::NoProxy) {
+ if (qtProxy.type() == QNetworkProxy::NoProxy
+ && QNetworkProxyFactory::usesSystemConfiguration()) {
*config = systemConfig;
return systemAvailability;
}
diff --git a/src/core/proxy_config_service_qt.h b/src/core/proxy_config_service_qt.h
index da24e3337..f2f9a2210 100644
--- a/src/core/proxy_config_service_qt.h
+++ b/src/core/proxy_config_service_qt.h
@@ -41,7 +41,6 @@
#define PROXY_CONFIG_SERVICE_QT_H
#include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
#include "base/observer_list.h"
#include "net/proxy/proxy_config.h"
@@ -56,7 +55,7 @@ public:
static net::ProxyServer fromQNetworkProxy(const QNetworkProxy &);
- explicit ProxyConfigServiceQt(scoped_ptr<ProxyConfigService> baseService);
+ explicit ProxyConfigServiceQt(std::unique_ptr<ProxyConfigService> baseService);
~ProxyConfigServiceQt() override;
// ProxyConfigService implementation:
@@ -73,7 +72,7 @@ private:
// Makes sure that the observer registration with the base service is set up.
void RegisterObserver();
- scoped_ptr<net::ProxyConfigService> m_baseService;
+ std::unique_ptr<net::ProxyConfigService> m_baseService;
base::ObserverList<net::ProxyConfigService::Observer, true> m_observers;
// Keep the last QNetworkProxy::applicationProxy state around.
diff --git a/src/core/qtwebengine.gypi b/src/core/qtwebengine.gypi
index 816962d3d..d0ab01534 100644
--- a/src/core/qtwebengine.gypi
+++ b/src/core/qtwebengine.gypi
@@ -8,15 +8,18 @@
'dependencies': [
'<(chromium_src_dir)/base/base.gyp:base',
'<(chromium_src_dir)/base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
- '<(chromium_src_dir)/chrome/tools/convert_dict/convert_dict.gyp:convert_dict_lib',
+ '<(chromium_src_dir)/components/components.gyp:cdm_renderer',
'<(chromium_src_dir)/components/components.gyp:devtools_discovery',
'<(chromium_src_dir)/components/components.gyp:devtools_http_handler',
'<(chromium_src_dir)/components/components.gyp:error_page_renderer',
+ '<(chromium_src_dir)/components/components.gyp:keyed_service_content',
+ '<(chromium_src_dir)/components/components.gyp:keyed_service_core',
+ '<(chromium_src_dir)/components/components.gyp:pref_registry',
+ '<(chromium_src_dir)/components/components.gyp:user_prefs',
'<(chromium_src_dir)/components/components.gyp:visitedlink_browser',
'<(chromium_src_dir)/components/components.gyp:visitedlink_renderer',
'<(chromium_src_dir)/components/components.gyp:web_cache_browser',
'<(chromium_src_dir)/components/components.gyp:web_cache_renderer',
- '<(chromium_src_dir)/components/components.gyp:cdm_renderer',
'<(chromium_src_dir)/content/content.gyp:content',
'<(chromium_src_dir)/content/content.gyp:content_app_browser',
'<(chromium_src_dir)/content/content.gyp:content_browser',
@@ -36,7 +39,7 @@
'<(chromium_src_dir)/ui/base/ui_base.gyp:ui_base',
'<(chromium_src_dir)/ui/gl/gl.gyp:gl',
'<(chromium_src_dir)/url/url.gyp:url_lib',
- '<(chromium_src_dir)/v8/tools/gyp/v8.gyp:v8',
+ '<(chromium_src_dir)/v8/src/v8.gyp:v8',
'<(qtwebengine_root)/src/core/chrome_qt.gyp:chrome_qt',
],
@@ -85,7 +88,8 @@
},
},
'dependencies': [
- '<(chromium_src_dir)/ui/events/ozone/events_ozone.gyp:events_ozone_evdev'
+ '<(chromium_src_dir)/ui/events/ozone/events_ozone.gyp:events_ozone_evdev',
+ '<(chromium_src_dir)/ui/ozone/ozone.gyp:ozone_common',
]
}],
['qt_os=="win32" and qt_gl=="opengl"', {
diff --git a/src/core/qtwebengine_extras.gypi b/src/core/qtwebengine_extras.gypi
index 229421efa..8e4c655a9 100644
--- a/src/core/qtwebengine_extras.gypi
+++ b/src/core/qtwebengine_extras.gypi
@@ -32,21 +32,28 @@
['exclude', 'browser/renderer_host/render_widget_host_view_mac\\.(mm|h)$'],
['exclude', 'browser/renderer_host/render_widget_host_view_win\\.(cc|h)$'],
['exclude', 'common/font_list_pango\\.cc$'],
- ['exclude', 'browser/accessibility/browser_accessibility_cocoa\\.(cc|h)$'],
+ ['exclude', 'browser/accessibility/browser_accessibility_cocoa\\.(mm|h)$'],
['exclude', 'browser/accessibility/browser_accessibility_gtk\\.(cc|h)$'],
- ['exclude', 'browser/accessibility/browser_accessibility_mac\\.(cc|h)$'],
+ ['exclude', 'browser/accessibility/browser_accessibility_mac\\.(mm|h)$'],
['exclude', 'browser/accessibility/browser_accessibility_win\\.(cc|h)$'],
+ ['exclude', 'browser/accessibility/browser_accessibility_event_win\\.(cc|h)$'],
['exclude', 'browser/accessibility/browser_accessibility_manager_gtk\\.(cc|h)$'],
- ['exclude', 'browser/accessibility/browser_accessibility_manager_mac\\.(cc|h)$'],
+ ['exclude', 'browser/accessibility/browser_accessibility_manager_mac\\.(mm|h)$'],
['exclude', 'browser/accessibility/browser_accessibility_manager_win\\.(cc|h)$'],
['exclude', 'command_buffer/service/async_pixel_transfer_manager_egl\\.(cc|h)$'],
['exclude', 'common/gpu/image_transport_surface_linux\\.cc$'],
['exclude', 'common/gpu/image_transport_surface_win\\.cc$'],
['exclude', 'gl_surface_egl\\.cc$'],
+ ['exclude', 'gl_surface_egl_ozone\\.cc$'],
+ ['exclude', 'gl_surface_egl_win\\.cc$'],
+ ['exclude', 'gl_surface_egl_x11\\.cc$'],
['exclude', 'gl_surface_glx\\.cc$'],
- ['exclude', 'gl_surface_x11\\.cc$'],
- ['exclude', 'gl_surface_win\\.cc$'],
['exclude', 'gl_surface_ozone\\.cc$'],
+ ['exclude', 'gl_factory_ozone\\.cc$'],
+ ['exclude', 'gl_factory_win\\.cc$'],
+ ['exclude', 'gl_initializer_ozone\\.cc$'],
+ ['exclude', 'gl_initializer_win\\.cc$'],
+ ['exclude', 'gl_initializer_x11\\.cc$'],
# Avoid the ATL dependency to allow building with VS Express
['exclude', 'browser/accessibility/accessibility_tree_formatter\\.(cc|h)$',],
['exclude', 'browser/accessibility/accessibility_tree_formatter_mac\\.(mm|h)$',],
diff --git a/src/core/render_widget_host_view_qt.cpp b/src/core/render_widget_host_view_qt.cpp
index f45db6bf4..097dda1cd 100644
--- a/src/core/render_widget_host_view_qt.cpp
+++ b/src/core/render_widget_host_view_qt.cpp
@@ -343,18 +343,14 @@ gfx::NativeView RenderWidgetHostViewQt::GetNativeView() const
return gfx::NativeView();
}
-gfx::NativeViewId RenderWidgetHostViewQt::GetNativeViewId() const
-{
- return 0;
-}
-
gfx::NativeViewAccessible RenderWidgetHostViewQt::GetNativeViewAccessible()
{
return 0;
}
-content::BrowserAccessibilityManager* RenderWidgetHostViewQt::CreateBrowserAccessibilityManager(content::BrowserAccessibilityDelegate* delegate)
+content::BrowserAccessibilityManager* RenderWidgetHostViewQt::CreateBrowserAccessibilityManager(content::BrowserAccessibilityDelegate* delegate, bool for_root_frame)
{
+ Q_UNUSED(for_root_frame); // FIXME
#ifndef QT_NO_ACCESSIBILITY
return new content::BrowserAccessibilityManagerQt(
m_adapterClient->accessibilityParentObject(),
@@ -435,11 +431,6 @@ void RenderWidgetHostViewQt::UnlockMouse()
m_host->LostMouseLock();
}
-void RenderWidgetHostViewQt::MovePluginWindows(const std::vector<content::WebPluginGeometry>&)
-{
- // QT_NOT_YET_IMPLEMENTED
-}
-
void RenderWidgetHostViewQt::UpdateCursor(const content::WebCursor &webCursor)
{
content::WebCursor::CursorInfo cursorInfo;
@@ -580,7 +571,7 @@ void RenderWidgetHostViewQt::SetIsLoading(bool)
// We use WebContentsDelegateQt::LoadingStateChanged to notify about loading state.
}
-void RenderWidgetHostViewQt::TextInputStateChanged(const ViewHostMsg_TextInputState_Params &params)
+void RenderWidgetHostViewQt::TextInputStateChanged(const content::TextInputState &params)
{
m_currentInputType = params.type;
m_delegate->inputMethodStateChanged(params.type != ui::TEXT_INPUT_TYPE_NONE);
@@ -612,7 +603,7 @@ void RenderWidgetHostViewQt::Destroy()
void RenderWidgetHostViewQt::SetTooltipText(const base::string16 &tooltip_text)
{
- m_delegate->setTooltip(toQt(tooltip_text));
+ m_adapterClient->setToolTip(toQt(tooltip_text));
}
void RenderWidgetHostViewQt::SelectionBoundsChanged(const ViewHostMsg_SelectionBounds_Params &params)
@@ -664,19 +655,19 @@ void RenderWidgetHostViewQt::UnlockCompositingSurface()
{
}
-void RenderWidgetHostViewQt::OnSwapCompositorFrame(uint32_t output_surface_id, scoped_ptr<cc::CompositorFrame> frame)
+void RenderWidgetHostViewQt::OnSwapCompositorFrame(uint32_t output_surface_id, cc::CompositorFrame frame)
{
- bool scrollOffsetChanged = (m_lastScrollOffset != frame->metadata.root_scroll_offset);
- bool contentsSizeChanged = (m_lastContentsSize != frame->metadata.root_layer_size);
- m_lastScrollOffset = frame->metadata.root_scroll_offset;
- m_lastContentsSize = frame->metadata.root_layer_size;
+ bool scrollOffsetChanged = (m_lastScrollOffset != frame.metadata.root_scroll_offset);
+ bool contentsSizeChanged = (m_lastContentsSize != frame.metadata.root_layer_size);
+ m_lastScrollOffset = frame.metadata.root_scroll_offset;
+ m_lastContentsSize = frame.metadata.root_layer_size;
Q_ASSERT(!m_needsDelegatedFrameAck);
m_needsDelegatedFrameAck = true;
m_pendingOutputSurfaceId = output_surface_id;
- Q_ASSERT(frame->delegated_frame_data);
+ Q_ASSERT(frame.delegated_frame_data);
Q_ASSERT(!m_chromiumCompositorData->frameData || m_chromiumCompositorData->frameData->resource_list.empty());
- m_chromiumCompositorData->frameData = std::move(frame->delegated_frame_data);
- m_chromiumCompositorData->frameDevicePixelRatio = frame->metadata.device_scale_factor;
+ m_chromiumCompositorData->frameData = std::move(frame.delegated_frame_data);
+ m_chromiumCompositorData->frameDevicePixelRatio = frame.metadata.device_scale_factor;
// Support experimental.viewport.devicePixelRatio, see GetScreenInfo implementation below.
float dpiScale = this->dpiScale();
@@ -720,11 +711,6 @@ void RenderWidgetHostViewQt::ClearCompositorFrame()
{
}
-bool RenderWidgetHostViewQt::GetScreenColorProfile(std::vector<char>*)
-{
- return false;
-}
-
void RenderWidgetHostViewQt::SelectionChanged(const base::string16 &text, size_t offset, const gfx::Range &range)
{
content::RenderWidgetHostViewBase::SelectionChanged(text, offset, range);
@@ -882,7 +868,7 @@ void RenderWidgetHostViewQt::processMotionEvent(const ui::MotionEvent &motionEve
return;
blink::WebTouchEvent touchEvent = ui::CreateWebTouchEventFromMotionEvent(motionEvent,
- result.did_generate_scroll);
+ result.moved_beyond_slop_region);
m_host->ForwardTouchEventWithLatencyInfo(touchEvent, CreateLatencyInfo(touchEvent));
}
@@ -1032,14 +1018,6 @@ void RenderWidgetHostViewQt::handleInputMethodEvent(QInputMethodEvent *ev)
}
};
- auto setCompositionForPreEditString = [&](){
- ensureValidSelectionRange();
- m_host->ImeSetComposition(toString16(preeditString),
- underlines,
- selectionRange.start(),
- selectionRange.end());
- };
-
Q_FOREACH (const QInputMethodEvent::Attribute &attribute, attributes) {
switch (attribute.type) {
case QInputMethodEvent::TextFormat: {
@@ -1048,7 +1026,25 @@ void RenderWidgetHostViewQt::handleInputMethodEvent(QInputMethodEvent *ev)
int start = qMin(attribute.start, (attribute.start + attribute.length));
int end = qMax(attribute.start, (attribute.start + attribute.length));
- underlines.push_back(blink::WebCompositionUnderline(start, end, /*color*/ SK_ColorBLACK, /*thick*/ false, /*backgroundColor*/ SK_ColorTRANSPARENT));
+
+ // Blink does not support negative position values. Adjust start and end positions
+ // to non-negative values.
+ if (start < 0) {
+ start = 0;
+ end = qMax(0, start + end);
+ }
+
+ QTextCharFormat format = qvariant_cast<QTextFormat>(attribute.value).toCharFormat();
+
+ QColor underlineColor(0, 0, 0, 0);
+ if (format.underlineStyle() != QTextCharFormat::NoUnderline)
+ underlineColor = format.underlineColor();
+
+ QColor backgroundColor(0, 0, 0, 0);
+ if (format.background().style() != Qt::NoBrush)
+ backgroundColor = format.background().color();
+
+ underlines.push_back(blink::WebCompositionUnderline(start, end, toSk(underlineColor), /*thick*/ false, toSk(backgroundColor)));
break;
}
case QInputMethodEvent::Cursor:
@@ -1067,9 +1063,19 @@ void RenderWidgetHostViewQt::handleInputMethodEvent(QInputMethodEvent *ev)
}
}
+ gfx::Range replacementRange = (replacementLength > 0) ? gfx::Range(replacementStart, replacementStart + replacementLength)
+ : gfx::Range::InvalidRange();
+
+ auto setCompositionForPreEditString = [&](){
+ ensureValidSelectionRange();
+ m_host->ImeSetComposition(toString16(preeditString),
+ underlines,
+ replacementRange,
+ selectionRange.start(),
+ selectionRange.end());
+ };
+
if (!commitString.isEmpty()) {
- gfx::Range replacementRange = (replacementLength > 0) ? gfx::Range(replacementStart, replacementStart + replacementLength)
- : gfx::Range::InvalidRange();
m_host->ImeConfirmComposition(toString16(commitString), replacementRange, false);
// We might get a commit string and a pre-edit string in a single event, which means
diff --git a/src/core/render_widget_host_view_qt.h b/src/core/render_widget_host_view_qt.h
index 523d1c49d..d6c77fada 100644
--- a/src/core/render_widget_host_view_qt.h
+++ b/src/core/render_widget_host_view_qt.h
@@ -42,13 +42,12 @@
#include "render_widget_host_view_qt_delegate.h"
-#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "cc/resources/transferable_resource.h"
#include "content/browser/accessibility/browser_accessibility_manager.h"
#include "content/browser/renderer_host/render_widget_host_view_base.h"
-#include "content/common/gpu/gpu_messages.h"
#include "content/common/view_messages.h"
+#include "gpu/ipc/common/gpu_messages.h"
#include "ui/events/gesture_detection/filtered_gesture_provider.h"
#include "qtwebenginecoreglobal_p.h"
#include <QMap>
@@ -120,7 +119,6 @@ public:
virtual gfx::Vector2dF GetLastScrollOffset() const Q_DECL_OVERRIDE;
virtual gfx::Size GetPhysicalBackingSize() const Q_DECL_OVERRIDE;
virtual gfx::NativeView GetNativeView() const Q_DECL_OVERRIDE;
- virtual gfx::NativeViewId GetNativeViewId() const Q_DECL_OVERRIDE;
virtual gfx::NativeViewAccessible GetNativeViewAccessible() Q_DECL_OVERRIDE;
virtual void Focus() Q_DECL_OVERRIDE;
virtual bool HasFocus() const Q_DECL_OVERRIDE;
@@ -132,10 +130,9 @@ public:
virtual void SetBackgroundColor(SkColor color) Q_DECL_OVERRIDE;
virtual bool LockMouse() Q_DECL_OVERRIDE;
virtual void UnlockMouse() Q_DECL_OVERRIDE;
- virtual void MovePluginWindows(const std::vector<content::WebPluginGeometry>&) Q_DECL_OVERRIDE;
virtual void UpdateCursor(const content::WebCursor&) Q_DECL_OVERRIDE;
virtual void SetIsLoading(bool) Q_DECL_OVERRIDE;
- virtual void TextInputStateChanged(const ViewHostMsg_TextInputState_Params&) Q_DECL_OVERRIDE;
+ virtual void TextInputStateChanged(const content::TextInputState& params) Q_DECL_OVERRIDE;
virtual void ImeCancelComposition() Q_DECL_OVERRIDE;
virtual void ImeCompositionRangeChanged(const gfx::Range&, const std::vector<gfx::Rect>&) Q_DECL_OVERRIDE;
virtual void RenderProcessGone(base::TerminationStatus, int) Q_DECL_OVERRIDE;
@@ -147,12 +144,12 @@ public:
virtual bool CanCopyToVideoFrame() const Q_DECL_OVERRIDE;
virtual bool HasAcceleratedSurface(const gfx::Size&) Q_DECL_OVERRIDE;
- virtual void OnSwapCompositorFrame(uint32_t output_surface_id, scoped_ptr<cc::CompositorFrame> frame) Q_DECL_OVERRIDE;
+ virtual void OnSwapCompositorFrame(uint32_t output_surface_id, cc::CompositorFrame frame) Q_DECL_OVERRIDE;
+
virtual void GetScreenInfo(blink::WebScreenInfo* results) Q_DECL_OVERRIDE;
virtual gfx::Rect GetBoundsInRootWindow() Q_DECL_OVERRIDE;
virtual void ProcessAckedTouchEvent(const content::TouchEventWithLatencyInfo &touch, content::InputEventAckState ack_result) Q_DECL_OVERRIDE;
virtual void ClearCompositorFrame() Q_DECL_OVERRIDE;
- virtual bool GetScreenColorProfile(std::vector<char>*) Q_DECL_OVERRIDE;
virtual void LockCompositingSurface() Q_DECL_OVERRIDE;
virtual void UnlockCompositingSurface() Q_DECL_OVERRIDE;
@@ -184,26 +181,15 @@ public:
virtual void SetActive(bool active) Q_DECL_OVERRIDE { QT_NOT_YET_IMPLEMENTED }
virtual bool IsSpeaking() const Q_DECL_OVERRIDE { QT_NOT_YET_IMPLEMENTED; return false; }
virtual void SpeakSelection() Q_DECL_OVERRIDE { QT_NOT_YET_IMPLEMENTED }
- virtual bool PostProcessEventForPluginIme(const content::NativeWebKeyboardEvent& event) Q_DECL_OVERRIDE { QT_NOT_YET_IMPLEMENTED; return false; }
virtual void StopSpeaking() Q_DECL_OVERRIDE { QT_NOT_YET_IMPLEMENTED }
- virtual void SetWindowVisibility(bool visible) Q_DECL_OVERRIDE { QT_NOT_YET_IMPLEMENTED }
virtual bool SupportsSpeech() const Q_DECL_OVERRIDE { QT_NOT_YET_IMPLEMENTED; return false; }
virtual void ShowDefinitionForSelection() Q_DECL_OVERRIDE { QT_NOT_YET_IMPLEMENTED }
- virtual void WindowFrameChanged() Q_DECL_OVERRIDE { QT_NOT_YET_IMPLEMENTED }
+ virtual ui::AcceleratedWidgetMac *GetAcceleratedWidgetMac() const Q_DECL_OVERRIDE { QT_NOT_YET_IMPLEMENTED; return nullptr; }
#endif // defined(OS_MACOSX)
-#if defined(OS_WIN)
-#if defined(USE_AURA)
- virtual void SetParentNativeViewAccessible(gfx::NativeViewAccessible accessible_parent) Q_DECL_OVERRIDE { QT_NOT_YET_IMPLEMENTED }
- virtual gfx::NativeViewId GetParentForWindowlessPlugin() const Q_DECL_OVERRIDE { QT_NOT_YET_IMPLEMENTED return gfx::NativeViewId(); }
-#else
- virtual void SetClickthroughRegion(SkRegion *) Q_DECL_OVERRIDE { QT_NOT_YET_IMPLEMENTED }
- virtual void WillWmDestroy(void) Q_DECL_OVERRIDE { QT_NOT_YET_IMPLEMENTED }
-#endif // defined(USE_AURA)
-#endif // defined(OS_WIN)
// Overridden from content::BrowserAccessibilityDelegate
- virtual content::BrowserAccessibilityManager* CreateBrowserAccessibilityManager(content::BrowserAccessibilityDelegate* delegate) Q_DECL_OVERRIDE;
+ virtual content::BrowserAccessibilityManager* CreateBrowserAccessibilityManager(content::BrowserAccessibilityDelegate* delegate, bool for_root_frame) Q_DECL_OVERRIDE;
#ifndef QT_NO_ACCESSIBILITY
virtual void accessibilityActiveChanged(bool active) Q_DECL_OVERRIDE;
#endif // QT_NO_ACCESSIBILITY
@@ -227,7 +213,7 @@ private:
bool m_touchMotionStarted;
QMap<int, int> m_touchIdMapping;
QList<QTouchEvent::TouchPoint> m_previousTouchPoints;
- scoped_ptr<RenderWidgetHostViewQtDelegate> m_delegate;
+ std::unique_ptr<RenderWidgetHostViewQtDelegate> m_delegate;
QExplicitlySharedDataPointer<ChromiumCompositorData> m_chromiumCompositorData;
cc::ReturnedResourceArray m_resourcesToRelease;
diff --git a/src/core/render_widget_host_view_qt_delegate.h b/src/core/render_widget_host_view_qt_delegate.h
index ce6ec730a..1e50c8f08 100644
--- a/src/core/render_widget_host_view_qt_delegate.h
+++ b/src/core/render_widget_host_view_qt_delegate.h
@@ -49,13 +49,25 @@ QT_BEGIN_NAMESPACE
class QCursor;
class QEvent;
class QPainter;
-class QSGImageNode;
class QSGLayer;
class QSGNode;
+class QSGRectangleNode;
class QSGTexture;
class QVariant;
class QWindow;
class QInputMethodEvent;
+
+#if (QT_VERSION < QT_VERSION_CHECK(5, 8, 0))
+class QSGImageNode;
+typedef QSGImageNode QSGInternalImageNode;
+class QSGSimpleTextureNode;
+typedef QSGSimpleTextureNode QSGTextureNode;
+#else
+class QSGInternalImageNode;
+class QSGImageNode;
+typedef QSGImageNode QSGTextureNode;
+#endif
+
QT_END_NAMESPACE
namespace QtWebEngineCore {
@@ -92,13 +104,14 @@ public:
virtual QWindow* window() const = 0;
virtual QSGTexture *createTextureFromImage(const QImage &) = 0;
virtual QSGLayer *createLayer() = 0;
- virtual QSGImageNode *createImageNode() = 0;
+ virtual QSGInternalImageNode *createImageNode() = 0;
+ virtual QSGTextureNode *createTextureNode() = 0;
+ virtual QSGRectangleNode *createRectangleNode() = 0;
virtual void update() = 0;
virtual void updateCursor(const QCursor &) = 0;
virtual void resize(int width, int height) = 0;
virtual void move(const QPoint &) = 0;
virtual void inputMethodStateChanged(bool editorVisible) = 0;
- virtual void setTooltip(const QString &) = 0;
virtual void setClearColor(const QColor &color) = 0;
};
diff --git a/src/core/renderer/content_renderer_client_qt.cpp b/src/core/renderer/content_renderer_client_qt.cpp
index 5d1780cbe..69f5bfefe 100644
--- a/src/core/renderer/content_renderer_client_qt.cpp
+++ b/src/core/renderer/content_renderer_client_qt.cpp
@@ -43,18 +43,18 @@
#include "base/strings/string_split.h"
#include "base/strings/utf_string_conversions.h"
-#include "chrome/common/localized_error.h"
#if defined(ENABLE_SPELLCHECK)
#include "chrome/renderer/spellchecker/spellcheck.h"
#include "chrome/renderer/spellchecker/spellcheck_provider.h"
#endif
-#include "components/cdm/renderer/widevine_key_systems.h"
+#include "components/cdm/renderer/widevine_key_system_properties.h"
#include "components/error_page/common/error_page_params.h"
+#include "components/error_page/common/localized_error.h"
#if defined (ENABLE_BASIC_PRINTING)
#include "components/printing/renderer/print_web_view_helper.h"
#endif // if defined(ENABLE_BASIC_PRINTING)
#include "components/visitedlink/renderer/visitedlink_slave.h"
-#include "components/web_cache/renderer/web_cache_render_process_observer.h"
+#include "components/web_cache/renderer/web_cache_impl.h"
#include "content/public/renderer/render_frame.h"
#include "content/public/renderer/render_thread.h"
#include "content/public/renderer/render_view.h"
@@ -76,7 +76,7 @@
#include "renderer/render_view_observer_qt.h"
#include "renderer/user_resource_controller.h"
-#include "grit/renderer_resources.h"
+#include "components/grit/components_resources.h"
#include "widevine_cdm_version.h" // In SHARED_INTERMEDIATE_DIR.
@@ -85,17 +85,6 @@ namespace QtWebEngineCore {
static const char kHttpErrorDomain[] = "http";
static const char kQrcSchemeQt[] = "qrc";
-class RenderProcessObserverQt : public content::RenderProcessObserver {
-public:
- void WebKitInitialized() override
- {
- // Can only be done after blink is initialized.
- blink::WebString qrcScheme(base::ASCIIToUTF16(kQrcSchemeQt));
- // mark qrc as a secure scheme (avoids deprecation warnings)
- blink::WebSecurityPolicy::registerURLSchemeAsSecure(qrcScheme);
- }
-};
-
ContentRendererClientQt::ContentRendererClientQt()
{
}
@@ -108,23 +97,24 @@ void ContentRendererClientQt::RenderThreadStarted()
{
content::RenderThread *renderThread = content::RenderThread::Get();
m_visitedLinkSlave.reset(new visitedlink::VisitedLinkSlave);
- m_webCacheObserver.reset(new web_cache::WebCacheRenderProcessObserver());
- m_renderProcessObserver.reset(new RenderProcessObserverQt());
+ m_webCacheImpl.reset(new web_cache::WebCacheImpl());
renderThread->AddObserver(m_visitedLinkSlave.data());
- renderThread->AddObserver(m_webCacheObserver.data());
renderThread->AddObserver(UserResourceController::instance());
- renderThread->AddObserver(m_renderProcessObserver.data());
#if defined(ENABLE_SPELLCHECK)
m_spellCheck.reset(new SpellCheck());
renderThread->AddObserver(m_spellCheck.data());
#endif
+
+ blink::WebString qrcScheme(base::ASCIIToUTF16(kQrcSchemeQt));
+ // mark qrc as a secure scheme (avoids deprecation warnings)
+ blink::WebSecurityPolicy::registerURLSchemeAsSecure(qrcScheme);
}
void ContentRendererClientQt::RenderViewCreated(content::RenderView* render_view)
{
// RenderViewObservers destroy themselves with their RenderView.
- new RenderViewObserverQt(render_view, m_webCacheObserver.data());
+ new RenderViewObserverQt(render_view, m_webCacheImpl.data());
new WebChannelIPCTransport(render_view);
UserResourceController::instance()->renderViewCreated(render_view);
#if defined(ENABLE_SPELLCHECK)
@@ -133,9 +123,8 @@ void ContentRendererClientQt::RenderViewCreated(content::RenderView* render_view
#if defined(ENABLE_BASIC_PRINTING)
new printing::PrintWebViewHelper(
- render_view,
- scoped_ptr<printing::PrintWebViewHelper::Delegate>(
- new PrintWebViewHelperDelegateQt()));
+ render_view,
+ base::WrapUnique(new PrintWebViewHelperDelegateQt()));
#endif // defined(ENABLE_BASIC_PRINTING)
}
@@ -144,14 +133,38 @@ void ContentRendererClientQt::RenderFrameCreated(content::RenderFrame* render_fr
new QtWebEngineCore::RenderFrameObserverQt(render_frame);
}
+void ContentRendererClientQt::RunScriptsAtDocumentStart(content::RenderFrame* render_frame)
+{
+ // Check whether the render_frame has been created and has not been detached yet.
+ // Otherwise the WebFrame is not available.
+ RenderFrameObserverQt *render_frame_observer = RenderFrameObserverQt::Get(render_frame);
+ if (!render_frame_observer || render_frame_observer->isFrameDetached())
+ return; // The frame is invisible to scripts.
+
+ if (WebChannelIPCTransport *transport = WebChannelIPCTransport::Get(render_frame->GetRenderView()))
+ transport->RunScriptsAtDocumentStart(render_frame);
+ UserResourceController::instance()->RunScriptsAtDocumentStart(render_frame);
+}
+
+void ContentRendererClientQt::RunScriptsAtDocumentEnd(content::RenderFrame* render_frame)
+{
+ // Check whether the render_frame has been created and has not been detached yet.
+ // Otherwise the WebFrame is not available.
+ RenderFrameObserverQt *render_frame_observer = RenderFrameObserverQt::Get(render_frame);
+ if (!render_frame_observer || render_frame_observer->isFrameDetached())
+ return; // The frame is invisible to scripts.
+
+ UserResourceController::instance()->RunScriptsAtDocumentEnd(render_frame);
+}
+
bool ContentRendererClientQt::HasErrorPage(int httpStatusCode, std::string *errorDomain)
{
// Use an internal error page, if we have one for the status code.
- if (!LocalizedError::HasStrings(LocalizedError::kHttpErrorDomain, httpStatusCode)) {
+ if (!error_page::LocalizedError::HasStrings(error_page::LocalizedError::kHttpErrorDomain, httpStatusCode)) {
return false;
}
- *errorDomain = LocalizedError::kHttpErrorDomain;
+ *errorDomain = error_page::LocalizedError::kHttpErrorDomain;
return true;
}
@@ -173,9 +186,10 @@ void ContentRendererClientQt::GetNavigationErrorStrings(content::RenderFrame* re
const std::string locale = content::RenderThread::Get()->GetLocale();
// TODO(elproxy): We could potentially get better diagnostics here by first calling
// NetErrorHelper::GetErrorStringsForDnsProbe, but that one is harder to untangle.
- LocalizedError::GetStrings(error.reason, error.domain.utf8(), error.unreachableURL, isPost
- , error.staleCopyInCache && !isPost, false, error_page::OfflinePageStatus::NONE, locale, renderFrame->GetRenderView()->GetAcceptLanguages()
- , scoped_ptr<error_page::ErrorPageParams>(), &errorStrings);
+
+ error_page::LocalizedError::GetStrings(error.reason, error.domain.utf8(), error.unreachableURL, isPost
+ , error.staleCopyInCache && !isPost, false, false, locale
+ , std::unique_ptr<error_page::ErrorPageParams>(), &errorStrings);
resourceId = IDR_NET_ERROR_HTML;
@@ -187,7 +201,7 @@ void ContentRendererClientQt::GetNavigationErrorStrings(content::RenderFrame* re
}
if (errorDescription)
- *errorDescription = LocalizedError::GetErrorDetails(error.domain.utf8(), error.reason, isPost);
+ *errorDescription = error_page::LocalizedError::GetErrorDetails(error.domain.utf8(), error.reason, isPost);
}
unsigned long long ContentRendererClientQt::VisitedLinkHash(const char *canonicalUrl, size_t length)
@@ -206,6 +220,8 @@ bool ContentRendererClientQt::IsLinkVisited(unsigned long long linkHash)
// found in the LICENSE file.
#if defined(ENABLE_PEPPER_CDMS)
+static const char kExternalClearKeyPepperType[] = "application/x-ppapi-clearkey-cdm";
+
static bool IsPepperCdmAvailable(const std::string& pepper_type,
std::vector<base::string16>* additional_param_names,
std::vector<base::string16>* additional_param_values)
@@ -221,21 +237,94 @@ static bool IsPepperCdmAvailable(const std::string& pepper_type,
return is_available;
}
+// KeySystemProperties implementation for external Clear Key systems.
+class ExternalClearKeyProperties : public media::KeySystemProperties
+{
+public:
+ explicit ExternalClearKeyProperties(const std::string& key_system_name)
+ : key_system_name_(key_system_name) {}
+
+ std::string GetKeySystemName() const override { return key_system_name_; }
+ bool IsSupportedInitDataType(media::EmeInitDataType init_data_type) const override
+ {
+ switch (init_data_type) {
+ case media::EmeInitDataType::WEBM:
+ case media::EmeInitDataType::KEYIDS:
+ return true;
+
+ case media::EmeInitDataType::CENC:
+#if defined(USE_PROPRIETARY_CODECS)
+ return true;
+#else
+ return false;
+#endif // defined(USE_PROPRIETARY_CODECS)
+
+ case media::EmeInitDataType::UNKNOWN:
+ return false;
+ }
+ NOTREACHED();
+ return false;
+ }
+
+ media::SupportedCodecs GetSupportedCodecs() const override
+ {
+#if defined(USE_PROPRIETARY_CODECS)
+ return media::EME_CODEC_MP4_ALL | media::EME_CODEC_WEBM_ALL;
+#else
+ return media::EME_CODEC_WEBM_ALL;
+#endif
+ }
+
+ media::EmeConfigRule GetRobustnessConfigRule(
+ media::EmeMediaType media_type,
+ const std::string& requested_robustness) const override
+ {
+ return requested_robustness.empty() ? media::EmeConfigRule::SUPPORTED
+ : media::EmeConfigRule::NOT_SUPPORTED;
+ }
+
+ // Persistent license sessions are faked.
+ media::EmeSessionTypeSupport GetPersistentLicenseSessionSupport() const override
+ {
+ return media::EmeSessionTypeSupport::SUPPORTED;
+ }
+
+ media::EmeSessionTypeSupport GetPersistentReleaseMessageSessionSupport() const override {
+ return media::EmeSessionTypeSupport::NOT_SUPPORTED;
+ }
+
+ media::EmeFeatureSupport GetPersistentStateSupport() const override
+ {
+ return media::EmeFeatureSupport::REQUESTABLE;
+ }
+
+ media::EmeFeatureSupport GetDistinctiveIdentifierSupport() const override
+ {
+ return media::EmeFeatureSupport::NOT_SUPPORTED;
+ }
+
+ std::string GetPepperType() const override
+ {
+ return kExternalClearKeyPepperType;
+ }
+
+private:
+ const std::string key_system_name_;
+};
+
// External Clear Key (used for testing).
-static void AddExternalClearKey(std::vector<media::KeySystemInfo>* concrete_key_systems)
+static void AddExternalClearKey(std::vector<std::unique_ptr<media::KeySystemProperties>>* concrete_key_systems)
{
- static const char kExternalClearKeyKeySystem[] =
- "org.chromium.externalclearkey";
- static const char kExternalClearKeyDecryptOnlyKeySystem[] =
- "org.chromium.externalclearkey.decryptonly";
- static const char kExternalClearKeyFileIOTestKeySystem[] =
- "org.chromium.externalclearkey.fileiotest";
- static const char kExternalClearKeyInitializeFailKeySystem[] =
- "org.chromium.externalclearkey.initializefail";
- static const char kExternalClearKeyCrashKeySystem[] =
- "org.chromium.externalclearkey.crash";
- static const char kExternalClearKeyPepperType[] =
- "application/x-ppapi-clearkey-cdm";
+ static const char kExternalClearKeyKeySystem[] =
+ "org.chromium.externalclearkey";
+ static const char kExternalClearKeyDecryptOnlyKeySystem[] =
+ "org.chromium.externalclearkey.decryptonly";
+ static const char kExternalClearKeyFileIOTestKeySystem[] =
+ "org.chromium.externalclearkey.fileiotest";
+ static const char kExternalClearKeyInitializeFailKeySystem[] =
+ "org.chromium.externalclearkey.initializefail";
+ static const char kExternalClearKeyCrashKeySystem[] =
+ "org.chromium.externalclearkey.crash";
std::vector<base::string16> additional_param_names;
std::vector<base::string16> additional_param_values;
@@ -244,53 +333,31 @@ static void AddExternalClearKey(std::vector<media::KeySystemInfo>* concrete_key_
&additional_param_values))
return;
- media::KeySystemInfo info;
- info.key_system = kExternalClearKeyKeySystem;
-
- info.supported_init_data_types =
- media::kInitDataTypeMaskWebM | media::kInitDataTypeMaskKeyIds;
- info.supported_codecs = media::EME_CODEC_WEBM_ALL;
-#if defined(USE_PROPRIETARY_CODECS)
- info.supported_init_data_types |= media::kInitDataTypeMaskCenc;
- info.supported_codecs |= media::EME_CODEC_MP4_ALL;
-#endif // defined(USE_PROPRIETARY_CODECS)
-
- info.max_audio_robustness = media::EmeRobustness::EMPTY;
- info.max_video_robustness = media::EmeRobustness::EMPTY;
-
- // Persistent sessions are faked.
- info.persistent_license_support = media::EmeSessionTypeSupport::SUPPORTED;
- info.persistent_release_message_support =
- media::EmeSessionTypeSupport::NOT_SUPPORTED;
- info.persistent_state_support = media::EmeFeatureSupport::REQUESTABLE;
- info.distinctive_identifier_support = media::EmeFeatureSupport::NOT_SUPPORTED;
-
- info.pepper_type = kExternalClearKeyPepperType;
-
- concrete_key_systems->push_back(info);
+ concrete_key_systems->emplace_back(
+ new ExternalClearKeyProperties(kExternalClearKeyKeySystem));
// Add support of decrypt-only mode in ClearKeyCdm.
- info.key_system = kExternalClearKeyDecryptOnlyKeySystem;
- concrete_key_systems->push_back(info);
+ concrete_key_systems->emplace_back(
+ new ExternalClearKeyProperties(kExternalClearKeyDecryptOnlyKeySystem));
// A key system that triggers FileIO test in ClearKeyCdm.
- info.key_system = kExternalClearKeyFileIOTestKeySystem;
- concrete_key_systems->push_back(info);
+ concrete_key_systems->emplace_back(
+ new ExternalClearKeyProperties(kExternalClearKeyFileIOTestKeySystem));
// A key system that Chrome thinks is supported by ClearKeyCdm, but actually
// will be refused by ClearKeyCdm. This is to test the CDM initialization
// failure case.
- info.key_system = kExternalClearKeyInitializeFailKeySystem;
- concrete_key_systems->push_back(info);
+ concrete_key_systems->emplace_back(
+ new ExternalClearKeyProperties(kExternalClearKeyInitializeFailKeySystem));
// A key system that triggers a crash in ClearKeyCdm.
- info.key_system = kExternalClearKeyCrashKeySystem;
- concrete_key_systems->push_back(info);
+ concrete_key_systems->emplace_back(
+ new ExternalClearKeyProperties(kExternalClearKeyCrashKeySystem));
}
#if defined(WIDEVINE_CDM_AVAILABLE)
-static void AddPepperBasedWidevine(std::vector<media::KeySystemInfo>* concrete_key_systems)
+static void AddPepperBasedWidevine(std::vector<std::unique_ptr<media::KeySystemProperties>> *concrete_key_systems)
{
//#if defined(WIDEVINE_CDM_MIN_GLIBC_VERSION)
// Version glibc_version(gnu_get_libc_version());
@@ -319,26 +386,26 @@ static void AddPepperBasedWidevine(std::vector<media::KeySystemInfo>* concrete_k
supported_codecs |= media::EME_CODEC_MP4_AAC;
#endif // defined(USE_PROPRIETARY_CODECS)
- cdm::AddWidevineWithCodecs(
- cdm::WIDEVINE, supported_codecs,
- media::EmeRobustness::SW_SECURE_CRYPTO, // Maximum audio robustness.
- media::EmeRobustness::SW_SECURE_DECODE, // Maximum video robustness.
+ using Robustness = cdm::WidevineKeySystemProperties::Robustness;
+ concrete_key_systems->emplace_back(new cdm::WidevineKeySystemProperties(
+ supported_codecs,
+ Robustness::SW_SECURE_CRYPTO, // Maximum audio robustness.
+ Robustness::SW_SECURE_DECODE, // Maximum video robustness.
media::EmeSessionTypeSupport::NOT_SUPPORTED, // persistent-license.
media::EmeSessionTypeSupport::NOT_SUPPORTED, // persistent-release-message.
- media::EmeFeatureSupport::REQUESTABLE, // Persistent state.
- media::EmeFeatureSupport::NOT_SUPPORTED, // Distinctive identifier.
- concrete_key_systems);
+ media::EmeFeatureSupport::REQUESTABLE, // Persistent state.
+ media::EmeFeatureSupport::NOT_SUPPORTED)); // Distinctive identifier.
}
#endif // defined(WIDEVINE_CDM_AVAILABLE)
#endif // defined(ENABLE_PEPPER_CDMS)
-void ContentRendererClientQt::AddKeySystems(std::vector<media::KeySystemInfo>* key_systems_info)
+void ContentRendererClientQt::AddSupportedKeySystems(std::vector<std::unique_ptr<media::KeySystemProperties>> *key_systems)
{
#if defined(ENABLE_PEPPER_CDMS)
- AddExternalClearKey(key_systems_info);
+ AddExternalClearKey(key_systems);
#if defined(WIDEVINE_CDM_AVAILABLE)
- AddPepperBasedWidevine(key_systems_info);
+ AddPepperBasedWidevine(key_systems);
#endif // defined(WIDEVINE_CDM_AVAILABLE)
#endif // defined(ENABLE_PEPPER_CDMS)
}
diff --git a/src/core/renderer/content_renderer_client_qt.h b/src/core/renderer/content_renderer_client_qt.h
index d475c7801..72b4e4061 100644
--- a/src/core/renderer/content_renderer_client_qt.h
+++ b/src/core/renderer/content_renderer_client_qt.h
@@ -44,16 +44,12 @@
#include <QtGlobal>
#include <QScopedPointer>
-namespace content {
-class RenderProcessObserver;
-}
-
namespace visitedlink {
class VisitedLinkSlave;
}
namespace web_cache {
-class WebCacheRenderProcessObserver;
+class WebCacheImpl;
}
#if defined(ENABLE_SPELLCHECK)
@@ -76,12 +72,14 @@ public:
virtual unsigned long long VisitedLinkHash(const char *canonicalUrl, size_t length) Q_DECL_OVERRIDE;
virtual bool IsLinkVisited(unsigned long long linkHash) Q_DECL_OVERRIDE;
- virtual void AddKeySystems(std::vector<media::KeySystemInfo>* key_systems) Q_DECL_OVERRIDE;
+ virtual void AddSupportedKeySystems(std::vector<std::unique_ptr<media::KeySystemProperties>>* key_systems) Q_DECL_OVERRIDE;
+
+ virtual void RunScriptsAtDocumentStart(content::RenderFrame* render_frame) Q_DECL_OVERRIDE;
+ virtual void RunScriptsAtDocumentEnd(content::RenderFrame* render_frame) Q_DECL_OVERRIDE;
private:
QScopedPointer<visitedlink::VisitedLinkSlave> m_visitedLinkSlave;
- QScopedPointer<web_cache::WebCacheRenderProcessObserver> m_webCacheObserver;
- QScopedPointer<content::RenderProcessObserver> m_renderProcessObserver;
+ QScopedPointer<web_cache::WebCacheImpl> m_webCacheImpl;
#if defined(ENABLE_SPELLCHECK)
QScopedPointer<SpellCheck> m_spellCheck;
#endif
diff --git a/src/core/renderer/pepper/pepper_flash_clipboard_message_filter_qt.cpp b/src/core/renderer/pepper/pepper_flash_clipboard_message_filter_qt.cpp
deleted file mode 100644
index c1782844d..000000000
--- a/src/core/renderer/pepper/pepper_flash_clipboard_message_filter_qt.cpp
+++ /dev/null
@@ -1,401 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: http://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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://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.LGPLv3 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.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 later as published by the Free
-** Software Foundation and appearing in the file LICENSE.GPL included in
-** the packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 2.0 requirements will be
-** met: http://www.gnu.org/licenses/gpl-2.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-// based on chrome/browser/renderer_host/pepper/pepper_flash_clipboard_message_filter.cc
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "pepper_flash_clipboard_message_filter_qt.h"
-
-#include "base/pickle.h"
-#include "base/strings/utf_string_conversions.h"
-#include "content/public/browser/browser_thread.h"
-#include "ipc/ipc_message.h"
-#include "ipc/ipc_message_macros.h"
-#include "ppapi/c/pp_errors.h"
-#include "ppapi/c/private/ppb_flash_clipboard.h"
-#include "ppapi/host/dispatch_host_message.h"
-#include "ppapi/host/host_message_context.h"
-#include "ppapi/host/ppapi_host.h"
-#include "ppapi/proxy/ppapi_messages.h"
-#include "ppapi/proxy/resource_message_params.h"
-#include "ui/base/clipboard/scoped_clipboard_writer.h"
-
-using content::BrowserThread;
-
-namespace QtWebEngineCore {
-
-namespace {
-
-const size_t kMaxClipboardWriteSize = 1000000;
-
-ui::ClipboardType ConvertClipboardType(uint32_t type)
-{
- switch (type) {
- case PP_FLASH_CLIPBOARD_TYPE_STANDARD:
- return ui::CLIPBOARD_TYPE_COPY_PASTE;
- case PP_FLASH_CLIPBOARD_TYPE_SELECTION:
- return ui::CLIPBOARD_TYPE_SELECTION;
- }
- NOTREACHED();
- return ui::CLIPBOARD_TYPE_COPY_PASTE;
-}
-
-// Functions to pack/unpack custom data from a pickle. See the header file for
-// more detail on custom formats in Pepper.
-// TODO(raymes): Currently pepper custom formats are stored in their own
-// native format type. However we should be able to store them in the same way
-// as "Web Custom" formats are. This would allow clipboard data to be shared
-// between pepper applications and web applications. However currently web apps
-// assume all data that is placed on the clipboard is UTF16 and pepper allows
-// arbitrary data so this change would require some reworking of the chrome
-// clipboard interface for custom data.
-bool JumpToFormatInPickle(const base::string16& format, base::PickleIterator* iter)
-{
- size_t size = 0;
- if (!iter->ReadSizeT(&size))
- return false;
- for (size_t i = 0; i < size; ++i) {
- base::string16 stored_format;
- if (!iter->ReadString16(&stored_format))
- return false;
- if (stored_format == format)
- return true;
- int skip_length;
- if (!iter->ReadLength(&skip_length))
- return false;
- if (!iter->SkipBytes(skip_length))
- return false;
- }
- return false;
-}
-
-bool IsFormatAvailableInPickle(const base::string16& format, const base::Pickle& pickle)
-{
- base::PickleIterator iter(pickle);
- return JumpToFormatInPickle(format, &iter);
-}
-
-std::string ReadDataFromPickle(const base::string16& format, const base::Pickle& pickle)
-{
- std::string result;
- base::PickleIterator iter(pickle);
- if (!JumpToFormatInPickle(format, &iter) || !iter.ReadString(&result))
- return std::string();
- return result;
-}
-
-bool WriteDataToPickle(const std::map<base::string16, std::string>& data, base::Pickle* pickle)
-{
- pickle->WriteSizeT(data.size());
- for (std::map<base::string16, std::string>::const_iterator it = data.begin(); it != data.end(); ++it) {
- if (!pickle->WriteString16(it->first))
- return false;
- if (!pickle->WriteString(it->second))
- return false;
- }
- return true;
-}
-
-} // namespace
-
-PepperFlashClipboardMessageFilter::PepperFlashClipboardMessageFilter() {}
-
-PepperFlashClipboardMessageFilter::~PepperFlashClipboardMessageFilter() {}
-
-scoped_refptr<base::TaskRunner>
-PepperFlashClipboardMessageFilter::OverrideTaskRunnerForMessage(const IPC::Message& msg)
-{
- // Clipboard writes should always occur on the UI thread due to the
- // restrictions of various platform APIs. In general, the clipboard is not
- // thread-safe, so all clipboard calls should be serviced from the UI thread.
- if (msg.type() == PpapiHostMsg_FlashClipboard_WriteData::ID)
- return BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI);
-
- // Windows needs clipboard reads to be serviced from the IO thread because
- // these are sync IPCs which can result in deadlocks with plugins if serviced
- // from the UI thread. Note that Windows clipboard calls ARE thread-safe so it
- // is ok for reads and writes to be serviced from different threads.
-#if !defined(OS_WIN)
- return BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI);
-#else
- return BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO);
-#endif
-}
-
-int32_t PepperFlashClipboardMessageFilter::OnResourceMessageReceived(const IPC::Message& msg,
- ppapi::host::HostMessageContext* context)
-{
- PPAPI_BEGIN_MESSAGE_MAP(PepperFlashClipboardMessageFilter, msg)
- PPAPI_DISPATCH_HOST_RESOURCE_CALL(PpapiHostMsg_FlashClipboard_RegisterCustomFormat,
- OnMsgRegisterCustomFormat)
- PPAPI_DISPATCH_HOST_RESOURCE_CALL(PpapiHostMsg_FlashClipboard_IsFormatAvailable,
- OnMsgIsFormatAvailable)
- PPAPI_DISPATCH_HOST_RESOURCE_CALL(PpapiHostMsg_FlashClipboard_ReadData,
- OnMsgReadData)
- PPAPI_DISPATCH_HOST_RESOURCE_CALL(PpapiHostMsg_FlashClipboard_WriteData,
- OnMsgWriteData)
- PPAPI_DISPATCH_HOST_RESOURCE_CALL(PpapiHostMsg_FlashClipboard_GetSequenceNumber,
- OnMsgGetSequenceNumber)
- PPAPI_END_MESSAGE_MAP()
- return PP_ERROR_FAILED;
-}
-
-int32_t PepperFlashClipboardMessageFilter::OnMsgRegisterCustomFormat(
- ppapi::host::HostMessageContext* host_context,
- const std::string& format_name)
-{
- uint32_t format = m_custom_formats.RegisterFormat(format_name);
- if (format == PP_FLASH_CLIPBOARD_FORMAT_INVALID)
- return PP_ERROR_FAILED;
- host_context->reply_msg = PpapiPluginMsg_FlashClipboard_RegisterCustomFormatReply(format);
- return PP_OK;
-}
-
-int32_t PepperFlashClipboardMessageFilter::OnMsgIsFormatAvailable(
- ppapi::host::HostMessageContext* host_context,
- uint32_t clipboard_type,
- uint32_t format)
-{
- if (clipboard_type != PP_FLASH_CLIPBOARD_TYPE_STANDARD) {
- NOTIMPLEMENTED();
- return PP_ERROR_FAILED;
- }
-
- ui::Clipboard* clipboard = ui::Clipboard::GetForCurrentThread();
- ui::ClipboardType type = ConvertClipboardType(clipboard_type);
- bool available = false;
- switch (format) {
- case PP_FLASH_CLIPBOARD_FORMAT_PLAINTEXT: {
- bool plain = clipboard->IsFormatAvailable(ui::Clipboard::GetPlainTextFormatType(), type);
- bool plainw = clipboard->IsFormatAvailable(ui::Clipboard::GetPlainTextWFormatType(), type);
- available = plain || plainw;
- break;
- }
- case PP_FLASH_CLIPBOARD_FORMAT_HTML:
- available = clipboard->IsFormatAvailable(ui::Clipboard::GetHtmlFormatType(), type);
- break;
- case PP_FLASH_CLIPBOARD_FORMAT_RTF:
- available = clipboard->IsFormatAvailable(ui::Clipboard::GetRtfFormatType(), type);
- break;
- case PP_FLASH_CLIPBOARD_FORMAT_INVALID:
- break;
- default:
- if (m_custom_formats.IsFormatRegistered(format)) {
- std::string format_name = m_custom_formats.GetFormatName(format);
- std::string clipboard_data;
- clipboard->ReadData(ui::Clipboard::GetPepperCustomDataFormatType(), &clipboard_data);
- base::Pickle pickle(clipboard_data.data(), clipboard_data.size());
- available = IsFormatAvailableInPickle(base::UTF8ToUTF16(format_name), pickle);
- }
- break;
- }
-
- return available ? PP_OK : PP_ERROR_FAILED;
-}
-
-int32_t PepperFlashClipboardMessageFilter::OnMsgReadData(
- ppapi::host::HostMessageContext* host_context,
- uint32_t clipboard_type,
- uint32_t format)
-{
- if (clipboard_type != PP_FLASH_CLIPBOARD_TYPE_STANDARD) {
- NOTIMPLEMENTED();
- return PP_ERROR_FAILED;
- }
-
- ui::Clipboard* clipboard = ui::Clipboard::GetForCurrentThread();
- ui::ClipboardType type = ConvertClipboardType(clipboard_type);
- std::string clipboard_string;
- int32_t result = PP_ERROR_FAILED;
- switch (format) {
- case PP_FLASH_CLIPBOARD_FORMAT_PLAINTEXT: {
- if (clipboard->IsFormatAvailable(ui::Clipboard::GetPlainTextWFormatType(), type)) {
- base::string16 text;
- clipboard->ReadText(type, &text);
- if (!text.empty()) {
- result = PP_OK;
- clipboard_string = base::UTF16ToUTF8(text);
- break;
- }
- }
- // If the PlainTextW format isn't available or is empty, take the
- // ASCII text format.
- if (clipboard->IsFormatAvailable(ui::Clipboard::GetPlainTextFormatType(), type)) {
- result = PP_OK;
- clipboard->ReadAsciiText(type, &clipboard_string);
- }
- break;
- }
- case PP_FLASH_CLIPBOARD_FORMAT_HTML: {
- if (!clipboard->IsFormatAvailable(ui::Clipboard::GetHtmlFormatType(), type)) {
- break;
- }
-
- base::string16 html;
- std::string url;
- uint32_t fragment_start;
- uint32_t fragment_end;
- clipboard->ReadHTML(type, &html, &url, &fragment_start, &fragment_end);
- result = PP_OK;
- clipboard_string = base::UTF16ToUTF8(html.substr(fragment_start, fragment_end - fragment_start));
- break;
- }
- case PP_FLASH_CLIPBOARD_FORMAT_RTF: {
- if (!clipboard->IsFormatAvailable(ui::Clipboard::GetRtfFormatType(), type)) {
- break;
- }
- result = PP_OK;
- clipboard->ReadRTF(type, &clipboard_string);
- break;
- }
- case PP_FLASH_CLIPBOARD_FORMAT_INVALID:
- break;
- default:
- if (m_custom_formats.IsFormatRegistered(format)) {
- base::string16 format_name =
- base::UTF8ToUTF16(m_custom_formats.GetFormatName(format));
- std::string clipboard_data;
- clipboard->ReadData(ui::Clipboard::GetPepperCustomDataFormatType(),
- &clipboard_data);
- base::Pickle pickle(clipboard_data.data(), clipboard_data.size());
- if (IsFormatAvailableInPickle(format_name, pickle)) {
- result = PP_OK;
- clipboard_string = ReadDataFromPickle(format_name, pickle);
- }
- }
- break;
- }
-
- if (result == PP_OK) {
- host_context->reply_msg = PpapiPluginMsg_FlashClipboard_ReadDataReply(clipboard_string);
- }
- return result;
-}
-
-int32_t PepperFlashClipboardMessageFilter::OnMsgWriteData(
- ppapi::host::HostMessageContext* host_context,
- uint32_t clipboard_type,
- const std::vector<uint32_t>& formats,
- const std::vector<std::string>& data)
-{
- if (clipboard_type != PP_FLASH_CLIPBOARD_TYPE_STANDARD) {
- NOTIMPLEMENTED();
- return PP_ERROR_FAILED;
- }
- if (formats.size() != data.size())
- return PP_ERROR_FAILED;
-
- ui::Clipboard* clipboard = ui::Clipboard::GetForCurrentThread();
- ui::ClipboardType type = ConvertClipboardType(clipboard_type);
- // If no formats are passed in clear the clipboard.
- if (formats.size() == 0) {
- clipboard->Clear(type);
- return PP_OK;
- }
-
- ui::ScopedClipboardWriter scw(type);
- std::map<base::string16, std::string> custom_data_map;
- int32_t res = PP_OK;
- for (uint32_t i = 0; i < formats.size(); ++i) {
- if (data[i].length() > kMaxClipboardWriteSize) {
- res = PP_ERROR_NOSPACE;
- break;
- }
-
- switch (formats[i]) {
- case PP_FLASH_CLIPBOARD_FORMAT_PLAINTEXT:
- scw.WriteText(base::UTF8ToUTF16(data[i]));
- break;
- case PP_FLASH_CLIPBOARD_FORMAT_HTML:
- scw.WriteHTML(base::UTF8ToUTF16(data[i]), std::string());
- break;
- case PP_FLASH_CLIPBOARD_FORMAT_RTF:
- scw.WriteRTF(data[i]);
- break;
- case PP_FLASH_CLIPBOARD_FORMAT_INVALID:
- res = PP_ERROR_BADARGUMENT;
- break;
- default:
- if (m_custom_formats.IsFormatRegistered(formats[i])) {
- std::string format_name = m_custom_formats.GetFormatName(formats[i]);
- custom_data_map[base::UTF8ToUTF16(format_name)] = data[i];
- } else {
- // Invalid format.
- res = PP_ERROR_BADARGUMENT;
- break;
- }
- }
-
- if (res != PP_OK)
- break;
- }
-
- if (custom_data_map.size() > 0) {
- base::Pickle pickle;
- if (WriteDataToPickle(custom_data_map, &pickle)) {
- scw.WritePickledData(pickle, ui::Clipboard::GetPepperCustomDataFormatType());
- } else {
- res = PP_ERROR_BADARGUMENT;
- }
- }
-
- if (res != PP_OK) {
- // Need to clear the objects so nothing is written.
- scw.Reset();
- }
-
- return res;
-}
-
-int32_t PepperFlashClipboardMessageFilter::OnMsgGetSequenceNumber(
- ppapi::host::HostMessageContext* host_context,
- uint32_t clipboard_type)
-{
- if (clipboard_type != PP_FLASH_CLIPBOARD_TYPE_STANDARD) {
- NOTIMPLEMENTED();
- return PP_ERROR_FAILED;
- }
-
- ui::Clipboard* clipboard = ui::Clipboard::GetForCurrentThread();
- ui::ClipboardType type = ConvertClipboardType(clipboard_type);
- int64_t sequence_number = clipboard->GetSequenceNumber(type);
- host_context->reply_msg = PpapiPluginMsg_FlashClipboard_GetSequenceNumberReply(sequence_number);
- return PP_OK;
-}
-
-} // namespace QtWebEngineCore
diff --git a/src/core/renderer/pepper/pepper_flash_clipboard_message_filter_qt.h b/src/core/renderer/pepper/pepper_flash_clipboard_message_filter_qt.h
deleted file mode 100644
index c00e668ea..000000000
--- a/src/core/renderer/pepper/pepper_flash_clipboard_message_filter_qt.h
+++ /dev/null
@@ -1,108 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: http://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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://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.LGPLv3 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.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 later as published by the Free
-** Software Foundation and appearing in the file LICENSE.GPL included in
-** the packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 2.0 requirements will be
-** met: http://www.gnu.org/licenses/gpl-2.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-// based on chrome/browser/renderer_host/pepper/pepper_flash_clipboard_message_filter.h
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef PEPPER_FLASH_CLIPBOARD_MESSAGE_FILTER_QT_H
-#define PEPPER_FLASH_CLIPBOARD_MESSAGE_FILTER_QT_H
-
-#include <string>
-#include <vector>
-
-#include "base/compiler_specific.h"
-#include "ppapi/host/resource_message_filter.h"
-#include "ppapi/shared_impl/flash_clipboard_format_registry.h"
-
-namespace ppapi {
-namespace host {
-struct HostMessageContext;
-}
-}
-
-namespace ui {
-class ScopedClipboardWriter;
-}
-
-namespace QtWebEngineCore {
-
-// Resource message filter for accessing the clipboard in Pepper. Pepper
-// supports reading/writing custom formats from the clipboard. Currently, all
-// custom formats that are read/written from the clipboard through pepper are
-// stored in a single real clipboard format (in the same way the "web custom"
-// clipboard formats are). This is done so that we don't have to have use real
-// clipboard types for each custom clipboard format which may be a limited
-// resource on a particular platform.
-class PepperFlashClipboardMessageFilter : public ppapi::host::ResourceMessageFilter {
-public:
- PepperFlashClipboardMessageFilter();
-
-protected:
- // ppapi::host::ResourceMessageFilter overrides.
- scoped_refptr<base::TaskRunner> OverrideTaskRunnerForMessage(const IPC::Message& msg) override;
- int32_t OnResourceMessageReceived(const IPC::Message& msg, ppapi::host::HostMessageContext* context) override;
-
-private:
- ~PepperFlashClipboardMessageFilter() override;
-
- int32_t OnMsgRegisterCustomFormat(ppapi::host::HostMessageContext* host_context, const std::string& format_name);
- int32_t OnMsgIsFormatAvailable(ppapi::host::HostMessageContext* host_context,
- uint32_t clipboard_type,
- uint32_t format);
- int32_t OnMsgReadData(ppapi::host::HostMessageContext* host_context,
- uint32_t clipoard_type,
- uint32_t format);
- int32_t OnMsgWriteData(ppapi::host::HostMessageContext* host_context,
- uint32_t clipboard_type,
- const std::vector<uint32_t>& formats,
- const std::vector<std::string>& data);
- int32_t OnMsgGetSequenceNumber(ppapi::host::HostMessageContext* host_context,
- uint32_t clipboard_type);
-
- int32_t WriteClipboardDataItem(uint32_t format,
- const std::string& data,
- ui::ScopedClipboardWriter* scw);
-
- ppapi::FlashClipboardFormatRegistry m_custom_formats;
-
- DISALLOW_COPY_AND_ASSIGN(PepperFlashClipboardMessageFilter);
-};
-
-} // namespace QtWebEngineCore
-
-#endif // PEPPER_FLASH_CLIPBOARD_MESSAGE_FILTER_QT_H
diff --git a/src/core/renderer/pepper/pepper_flash_renderer_host_qt.cpp b/src/core/renderer/pepper/pepper_flash_renderer_host_qt.cpp
index 37ce4b5f3..a46454407 100644
--- a/src/core/renderer/pepper/pepper_flash_renderer_host_qt.cpp
+++ b/src/core/renderer/pepper/pepper_flash_renderer_host_qt.cpp
@@ -250,6 +250,83 @@ int32_t PepperFlashRendererHostQt::OnDrawGlyphs(
params.glyph_indices.empty())
return PP_ERROR_FAILED;
+ int style = SkTypeface::kNormal;
+ if (static_cast<PP_BrowserFont_Trusted_Weight>(params.font_desc.weight) >= PP_BROWSERFONT_TRUSTED_WEIGHT_BOLD)
+ style |= SkTypeface::kBold;
+ if (params.font_desc.italic)
+ style |= SkTypeface::kItalic;
+ sk_sp<SkTypeface> typeface(SkTypeface::MakeFromName(params.font_desc.face.c_str(), SkFontStyle::FromOldStyle(style)));
+ if (!typeface)
+ return PP_ERROR_FAILED;
+
+ EnterResourceNoLock<PPB_ImageData_API> enter(params.image_data.host_resource(), true);
+ if (enter.failed())
+ return PP_ERROR_FAILED;
+
+ PPB_ImageData_API* image = static_cast<PPB_ImageData_API*>(enter.object());
+ SkCanvas* canvas = image->GetCanvas();
+ bool needs_unmapping = false;
+ if (!canvas) {
+ needs_unmapping = true;
+ image->Map();
+ canvas = image->GetCanvas();
+ if (!canvas)
+ return PP_ERROR_FAILED; // Failure mapping.
+ }
+
+ SkAutoCanvasRestore acr(canvas, true);
+
+ // Clip is applied in pixels before the transform.
+ SkRect clip_rect = {
+ SkIntToScalar(params.clip.point.x), SkIntToScalar(params.clip.point.y),
+ SkIntToScalar(params.clip.point.x + params.clip.size.width),
+ SkIntToScalar(params.clip.point.y + params.clip.size.height)};
+ canvas->clipRect(clip_rect);
+
+ SkMatrix matrix;
+ matrix.set(SkMatrix::kMScaleX, SkFloatToScalar(params.transformation[0][0]));
+ matrix.set(SkMatrix::kMSkewX, SkFloatToScalar(params.transformation[0][1]));
+ matrix.set(SkMatrix::kMTransX, SkFloatToScalar(params.transformation[0][2]));
+ matrix.set(SkMatrix::kMSkewY, SkFloatToScalar(params.transformation[1][0]));
+ matrix.set(SkMatrix::kMScaleY, SkFloatToScalar(params.transformation[1][1]));
+ matrix.set(SkMatrix::kMTransY, SkFloatToScalar(params.transformation[1][2]));
+ matrix.set(SkMatrix::kMPersp0, SkFloatToScalar(params.transformation[2][0]));
+ matrix.set(SkMatrix::kMPersp1, SkFloatToScalar(params.transformation[2][1]));
+ matrix.set(SkMatrix::kMPersp2, SkFloatToScalar(params.transformation[2][2]));
+ canvas->concat(matrix);
+
+ SkPaint paint;
+ paint.setColor(params.color);
+ paint.setTextEncoding(SkPaint::kGlyphID_TextEncoding);
+ paint.setAntiAlias(true);
+ paint.setHinting(SkPaint::kFull_Hinting);
+ paint.setTextSize(SkIntToScalar(params.font_desc.size));
+ paint.setTypeface(std::move(typeface));
+ if (params.allow_subpixel_aa) {
+ paint.setSubpixelText(true);
+ paint.setLCDRenderText(true);
+ }
+
+ SkScalar x = SkIntToScalar(params.position.x);
+ SkScalar y = SkIntToScalar(params.position.y);
+
+ // Build up the skia advances.
+ size_t glyph_count = params.glyph_indices.size();
+ if (glyph_count) {
+ std::vector<SkPoint> sk_positions(glyph_count);
+ for (uint32_t i = 0; i < glyph_count; i++) {
+ sk_positions[i].set(x, y);
+ x += SkFloatToScalar(params.glyph_advances[i].x);
+ y += SkFloatToScalar(params.glyph_advances[i].y);
+ }
+
+ canvas->drawPosText(
+ &params.glyph_indices[0], glyph_count * 2, &sk_positions[0], paint);
+ }
+
+ if (needs_unmapping)
+ image->Unmap();
+
return PP_OK;
}
diff --git a/src/core/renderer/pepper/pepper_renderer_host_factory_qt.cpp b/src/core/renderer/pepper/pepper_renderer_host_factory_qt.cpp
index 636ca12f1..febde84f7 100644
--- a/src/core/renderer/pepper/pepper_renderer_host_factory_qt.cpp
+++ b/src/core/renderer/pepper/pepper_renderer_host_factory_qt.cpp
@@ -44,6 +44,9 @@
#include "pepper_renderer_host_factory_qt.h"
#include "pepper_flash_renderer_host_qt.h"
+
+#include "base/memory/ptr_util.h"
+#include "chrome/renderer/pepper/pepper_flash_font_file_host.h"
#include "content/public/renderer/renderer_ppapi_host.h"
#include "ppapi/host/ppapi_host.h"
#include "ppapi/host/resource_host.h"
@@ -63,7 +66,7 @@ PepperRendererHostFactoryQt::~PepperRendererHostFactoryQt()
{
}
-scoped_ptr<ppapi::host::ResourceHost> PepperRendererHostFactoryQt::CreateResourceHost(
+std::unique_ptr<ppapi::host::ResourceHost> PepperRendererHostFactoryQt::CreateResourceHost(
ppapi::host::PpapiHost* host,
PP_Resource resource,
PP_Instance instance,
@@ -72,16 +75,47 @@ scoped_ptr<ppapi::host::ResourceHost> PepperRendererHostFactoryQt::CreateResourc
DCHECK_EQ(host_->GetPpapiHost(), host);
if (!host_->IsValidInstance(instance))
- return scoped_ptr<ppapi::host::ResourceHost>();
+ return nullptr;
+
+ if (host_->GetPpapiHost()->permissions().HasPermission(ppapi::PERMISSION_FLASH)) {
+ switch (message.type()) {
+ case PpapiHostMsg_Flash_Create::ID:
+ return base::WrapUnique(new PepperFlashRendererHostQt(host_, instance, resource));
+ case PpapiHostMsg_FlashFullscreen_Create::ID:
+ case PpapiHostMsg_FlashMenu_Create::ID:
+ // Not implemented
+ break;
+ }
+ }
+ // TODO(raymes): PDF also needs access to the FlashFontFileHost currently.
+ // We should either rename PPB_FlashFont_File to PPB_FontFile_Private or get
+ // rid of its use in PDF if possible.
if (host_->GetPpapiHost()->permissions().HasPermission(ppapi::PERMISSION_FLASH)
- && message.type() == PpapiHostMsg_Flash_Create::ID)
- return scoped_ptr<ppapi::host::ResourceHost>(
- new PepperFlashRendererHostQt(host_,
- instance,
- resource));
+ || host_->GetPpapiHost()->permissions().HasPermission(ppapi::PERMISSION_PRIVATE)) {
+ switch (message.type()) {
+ case PpapiHostMsg_FlashFontFile_Create::ID: {
+ ppapi::proxy::SerializedFontDescription description;
+ PP_PrivateFontCharset charset;
+ if (ppapi::UnpackMessage<PpapiHostMsg_FlashFontFile_Create>(message, &description, &charset))
+ return base::WrapUnique(new PepperFlashFontFileHost(host_, instance, resource, description, charset));
+ break;
+ }
+ case PpapiHostMsg_FlashDRM_Create::ID:
+ // Not implemented
+ break;
+ }
+ }
+
+ if (host_->GetPpapiHost()->permissions().HasPermission(ppapi::PERMISSION_PRIVATE)) {
+ switch (message.type()) {
+ case PpapiHostMsg_PDF_Create::ID:
+ // Not implemented
+ break;
+ }
+ }
- return scoped_ptr<ppapi::host::ResourceHost>();
+ return nullptr;
}
} // QtWebEngineCore
diff --git a/src/core/renderer/pepper/pepper_renderer_host_factory_qt.h b/src/core/renderer/pepper/pepper_renderer_host_factory_qt.h
index bc472a7c6..ec3440a08 100644
--- a/src/core/renderer/pepper/pepper_renderer_host_factory_qt.h
+++ b/src/core/renderer/pepper/pepper_renderer_host_factory_qt.h
@@ -56,7 +56,7 @@ public:
~PepperRendererHostFactoryQt();
// HostFactory.
- scoped_ptr<ppapi::host::ResourceHost> CreateResourceHost(
+ std::unique_ptr<ppapi::host::ResourceHost> CreateResourceHost(
ppapi::host::PpapiHost* host,
PP_Resource resource,
PP_Instance instance,
diff --git a/src/core/renderer/render_frame_observer_qt.cpp b/src/core/renderer/render_frame_observer_qt.cpp
index f2285f298..53e9407db 100644
--- a/src/core/renderer/render_frame_observer_qt.cpp
+++ b/src/core/renderer/render_frame_observer_qt.cpp
@@ -44,16 +44,19 @@
#include "render_frame_observer_qt.h"
+#include "base/memory/ptr_util.h"
+#include "chrome/renderer/pepper/pepper_shared_memory_message_filter.h"
#include "content/public/renderer/renderer_ppapi_host.h"
#include "ppapi/host/ppapi_host.h"
#include "renderer/pepper/pepper_renderer_host_factory_qt.h"
-#include "renderer/pepper/pepper_flash_renderer_host_qt.h"
namespace QtWebEngineCore {
RenderFrameObserverQt::RenderFrameObserverQt(content::RenderFrame* render_frame)
: RenderFrameObserver(render_frame)
+ , RenderFrameObserverTracker<RenderFrameObserverQt>(render_frame)
+ , m_isFrameDetached(false)
{
}
@@ -65,9 +68,20 @@ RenderFrameObserverQt::~RenderFrameObserverQt()
void RenderFrameObserverQt::DidCreatePepperPlugin(content::RendererPpapiHost* host)
{
host->GetPpapiHost()->AddHostFactoryFilter(
- scoped_ptr<ppapi::host::HostFactory>(
- new PepperRendererHostFactoryQt(host)));
+ base::WrapUnique(new PepperRendererHostFactoryQt(host)));
+ host->GetPpapiHost()->AddInstanceMessageFilter(
+ base::WrapUnique(new PepperSharedMemoryMessageFilter(host)));
}
#endif
+void RenderFrameObserverQt::FrameDetached()
+{
+ m_isFrameDetached = true;
+}
+
+bool RenderFrameObserverQt::isFrameDetached() const
+{
+ return m_isFrameDetached;
+}
+
} // namespace QtWebEngineCore
diff --git a/src/core/renderer/render_frame_observer_qt.h b/src/core/renderer/render_frame_observer_qt.h
index b1d59d8c5..b74be5cd1 100644
--- a/src/core/renderer/render_frame_observer_qt.h
+++ b/src/core/renderer/render_frame_observer_qt.h
@@ -42,6 +42,7 @@
#include "base/compiler_specific.h"
#include "content/public/renderer/render_frame_observer.h"
+#include "content/public/renderer/render_frame_observer_tracker.h"
namespace content {
@@ -50,7 +51,10 @@ class RenderFrame;
namespace QtWebEngineCore {
-class RenderFrameObserverQt : public content::RenderFrameObserver {
+class RenderFrameObserverQt
+ : public content::RenderFrameObserver
+ , public content::RenderFrameObserverTracker<RenderFrameObserverQt>
+{
public:
explicit RenderFrameObserverQt(content::RenderFrame* render_frame);
~RenderFrameObserverQt();
@@ -58,9 +62,15 @@ public:
#if defined(ENABLE_PLUGINS)
void DidCreatePepperPlugin(content::RendererPpapiHost* host) override;
#endif
+ void OnDestruct() override { }
+ void FrameDetached() override;
+
+ bool isFrameDetached() const;
private:
DISALLOW_COPY_AND_ASSIGN(RenderFrameObserverQt);
+
+ bool m_isFrameDetached;
};
} // namespace QtWebEngineCore
diff --git a/src/core/renderer/render_view_observer_qt.cpp b/src/core/renderer/render_view_observer_qt.cpp
index 4b44a9bd9..393b4752c 100644
--- a/src/core/renderer/render_view_observer_qt.cpp
+++ b/src/core/renderer/render_view_observer_qt.cpp
@@ -41,40 +41,46 @@
#include "common/qt_messages.h"
-#include "components/web_cache/renderer/web_cache_render_process_observer.h"
+#include "components/web_cache/renderer/web_cache_impl.h"
#include "content/public/renderer/render_view.h"
#include "third_party/WebKit/public/web/WebDocument.h"
#include "third_party/WebKit/public/web/WebElement.h"
#include "third_party/WebKit/public/web/WebFrame.h"
+#include "third_party/WebKit/public/web/WebFrameContentDumper.h"
+#include "third_party/WebKit/public/web/WebFrameWidget.h"
+#include "third_party/WebKit/public/web/WebLocalFrame.h"
#include "third_party/WebKit/public/web/WebView.h"
RenderViewObserverQt::RenderViewObserverQt(
content::RenderView* render_view,
- web_cache::WebCacheRenderProcessObserver* web_cache_render_process_observer)
+ web_cache::WebCacheImpl* web_cache_impl)
: content::RenderViewObserver(render_view)
- , m_web_cache_render_process_observer(web_cache_render_process_observer)
+ , m_web_cache_impl(web_cache_impl)
{
}
void RenderViewObserverQt::onFetchDocumentMarkup(quint64 requestId)
{
- Send(new RenderViewObserverHostQt_DidFetchDocumentMarkup(
- routing_id(),
- requestId,
- render_view()->GetWebView()->mainFrame()->contentAsMarkup()));
+ blink::WebString markup;
+ if (render_view()->GetWebView()->mainFrame()->isWebLocalFrame())
+ markup = blink::WebFrameContentDumper::dumpAsMarkup(
+ static_cast<blink::WebLocalFrame*>(render_view()->GetWebView()->mainFrame()));
+ Send(new RenderViewObserverHostQt_DidFetchDocumentMarkup(routing_id(), requestId, markup));
}
void RenderViewObserverQt::onFetchDocumentInnerText(quint64 requestId)
{
- Send(new RenderViewObserverHostQt_DidFetchDocumentInnerText(
- routing_id(),
- requestId,
- render_view()->GetWebView()->mainFrame()->contentAsText(std::numeric_limits<std::size_t>::max())));
+ blink::WebString text;
+ if (render_view()->GetWebView()->mainFrame()->isWebLocalFrame())
+ text = blink::WebFrameContentDumper::dumpWebViewAsText(
+ render_view()->GetWebView(),
+ std::numeric_limits<std::size_t>::max());
+ Send(new RenderViewObserverHostQt_DidFetchDocumentInnerText(routing_id(), requestId, text));
}
void RenderViewObserverQt::onSetBackgroundColor(quint32 color)
{
- render_view()->GetWebView()->setBaseBackgroundColor(color);
+ render_view()->GetWebFrameWidget()->setBaseBackgroundColor(color);
}
void RenderViewObserverQt::OnFirstVisuallyNonEmptyLayout()
@@ -96,6 +102,6 @@ bool RenderViewObserverQt::OnMessageReceived(const IPC::Message& message)
void RenderViewObserverQt::Navigate(const GURL &)
{
- if (m_web_cache_render_process_observer)
- m_web_cache_render_process_observer->ExecutePendingClearCache();
+ if (m_web_cache_impl)
+ m_web_cache_impl->ExecutePendingClearCache();
}
diff --git a/src/core/renderer/render_view_observer_qt.h b/src/core/renderer/render_view_observer_qt.h
index 4839ae064..b62c815af 100644
--- a/src/core/renderer/render_view_observer_qt.h
+++ b/src/core/renderer/render_view_observer_qt.h
@@ -44,13 +44,13 @@
#include <QtGlobal>
namespace web_cache {
-class WebCacheRenderProcessObserver;
+class WebCacheImpl;
}
class RenderViewObserverQt : public content::RenderViewObserver {
public:
RenderViewObserverQt(content::RenderView* render_view,
- web_cache::WebCacheRenderProcessObserver* web_cache_render_process_observer);
+ web_cache::WebCacheImpl* web_cache_impl);
private:
void onFetchDocumentMarkup(quint64 requestId);
@@ -58,11 +58,12 @@ private:
void onSetBackgroundColor(quint32 color);
void OnFirstVisuallyNonEmptyLayout() Q_DECL_OVERRIDE;
+ void OnDestruct() Q_DECL_OVERRIDE { }
virtual bool OnMessageReceived(const IPC::Message& message) Q_DECL_OVERRIDE;
virtual void Navigate(const GURL& url) Q_DECL_OVERRIDE;
- web_cache::WebCacheRenderProcessObserver* m_web_cache_render_process_observer;
+ web_cache::WebCacheImpl* m_web_cache_impl;
DISALLOW_COPY_AND_ASSIGN(RenderViewObserverQt);
};
diff --git a/src/core/renderer/user_resource_controller.cpp b/src/core/renderer/user_resource_controller.cpp
index 30a04958f..8c603b805 100644
--- a/src/core/renderer/user_resource_controller.cpp
+++ b/src/core/renderer/user_resource_controller.cpp
@@ -39,8 +39,12 @@
#include "user_resource_controller.h"
+#include "base/strings/pattern.h"
+#include "content/public/renderer/render_frame.h"
#include "content/public/renderer/render_view.h"
#include "content/public/renderer/render_view_observer.h"
+#include "extensions/common/url_pattern.h"
+#include "third_party/WebKit/public/web/WebDocument.h"
#include "third_party/WebKit/public/web/WebLocalFrame.h"
#include "third_party/WebKit/public/web/WebScriptSource.h"
#include "third_party/WebKit/public/web/WebView.h"
@@ -48,6 +52,8 @@
#include "common/qt_messages.h"
#include "common/user_script_data.h"
+#include "type_conversion.h"
+#include "user_script.h"
Q_GLOBAL_STATIC(UserResourceController, qt_webengine_userResourceController)
@@ -56,13 +62,46 @@ static content::RenderView * const globalScriptsIndex = 0;
// Scripts meant to run after the load event will be run 500ms after DOMContentLoaded if the load event doesn't come within that delay.
static const int afterLoadTimeout = 500;
+static bool scriptMatchesURL(const UserScriptData &scriptData, const GURL &url) {
+ // Logic taken from Chromium (extensions/common/user_script.cc)
+ bool matchFound;
+ if (!scriptData.urlPatterns.empty()) {
+ matchFound = false;
+ for (auto it = scriptData.urlPatterns.begin(), end = scriptData.urlPatterns.end(); it != end; ++it) {
+ URLPattern urlPattern(QtWebEngineCore::UserScript::validUserScriptSchemes(), *it);
+ if (urlPattern.MatchesURL(url))
+ matchFound = true;
+ }
+ if (!matchFound)
+ return false;
+ }
+
+ if (!scriptData.globs.empty()) {
+ matchFound = false;
+ for (auto it = scriptData.globs.begin(), end = scriptData.globs.end(); it != end; ++it) {
+ if (base::MatchPattern(url.spec(), *it))
+ matchFound = true;
+ }
+ if (!matchFound)
+ return false;
+ }
+
+ if (!scriptData.excludeGlobs.empty()) {
+ for (auto it = scriptData.excludeGlobs.begin(), end = scriptData.excludeGlobs.end(); it != end; ++it) {
+ if (base::MatchPattern(url.spec(), *it))
+ return false;
+ }
+ }
+
+ return true;
+}
+
class UserResourceController::RenderViewObserverHelper : public content::RenderViewObserver
{
public:
RenderViewObserverHelper(content::RenderView *);
private:
// RenderViewObserver implementation.
- virtual void DidCreateDocumentElement(blink::WebLocalFrame* frame) Q_DECL_OVERRIDE;
virtual void DidFinishDocumentLoad(blink::WebLocalFrame* frame) Q_DECL_OVERRIDE;
virtual void DidFinishLoad(blink::WebLocalFrame* frame) Q_DECL_OVERRIDE;
virtual void DidStartProvisionalLoad(blink::WebLocalFrame* frame) Q_DECL_OVERRIDE;
@@ -82,17 +121,25 @@ void UserResourceController::RenderViewObserverHelper::runScripts(UserScriptData
{
if (p == UserScriptData::AfterLoad && !m_pendingFrames.remove(frame))
return;
+
+ UserResourceController::instance()->runScripts(p, frame);
+}
+
+void UserResourceController::runScripts(UserScriptData::InjectionPoint p, blink::WebLocalFrame *frame)
+{
content::RenderView *renderView = content::RenderView::FromWebView(frame->view());
const bool isMainFrame = (frame == renderView->GetWebView()->mainFrame());
- QList<uint64_t> scriptsToRun = UserResourceController::instance()->m_viewUserScriptMap.value(globalScriptsIndex).toList();
- scriptsToRun.append(UserResourceController::instance()->m_viewUserScriptMap.value(renderView).toList());
+ QList<uint64_t> scriptsToRun = m_viewUserScriptMap.value(globalScriptsIndex).toList();
+ scriptsToRun.append(m_viewUserScriptMap.value(renderView).toList());
Q_FOREACH (uint64_t id, scriptsToRun) {
- const UserScriptData &script = UserResourceController::instance()->m_scripts.value(id);
+ const UserScriptData &script = m_scripts.value(id);
if (script.injectionPoint != p
|| (!script.injectForSubframes && !isMainFrame))
continue;
+ if (!scriptMatchesURL(script, frame->document().url()))
+ continue;
blink::WebScriptSource source(blink::WebString::fromUTF8(script.source), script.url);
if (script.worldId)
frame->executeScriptInIsolatedWorld(script.worldId, &source, /*numSources = */1, /*contentScriptExtentsionGroup = */ 0);
@@ -101,20 +148,23 @@ void UserResourceController::RenderViewObserverHelper::runScripts(UserScriptData
}
}
+void UserResourceController::RunScriptsAtDocumentStart(content::RenderFrame *render_frame)
+{
+ runScripts(UserScriptData::DocumentElementCreation, render_frame->GetWebFrame());
+}
-UserResourceController::RenderViewObserverHelper::RenderViewObserverHelper(content::RenderView *renderView)
- : content::RenderViewObserver(renderView)
+void UserResourceController::RunScriptsAtDocumentEnd(content::RenderFrame *render_frame)
{
+ runScripts(UserScriptData::DocumentLoadFinished, render_frame->GetWebFrame());
}
-void UserResourceController::RenderViewObserverHelper::DidCreateDocumentElement(blink::WebLocalFrame *frame)
+UserResourceController::RenderViewObserverHelper::RenderViewObserverHelper(content::RenderView *renderView)
+ : content::RenderViewObserver(renderView)
{
- runScripts(UserScriptData::DocumentElementCreation, frame);
}
void UserResourceController::RenderViewObserverHelper::DidFinishDocumentLoad(blink::WebLocalFrame *frame)
{
- runScripts(UserScriptData::DocumentLoadFinished, frame);
m_pendingFrames.insert(frame);
base::MessageLoop::current()->PostDelayedTask(FROM_HERE, base::Bind(&UserResourceController::RenderViewObserverHelper::runScripts,
base::Unretained(this), UserScriptData::AfterLoad, frame),
diff --git a/src/core/renderer/user_resource_controller.h b/src/core/renderer/user_resource_controller.h
index bd3d0ba49..d0b5088d6 100644
--- a/src/core/renderer/user_resource_controller.h
+++ b/src/core/renderer/user_resource_controller.h
@@ -40,7 +40,7 @@
#ifndef USER_RESOURCE_CONTROLLER_H
#define USER_RESOURCE_CONTROLLER_H
-#include "content/public/renderer/render_process_observer.h"
+#include "content/public/renderer/render_thread_observer.h"
#include "common/user_script_data.h"
@@ -48,12 +48,16 @@
#include <QtCore/QHash>
#include <QtCore/QSet>
+namespace blink {
+class WebLocalFrame;
+}
+
namespace content {
+class RenderFrame;
class RenderView;
}
-
-class UserResourceController : public content::RenderProcessObserver {
+class UserResourceController : public content::RenderThreadObserver {
public:
static UserResourceController *instance();
@@ -64,22 +68,29 @@ public:
void removeScriptForView(const UserScriptData &, content::RenderView *);
void clearScriptsForView(content::RenderView *);
+ void RunScriptsAtDocumentStart(content::RenderFrame *render_frame);
+ void RunScriptsAtDocumentEnd(content::RenderFrame *render_frame);
+
private:
Q_DISABLE_COPY(UserResourceController)
class RenderViewObserverHelper;
// RenderProcessObserver implementation.
- virtual bool OnControlMessageReceived(const IPC::Message &message) Q_DECL_OVERRIDE;
+ bool OnControlMessageReceived(const IPC::Message &message) override;
void onAddScript(const UserScriptData &);
void onRemoveScript(const UserScriptData &);
void onClearScripts();
+ void runScripts(UserScriptData::InjectionPoint, blink::WebLocalFrame *);
+
typedef QSet<uint64_t> UserScriptSet;
typedef QHash<const content::RenderView *, UserScriptSet> ViewUserScriptMap;
ViewUserScriptMap m_viewUserScriptMap;
QHash<uint64_t, UserScriptData> m_scripts;
+
+ friend class RenderViewObserverHelper;
};
#endif // USER_RESOURCE_CONTROLLER_H
diff --git a/src/core/renderer/web_channel_ipc_transport.cpp b/src/core/renderer/web_channel_ipc_transport.cpp
index 6bbbe28bd..2ca6640c6 100644
--- a/src/core/renderer/web_channel_ipc_transport.cpp
+++ b/src/core/renderer/web_channel_ipc_transport.cpp
@@ -44,6 +44,7 @@
#include "common/qt_messages.h"
+#include "content/public/renderer/render_frame.h"
#include "content/public/renderer/render_view.h"
#include "gin/arguments.h"
#include "gin/handle.h"
@@ -153,11 +154,21 @@ content::RenderView *WebChannelTransport::GetRenderView(v8::Isolate *isolate)
WebChannelIPCTransport::WebChannelIPCTransport(content::RenderView *renderView)
: content::RenderViewObserver(renderView)
+ , content::RenderViewObserverTracker<WebChannelIPCTransport>(renderView)
, m_installed(false)
, m_installedWorldId(0)
{
}
+void WebChannelIPCTransport::RunScriptsAtDocumentStart(content::RenderFrame *render_frame)
+{
+ // JavaScript run before this point doesn't stick, and needs to be redone.
+ // ### FIXME: we should try no even installing before
+ if (m_installed && render_frame->IsMainFrame())
+ WebChannelTransport::Install(render_frame->GetWebFrame(), m_installedWorldId);
+}
+
+
void WebChannelIPCTransport::installWebChannel(uint worldId)
{
blink::WebView *webView = render_view()->GetWebView();
@@ -170,6 +181,7 @@ void WebChannelIPCTransport::installWebChannel(uint worldId)
void WebChannelIPCTransport::uninstallWebChannel(uint worldId)
{
+ Q_ASSERT(worldId = m_installedWorldId);
blink::WebView *webView = render_view()->GetWebView();
if (!webView)
return;
@@ -222,13 +234,6 @@ void WebChannelIPCTransport::dispatchWebChannelMessage(const std::vector<char> &
frame->callFunctionEvenIfScriptDisabled(callback, webChannelObjectValue->ToObject(), argc, argv);
}
-void WebChannelIPCTransport::DidCreateDocumentElement(blink::WebLocalFrame* frame)
-{
- blink::WebFrame* main_frame = render_view()->GetWebView()->mainFrame();
- if (m_installed && frame == main_frame)
- WebChannelTransport::Install(frame, m_installedWorldId);
-}
-
bool WebChannelIPCTransport::OnMessageReceived(const IPC::Message &message)
{
bool handled = true;
diff --git a/src/core/renderer/web_channel_ipc_transport.h b/src/core/renderer/web_channel_ipc_transport.h
index fcee13bda..e949d1c99 100644
--- a/src/core/renderer/web_channel_ipc_transport.h
+++ b/src/core/renderer/web_channel_ipc_transport.h
@@ -42,24 +42,33 @@
#include "base/values.h"
#include "content/public/renderer/render_view_observer.h"
+#include "content/public/renderer/render_view_observer_tracker.h"
#include <QtCore/qcompilerdetection.h>
+namespace content {
+class RenderFrame;
+}
+
namespace v8 {
class Extension;
}
namespace QtWebEngineCore {
-class WebChannelIPCTransport : public content::RenderViewObserver {
+class WebChannelIPCTransport : public content::RenderViewObserver
+ , public content::RenderViewObserverTracker<WebChannelIPCTransport>
+{
public:
WebChannelIPCTransport(content::RenderView *);
+ void RunScriptsAtDocumentStart(content::RenderFrame *render_frame);
+
private:
void dispatchWebChannelMessage(const std::vector<char> &binaryJSON, uint worldId);
void installWebChannel(uint worldId);
void uninstallWebChannel(uint worldId);
- virtual void DidCreateDocumentElement(blink::WebLocalFrame* frame) override;
virtual bool OnMessageReceived(const IPC::Message &message) Q_DECL_OVERRIDE;
+ virtual void OnDestruct() Q_DECL_OVERRIDE { }
bool m_installed;
uint m_installedWorldId;
diff --git a/src/core/renderer/pepper/pepper_flash_browser_host_qt.cpp b/src/core/renderer_host/pepper/pepper_flash_browser_host_qt.cpp
index 4427a67f2..4427a67f2 100644
--- a/src/core/renderer/pepper/pepper_flash_browser_host_qt.cpp
+++ b/src/core/renderer_host/pepper/pepper_flash_browser_host_qt.cpp
diff --git a/src/core/renderer/pepper/pepper_flash_browser_host_qt.h b/src/core/renderer_host/pepper/pepper_flash_browser_host_qt.h
index 5d1107dfb..5d1107dfb 100644
--- a/src/core/renderer/pepper/pepper_flash_browser_host_qt.h
+++ b/src/core/renderer_host/pepper/pepper_flash_browser_host_qt.h
diff --git a/src/core/renderer/pepper/pepper_host_factory_qt.cpp b/src/core/renderer_host/pepper/pepper_host_factory_qt.cpp
index 9b7236d8a..4a25e7756 100644
--- a/src/core/renderer/pepper/pepper_host_factory_qt.cpp
+++ b/src/core/renderer_host/pepper/pepper_host_factory_qt.cpp
@@ -44,7 +44,9 @@
#include "pepper_host_factory_qt.h"
+#include "base/memory/ptr_util.h"
#include "build/build_config.h"
+#include "chrome/browser/renderer_host/pepper/pepper_flash_clipboard_message_filter.h"
#include "content/public/browser/browser_ppapi_host.h"
#include "ppapi/host/message_filter_host.h"
#include "ppapi/host/ppapi_host.h"
@@ -53,7 +55,6 @@
#include "ppapi/shared_impl/ppapi_permissions.h"
#include "pepper_flash_browser_host_qt.h"
-#include "pepper_flash_clipboard_message_filter_qt.h"
#include "pepper_isolated_file_system_message_filter.h"
using ppapi::host::MessageFilterHost;
@@ -68,7 +69,7 @@ PepperHostFactoryQt::PepperHostFactoryQt(content::BrowserPpapiHost* host)
PepperHostFactoryQt::~PepperHostFactoryQt() {}
-scoped_ptr<ppapi::host::ResourceHost> PepperHostFactoryQt::CreateResourceHost(ppapi::host::PpapiHost* host,
+std::unique_ptr<ppapi::host::ResourceHost> PepperHostFactoryQt::CreateResourceHost(ppapi::host::PpapiHost* host,
PP_Resource resource,
PP_Instance instance,
const IPC::Message& message)
@@ -77,16 +78,16 @@ scoped_ptr<ppapi::host::ResourceHost> PepperHostFactoryQt::CreateResourceHost(pp
if (!host_->IsValidInstance(instance))
- return scoped_ptr<ppapi::host::ResourceHost>();
+ return nullptr;
// Flash interfaces.
if (host_->GetPpapiHost()->permissions().HasPermission(ppapi::PERMISSION_FLASH)) {
switch (message.type()) {
case PpapiHostMsg_Flash_Create::ID:
- return scoped_ptr<ppapi::host::ResourceHost>(new PepperFlashBrowserHostQt(host_, instance, resource));
+ return base::WrapUnique(new PepperFlashBrowserHostQt(host_, instance, resource));
case PpapiHostMsg_FlashClipboard_Create::ID: {
- scoped_refptr<ResourceMessageFilter> clipboard_filter(new PepperFlashClipboardMessageFilter);
- return scoped_ptr<ppapi::host::ResourceHost>(new MessageFilterHost(
+ scoped_refptr<ResourceMessageFilter> clipboard_filter(new chrome::PepperFlashClipboardMessageFilter);
+ return base::WrapUnique(new MessageFilterHost(
host_->GetPpapiHost(), instance, resource, clipboard_filter));
}
}
@@ -101,11 +102,12 @@ scoped_ptr<ppapi::host::ResourceHost> PepperHostFactoryQt::CreateResourceHost(pp
if (message.type() == PpapiHostMsg_IsolatedFileSystem_Create::ID) {
PepperIsolatedFileSystemMessageFilter* isolated_fs_filter = PepperIsolatedFileSystemMessageFilter::Create(instance, host_);
if (!isolated_fs_filter)
- return scoped_ptr<ppapi::host::ResourceHost>();
- return scoped_ptr<ppapi::host::ResourceHost>(new MessageFilterHost(host, instance, resource, isolated_fs_filter));
+ return nullptr;
+ return base::WrapUnique(
+ new MessageFilterHost(host_->GetPpapiHost(), instance, resource, isolated_fs_filter));
}
- return scoped_ptr<ppapi::host::ResourceHost>();
+ return nullptr;
}
} // namespace QtWebEngineCore
diff --git a/src/core/renderer/pepper/pepper_host_factory_qt.h b/src/core/renderer_host/pepper/pepper_host_factory_qt.h
index e73e097c0..0446cf9e3 100644
--- a/src/core/renderer/pepper/pepper_host_factory_qt.h
+++ b/src/core/renderer_host/pepper/pepper_host_factory_qt.h
@@ -57,7 +57,7 @@ public:
explicit PepperHostFactoryQt(content::BrowserPpapiHost* host);
~PepperHostFactoryQt() override;
- virtual scoped_ptr<ppapi::host::ResourceHost> CreateResourceHost(
+ virtual std::unique_ptr<ppapi::host::ResourceHost> CreateResourceHost(
ppapi::host::PpapiHost* host,
PP_Resource resource,
PP_Instance instance,
diff --git a/src/core/renderer/pepper/pepper_isolated_file_system_message_filter.cpp b/src/core/renderer_host/pepper/pepper_isolated_file_system_message_filter.cpp
index 7e8b2fdda..7e8b2fdda 100644
--- a/src/core/renderer/pepper/pepper_isolated_file_system_message_filter.cpp
+++ b/src/core/renderer_host/pepper/pepper_isolated_file_system_message_filter.cpp
diff --git a/src/core/renderer/pepper/pepper_isolated_file_system_message_filter.h b/src/core/renderer_host/pepper/pepper_isolated_file_system_message_filter.h
index 750f7cea0..750f7cea0 100644
--- a/src/core/renderer/pepper/pepper_isolated_file_system_message_filter.h
+++ b/src/core/renderer_host/pepper/pepper_isolated_file_system_message_filter.h
diff --git a/src/core/resource_dispatcher_host_delegate_qt.cpp b/src/core/renderer_host/resource_dispatcher_host_delegate_qt.cpp
index af8b02e1b..16a4e7265 100644
--- a/src/core/resource_dispatcher_host_delegate_qt.cpp
+++ b/src/core/renderer_host/resource_dispatcher_host_delegate_qt.cpp
@@ -151,7 +151,8 @@ static void LaunchURL(const GURL& url, int render_process_id,
bool ResourceDispatcherHostDelegateQt::HandleExternalProtocol(const GURL& url, int child_id,
const content::ResourceRequestInfo::WebContentsGetter& web_contents_getter,
- bool is_main_frame, ui::PageTransition page_transition, bool has_user_gesture)
+ bool is_main_frame, ui::PageTransition page_transition, bool has_user_gesture,
+ content::ResourceContext* /*resource_context*/)
{
Q_ASSERT(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO));
// We don't want to launch external applications unless it is based on a user action
diff --git a/src/core/resource_dispatcher_host_delegate_qt.h b/src/core/renderer_host/resource_dispatcher_host_delegate_qt.h
index 90797dbbf..6690f9a0f 100644
--- a/src/core/resource_dispatcher_host_delegate_qt.h
+++ b/src/core/renderer_host/resource_dispatcher_host_delegate_qt.h
@@ -89,10 +89,10 @@ private:
class ResourceDispatcherHostDelegateQt : public content::ResourceDispatcherHostDelegate {
public:
- virtual bool HandleExternalProtocol(const GURL& url,int child_id,
- const content::ResourceRequestInfo::WebContentsGetter& web_contents_getter,
- bool is_main_frame, ui::PageTransition page_transition, bool has_user_gesture)
- Q_DECL_OVERRIDE;
+ bool HandleExternalProtocol(const GURL& url, int child_id,
+ const content::ResourceRequestInfo::WebContentsGetter& web_contents_getter,
+ bool is_main_frame, ui::PageTransition page_transition, bool has_user_gesture,
+ content::ResourceContext* resource_context) override;
virtual content::ResourceDispatcherHostLoginDelegate* CreateLoginDelegate(net::AuthChallengeInfo *authInfo, net::URLRequest *request) Q_DECL_OVERRIDE;
};
diff --git a/src/core/user_resource_controller_host.cpp b/src/core/renderer_host/user_resource_controller_host.cpp
index 9d2ba8eb8..9d2ba8eb8 100644
--- a/src/core/user_resource_controller_host.cpp
+++ b/src/core/renderer_host/user_resource_controller_host.cpp
diff --git a/src/core/user_resource_controller_host.h b/src/core/renderer_host/user_resource_controller_host.h
index 8e6e1e3bf..8e6e1e3bf 100644
--- a/src/core/user_resource_controller_host.h
+++ b/src/core/renderer_host/user_resource_controller_host.h
diff --git a/src/core/web_channel_ipc_transport_host.cpp b/src/core/renderer_host/web_channel_ipc_transport_host.cpp
index aef16f0a0..aef16f0a0 100644
--- a/src/core/web_channel_ipc_transport_host.cpp
+++ b/src/core/renderer_host/web_channel_ipc_transport_host.cpp
diff --git a/src/core/web_channel_ipc_transport_host.h b/src/core/renderer_host/web_channel_ipc_transport_host.h
index 9cc1f3104..75b40477e 100644
--- a/src/core/web_channel_ipc_transport_host.h
+++ b/src/core/renderer_host/web_channel_ipc_transport_host.h
@@ -62,7 +62,7 @@ public:
virtual void RenderViewHostChanged(content::RenderViewHost* old_host, content::RenderViewHost* new_host) Q_DECL_OVERRIDE;
// QWebChannelAbstractTransport
- virtual void sendMessage(const QJsonObject &message) Q_DECL_OVERRIDE;
+ void sendMessage(const QJsonObject &message) Q_DECL_OVERRIDE;
void setWorldId(uint worldId);
uint worldId() const { return m_worldId; }
diff --git a/src/core/resource_bundle_qt.cpp b/src/core/resource_bundle_qt.cpp
index fa5c04524..5f5cead96 100644
--- a/src/core/resource_bundle_qt.cpp
+++ b/src/core/resource_bundle_qt.cpp
@@ -38,10 +38,20 @@
****************************************************************************/
#include "base/command_line.h"
+#include "base/metrics/histogram.h"
#include "content/public/common/content_switches.h"
+#include "ui/base/l10n/l10n_util.h"
+#include "ui/base/resource/data_pack.h"
#include "ui/base/resource/resource_bundle.h"
+#include "ui/base/ui_base_switches.h"
+
#include "web_engine_library_info.h"
+#if defined(OS_LINUX)
+#include "base/posix/global_descriptors.h"
+#include "global_descriptors_qt.h"
+#endif
+
namespace ui {
void ResourceBundle::LoadCommonResources()
@@ -53,11 +63,69 @@ void ResourceBundle::LoadCommonResources()
AddOptionalDataPackFromPath(WebEngineLibraryInfo::getPath(QT_RESOURCES_DEVTOOLS_PAK), SCALE_FACTOR_NONE);
}
-gfx::Image& ResourceBundle::GetNativeImageNamed(int resource_id, ImageRTL rtl)
+gfx::Image& ResourceBundle::GetNativeImageNamed(int resource_id)
{
LOG(WARNING) << "Unable to load image with id " << resource_id;
NOTREACHED(); // Want to assert in debug mode.
return GetEmptyImage();
}
+bool ResourceBundle::LocaleDataPakExists(const std::string& locale)
+{
+#if defined(OS_LINUX)
+ base::CommandLine *parsed_command_line = base::CommandLine::ForCurrentProcess();
+ std::string process_type = parsed_command_line->GetSwitchValueASCII(switches::kProcessType);
+ if (process_type == switches::kRendererProcess) {
+ // The Renderer Process is sandboxed thus only one locale is available in it.
+ // The particular one is passed by the --lang command line option.
+ if (!parsed_command_line->HasSwitch(switches::kLang) || parsed_command_line->GetSwitchValueASCII(switches::kLang) != locale)
+ return false;
+
+ auto global_descriptors = base::GlobalDescriptors::GetInstance();
+ return global_descriptors->MaybeGet(kWebEngineLocale) != -1;
+ }
+#endif
+
+ return !GetLocaleFilePath(locale, true).empty();
+}
+
+std::string ResourceBundle::LoadLocaleResources(const std::string& pref_locale)
+{
+ DCHECK(!locale_resources_data_.get()) << "locale.pak already loaded";
+
+ std::string app_locale = l10n_util::GetApplicationLocale(pref_locale);
+
+#if defined(OS_LINUX)
+ int locale_fd = base::GlobalDescriptors::GetInstance()->MaybeGet(kWebEngineLocale);
+ if (locale_fd > -1) {
+ std::unique_ptr<DataPack> data_pack(new DataPack(SCALE_FACTOR_100P));
+ data_pack->LoadFromFile(base::File(locale_fd));
+ locale_resources_data_.reset(data_pack.release());
+ return app_locale;
+ }
+#endif
+
+ base::FilePath locale_file_path = GetOverriddenPakPath();
+ if (locale_file_path.empty())
+ locale_file_path = GetLocaleFilePath(app_locale, true);
+
+ if (locale_file_path.empty()) {
+ // It's possible that there is no locale.pak.
+ LOG(WARNING) << "locale_file_path.empty() for locale " << app_locale;
+ return std::string();
+ }
+
+ std::unique_ptr<DataPack> data_pack(new DataPack(SCALE_FACTOR_100P));
+ if (!data_pack->LoadFromPath(locale_file_path)) {
+ UMA_HISTOGRAM_ENUMERATION("ResourceBundle.LoadLocaleResourcesError",
+ logging::GetLastSystemErrorCode(), 16000);
+ LOG(ERROR) << "failed to load locale.pak";
+ NOTREACHED();
+ return std::string();
+ }
+
+ locale_resources_data_.reset(data_pack.release());
+ return app_locale;
+}
+
} // namespace ui
diff --git a/src/core/resource_context_qt.cpp b/src/core/resource_context_qt.cpp
index 5cb217605..1ab1ea223 100644
--- a/src/core/resource_context_qt.cpp
+++ b/src/core/resource_context_qt.cpp
@@ -39,6 +39,7 @@
#include "resource_context_qt.h"
+#include "content/public/browser/storage_partition.h"
#include "net/url_request/url_request_context_getter.h"
#include "browser_context_qt.h"
@@ -53,6 +54,8 @@ net::HostResolver *ResourceContextQt::GetHostResolver()
net::URLRequestContext* ResourceContextQt::GetRequestContext()
{
Q_ASSERT(context);
+ // FIXME: This is the only remaining use of GetRequestContext(),
+ // but we are on the wrong thread for calling BrowserContext::GetDefaultStoragePartition
return context->GetRequestContext()->GetURLRequestContext();
}
diff --git a/src/core/resources/resources.gyp b/src/core/resources/resources.gyp
index 618b4d355..8b7d520a9 100644
--- a/src/core/resources/resources.gyp
+++ b/src/core/resources/resources.gyp
@@ -20,6 +20,7 @@
'dependencies': [
'<(chromium_src_dir)/content/app/strings/content_strings.gyp:content_strings',
'<(chromium_src_dir)/content/browser/devtools/devtools_resources.gyp:devtools_resources',
+ '<(chromium_src_dir)/components/components_resources.gyp:components_resources',
'<(chromium_src_dir)/components/components_strings.gyp:components_strings',
'<(chromium_src_dir)/third_party/WebKit/public/blink_resources.gyp:blink_resources',
'<(qtwebengine_root)/src/core/chrome_qt.gyp:chrome_resources',
@@ -30,6 +31,7 @@
'variables': {
'pak_inputs': [
'<(SHARED_INTERMEDIATE_DIR)/net/net_resources.pak',
+ '<(SHARED_INTERMEDIATE_DIR)/components/components_resources.pak',
'<(SHARED_INTERMEDIATE_DIR)/content/content_resources.pak',
'<(SHARED_INTERMEDIATE_DIR)/blink/public/resources/blink_resources.pak',
'<(SHARED_INTERMEDIATE_DIR)/ui/resources/webui_resources.pak',
@@ -45,6 +47,7 @@
'variables': {
'pak_inputs': [
'<(SHARED_INTERMEDIATE_DIR)/ui/resources/ui_resources_100_percent.pak',
+ '<(SHARED_INTERMEDIATE_DIR)/components/components_resources_100_percent.pak',
'<(SHARED_INTERMEDIATE_DIR)/content/app/resources/content_resources_100_percent.pak',
'<(SHARED_INTERMEDIATE_DIR)/chrome/renderer_resources_100_percent.pak',
'<(SHARED_INTERMEDIATE_DIR)/blink/public/resources/blink_image_resources_100_percent.pak',
@@ -60,6 +63,7 @@
'variables': {
'pak_inputs': [
'<(SHARED_INTERMEDIATE_DIR)/ui/resources/ui_resources_200_percent.pak',
+ '<(SHARED_INTERMEDIATE_DIR)/components/components_resources_200_percent.pak',
'<(SHARED_INTERMEDIATE_DIR)/content/app/resources/content_resources_200_percent.pak',
'<(SHARED_INTERMEDIATE_DIR)/chrome/renderer_resources_200_percent.pak',
'<(SHARED_INTERMEDIATE_DIR)/blink/public/resources/blink_image_resources_200_percent.pak',
diff --git a/src/core/surface_factory_qt.cpp b/src/core/surface_factory_qt.cpp
index 48c91bfcf..97a304730 100644
--- a/src/core/surface_factory_qt.cpp
+++ b/src/core/surface_factory_qt.cpp
@@ -85,7 +85,7 @@ bool SurfaceFactoryQt::LoadEGLGLES2Bindings(AddGLLibraryCallback add_gl_library,
if (!gles2Library)
return false;
- gfx::GLGetProcAddressProc get_proc_address = reinterpret_cast<gfx::GLGetProcAddressProc>(base::GetFunctionPointerFromNativeLibrary(eglLibrary, "eglGetProcAddress"));
+ gl::GLGetProcAddressProc get_proc_address = reinterpret_cast<gl::GLGetProcAddressProc>(base::GetFunctionPointerFromNativeLibrary(eglLibrary, "eglGetProcAddress"));
if (!get_proc_address) {
LOG(ERROR) << "eglGetProcAddress not found.";
base::UnloadNativeLibrary(eglLibrary);
@@ -93,9 +93,9 @@ bool SurfaceFactoryQt::LoadEGLGLES2Bindings(AddGLLibraryCallback add_gl_library,
return false;
}
- gfx::SetGLGetProcAddressProc(get_proc_address);
- gfx::AddGLNativeLibrary(eglLibrary);
- gfx::AddGLNativeLibrary(gles2Library);
+ gl::SetGLGetProcAddressProc(get_proc_address);
+ gl::AddGLNativeLibrary(eglLibrary);
+ gl::AddGLNativeLibrary(gles2Library);
return true;
}
diff --git a/src/core/type_conversion.cpp b/src/core/type_conversion.cpp
index ef220b86c..a7b5ee831 100644
--- a/src/core/type_conversion.cpp
+++ b/src/core/type_conversion.cpp
@@ -50,6 +50,8 @@ QImage toQImage(const SkBitmap &bitmap)
QImage image;
switch (bitmap.colorType()) {
case kUnknown_SkColorType:
+ case kRGBA_F16_SkColorType:
+ qWarning("Unknown or unsupported skia image format");
break;
case kAlpha_8_SkColorType:
image = toQImage(bitmap, QImage::Format_Alpha8);
diff --git a/src/core/type_conversion.h b/src/core/type_conversion.h
index e96a544e5..ed02a9db9 100644
--- a/src/core/type_conversion.h
+++ b/src/core/type_conversion.h
@@ -60,7 +60,7 @@
#include "third_party/skia/include/core/SkBitmap.h"
#include "third_party/skia/include/core/SkColor.h"
#include "third_party/skia/include/core/SkPixelRef.h"
-#include "third_party/skia/include/utils/SkMatrix44.h"
+#include "third_party/skia/include/core/SkMatrix44.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/geometry/rect_f.h"
#include "url/gurl.h"
diff --git a/src/core/url_request_context_getter_qt.cpp b/src/core/url_request_context_getter_qt.cpp
index bf32c75a4..61f359a87 100644
--- a/src/core/url_request_context_getter_qt.cpp
+++ b/src/core/url_request_context_getter_qt.cpp
@@ -40,6 +40,7 @@
#include "url_request_context_getter_qt.h"
#include "base/command_line.h"
+#include "base/memory/ptr_util.h"
#include "base/strings/string_util.h"
#include "base/threading/worker_pool.h"
#include "base/threading/sequenced_worker_pool.h"
@@ -48,6 +49,10 @@
#include "content/public/common/content_switches.h"
#include "net/base/cache_type.h"
#include "net/cert/cert_verifier.h"
+#include "net/cert/ct_known_logs.h"
+#include "net/cert/ct_log_verifier.h"
+#include "net/cert/ct_policy_enforcer.h"
+#include "net/cert/multi_log_ct_verifier.h"
#include "net/disk_cache/disk_cache.h"
#include "net/dns/host_resolver.h"
#include "net/dns/mapped_host_resolver.h"
@@ -216,6 +221,7 @@ void URLRequestContextGetterQt::generateStorage()
cancelAllUrlRequests();
// we need to get rid of dangling pointer due to coming storage deletion
m_urlRequestContext->set_http_transaction_factory(0);
+ m_httpNetworkSession.reset();
}
m_storage.reset(new net::URLRequestContextStorage(m_urlRequestContext.get()));
@@ -224,8 +230,12 @@ void URLRequestContextGetterQt::generateStorage()
Q_ASSERT(proxyConfigService);
m_storage->set_cert_verifier(net::CertVerifier::CreateDefault());
+ std::unique_ptr<net::MultiLogCTVerifier> ct_verifier(new net::MultiLogCTVerifier());
+ ct_verifier->AddLogs(net::ct::CreateLogVerifiersForKnownLogs());
+ m_storage->set_cert_transparency_verifier(std::move(ct_verifier));
+ m_storage->set_ct_policy_enforcer(base::WrapUnique(new net::CTPolicyEnforcer));
- scoped_ptr<net::HostResolver> host_resolver(net::HostResolver::CreateDefaultResolver(NULL));
+ std::unique_ptr<net::HostResolver> host_resolver(net::HostResolver::CreateDefaultResolver(NULL));
// The System Proxy Resolver has issues on Windows with unconfigured network cards,
// which is why we want to use the v8 one
@@ -233,7 +243,7 @@ void URLRequestContextGetterQt::generateStorage()
m_dhcpProxyScriptFetcherFactory.reset(new net::DhcpProxyScriptFetcherFactory);
m_storage->set_proxy_service(net::CreateProxyServiceUsingV8ProxyResolver(
- scoped_ptr<net::ProxyConfigService>(proxyConfigService),
+ std::unique_ptr<net::ProxyConfigService>(proxyConfigService),
new net::ProxyScriptFetcherImpl(m_urlRequestContext.get()),
m_dhcpProxyScriptFetcherFactory->Create(m_urlRequestContext.get()),
host_resolver.get(),
@@ -241,10 +251,10 @@ void URLRequestContextGetterQt::generateStorage()
m_networkDelegate.get()));
m_storage->set_ssl_config_service(new net::SSLConfigServiceDefaults);
- m_storage->set_transport_security_state(scoped_ptr<net::TransportSecurityState>(new net::TransportSecurityState()));
+ m_storage->set_transport_security_state(std::unique_ptr<net::TransportSecurityState>(new net::TransportSecurityState()));
m_storage->set_http_auth_handler_factory(net::HttpAuthHandlerFactory::CreateDefault(host_resolver.get()));
- m_storage->set_http_server_properties(scoped_ptr<net::HttpServerProperties>(new net::HttpServerPropertiesImpl));
+ m_storage->set_http_server_properties(std::unique_ptr<net::HttpServerProperties>(new net::HttpServerPropertiesImpl));
// Give |m_storage| ownership at the end in case it's |mapped_host_resolver|.
m_storage->set_host_resolver(std::move(host_resolver));
@@ -283,7 +293,7 @@ void URLRequestContextGetterQt::generateCookieStore()
}
m_storage->set_channel_id_service(
- scoped_ptr<net::ChannelIDService>(new net::ChannelIDService(
+ base::WrapUnique(new net::ChannelIDService(
new net::DefaultChannelIDStore(channel_id_db.get()),
base::WorkerPool::GetTaskRunner(true))));
@@ -291,7 +301,7 @@ void URLRequestContextGetterQt::generateCookieStore()
m_storage->set_cookie_store(0);
m_cookieDelegate->setCookieMonster(0);
- net::CookieStore* cookieStore = 0;
+ std::unique_ptr<net::CookieStore> cookieStore;
switch (m_persistentCookiesPolicy) {
case BrowserContextAdapter::NoPersistentCookies:
cookieStore =
@@ -321,10 +331,13 @@ void URLRequestContextGetterQt::generateCookieStore()
);
break;
}
- m_storage->set_cookie_store(cookieStore);
- net::CookieMonster * const cookieMonster = cookieStore->GetCookieMonster();
- cookieMonster->SetCookieableSchemes(kCookieableSchemes, arraysize(kCookieableSchemes));
+ net::CookieMonster * const cookieMonster = static_cast<net::CookieMonster*>(cookieStore.get());
+ cookieStore->SetChannelIDServiceID(m_urlRequestContext->channel_id_service()->GetUniqueID());
+ m_storage->set_cookie_store(std::move(cookieStore));
+
+ const std::vector<std::string> cookieableSchemes(kCookieableSchemes, kCookieableSchemes + arraysize(kCookieableSchemes));
+ cookieMonster->SetCookieableSchemes(cookieableSchemes);
m_cookieDelegate->setCookieMonster(cookieMonster);
}
@@ -351,7 +364,7 @@ void URLRequestContextGetterQt::generateUserAgent()
QMutexLocker lock(&m_mutex);
m_updateUserAgent = true;
- m_storage->set_http_user_agent_settings(scoped_ptr<net::HttpUserAgentSettings>(
+ m_storage->set_http_user_agent_settings(std::unique_ptr<net::HttpUserAgentSettings>(
new net::StaticHttpUserAgentSettings(m_httpAcceptLanguage.toStdString(), m_httpUserAgent.toStdString())));
}
@@ -406,14 +419,16 @@ static bool doNetworkSessionParamsMatch(const net::HttpNetworkSession::Params &f
return false;
if (first.http_auth_handler_factory != second.http_auth_handler_factory)
return false;
- if (first.network_delegate != second.network_delegate)
- return false;
- if (first.http_server_properties.get() != second.http_server_properties.get())
+ if (first.http_server_properties != second.http_server_properties)
return false;
if (first.ignore_certificate_errors != second.ignore_certificate_errors)
return false;
if (first.host_resolver != second.host_resolver)
return false;
+ if (first.cert_transparency_verifier != second.cert_transparency_verifier)
+ return false;
+ if (first.ct_policy_enforcer != second.ct_policy_enforcer)
+ return false;
return true;
}
@@ -430,10 +445,11 @@ net::HttpNetworkSession::Params URLRequestContextGetterQt::generateNetworkSessio
network_session_params.proxy_service = m_urlRequestContext->proxy_service();
network_session_params.ssl_config_service = m_urlRequestContext->ssl_config_service();
network_session_params.http_auth_handler_factory = m_urlRequestContext->http_auth_handler_factory();
- network_session_params.network_delegate = m_networkDelegate.get();
network_session_params.http_server_properties = m_urlRequestContext->http_server_properties();
network_session_params.ignore_certificate_errors = m_ignoreCertificateErrors;
network_session_params.host_resolver = m_urlRequestContext->host_resolver();
+ network_session_params.cert_transparency_verifier = m_urlRequestContext->cert_transparency_verifier();
+ network_session_params.ct_policy_enforcer = m_urlRequestContext->ct_policy_enforcer();
return network_session_params;
}
@@ -482,9 +498,9 @@ void URLRequestContextGetterQt::generateHttpCache()
m_httpNetworkSession.reset(new net::HttpNetworkSession(network_session_params));
}
- cache = new net::HttpCache(m_httpNetworkSession.get(), scoped_ptr<net::HttpCache::DefaultBackend>(main_backend), false);
+ cache = new net::HttpCache(m_httpNetworkSession.get(), std::unique_ptr<net::HttpCache::DefaultBackend>(main_backend), false);
- m_storage->set_http_transaction_factory(scoped_ptr<net::HttpCache>(cache));
+ m_storage->set_http_transaction_factory(std::unique_ptr<net::HttpCache>(cache));
}
void URLRequestContextGetterQt::clearHttpCache()
@@ -513,36 +529,39 @@ void URLRequestContextGetterQt::generateJobFactory()
QMutexLocker lock(&m_mutex);
m_updateJobFactory = false;
- scoped_ptr<net::URLRequestJobFactoryImpl> jobFactory(new net::URLRequestJobFactoryImpl());
+ std::unique_ptr<net::URLRequestJobFactoryImpl> jobFactory(new net::URLRequestJobFactoryImpl());
{
- // Chromium has a few protocol handlers ready for us, only pick blob: and throw away the rest.
+ // Chromium has transferred a few protocol handlers to us, only pick blob: and chrome: and ignore the rest.
content::ProtocolHandlerMap::iterator it = m_protocolHandlers.find(url::kBlobScheme);
Q_ASSERT(it != m_protocolHandlers.end());
- jobFactory->SetProtocolHandler(it->first, scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>(it->second.release()));
+ jobFactory->SetProtocolHandler(it->first, std::unique_ptr<net::URLRequestJobFactory::ProtocolHandler>(it->second.release()));
+ it = m_protocolHandlers.find(content::kChromeUIScheme);
+ Q_ASSERT(it != m_protocolHandlers.end());
+ jobFactory->SetProtocolHandler(it->first, std::unique_ptr<net::URLRequestJobFactory::ProtocolHandler>(it->second.release()));
m_protocolHandlers.clear();
}
- jobFactory->SetProtocolHandler(url::kDataScheme, scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>(new net::DataProtocolHandler()));
- jobFactory->SetProtocolHandler(url::kFileScheme, scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>(new net::FileProtocolHandler(
+ jobFactory->SetProtocolHandler(url::kDataScheme, std::unique_ptr<net::URLRequestJobFactory::ProtocolHandler>(new net::DataProtocolHandler()));
+ jobFactory->SetProtocolHandler(url::kFileScheme, std::unique_ptr<net::URLRequestJobFactory::ProtocolHandler>(new net::FileProtocolHandler(
content::BrowserThread::GetBlockingPool()->GetTaskRunnerWithShutdownBehavior(
base::SequencedWorkerPool::SKIP_ON_SHUTDOWN))));
- jobFactory->SetProtocolHandler(kQrcSchemeQt, scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>(new QrcProtocolHandlerQt()));
+ jobFactory->SetProtocolHandler(kQrcSchemeQt, std::unique_ptr<net::URLRequestJobFactory::ProtocolHandler>(new QrcProtocolHandlerQt()));
jobFactory->SetProtocolHandler(url::kFtpScheme,
- scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>(new net::FtpProtocolHandler(new net::FtpNetworkLayer(m_urlRequestContext->host_resolver()))));
+ std::unique_ptr<net::URLRequestJobFactory::ProtocolHandler>(new net::FtpProtocolHandler(new net::FtpNetworkLayer(m_urlRequestContext->host_resolver()))));
m_installedCustomSchemes = m_customUrlSchemes;
Q_FOREACH (const QByteArray &scheme, m_installedCustomSchemes) {
- jobFactory->SetProtocolHandler(scheme.toStdString(), scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>(new CustomProtocolHandler(m_browserContext)));
+ jobFactory->SetProtocolHandler(scheme.toStdString(), std::unique_ptr<net::URLRequestJobFactory::ProtocolHandler>(new CustomProtocolHandler(m_browserContext)));
}
m_baseJobFactory = jobFactory.get();
// Set up interceptors in the reverse order.
- scoped_ptr<net::URLRequestJobFactory> topJobFactory = std::move(jobFactory);
+ std::unique_ptr<net::URLRequestJobFactory> topJobFactory = std::move(jobFactory);
for (content::URLRequestInterceptorScopedVector::reverse_iterator i = m_requestInterceptors.rbegin(); i != m_requestInterceptors.rend(); ++i)
- topJobFactory.reset(new net::URLRequestInterceptingJobFactory(std::move(topJobFactory), make_scoped_ptr(*i)));
+ topJobFactory.reset(new net::URLRequestInterceptingJobFactory(std::move(topJobFactory), std::unique_ptr<net::URLRequestInterceptor>(*i)));
m_requestInterceptors.weak_clear();
@@ -570,7 +589,7 @@ void URLRequestContextGetterQt::regenerateJobFactory()
m_installedCustomSchemes = m_customUrlSchemes;
Q_FOREACH (const QByteArray &scheme, m_installedCustomSchemes) {
- m_baseJobFactory->SetProtocolHandler(scheme.toStdString(), scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>(new CustomProtocolHandler(m_browserContext)));
+ m_baseJobFactory->SetProtocolHandler(scheme.toStdString(), std::unique_ptr<net::URLRequestJobFactory::ProtocolHandler>(new CustomProtocolHandler(m_browserContext)));
}
}
diff --git a/src/core/url_request_context_getter_qt.h b/src/core/url_request_context_getter_qt.h
index dd51fd72c..8cfa8d759 100644
--- a/src/core/url_request_context_getter_qt.h
+++ b/src/core/url_request_context_getter_qt.h
@@ -44,8 +44,8 @@
#include "base/files/file_path.h"
#include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
#include "base/single_thread_task_runner.h"
+#include "content/public/browser/browser_context.h"
#include "content/public/browser/content_browser_client.h"
#include "content/public/common/url_constants.h"
#include "net/http/http_network_session.h"
@@ -116,15 +116,15 @@ private:
content::ProtocolHandlerMap m_protocolHandlers;
QAtomicPointer<net::ProxyConfigService> m_proxyConfigService;
- scoped_ptr<net::URLRequestContext> m_urlRequestContext;
- scoped_ptr<NetworkDelegateQt> m_networkDelegate;
- scoped_ptr<net::URLRequestContextStorage> m_storage;
- scoped_ptr<net::URLRequestJobFactory> m_jobFactory;
+ std::unique_ptr<net::URLRequestContext> m_urlRequestContext;
+ std::unique_ptr<NetworkDelegateQt> m_networkDelegate;
+ std::unique_ptr<net::URLRequestContextStorage> m_storage;
+ std::unique_ptr<net::URLRequestJobFactory> m_jobFactory;
net::URLRequestJobFactoryImpl *m_baseJobFactory;
- scoped_ptr<net::DhcpProxyScriptFetcherFactory> m_dhcpProxyScriptFetcherFactory;
+ std::unique_ptr<net::DhcpProxyScriptFetcherFactory> m_dhcpProxyScriptFetcherFactory;
scoped_refptr<CookieMonsterDelegateQt> m_cookieDelegate;
content::URLRequestInterceptorScopedVector m_requestInterceptors;
- scoped_ptr<net::HttpNetworkSession> m_httpNetworkSession;
+ std::unique_ptr<net::HttpNetworkSession> m_httpNetworkSession;
QList<QByteArray> m_installedCustomSchemes;
QWebEngineUrlRequestInterceptor* m_requestInterceptor;
diff --git a/src/core/user_script.cpp b/src/core/user_script.cpp
index 839eff366..b33dd6a7d 100644
--- a/src/core/user_script.cpp
+++ b/src/core/user_script.cpp
@@ -38,11 +38,39 @@
****************************************************************************/
#include "common/user_script_data.h"
+#include "extensions/common/url_pattern.h"
#include "user_script.h"
#include "type_conversion.h"
+namespace {
+
+// Helper function to parse Greasemonkey headers
+bool GetDeclarationValue(const base::StringPiece& line,
+ const base::StringPiece& prefix,
+ std::string* value) {
+ base::StringPiece::size_type index = line.find(prefix);
+ if (index == base::StringPiece::npos)
+ return false;
+
+ std::string temp(line.data() + index + prefix.length(),
+ line.length() - index - prefix.length());
+
+ if (temp.empty() || !base::IsUnicodeWhitespace(temp[0]))
+ return false;
+
+ base::TrimWhitespaceASCII(temp, base::TRIM_ALL, value);
+ return true;
+}
+
+} // namespace
+
namespace QtWebEngineCore {
+int UserScript::validUserScriptSchemes()
+{
+ return URLPattern::SCHEME_HTTP | URLPattern::SCHEME_HTTPS | URLPattern::SCHEME_FILE;
+}
+
ASSERT_ENUMS_MATCH(UserScript::AfterLoad, UserScriptData::AfterLoad)
ASSERT_ENUMS_MATCH(UserScript::DocumentLoadFinished, UserScriptData::DocumentLoadFinished)
ASSERT_ENUMS_MATCH(UserScript::DocumentElementCreation, UserScriptData::DocumentElementCreation)
@@ -100,6 +128,7 @@ void UserScript::setSourceCode(const QString &source)
{
initData();
scriptData->source = source.toStdString();
+ parseMetadataHeader();
}
UserScript::InjectionPoint UserScript::injectionPoint() const
@@ -169,4 +198,80 @@ UserScriptData &UserScript::data() const
return *(scriptData.data());
}
+void UserScript::parseMetadataHeader()
+{
+ // Logic taken from Chromium (extensions/browser/user_script_loader.cc)
+ // http://wiki.greasespot.net/Metadata_block
+ const std::string &script_text = scriptData->source;
+ base::StringPiece line;
+ size_t line_start = 0;
+ size_t line_end = line_start;
+ bool in_metadata = false;
+
+ static const base::StringPiece kUserScriptBegin("// ==UserScript==");
+ static const base::StringPiece kUserScriptEnd("// ==/UserScript==");
+ static const base::StringPiece kNameDeclaration("// @name");
+ static const base::StringPiece kIncludeDeclaration("// @include");
+ static const base::StringPiece kExcludeDeclaration("// @exclude");
+ static const base::StringPiece kMatchDeclaration("// @match");
+ static const base::StringPiece kRunAtDeclaration("// @run-at");
+ static const base::StringPiece kRunAtDocumentStartValue("document-start");
+ static const base::StringPiece kRunAtDocumentEndValue("document-end");
+ static const base::StringPiece kRunAtDocumentIdleValue("document-idle");
+ // FIXME: Scripts don't run in subframes by default. If we would like to
+ // support @noframes rule, we have to change the current default behavior.
+ // static const base::StringPiece kNoFramesDeclaration("// @noframes");
+
+ static URLPattern urlPatternParser(validUserScriptSchemes());
+
+ while (line_start < script_text.length()) {
+ line_end = script_text.find('\n', line_start);
+
+ // Handle the case where there is no trailing newline in the file.
+ if (line_end == std::string::npos)
+ line_end = script_text.length() - 1;
+
+ line.set(script_text.data() + line_start, line_end - line_start);
+
+ if (!in_metadata) {
+ if (line.starts_with(kUserScriptBegin))
+ in_metadata = true;
+ } else {
+ if (line.starts_with(kUserScriptEnd))
+ break;
+
+ std::string value;
+ if (GetDeclarationValue(line, kNameDeclaration, &value)) {
+ setName(toQt(value));
+ } else if (GetDeclarationValue(line, kIncludeDeclaration, &value)) {
+ // We escape some characters that MatchPattern() considers special.
+ base::ReplaceSubstringsAfterOffset(&value, 0, "\\", "\\\\");
+ base::ReplaceSubstringsAfterOffset(&value, 0, "?", "\\?");
+ scriptData->globs.push_back(value);
+ } else if (GetDeclarationValue(line, kExcludeDeclaration, &value)) {
+ base::ReplaceSubstringsAfterOffset(&value, 0, "\\", "\\\\");
+ base::ReplaceSubstringsAfterOffset(&value, 0, "?", "\\?");
+ scriptData->excludeGlobs.push_back(value);
+ } else if (GetDeclarationValue(line, kMatchDeclaration, &value)) {
+ if (URLPattern::PARSE_SUCCESS == urlPatternParser.Parse(value))
+ scriptData->urlPatterns.push_back(value);
+ } else if (GetDeclarationValue(line, kRunAtDeclaration, &value)) {
+ if (value == kRunAtDocumentStartValue)
+ scriptData->injectionPoint = DocumentElementCreation;
+ else if (value == kRunAtDocumentEndValue)
+ scriptData->injectionPoint = DocumentLoadFinished;
+ else if (value == kRunAtDocumentIdleValue)
+ scriptData->injectionPoint = AfterLoad;
+ }
+ }
+
+ line_start = line_end + 1;
+ }
+
+ // If no patterns were specified, default to @include *. This is what
+ // Greasemonkey does.
+ if (scriptData->globs.empty() && scriptData->urlPatterns.empty())
+ scriptData->globs.push_back("*");
+}
+
} // namespace QtWebEngineCore
diff --git a/src/core/user_script.h b/src/core/user_script.h
index 9d7d66a58..e44efd3e9 100644
--- a/src/core/user_script.h
+++ b/src/core/user_script.h
@@ -85,9 +85,12 @@ public:
bool operator==(const UserScript &) const;
+ static int validUserScriptSchemes();
+
private:
void initData();
UserScriptData &data() const;
+ void parseMetadataHeader();
friend class UserResourceControllerHost;
QScopedPointer<UserScriptData> scriptData;
diff --git a/src/core/web_contents_adapter.cpp b/src/core/web_contents_adapter.cpp
index fc54c98ed..03b62d190 100644
--- a/src/core/web_contents_adapter.cpp
+++ b/src/core/web_contents_adapter.cpp
@@ -46,14 +46,16 @@
#include "browser_accessibility_qt.h"
#include "browser_context_adapter.h"
+#include "browser_context_adapter_client.h"
#include "browser_context_qt.h"
#include "download_manager_delegate_qt.h"
#include "media_capture_devices_dispatcher.h"
+#include "pdfium_printing_wrapper_qt.h"
#include "print_view_manager_qt.h"
#include "qwebenginecallback_p.h"
+#include "renderer_host/web_channel_ipc_transport_host.h"
#include "render_view_observer_host_qt.h"
#include "type_conversion.h"
-#include "web_channel_ipc_transport_host.h"
#include "web_contents_adapter_client.h"
#include "web_contents_view_qt.h"
#include "web_engine_context.h"
@@ -90,6 +92,9 @@
#include <QtGui/qaccessible.h>
#include <QtGui/qdrag.h>
#include <QtGui/qpixmap.h>
+#if !defined(QT_NO_WIDGETS) && !defined(QT_NO_PRINTER)
+#include <QtPrintSupport/qprinter.h>
+#endif // QT_NO_PRINTER
#include <QtWebChannel/QWebChannel>
namespace QtWebEngineCore {
@@ -188,6 +193,17 @@ static void callbackOnPrintingFinished(WebContentsAdapterClient *adapterClient,
}
}
+#if !defined(QT_NO_WIDGETS) && !defined(QT_NO_PRINTER)
+static void callbackOnPrintingOnPrinterFinished(WebContentsAdapterClient *adapterClient, int requestId, QPrinter *printer, const std::vector<char> &result)
+{
+ if (requestId) {
+ PdfiumPrintingWrapperQt printWrapper(result.data(), result.size());
+ bool printerResult = printWrapper.printOnPrinter(*printer);
+ adapterClient->didPrintPageOnPrinter(requestId, printerResult);
+ }
+}
+#endif // QT_NO_PRINTER
+
static content::WebContents *createBlankWebContents(WebContentsAdapterClient *adapterClient, content::BrowserContext *browserContext)
{
content::WebContents::CreateParams create_params(browserContext, NULL);
@@ -231,7 +247,7 @@ static void serializeNavigationHistory(const content::NavigationController &cont
}
}
-static void deserializeNavigationHistory(QDataStream &input, int *currentIndex, std::vector<scoped_ptr<content::NavigationEntry>> *entries, content::BrowserContext *browserContext)
+static void deserializeNavigationHistory(QDataStream &input, int *currentIndex, std::vector<std::unique_ptr<content::NavigationEntry>> *entries, content::BrowserContext *browserContext)
{
int version;
input >> version;
@@ -280,7 +296,7 @@ static void deserializeNavigationHistory(QDataStream &input, int *currentIndex,
return;
}
- scoped_ptr<content::NavigationEntry> entry = content::NavigationController::CreateNavigationEntry(
+ std::unique_ptr<content::NavigationEntry> entry = content::NavigationController::CreateNavigationEntry(
toGurl(virtualUrl),
content::Referrer(toGurl(referrerUrl), static_cast<blink::WebReferrerPolicy>(referrerPolicy)),
// Use a transition type of reload so that we don't incorrectly
@@ -351,7 +367,7 @@ WebContentsAdapterPrivate::~WebContentsAdapterPrivate()
QSharedPointer<WebContentsAdapter> WebContentsAdapter::createFromSerializedNavigationHistory(QDataStream &input, WebContentsAdapterClient *adapterClient)
{
int currentIndex;
- std::vector<scoped_ptr<content::NavigationEntry>> entries;
+ std::vector<std::unique_ptr<content::NavigationEntry>> entries;
deserializeNavigationHistory(input, &currentIndex, &entries, adapterClient->browserContextAdapter()->browserContext());
if (currentIndex == -1)
@@ -469,21 +485,21 @@ void WebContentsAdapter::stop()
controller.RemoveEntryAtIndex(index);
d->webContents->Stop();
- d->webContents->Focus();
+ focusIfNecessary();
}
void WebContentsAdapter::reload()
{
Q_D(WebContentsAdapter);
d->webContents->GetController().Reload(/*checkRepost = */false);
- d->webContents->Focus();
+ focusIfNecessary();
}
void WebContentsAdapter::reloadAndBypassCache()
{
Q_D(WebContentsAdapter);
- d->webContents->GetController().ReloadIgnoringCache(/*checkRepost = */false);
- d->webContents->Focus();
+ d->webContents->GetController().ReloadBypassingCache(/*checkRepost = */false);
+ focusIfNecessary();
}
void WebContentsAdapter::load(const QUrl &url)
@@ -502,11 +518,23 @@ void WebContentsAdapter::load(const QUrl &url)
Q_UNUSED(guard);
Q_D(WebContentsAdapter);
- content::NavigationController::LoadURLParams params(toGurl(url));
+ GURL gurl = toGurl(url);
+
+ // Add URL scheme if missing from view-source URL.
+ if (url.scheme() == content::kViewSourceScheme) {
+ QUrl pageUrl = QUrl(url.toString().remove(0, strlen(content::kViewSourceScheme) + 1));
+ if (pageUrl.scheme().isEmpty()) {
+ QUrl extendedUrl = QUrl::fromUserInput(pageUrl.toString());
+ extendedUrl = QUrl(QString("%1:%2").arg(content::kViewSourceScheme, extendedUrl.toString()));
+ gurl = toGurl(extendedUrl);
+ }
+ }
+
+ content::NavigationController::LoadURLParams params(gurl);
params.transition_type = ui::PageTransitionFromInt(ui::PAGE_TRANSITION_TYPED | ui::PAGE_TRANSITION_FROM_ADDRESS_BAR);
params.override_user_agent = content::NavigationController::UA_OVERRIDE_TRUE;
d->webContents->GetController().LoadURLWithParams(params);
- d->webContents->Focus();
+ focusIfNecessary();
}
void WebContentsAdapter::setContent(const QByteArray &data, const QString &mimeType, const QUrl &baseUrl)
@@ -519,7 +547,7 @@ void WebContentsAdapter::setContent(const QByteArray &data, const QString &mimeT
urlString.append(encodedData.constData(), encodedData.length());
GURL dataUrlToLoad(urlString);
- if (dataUrlToLoad.spec().size() > content::kMaxURLChars) {
+ if (dataUrlToLoad.spec().size() > url::kMaxURLChars) {
d->adapterClient->loadFinished(false, baseUrl, false, net::ERR_ABORTED);
return;
}
@@ -531,13 +559,14 @@ void WebContentsAdapter::setContent(const QByteArray &data, const QString &mimeT
params.transition_type = ui::PageTransitionFromInt(ui::PAGE_TRANSITION_TYPED | ui::PAGE_TRANSITION_FROM_API);
params.override_user_agent = content::NavigationController::UA_OVERRIDE_TRUE;
d->webContents->GetController().LoadURLWithParams(params);
- d->webContents->Focus();
+ focusIfNecessary();
d->webContents->Unselect();
}
-void WebContentsAdapter::save()
+void WebContentsAdapter::save(const QString &filePath, int savePageFormat)
{
Q_D(WebContentsAdapter);
+ d->webContentsDelegate->setSavePageInfo(SavePageInfo(filePath, savePageFormat));
d->webContents->OnSavePage();
}
@@ -631,7 +660,7 @@ void WebContentsAdapter::selectAll()
void WebContentsAdapter::requestClose()
{
Q_D(WebContentsAdapter);
- d->webContents->DispatchBeforeUnload(false);
+ d->webContents->DispatchBeforeUnload();
}
void WebContentsAdapter::unselect()
@@ -644,14 +673,14 @@ void WebContentsAdapter::navigateToIndex(int offset)
{
Q_D(WebContentsAdapter);
d->webContents->GetController().GoToIndex(offset);
- d->webContents->Focus();
+ focusIfNecessary();
}
void WebContentsAdapter::navigateToOffset(int offset)
{
Q_D(WebContentsAdapter);
d->webContents->GetController().GoToOffset(offset);
- d->webContents->Focus();
+ focusIfNecessary();
}
int WebContentsAdapter::navigationEntryCount()
@@ -849,13 +878,19 @@ void WebContentsAdapter::updateWebPreferences(const content::WebPreferences & we
void WebContentsAdapter::download(const QUrl &url, const QString &suggestedFileName)
{
+ Q_D(WebContentsAdapter);
content::BrowserContext *bctx = webContents()->GetBrowserContext();
content::DownloadManager *dlm = content::BrowserContext::GetDownloadManager(bctx);
+ DownloadManagerDelegateQt *dlmd = d->browserContextAdapter->downloadManagerDelegate();
+
if (!dlm)
return;
- scoped_ptr<content::DownloadUrlParameters> params(
- content::DownloadUrlParameters::FromWebContents(webContents(), toGurl(url)));
+ dlmd->setDownloadType(BrowserContextAdapterClient::UserRequested);
+ dlm->SetDelegate(dlmd);
+
+ std::unique_ptr<content::DownloadUrlParameters> params(
+ content::DownloadUrlParameters::CreateForWebContentsMainFrame(webContents(), toGurl(url)));
params->set_suggested_name(toString16(suggestedFileName));
dlm->DownloadUrl(std::move(params));
}
@@ -881,7 +916,7 @@ bool WebContentsAdapter::recentlyAudible()
void WebContentsAdapter::copyImageAt(const QPoint &location)
{
Q_D(WebContentsAdapter);
- d->webContents->GetRenderViewHost()->CopyImageAt(location.x(), location.y());
+ d->webContents->GetRenderViewHost()->GetMainFrame()->CopyImageAt(location.x(), location.y());
}
ASSERT_ENUMS_MATCH(WebContentsAdapter::MediaPlayerNoAction, blink::WebMediaPlayerAction::Unknown)
@@ -916,13 +951,13 @@ bool WebContentsAdapter::hasInspector() const
void WebContentsAdapter::exitFullScreen()
{
Q_D(WebContentsAdapter);
- d->webContents->ExitFullscreen();
+ d->webContents->ExitFullscreen(false);
}
void WebContentsAdapter::changedFullScreen()
{
Q_D(WebContentsAdapter);
- d->webContents->NotifyFullscreenChanged();
+ d->webContents->NotifyFullscreenChanged(false);
}
void WebContentsAdapter::wasShown()
@@ -940,7 +975,7 @@ void WebContentsAdapter::wasHidden()
void WebContentsAdapter::printToPDF(const QPageLayout &pageLayout, const QString &filePath)
{
#if defined(ENABLE_BASIC_PRINTING)
- PrintViewManagerQt::FromWebContents(webContents())->PrintToPDF(pageLayout, filePath);
+ PrintViewManagerQt::FromWebContents(webContents())->PrintToPDF(pageLayout, true, filePath);
#endif // if defined(ENABLE_BASIC_PRINTING)
}
@@ -948,13 +983,33 @@ quint64 WebContentsAdapter::printToPDFCallbackResult(const QPageLayout &pageLayo
{
#if defined(ENABLE_BASIC_PRINTING)
Q_D(WebContentsAdapter);
- PrintViewManagerQt::PrintToPDFCallback callback = base::Bind(&callbackOnPrintingFinished, d->adapterClient, d->nextRequestId);
- PrintViewManagerQt::FromWebContents(webContents())->PrintToPDFWithCallback(pageLayout, callback);
+ PrintViewManagerQt::PrintToPDFCallback callback = base::Bind(&callbackOnPrintingFinished
+ , d->adapterClient
+ , d->nextRequestId);
+ PrintViewManagerQt::FromWebContents(webContents())->PrintToPDFWithCallback(pageLayout, true
+ , callback);
+ return d->nextRequestId++;
+#else
+ return 0;
+#endif // if defined(ENABLE_BASIC_PRINTING)
+}
+
+#if !defined(QT_NO_WIDGETS) && !defined(QT_NO_PRINTER)
+quint64 WebContentsAdapter::printOnPrinterCallbackResult(QPrinter *printer)
+{
+#if defined(ENABLE_BASIC_PRINTING)
+ Q_D(WebContentsAdapter);
+ PrintViewManagerQt::PrintToPDFCallback callback
+ = base::Bind(&callbackOnPrintingOnPrinterFinished, d->adapterClient
+ , d->nextRequestId, printer);
+ PrintViewManagerQt::FromWebContents(webContents())->PrintToPDFWithCallback(
+ printer->pageLayout(), printer->colorMode() == QPrinter::Color, callback);
return d->nextRequestId++;
#else
return 0;
#endif // if defined(ENABLE_BASIC_PRINTING)
}
+#endif // QT_NO_PRINTER
QPointF WebContentsAdapter::lastScrollOffset() const
{
@@ -1137,7 +1192,7 @@ void WebContentsAdapter::enterDrag(QDragEnterEvent *e, const QPoint &screenPos)
{
Q_D(WebContentsAdapter);
- scoped_ptr<content::DropData> ownedDropData;
+ std::unique_ptr<content::DropData> ownedDropData;
const content::DropData *rvhDropData = d->currentDropData;
if (!rvhDropData) {
// The drag originated outside the WebEngineView.
@@ -1203,7 +1258,7 @@ void WebContentsAdapter::endDragging(const QPoint &clientPos, const QPoint &scre
Q_D(WebContentsAdapter);
finishDragUpdate();
content::RenderViewHost *rvh = d->webContents->GetRenderViewHost();
- rvh->DragTargetDrop(toGfx(clientPos), toGfx(screenPos), 0);
+ rvh->DragTargetDrop(*d->currentDropData, toGfx(clientPos), toGfx(screenPos), 0);
}
void WebContentsAdapter::leaveDrag()
@@ -1242,6 +1297,15 @@ void WebContentsAdapter::replaceMisspelling(const QString &word)
#endif
}
+void WebContentsAdapter::focusIfNecessary()
+{
+ Q_D(WebContentsAdapter);
+ const WebEngineSettings *settings = d->adapterClient->webEngineSettings();
+ bool focusOnNavigation = settings->testAttribute(WebEngineSettings::FocusOnNavigationEnabled);
+ if (focusOnNavigation)
+ d->webContents->Focus();
+}
+
WebContentsAdapterClient::RenderProcessTerminationStatus
WebContentsAdapterClient::renderProcessExitStatus(int terminationStatus) {
auto status = WebContentsAdapterClient::RenderProcessTerminationStatus(-1);
@@ -1280,4 +1344,16 @@ FaviconManager *WebContentsAdapter::faviconManager()
return d->webContentsDelegate->faviconManager();
}
+void WebContentsAdapter::viewSource()
+{
+ Q_D(WebContentsAdapter);
+ d->webContents->ViewSource();
+}
+
+bool WebContentsAdapter::canViewSource()
+{
+ Q_D(WebContentsAdapter);
+ return d->webContents->GetController().CanViewSource();
+}
+
} // namespace QtWebEngineCore
diff --git a/src/core/web_contents_adapter.h b/src/core/web_contents_adapter.h
index ec8cd7914..7a109770e 100644
--- a/src/core/web_contents_adapter.h
+++ b/src/core/web_contents_adapter.h
@@ -58,6 +58,9 @@ class QAccessibleInterface;
class QDragEnterEvent;
class QDragMoveEvent;
class QPageLayout;
+#if !defined(QT_NO_WIDGETS) && !defined(QT_NO_PRINTER)
+class QPrinter;
+#endif // QT_NO_PRINTER
class QString;
class QWebChannel;
QT_END_NAMESPACE
@@ -85,7 +88,7 @@ public:
void reloadAndBypassCache();
void load(const QUrl&);
void setContent(const QByteArray &data, const QString &mimeType, const QUrl &baseUrl);
- void save();
+ void save(const QString &filePath = QString(), int savePageFormat = -1);
QUrl activeUrl() const;
QUrl requestedUrl() const;
QString pageTitle() const;
@@ -174,10 +177,19 @@ public:
void printToPDF(const QPageLayout&, const QString&);
quint64 printToPDFCallbackResult(const QPageLayout &);
+#if !defined(QT_NO_WIDGETS) && !defined(QT_NO_PRINTER)
+ quint64 printOnPrinterCallbackResult(QPrinter *printer);
+#endif
+
// meant to be used within WebEngineCore only
content::WebContents *webContents() const;
void replaceMisspelling(const QString &word);
+ void viewSource();
+ bool canViewSource();
+ void focusIfNecessary();
+
+
private:
Q_DISABLE_COPY(WebContentsAdapter)
Q_DECLARE_PRIVATE(WebContentsAdapter)
diff --git a/src/core/web_contents_adapter_client.h b/src/core/web_contents_adapter_client.h
index 3952067a7..85a379409 100644
--- a/src/core/web_contents_adapter_client.h
+++ b/src/core/web_contents_adapter_client.h
@@ -71,23 +71,43 @@ class WebContentsAdapter;
class WebContentsDelegateQt;
class WebEngineSettings;
-// FIXME: make this ref-counted and implicitely shared and expose as public API maybe ?
-class WebEngineContextMenuData {
+
+class WebEngineContextMenuSharedData : public QSharedData {
public:
- WebEngineContextMenuData()
- : mediaType(MediaTypeNone)
- , hasImageContent(false)
- , mediaFlags(0)
+ WebEngineContextMenuSharedData()
+ : hasImageContent(false)
, isEditable(false)
, isSpellCheckerEnabled(false)
+ , mediaType(0)
+ , mediaFlags(0)
{
}
+ bool hasImageContent;
+ bool isEditable;
+ bool isSpellCheckerEnabled;
+ uint mediaType;
+ uint mediaFlags;
+ QPoint pos;
+ QUrl linkUrl;
+ QUrl mediaUrl;
+ QString linkText;
+ QString selectedText;
+ QString suggestedFileName;
+ QString misspelledWord;
+ QStringList spellCheckerSuggestions;
+ // Some likely candidates for future additions as we add support for the related actions:
+ // bool isImageBlocked;
+ // <enum tbd> mediaType;
+ // ...
+};
+class WebEngineContextMenuData {
+public:
// Must match blink::WebContextMenuData::MediaType:
enum MediaType {
// No special node is in context.
- MediaTypeNone,
+ MediaTypeNone = 0x0,
// An image node is selected.
MediaTypeImage,
// A video node is selected.
@@ -117,25 +137,118 @@ public:
MediaCanRotate = 0x200,
};
- QPoint pos;
- QUrl linkUrl;
- QString linkText;
- QString selectedText;
- QUrl mediaUrl;
- MediaType mediaType;
- bool hasImageContent;
- uint mediaFlags;
- QString suggestedFileName;
- bool isEditable;
- bool isSpellCheckerEnabled;
- QString misspelledWord;
- QStringList spellCheckerSuggestions;
-// Some likely candidates for future additions as we add support for the related actions:
-// bool isImageBlocked;
-// <enum tbd> mediaType;
-// ...
+ WebEngineContextMenuData():d(new WebEngineContextMenuSharedData) {
+ }
+
+ void setPosition(const QPoint &pos) {
+ d->pos = pos;
+ }
+
+ QPoint position() const {
+ return d->pos;
+ }
+
+ void setLinkUrl(const QUrl &url) {
+ d->linkUrl = url;
+ }
+
+ QUrl linkUrl() const {
+ return d->linkUrl;
+ }
+
+ void setLinkText(const QString &text) {
+ d->linkText = text;
+ }
+
+ QString linkText() const {
+ return d->linkText;
+ }
+
+ void setSelectedText(const QString &text) {
+ d->selectedText = text;
+ }
+
+ QString selectedText() const {
+ return d->selectedText;
+ }
+
+ void setMediaUrl(const QUrl &url) {
+ d->mediaUrl = url;
+ }
+
+ QUrl mediaUrl() const {
+ return d->mediaUrl;
+ }
+
+ void setMediaType(MediaType type) {
+ d->mediaType = type;
+ }
+
+ MediaType mediaType() const {
+ return MediaType(d->mediaType);
+ }
+
+ void setHasImageContent(bool imageContent) {
+ d->hasImageContent = imageContent;
+ }
+
+ bool hasImageContent() const {
+ return d->hasImageContent;
+ }
+
+ void setMediaFlags(MediaFlags flags) {
+ d->mediaFlags = flags;
+ }
+
+ MediaFlags mediaFlags() const {
+ return MediaFlags(d->mediaFlags);
+ }
+
+ void setSuggestedFileName(const QString &filename) {
+ d->suggestedFileName = filename;
+ }
+
+ QString suggestedFileName() const {
+ return d->suggestedFileName;
+ }
+
+ void setIsEditable(bool editable) {
+ d->isEditable = editable;
+ }
+
+ bool isEditable() const {
+ return d->isEditable;
+ }
+
+ void setIsSpellCheckerEnabled(bool spellCheckerEnabled) {
+ d->isSpellCheckerEnabled = spellCheckerEnabled;
+ }
+
+ bool isSpellCheckerEnabled() const {
+ return d->isSpellCheckerEnabled;
+ }
+
+ void setMisspelledWord(const QString &word) {
+ d->misspelledWord = word;
+ }
+
+ QString misspelledWord() const {
+ return d->misspelledWord;
+ }
+
+ void setSpellCheckerSuggestions(const QStringList &suggestions) {
+ d->spellCheckerSuggestions = suggestions;
+ }
+
+ QStringList spellCheckerSuggestions() const {
+ return d->spellCheckerSuggestions;
+ }
+
+private:
+ QSharedDataPointer<WebEngineContextMenuSharedData> d;
};
+
class QWEBENGINE_EXPORT WebContentsAdapterClient {
public:
// This must match window_open_disposition_list.h.
@@ -227,13 +340,16 @@ public:
virtual void requestFullScreenMode(const QUrl &origin, bool fullscreen) = 0;
virtual bool isFullScreenMode() const = 0;
virtual void javascriptDialog(QSharedPointer<JavaScriptDialogController>) = 0;
- virtual void runFileChooser(FilePickerController *controller) = 0;
+ virtual void runFileChooser(QSharedPointer<FilePickerController>) = 0;
virtual void showColorDialog(QSharedPointer<ColorChooserController>) = 0;
virtual void didRunJavaScript(quint64 requestId, const QVariant& result) = 0;
virtual void didFetchDocumentMarkup(quint64 requestId, const QString& result) = 0;
virtual void didFetchDocumentInnerText(quint64 requestId, const QString& result) = 0;
virtual void didFindText(quint64 requestId, int matchCount) = 0;
virtual void didPrintPage(quint64 requestId, const QByteArray &result) = 0;
+#if !defined(QT_NO_WIDGETS) && !defined(QT_NO_PRINTER)
+ virtual void didPrintPageOnPrinter(quint64 requestId, bool result) = 0;
+#endif
virtual void passOnFocus(bool reverse) = 0;
// returns the last QObject (QWidget/QQuickItem) based object in the accessibility
// hierarchy before going into the BrowserAccessibility tree
@@ -259,6 +375,7 @@ public:
const QPixmap &pixmap, const QPoint &offset) = 0;
virtual bool isEnabled() const = 0;
virtual const QObject *holdingQObject() const = 0;
+ virtual void setToolTip(const QString& toolTipText) = 0;
virtual QSharedPointer<BrowserContextAdapter> browserContextAdapter() = 0;
virtual WebContentsAdapter* webContentsAdapter() = 0;
diff --git a/src/core/web_contents_adapter_p.h b/src/core/web_contents_adapter_p.h
index 5c0e83298..77522d299 100644
--- a/src/core/web_contents_adapter_p.h
+++ b/src/core/web_contents_adapter_p.h
@@ -55,7 +55,6 @@
#include <base/callback.h>
#include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
#include <QScopedPointer>
#include <QSharedPointer>
@@ -84,10 +83,10 @@ public:
~WebContentsAdapterPrivate();
scoped_refptr<WebEngineContext> engineContext;
QSharedPointer<BrowserContextAdapter> browserContextAdapter;
- scoped_ptr<content::WebContents> webContents;
- scoped_ptr<WebContentsDelegateQt> webContentsDelegate;
- scoped_ptr<RenderViewObserverHostQt> renderViewObserverHost;
- scoped_ptr<WebChannelIPCTransportHost> webChannelTransport;
+ std::unique_ptr<content::WebContents> webContents;
+ std::unique_ptr<WebContentsDelegateQt> webContentsDelegate;
+ std::unique_ptr<RenderViewObserverHostQt> renderViewObserverHost;
+ std::unique_ptr<WebChannelIPCTransportHost> webChannelTransport;
QWebChannel *webChannel;
unsigned int webChannelWorld;
WebContentsAdapterClient *adapterClient;
diff --git a/src/core/web_contents_delegate_qt.cpp b/src/core/web_contents_delegate_qt.cpp
index 757ae853c..36acfe62e 100644
--- a/src/core/web_contents_delegate_qt.cpp
+++ b/src/core/web_contents_delegate_qt.cpp
@@ -118,8 +118,8 @@ content::WebContents *WebContentsDelegateQt::OpenURLFromTab(content::WebContents
load_url_params.is_renderer_initiated = params.is_renderer_initiated;
load_url_params.override_user_agent = content::NavigationController::UA_OVERRIDE_TRUE;
if (params.uses_post) {
- load_url_params.load_type = content::NavigationController::LOAD_TYPE_BROWSER_INITIATED_HTTP_POST;
- load_url_params.browser_initiated_post_data = params.browser_initiated_post_data;
+ load_url_params.load_type = content::NavigationController::LOAD_TYPE_HTTP_POST;
+ load_url_params.post_data = params.post_data;
}
target->GetController().LoadURLWithParams(load_url_params);
@@ -318,18 +318,19 @@ ASSERT_ENUMS_MATCH(FilePickerController::OpenMultiple, content::FileChooserParam
ASSERT_ENUMS_MATCH(FilePickerController::UploadFolder, content::FileChooserParams::UploadFolder)
ASSERT_ENUMS_MATCH(FilePickerController::Save, content::FileChooserParams::Save)
-void WebContentsDelegateQt::RunFileChooser(content::WebContents *web_contents, const content::FileChooserParams &params)
+void WebContentsDelegateQt::RunFileChooser(content::RenderFrameHost *frameHost, const content::FileChooserParams &params)
{
QStringList acceptedMimeTypes;
acceptedMimeTypes.reserve(params.accept_types.size());
for (std::vector<base::string16>::const_iterator it = params.accept_types.begin(); it < params.accept_types.end(); ++it)
acceptedMimeTypes.append(toQt(*it));
- FilePickerController *controller = new FilePickerController(static_cast<FilePickerController::FileChooserMode>(params.mode), web_contents, toQt(params.default_file_name.value()), acceptedMimeTypes);
+ m_filePickerController.reset(new FilePickerController(static_cast<FilePickerController::FileChooserMode>(params.mode),
+ web_contents(), toQt(params.default_file_name.value()), acceptedMimeTypes));
// Defer the call to not block base::MessageLoop::RunTask with modal dialogs.
- QTimer::singleShot(0, [this, controller] () {
- m_viewClient->runFileChooser(controller);
+ QTimer::singleShot(0, [this] () {
+ m_viewClient->runFileChooser(m_filePickerController);
});
}
diff --git a/src/core/web_contents_delegate_qt.h b/src/core/web_contents_delegate_qt.h
index d523aa16b..dad1e50f1 100644
--- a/src/core/web_contents_delegate_qt.h
+++ b/src/core/web_contents_delegate_qt.h
@@ -42,7 +42,6 @@
#include "content/public/browser/web_contents_delegate.h"
#include "content/public/browser/web_contents_observer.h"
-#include "content/public/common/permission_status.mojom.h"
#include "third_party/skia/include/core/SkColor.h"
#include "base/callback.h"
@@ -70,6 +69,23 @@ namespace QtWebEngineCore {
class WebContentsAdapterClient;
+class SavePageInfo
+{
+public:
+ SavePageInfo()
+ : requestedFormat(-1)
+ {
+ }
+
+ SavePageInfo(const QString &filePath, int format)
+ : requestedFilePath(filePath), requestedFormat(format)
+ {
+ }
+
+ QString requestedFilePath;
+ int requestedFormat;
+};
+
class WebContentsDelegateQt : public content::WebContentsDelegate
, public content::WebContentsObserver
{
@@ -92,7 +108,7 @@ public:
virtual void EnterFullscreenModeForTab(content::WebContents* web_contents, const GURL& origin) Q_DECL_OVERRIDE;
virtual void ExitFullscreenModeForTab(content::WebContents*) Q_DECL_OVERRIDE;
virtual bool IsFullscreenForTabOrPending(const content::WebContents* web_contents) const Q_DECL_OVERRIDE;
- virtual void RunFileChooser(content::WebContents *, const content::FileChooserParams &params) Q_DECL_OVERRIDE;
+ virtual void RunFileChooser(content::RenderFrameHost* render_frame_host, const content::FileChooserParams& params) Q_DECL_OVERRIDE;
virtual bool AddMessageToConsole(content::WebContents* source, int32_t level, const base::string16& message, int32_t line_no, const base::string16& source_id) Q_DECL_OVERRIDE;
virtual void FindReply(content::WebContents *source, int request_id, int number_of_matches, const gfx::Rect& selection_rect, int active_match_ordinal, bool final_update) Q_DECL_OVERRIDE;
virtual void RequestMediaAccessPermission(content::WebContents* web_contents, const content::MediaStreamRequest& request, const content::MediaResponseCallback& callback) Q_DECL_OVERRIDE;
@@ -126,6 +142,9 @@ public:
void launchExternalURL(const QUrl &url, ui::PageTransition page_transition, bool is_main_frame);
FaviconManager *faviconManager();
+ void setSavePageInfo(const SavePageInfo &spi) { m_savePageInfo = spi; }
+ const SavePageInfo &savePageInfo() { return m_savePageInfo; }
+
private:
QWeakPointer<WebContentsAdapter> createWindow(content::WebContents *new_contents, WindowOpenDisposition disposition, const gfx::Rect& initial_pos, bool user_gesture);
@@ -134,6 +153,8 @@ private:
int m_lastReceivedFindReply;
QVector<int64_t> m_loadingErrorFrameList;
QScopedPointer<FaviconManager> m_faviconManager;
+ SavePageInfo m_savePageInfo;
+ QSharedPointer<FilePickerController> m_filePickerController;
};
} // namespace QtWebEngineCore
diff --git a/src/core/web_contents_view_qt.cpp b/src/core/web_contents_view_qt.cpp
index e487fca46..ed6fdabff 100644
--- a/src/core/web_contents_view_qt.cpp
+++ b/src/core/web_contents_view_qt.cpp
@@ -155,19 +155,19 @@ ASSERT_ENUMS_MATCH(WebEngineContextMenuData::MediaCanRotate, blink::WebContextMe
static inline WebEngineContextMenuData fromParams(const content::ContextMenuParams &params)
{
WebEngineContextMenuData ret;
- ret.pos = QPoint(params.x, params.y);
- ret.linkUrl = toQt(params.link_url);
- ret.linkText = toQt(params.link_text.data());
- ret.selectedText = toQt(params.selection_text.data());
- ret.mediaUrl = toQt(params.src_url);
- ret.mediaType = (WebEngineContextMenuData::MediaType)params.media_type;
- ret.hasImageContent = params.has_image_contents;
- ret.mediaFlags = params.media_flags;
- ret.suggestedFileName = toQt(params.suggested_filename.data());
- ret.isEditable = params.is_editable;
+ ret.setPosition(QPoint(params.x, params.y));
+ ret.setLinkUrl(toQt(params.link_url));
+ ret.setLinkText(toQt(params.link_text.data()));
+ ret.setSelectedText(toQt(params.selection_text.data()));
+ ret.setMediaUrl(toQt(params.src_url));
+ ret.setMediaType((WebEngineContextMenuData::MediaType)params.media_type);
+ ret.setHasImageContent(params.has_image_contents);
+ ret.setMediaFlags((WebEngineContextMenuData::MediaFlags)params.media_flags);
+ ret.setSuggestedFileName(toQt(params.suggested_filename.data()));
+ ret.setIsEditable(params.is_editable);
#if defined(ENABLE_SPELLCHECK)
- ret.misspelledWord = toQt(params.misspelled_word);
- ret.spellCheckerSuggestions = fromVector(params.dictionary_suggestions);
+ ret.setMisspelledWord(toQt(params.misspelled_word));
+ ret.setSpellCheckerSuggestions(fromVector(params.dictionary_suggestions));
#endif
return ret;
}
@@ -183,7 +183,7 @@ void WebContentsViewQt::ShowContextMenu(content::RenderFrameHost *, const conten
// must be initialized to true due to the way how the initialization sequence
// in SpellCheck works ie. typing the first word triggers the creation
// of the SpellcheckService. Use user preference store instead.
- contextMenuData.isSpellCheckerEnabled = m_client->browserContextAdapter()->isSpellCheckEnabled();
+ contextMenuData.setIsSpellCheckerEnabled(m_client->browserContextAdapter()->isSpellCheckEnabled());
#endif
m_client->contextMenuRequested(contextMenuData);
}
diff --git a/src/core/web_engine_context.cpp b/src/core/web_engine_context.cpp
index 0d1d7b127..491835e45 100644
--- a/src/core/web_engine_context.cpp
+++ b/src/core/web_engine_context.cpp
@@ -51,6 +51,7 @@
#if defined(ENABLE_BASIC_PRINTING)
#include "chrome/browser/printing/print_job_manager.h"
#endif // defined(ENABLE_BASIC_PRINTING)
+#include "components/devtools_http_handler/devtools_http_handler.h"
#include "content/browser/gpu/gpu_process_host.h"
#include "content/browser/renderer_host/render_process_host_impl.h"
#include "content/browser/utility_process_host_impl.h"
@@ -87,7 +88,9 @@
#include <QFileInfo>
#include <QGuiApplication>
#include <QOffscreenSurface>
-#include <QOpenGLContext>
+#ifndef QT_NO_OPENGL
+# include <QOpenGLContext>
+#endif
#include <QStringList>
#include <QSurfaceFormat>
#include <QVector>
@@ -95,9 +98,11 @@
using namespace QtWebEngineCore;
+#ifndef QT_NO_OPENGL
QT_BEGIN_NAMESPACE
Q_GUI_EXPORT QOpenGLContext *qt_gl_global_share_context();
QT_END_NAMESPACE
+#endif
namespace {
@@ -114,6 +119,7 @@ void destroyContext()
s_destroyed = true;
}
+#ifndef QT_NO_OPENGL
bool usingANGLE()
{
#if defined(Q_OS_WIN)
@@ -150,12 +156,16 @@ bool usingQtQuick2DRenderer()
}
if (device.isEmpty())
+ device = QString::fromLocal8Bit(qgetenv("QT_QUICK_BACKEND"));
+ if (device.isEmpty())
device = QString::fromLocal8Bit(qgetenv("QMLSCENE_DEVICE"));
+ if (device.isEmpty())
+ device = QLatin1String("default");
- // This assumes that the plugin is installed and is going to be used by QtQuick.
- return device == QLatin1String("softwarecontext");
+ // Anything other than the default OpenGL device will need to render in 2D mode.
+ return device != QLatin1String("default");
}
-
+#endif //QT_NO_OPENGL
#if defined(ENABLE_PLUGINS)
void dummyGetPluginCallback(const std::vector<content::WebPluginInfo>&)
{
@@ -294,6 +304,9 @@ WebEngineContext::WebEngineContext()
parsedCommandLine->AppendSwitch(switches::kDisableZeroCopy);
parsedCommandLine->AppendSwitch(switches::kDisableGpuMemoryBufferCompositorResources);
+ // Enabled on OS X and Linux but currently not working. It worked in 5.7 on OS X.
+ parsedCommandLine->AppendSwitch(switches::kDisableGpuMemoryBufferVideoFrames);
+
if (useEmbeddedSwitches) {
// Inspired by the Android port's default switches
if (!parsedCommandLine->HasSwitch(switches::kDisableOverlayScrollbar))
@@ -312,11 +325,12 @@ WebEngineContext::WebEngineContext()
GLContextHelper::initialize();
const char *glType = 0;
+#ifndef QT_NO_OPENGL
if (!usingANGLE() && !usingSoftwareDynamicGL() && !usingQtQuick2DRenderer()) {
if (qt_gl_global_share_context() && qt_gl_global_share_context()->isValid()) {
if (!strcmp(qt_gl_global_share_context()->nativeHandle().typeName(), "QEGLNativeContext")) {
if (qt_gl_global_share_context()->isOpenGLES()) {
- glType = gfx::kGLImplementationEGLName;
+ glType = gl::kGLImplementationEGLName;
} else {
QOpenGLContext context;
QSurfaceFormat format;
@@ -334,7 +348,7 @@ WebEngineContext::WebEngineContext()
if (context.makeCurrent(&surface)) {
if (context.hasExtension("GL_ARB_ES2_compatibility"))
- glType = gfx::kGLImplementationEGLName;
+ glType = gl::kGLImplementationEGLName;
context.doneCurrent();
}
@@ -344,12 +358,13 @@ WebEngineContext::WebEngineContext()
}
} else {
if (!qt_gl_global_share_context()->isOpenGLES())
- glType = gfx::kGLImplementationDesktopName;
+ glType = gl::kGLImplementationDesktopName;
}
} else {
qWarning("WebEngineContext used before QtWebEngine::initialize() or OpenGL context creation failed.");
}
}
+#endif
if (glType)
parsedCommandLine->AppendSwitchASCII(switches::kUseGL, glType);
@@ -380,6 +395,8 @@ WebEngineContext::WebEngineContext()
// first gets referenced on the IO thread.
MediaCaptureDevicesDispatcher::GetInstance();
+ base::ThreadRestrictions::SetIOAllowed(true);
+
#if defined(ENABLE_PLUGINS)
// Creating pepper plugins from the page (which calls PluginService::GetPluginInfoArray)
// might fail unless the page queried the list of available plugins at least once
diff --git a/src/core/web_engine_context.h b/src/core/web_engine_context.h
index 960f8ed47..878b651de 100644
--- a/src/core/web_engine_context.h
+++ b/src/core/web_engine_context.h
@@ -43,9 +43,7 @@
#include "qtwebenginecoreglobal.h"
#include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
#include "base/values.h"
-#include "components/devtools_http_handler/devtools_http_handler.h"
#include <QSharedPointer>
@@ -58,6 +56,10 @@ class BrowserMainRunner;
class ContentMainRunner;
}
+namespace devtools_http_handler {
+class DevToolsHttpHandler;
+}
+
#if defined(ENABLE_BASIC_PRINTING)
namespace printing {
class PrintJobManager;
@@ -89,15 +91,15 @@ private:
WebEngineContext();
~WebEngineContext();
- scoped_ptr<base::RunLoop> m_runLoop;
- scoped_ptr<ContentMainDelegateQt> m_mainDelegate;
- scoped_ptr<content::ContentMainRunner> m_contentRunner;
- scoped_ptr<content::BrowserMainRunner> m_browserRunner;
+ std::unique_ptr<base::RunLoop> m_runLoop;
+ std::unique_ptr<ContentMainDelegateQt> m_mainDelegate;
+ std::unique_ptr<content::ContentMainRunner> m_contentRunner;
+ std::unique_ptr<content::BrowserMainRunner> m_browserRunner;
QObject* m_globalQObject;
QSharedPointer<QtWebEngineCore::BrowserContextAdapter> m_defaultBrowserContext;
- scoped_ptr<devtools_http_handler::DevToolsHttpHandler> m_devtools;
+ std::unique_ptr<devtools_http_handler::DevToolsHttpHandler> m_devtools;
#if defined(ENABLE_BASIC_PRINTING)
- scoped_ptr<printing::PrintJobManager> m_printJobManager;
+ std::unique_ptr<printing::PrintJobManager> m_printJobManager;
#endif // defined(ENABLE_BASIC_PRINTING)
};
diff --git a/src/core/web_engine_library_info.cpp b/src/core/web_engine_library_info.cpp
index 399e36765..40977812d 100644
--- a/src/core/web_engine_library_info.cpp
+++ b/src/core/web_engine_library_info.cpp
@@ -69,7 +69,7 @@ QString fallbackDir() {
return directory;
}
-#if defined(OS_MACOSX)
+#if defined(OS_MACOSX) && defined(QT_MAC_FRAMEWORK_BUILD)
static inline CFBundleRef frameworkBundle()
{
return CFBundleGetBundleWithIdentifier(CFSTR("org.qt-project.Qt.QtWebEngineCore"));
@@ -112,6 +112,34 @@ static QString getResourcesPath(CFBundleRef frameworkBundle)
}
#endif
+#if defined(OS_MACOSX)
+static QString getMainApplicationResourcesPath()
+{
+ QString resourcesPath;
+ CFBundleRef mainBundle = CFBundleGetMainBundle();
+ if (!mainBundle)
+ return resourcesPath;
+
+ // Will point to Resources inside an app bundle, or in case if the application is not packaged
+ // as a bundle, will point to the application directory, where the resources are assumed to be
+ // found.
+ CFURLRef resourcesRelativeUrl = CFBundleCopyResourcesDirectoryURL(mainBundle);
+ if (!resourcesRelativeUrl)
+ return resourcesPath;
+
+ CFURLRef resourcesAbsoluteUrl = CFURLCopyAbsoluteURL(resourcesRelativeUrl);
+ CFStringRef resourcesAbolutePath = CFURLCopyFileSystemPath(resourcesAbsoluteUrl,
+ kCFURLPOSIXPathStyle);
+ resourcesPath = QString::fromCFString(resourcesAbolutePath);
+ CFRelease(resourcesAbolutePath);
+ CFRelease(resourcesAbsoluteUrl);
+ CFRelease(resourcesRelativeUrl);
+
+ return resourcesPath;
+}
+
+#endif
+
QString subProcessPath()
{
static QString processPath;
@@ -181,18 +209,42 @@ QString localesPath()
#if defined(ENABLE_SPELLCHECK)
QString dictionariesPath()
{
+ static QString potentialDictionariesPath;
+ static bool initialized = false;
+ QStringList candidatePaths;
+ if (!initialized) {
+ initialized = true;
+
+ // First try to find dictionaries near the application.
+#ifdef OS_MACOSX
+ QString resourcesDictionariesPath = getMainApplicationResourcesPath()
+ % QDir::separator() % QLatin1String("qtwebengine_dictionaries");
+ candidatePaths << resourcesDictionariesPath;
+#endif
+ QString applicationDictionariesPath = QCoreApplication::applicationDirPath()
+ % QDir::separator() % QLatin1String("qtwebengine_dictionaries");
+ candidatePaths << applicationDictionariesPath;
+
+ // Then try to find dictionaries near the installed library.
#if defined(OS_MACOSX) && defined(QT_MAC_FRAMEWORK_BUILD)
- return getResourcesPath(frameworkBundle()) % QLatin1String("/qtwebengine_dictionaries");
-#else
- // first local path
- static QString potentialDictionariesPath = QCoreApplication::applicationDirPath() % QDir::separator() % QLatin1String("qtwebengine_dictionaries");
+ QString frameworkDictionariesPath = getResourcesPath(frameworkBundle())
+ % QLatin1String("/qtwebengine_dictionaries");
+ candidatePaths << frameworkDictionariesPath;
+#endif
- // now global one
- if (!QFileInfo::exists(potentialDictionariesPath))
- potentialDictionariesPath = QLibraryInfo::location(QLibraryInfo::DataPath) % QDir::separator() % QLatin1String("qtwebengine_dictionaries");
+ QString libraryDictionariesPath = QLibraryInfo::location(QLibraryInfo::DataPath)
+ % QDir::separator() % QLatin1String("qtwebengine_dictionaries");
+ candidatePaths << libraryDictionariesPath;
+
+ Q_FOREACH (const QString &candidate, candidatePaths) {
+ if (QFileInfo::exists(candidate)) {
+ potentialDictionariesPath = candidate;
+ break;
+ }
+ }
+ }
return potentialDictionariesPath;
-#endif
}
#endif // ENABLE_SPELLCHECK
@@ -303,8 +355,16 @@ base::string16 WebEngineLibraryInfo::getApplicationName()
std::string WebEngineLibraryInfo::getApplicationLocale()
{
base::CommandLine *parsedCommandLine = base::CommandLine::ForCurrentProcess();
- if (!parsedCommandLine->HasSwitch(switches::kLang))
- return QLocale().bcp47Name().toStdString();
+ if (!parsedCommandLine->HasSwitch(switches::kLang)) {
+ const QString &locale = QLocale().bcp47Name();
+
+ // QLocale::bcp47Name returns "en" for American English locale. Chromium requires the "US" suffix
+ // to clarify the dialect and ignores the shorter version.
+ if (locale == "en")
+ return "en-US";
+
+ return locale.toStdString();
+ }
return parsedCommandLine->GetSwitchValueASCII(switches::kLang);
}
diff --git a/src/core/web_engine_settings.cpp b/src/core/web_engine_settings.cpp
index fb0f7e839..c17177745 100644
--- a/src/core/web_engine_settings.cpp
+++ b/src/core/web_engine_settings.cpp
@@ -239,6 +239,8 @@ void WebEngineSettings::initDefaults(bool offTheRecord)
s_defaultAttributes.insert(Accelerated2dCanvasEnabled, accelerated2dCanvas);
s_defaultAttributes.insert(AutoLoadIconsForPage, true);
s_defaultAttributes.insert(TouchIconsEnabled, false);
+ s_defaultAttributes.insert(FocusOnNavigationEnabled, true);
+ s_defaultAttributes.insert(PrintElementBackgrounds, true);
s_defaultAttributes.insert(AllowRunningInsecureContent, allowRunningInsecureContent);
}
if (offTheRecord)
@@ -316,6 +318,7 @@ void WebEngineSettings::applySettingsToWebPreferences(content::WebPreferences *p
prefs->fullscreen_supported = testAttribute(FullScreenSupportEnabled);
prefs->accelerated_2d_canvas_enabled = testAttribute(Accelerated2dCanvasEnabled);
prefs->experimental_webgl_enabled = testAttribute(WebGLEnabled);
+ prefs->should_print_backgrounds = testAttribute(PrintElementBackgrounds);
prefs->allow_running_insecure_content = testAttribute(AllowRunningInsecureContent);
// Fonts settings.
diff --git a/src/core/web_engine_settings.h b/src/core/web_engine_settings.h
index e131af50c..8459ba75b 100644
--- a/src/core/web_engine_settings.h
+++ b/src/core/web_engine_settings.h
@@ -80,6 +80,8 @@ public:
Accelerated2dCanvasEnabled,
AutoLoadIconsForPage,
TouchIconsEnabled,
+ FocusOnNavigationEnabled,
+ PrintElementBackgrounds,
AllowRunningInsecureContent
};
diff --git a/src/core/web_engine_visited_links_manager.cpp b/src/core/web_engine_visited_links_manager.cpp
index ded9d5d24..0cf76d456 100644
--- a/src/core/web_engine_visited_links_manager.cpp
+++ b/src/core/web_engine_visited_links_manager.cpp
@@ -44,7 +44,6 @@
#include "content_browser_client_qt.h"
#include "type_conversion.h"
-#include "base/memory/scoped_ptr.h"
#include "components/visitedlink/browser/visitedlink_delegate.h"
#include "components/visitedlink/browser/visitedlink_master.h"
diff --git a/src/core/web_event_factory.cpp b/src/core/web_event_factory.cpp
index 80850af70..4f5023376 100644
--- a/src/core/web_event_factory.cpp
+++ b/src/core/web_event_factory.cpp
@@ -66,6 +66,9 @@
#include "web_event_factory.h"
#include "third_party/WebKit/Source/platform/WindowsKeyboardCodes.h"
+#include "ui/events/keycodes/dom/dom_code.h"
+#include "ui/events/keycodes/dom/dom_key.h"
+#include "ui/events/keycodes/dom/keycode_converter.h"
#include <QCoreApplication>
#include <QElapsedTimer>
@@ -471,6 +474,552 @@ static int windowsKeyCodeForKeyEvent(unsigned int keycode, bool isKeypad)
}
}
+/*
+ * List of the available DOM key values can be found in the
+ * chromium/ui/events/keycodes/dom/dom_key_data_inc file.
+ * Some of the DOM keys are currently unsupported in Qt:
+ *
+ * Modifier Keys:
+ * - ui::DomKey::ACCEL
+ * - ui::DomKey::FN
+ * - ui::DomKey::FN_LOCK
+ * - ui::DomKey::SYMBOL
+ * - ui::DomKey::SYMBOL_LOCK
+ * - ui::DomKey::SHIFT_LEVEL5
+ * - ui::DomKey::ALT_GRAPH_LATCH
+ *
+ * Editing Keys:
+ * - ui::DomKey::CR_SEL
+ * - ui::DomKey::ERASE_OF
+ * - ui::DomKey::EX_SEL
+ *
+ * UI Keys:
+ * - ui::DomKey::ACCEPT
+ * - ui::DomKey::AGAIN
+ * - ui::DomKey::ATTN
+ * - ui::DomKey::PROPS
+ *
+ * Device Keys:
+ * - ui::DomKey::POWER
+ *
+ * IME and Composition Keys:
+ * - ui::DomKey::ALL_CANDIDATES
+ * - ui::DomKey::ALPHANUMERIC
+ * - ui::DomKey::FINAL_MODE
+ * - ui::DomKey::GROUP_FIRST
+ * - ui::DomKey::GROUP_LAST
+ * - ui::DomKey::GROUP_NEXT
+ * - ui::DomKey::GROUP_PREVIOUS
+ * - ui::DomKey::NEXT_CANDIDATE
+ * - ui::DomKey::PREVIOUS_CANDIDATE
+ * - ui::DomKey::PROCESS
+ * - ui::DomKey::JUNJA_MODE
+ *
+ * General-Purpose Function Keys:
+ * - ui::DomKey::SOFT1
+ * - ui::DomKey::SOFT2
+ * - ui::DomKey::SOFT3
+ * - ui::DomKey::SOFT4
+ * - ui::DomKey::SOFT5
+ * - ui::DomKey::SOFT6
+ * - ui::DomKey::SOFT7
+ * - ui::DomKey::SOFT8
+ *
+ * Multimedia Numpad Keys:
+ * - ui::DomKey::KEY11
+ * - ui::DomKey::KEY12
+ *
+ * Audio Keys:
+ * - ui::DomKey::AUDIO_BALANCE_LEFT
+ * - ui::DomKey::AUDIO_BALANCE_RIGHT
+ * - ui::DomKey::AUDIO_BASS_BOOST_DOWN
+ * - ui::DomKey::AUDIO_BASS_BOOST_UP
+ * - ui::DomKey::AUDIO_FADER_FRONT
+ * - ui::DomKey::AUDIO_FADER_REAR
+ * - ui::DomKey::AUDIO_SURROUND_MODE_NEXT
+ * - ui::DomKey::MICROPHONE_TOGGLE
+ *
+ * Speech Keys:
+ * - ui::DomKey::SPEECH_CORRECTION_LIST
+ * - ui::DomKey::SPEECH_INPUT_TOGGLE
+ *
+ * Application Keys:
+ * - ui::DomKey::LAUNCH_CONTACTS
+ *
+ * Mobile Phone Keys:
+ * - ui::DomKey::APP_SWITCH
+ * - ui::DomKey::GO_BACK
+ * - ui::DomKey::GO_HOME
+ * - ui::DomKey::HEADSET_HOOK
+ * - ui::DomKey::NOTIFICATION
+ * - ui::DomKey::MANNER_MODE
+ *
+ * TV Keys:
+ * - ui::DomKey::TV
+ * - ui::DomKey::TV_3D_MODE
+ * - ui::DomKey::TV_ANTENNA_CABLE
+ * - ui::DomKey::TV_AUDIO_DESCRIPTION
+ * - ui::DomKey::TV_AUDIO_DESCRIPTION_MIX_DOWN
+ * - ui::DomKey::TV_AUDIO_DESCRIPTION_MIX_UP
+ * - ui::DomKey::TV_CONTENTS_MENU
+ * - ui::DomKey::TV_DATA_SERVICE
+ * - ui::DomKey::TV_INPUT
+ * - ui::DomKey::TV_INPUT_COMPONENT1
+ * - ui::DomKey::TV_INPUT_COMPONENT2
+ * - ui::DomKey::TV_INPUT_COMPOSITE1
+ * - ui::DomKey::TV_INPUT_COMPOSITE2
+ * - ui::DomKey::TV_INPUT_HDMI1
+ * - ui::DomKey::TV_INPUT_HDMI2
+ * - ui::DomKey::TV_INPUT_HDMI3
+ * - ui::DomKey::TV_INPUT_HDMI4
+ * - ui::DomKey::TV_INPUT_VGA1
+ * - ui::DomKey::TV_MEDIA_CONTEXT
+ * - ui::DomKey::TV_NETWORK
+ * - ui::DomKey::TV_NUMBER_ENTRY
+ * - ui::DomKey::TV_POWER
+ * - ui::DomKey::TV_RADIO_SERVICE
+ * - ui::DomKey::TV_SATELLITE
+ * - ui::DomKey::TV_SATELLITE_BC
+ * - ui::DomKey::TV_SATELLITE_CS
+ * - ui::DomKey::TV_SATELLITE_TOGGLE
+ * - ui::DomKey::TV_TERRESTRIAL_ANALOG
+ * - ui::DomKey::TV_TERRESTRIAL_DIGITAL
+ * - ui::DomKey::TV_TIMER
+ *
+ * Media Controller Keys:
+ * - ui::DomKey::AVR_INPUT
+ * - ui::DomKey::AVR_POWER
+ * - ui::DomKey::COLOR_F4_GREY
+ * - ui::DomKey::COLOR_F5_BROWN
+ * - ui::DomKey::CLOSED_CAPTION_TOGGLE
+ * - ui::DomKey::DVR
+ * - ui::DomKey::FAVORITE_CLEAR0
+ * - ui::DomKey::FAVORITE_CLEAR1
+ * - ui::DomKey::FAVORITE_CLEAR2
+ * - ui::DomKey::FAVORITE_CLEAR3
+ * - ui::DomKey::FAVORITE_RECALL0
+ * - ui::DomKey::FAVORITE_RECALL1
+ * - ui::DomKey::FAVORITE_RECALL2
+ * - ui::DomKey::FAVORITE_RECALL3
+ * - ui::DomKey::FAVORITE_STORE0
+ * - ui::DomKey::FAVORITE_STORE1
+ * - ui::DomKey::FAVORITE_STORE2
+ * - ui::DomKey::FAVORITE_STORE3
+ * - ui::DomKey::GUIDE_NEXT_DAY
+ * - ui::DomKey::GUIDE_PREVIOUS_DAY
+ * - ui::DomKey::INSTANT_REPLAY
+ * - ui::DomKey::LINK
+ * - ui::DomKey::LIST_PROGRAM
+ * - ui::DomKey::LIVE_CONTENT
+ * - ui::DomKey::LOCK
+ * - ui::DomKey::MEDIA_APPS
+ * - ui::DomKey::MEDIA_AUDIO_TRACK
+ * - ui::DomKey::MEDIA_SKIP_BACKWARD
+ * - ui::DomKey::MEDIA_SKIP_FORWARD
+ * - ui::DomKey::MEDIA_SKIP
+ * - ui::DomKey::MEDIA_STEP_BACKWARD
+ * - ui::DomKey::MEDIA_STEP_FORWARD
+ * - ui::DomKey::NAVIGATE_IN
+ * - ui::DomKey::NAVIGATE_NEXT
+ * - ui::DomKey::NAVIGATE_OUT
+ * - ui::DomKey::NAVIGATE_PREVIOUS
+ * - ui::DomKey::NEXT_FAVORITE_CHANNEL
+ * - ui::DomKey::NEXT_USER_PROFILE
+ * - ui::DomKey::ON_DEMAND
+ * - ui::DomKey::PAIRING
+ * - ui::DomKey::PINP_DOWN
+ * - ui::DomKey::PINP_MOVE
+ * - ui::DomKey::PINP_TOGGLE
+ * - ui::DomKey::PINP_UP
+ * - ui::DomKey::PLAY_SPEED_DOWN
+ * - ui::DomKey::PLAY_SPEED_RESET
+ * - ui::DomKey::PLAY_SPEED_UP
+ * - ui::DomKey::RC_LOW_BATTERY
+ * - ui::DomKey::RECORD_SPEED_NEXT
+ * - ui::DomKey::RF_BYPASS
+ * - ui::DomKey::SCAN_CHANNELS_TOGGLE
+ * - ui::DomKey::SCREEN_MODE_NEXT
+ * - ui::DomKey::STB_INPUT
+ * - ui::DomKey::STB_POWER
+ * - ui::DomKey::TELETEXT
+ * - ui::DomKey::VIDEO_MODE_NEXT
+ * - ui::DomKey::WINK
+ */
+static ui::DomKey getDomKeyFromQKeyEvent(QKeyEvent *ev)
+{
+ if (!ev->text().isEmpty())
+ return ui::DomKey::FromCharacter(ev->text().toUcs4().first());
+
+ switch (ev->key()) {
+ case Qt::Key_Backspace:
+ return ui::DomKey::BACKSPACE;
+ case Qt::Key_Tab:
+ case Qt::Key_Backtab:
+ return ui::DomKey::TAB;
+ case Qt::Key_Return:
+ case Qt::Key_Enter:
+ return ui::DomKey::ENTER;
+ case Qt::Key_Escape:
+ return ui::DomKey::ESCAPE;
+ case Qt::Key_Delete:
+ return ui::DomKey::DEL;
+
+ // Special Key Values
+ case Qt::Key_unknown:
+ return ui::DomKey::UNIDENTIFIED;
+
+ // Modifier Keys
+ case Qt::Key_Alt:
+ return ui::DomKey::ALT;
+ case Qt::Key_AltGr:
+ return ui::DomKey::ALT_GRAPH;
+ case Qt::Key_CapsLock:
+ return ui::DomKey::CAPS_LOCK;
+ case Qt::Key_Control:
+ return ui::DomKey::CONTROL;
+ case Qt::Key_Hyper_L:
+ case Qt::Key_Hyper_R:
+ return ui::DomKey::HYPER;
+ case Qt::Key_Meta:
+ return ui::DomKey::META;
+ case Qt::Key_NumLock:
+ return ui::DomKey::NUM_LOCK;
+ case Qt::Key_ScrollLock:
+ return ui::DomKey::SCROLL_LOCK;
+ case Qt::Key_Shift:
+ return ui::DomKey::SHIFT;
+ case Qt::Key_Super_L:
+ case Qt::Key_Super_R:
+ return ui::DomKey::SUPER;
+
+ // Navigation Keys
+ case Qt::Key_Down:
+ return ui::DomKey::ARROW_DOWN;
+ case Qt::Key_Left:
+ return ui::DomKey::ARROW_LEFT;
+ case Qt::Key_Right:
+ return ui::DomKey::ARROW_RIGHT;
+ case Qt::Key_Up:
+ return ui::DomKey::ARROW_UP;
+ case Qt::Key_End:
+ return ui::DomKey::END;
+ case Qt::Key_Home:
+ return ui::DomKey::HOME;
+ case Qt::Key_PageUp:
+ return ui::DomKey::PAGE_UP;
+ case Qt::Key_PageDown:
+ return ui::DomKey::PAGE_DOWN;
+
+ // Editing Keys
+ case Qt::Key_Clear:
+ return ui::DomKey::CLEAR;
+ case Qt::Key_Copy:
+ return ui::DomKey::COPY;
+ case Qt::Key_Cut:
+ return ui::DomKey::CUT;
+ case Qt::Key_Insert:
+ return ui::DomKey::INSERT;
+ case Qt::Key_Paste:
+ return ui::DomKey::PASTE;
+ case Qt::Key_Redo:
+ return ui::DomKey::REDO;
+ case Qt::Key_Undo:
+ return ui::DomKey::UNDO;
+
+ // UI Keys
+ case Qt::Key_Cancel:
+ return ui::DomKey::CANCEL;
+ case Qt::Key_Menu:
+ return ui::DomKey::CONTEXT_MENU;
+ case Qt::Key_Execute:
+ return ui::DomKey::EXECUTE;
+ case Qt::Key_Find:
+ return ui::DomKey::FIND;
+ case Qt::Key_Help:
+ return ui::DomKey::HELP;
+ case Qt::Key_Pause:
+ return ui::DomKey::PAUSE;
+ case Qt::Key_Play:
+ return ui::DomKey::PLAY;
+ case Qt::Key_Select:
+ return ui::DomKey::SELECT;
+ case Qt::Key_ZoomIn:
+ return ui::DomKey::ZOOM_IN;
+ case Qt::Key_ZoomOut:
+ return ui::DomKey::ZOOM_OUT;
+
+ // Device Keys
+ case Qt::Key_MonBrightnessDown:
+ return ui::DomKey::BRIGHTNESS_DOWN;
+ case Qt::Key_MonBrightnessUp:
+ return ui::DomKey::BRIGHTNESS_UP;
+ case Qt::Key_Eject:
+ return ui::DomKey::EJECT;
+ case Qt::Key_LogOff:
+ return ui::DomKey::LOG_OFF;
+ case Qt::Key_PowerDown:
+ case Qt::Key_PowerOff:
+ return ui::DomKey::POWER_OFF;
+ case Qt::Key_Print:
+ return ui::DomKey::PRINT_SCREEN;
+ case Qt::Key_Hibernate:
+ return ui::DomKey::HIBERNATE;
+ case Qt::Key_Standby:
+ return ui::DomKey::STANDBY;
+ case Qt::Key_WakeUp:
+ return ui::DomKey::WAKE_UP;
+
+ // IME and Composition Keys
+ case Qt::Key_Codeinput:
+ return ui::DomKey::CODE_INPUT;
+ case Qt::Key_Multi_key:
+ return ui::DomKey::COMPOSE;
+ case Qt::Key_Henkan:
+ return ui::DomKey::CONVERT;
+ case Qt::Key_Mode_switch:
+ return ui::DomKey::MODE_CHANGE;
+ case Qt::Key_Muhenkan:
+ return ui::DomKey::NON_CONVERT;
+ case Qt::Key_SingleCandidate:
+ return ui::DomKey::SINGLE_CANDIDATE;
+ case Qt::Key_Hangul:
+ return ui::DomKey::HANGUL_MODE;
+ case Qt::Key_Hangul_Hanja:
+ return ui::DomKey::HANJA_MODE;
+ case Qt::Key_Eisu_Shift:
+ case Qt::Key_Eisu_toggle:
+ return ui::DomKey::EISU;
+ case Qt::Key_Hankaku:
+ return ui::DomKey::HANKAKU;
+ case Qt::Key_Hiragana:
+ return ui::DomKey::HIRAGANA;
+ case Qt::Key_Hiragana_Katakana:
+ return ui::DomKey::HIRAGANA_KATAKANA;
+ case Qt::Key_Kana_Lock:
+ case Qt::Key_Kana_Shift:
+ return ui::DomKey::KANA_MODE;
+ case Qt::Key_Kanji:
+ return ui::DomKey::KANJI_MODE;
+ case Qt::Key_Katakana:
+ return ui::DomKey::KATAKANA;
+ case Qt::Key_Romaji:
+ return ui::DomKey::ROMAJI;
+ case Qt::Key_Zenkaku:
+ return ui::DomKey::ZENKAKU;
+ case Qt::Key_Zenkaku_Hankaku:
+ return ui::DomKey::ZENKAKU_HANKAKU;
+
+ // General-Purpose Function Keys
+ case Qt::Key_F1:
+ return ui::DomKey::F1;
+ case Qt::Key_F2:
+ return ui::DomKey::F2;
+ case Qt::Key_F3:
+ return ui::DomKey::F3;
+ case Qt::Key_F4:
+ return ui::DomKey::F4;
+ case Qt::Key_F5:
+ return ui::DomKey::F5;
+ case Qt::Key_F6:
+ return ui::DomKey::F6;
+ case Qt::Key_F7:
+ return ui::DomKey::F7;
+ case Qt::Key_F8:
+ return ui::DomKey::F8;
+ case Qt::Key_F9:
+ return ui::DomKey::F9;
+ case Qt::Key_F10:
+ return ui::DomKey::F10;
+ case Qt::Key_F11:
+ return ui::DomKey::F11;
+ case Qt::Key_F12:
+ return ui::DomKey::F12;
+ case Qt::Key_F13:
+ return ui::DomKey::F13;
+ case Qt::Key_F14:
+ return ui::DomKey::F14;
+ case Qt::Key_F15:
+ return ui::DomKey::F15;
+ case Qt::Key_F16:
+ return ui::DomKey::F16;
+ case Qt::Key_F17:
+ return ui::DomKey::F17;
+ case Qt::Key_F18:
+ return ui::DomKey::F18;
+ case Qt::Key_F19:
+ return ui::DomKey::F19;
+ case Qt::Key_F20:
+ return ui::DomKey::F20;
+ case Qt::Key_F21:
+ return ui::DomKey::F21;
+ case Qt::Key_F22:
+ return ui::DomKey::F22;
+ case Qt::Key_F23:
+ return ui::DomKey::F23;
+ case Qt::Key_F24:
+ return ui::DomKey::F24;
+
+ // Multimedia Keys
+ case Qt::Key_ChannelDown:
+ return ui::DomKey::CHANNEL_DOWN;
+ case Qt::Key_ChannelUp:
+ return ui::DomKey::CHANNEL_UP;
+ case Qt::Key_Close:
+ return ui::DomKey::CLOSE;
+ case Qt::Key_MailForward:
+ return ui::DomKey::MAIL_FORWARD;
+ case Qt::Key_Reply:
+ return ui::DomKey::MAIL_REPLY;
+ case Qt::Key_Send:
+ return ui::DomKey::MAIL_SEND;
+ case Qt::Key_AudioForward:
+ return ui::DomKey::MEDIA_FAST_FORWARD;
+ case Qt::Key_MediaPause:
+ return ui::DomKey::MEDIA_PAUSE;
+ case Qt::Key_MediaPlay:
+ return ui::DomKey::MEDIA_PLAY;
+ case Qt::Key_MediaTogglePlayPause:
+ return ui::DomKey::MEDIA_PLAY_PAUSE;
+ case Qt::Key_MediaRecord:
+ return ui::DomKey::MEDIA_RECORD;
+ case Qt::Key_AudioRewind:
+ return ui::DomKey::MEDIA_REWIND;
+ case Qt::Key_MediaStop:
+ return ui::DomKey::MEDIA_STOP;
+ case Qt::Key_MediaNext:
+ return ui::DomKey::MEDIA_TRACK_NEXT;
+ case Qt::Key_MediaPrevious:
+ return ui::DomKey::MEDIA_TRACK_PREVIOUS;
+ case Qt::Key_New:
+ return ui::DomKey::NEW;
+ case Qt::Key_Open:
+ return ui::DomKey::OPEN;
+ case Qt::Key_Printer:
+ return ui::DomKey::PRINT;
+ case Qt::Key_Save:
+ return ui::DomKey::SAVE;
+ case Qt::Key_Spell:
+ return ui::DomKey::SPELL_CHECK;
+
+ // Audio Keys
+ case Qt::Key_BassDown:
+ return ui::DomKey::AUDIO_BASS_DOWN;
+ case Qt::Key_BassBoost:
+ return ui::DomKey::AUDIO_BASS_BOOST_TOGGLE;
+ case Qt::Key_BassUp:
+ return ui::DomKey::AUDIO_BASS_UP;
+ case Qt::Key_TrebleDown:
+ return ui::DomKey::AUDIO_TREBLE_DOWN;
+ case Qt::Key_TrebleUp:
+ return ui::DomKey::AUDIO_TREBLE_UP;
+ case Qt::Key_VolumeDown:
+ return ui::DomKey::AUDIO_VOLUME_DOWN;
+ case Qt::Key_VolumeUp:
+ return ui::DomKey::AUDIO_VOLUME_UP;
+ case Qt::Key_VolumeMute:
+ return ui::DomKey::AUDIO_VOLUME_MUTE;
+ case Qt::Key_MicVolumeDown:
+ return ui::DomKey::MICROPHONE_VOLUME_DOWN;
+ case Qt::Key_MicVolumeUp:
+ return ui::DomKey::MICROPHONE_VOLUME_UP;
+ case Qt::Key_MicMute:
+ return ui::DomKey::MICROPHONE_VOLUME_MUTE;
+
+ // Application Keys
+ case Qt::Key_Calculator:
+ return ui::DomKey::LAUNCH_CALCULATOR;
+ case Qt::Key_Calendar:
+ return ui::DomKey::LAUNCH_CALENDAR;
+ case Qt::Key_LaunchMail:
+ return ui::DomKey::LAUNCH_MAIL;
+ case Qt::Key_LaunchMedia:
+ return ui::DomKey::LAUNCH_MEDIA_PLAYER;
+ case Qt::Key_Music:
+ return ui::DomKey::LAUNCH_MUSIC_PLAYER;
+ case Qt::Key_Launch0:
+ return ui::DomKey::LAUNCH_MY_COMPUTER;
+ case Qt::Key_Phone:
+ return ui::DomKey::LAUNCH_PHONE;
+ case Qt::Key_ScreenSaver:
+ return ui::DomKey::LAUNCH_SCREEN_SAVER;
+ case Qt::Key_Excel:
+ return ui::DomKey::LAUNCH_SPREADSHEET;
+ case Qt::Key_WWW:
+ return ui::DomKey::LAUNCH_WEB_BROWSER;
+ case Qt::Key_WebCam:
+ return ui::DomKey::LAUNCH_WEB_CAM;
+ case Qt::Key_Word:
+ return ui::DomKey::LAUNCH_WORD_PROCESSOR;
+
+ // Browser Keys
+ case Qt::Key_Back:
+ return ui::DomKey::BROWSER_BACK;
+ case Qt::Key_Favorites:
+ return ui::DomKey::BROWSER_FAVORITES;
+ case Qt::Key_Forward:
+ return ui::DomKey::BROWSER_FORWARD;
+ case Qt::Key_HomePage:
+ return ui::DomKey::BROWSER_HOME;
+ case Qt::Key_Refresh:
+ return ui::DomKey::BROWSER_REFRESH;
+ case Qt::Key_Search:
+ return ui::DomKey::BROWSER_SEARCH;
+ case Qt::Key_Stop:
+ return ui::DomKey::BROWSER_STOP;
+
+ // Mobile Phone Keys
+ case Qt::Key_Call:
+ return ui::DomKey::CALL;
+ case Qt::Key_Camera:
+ return ui::DomKey::CAMERA;
+ case Qt::Key_CameraFocus:
+ return ui::DomKey::CAMERA_FOCUS;
+ case Qt::Key_Hangup:
+ return ui::DomKey::END_CALL;
+ case Qt::Key_LastNumberRedial:
+ return ui::DomKey::LAST_NUMBER_REDIAL;
+ case Qt::Key_VoiceDial:
+ return ui::DomKey::VOICE_DIAL;
+
+ // Media Controller Keys
+ case Qt::Key_Red:
+ return ui::DomKey::COLOR_F0_RED;
+ case Qt::Key_Green:
+ return ui::DomKey::COLOR_F1_GREEN;
+ case Qt::Key_Yellow:
+ return ui::DomKey::COLOR_F2_YELLOW;
+ case Qt::Key_Blue:
+ return ui::DomKey::COLOR_F3_BLUE;
+ case Qt::Key_BrightnessAdjust:
+ return ui::DomKey::DIMMER;
+ case Qt::Key_Display:
+ return ui::DomKey::DISPLAY_SWAP;
+ case Qt::Key_Exit:
+ return ui::DomKey::EXIT;
+ case Qt::Key_Guide:
+ return ui::DomKey::GUIDE;
+ case Qt::Key_Info:
+ return ui::DomKey::INFO;
+ case Qt::Key_MediaLast:
+ return ui::DomKey::MEDIA_LAST;
+ case Qt::Key_TopMenu:
+ return ui::DomKey::MEDIA_TOP_MENU;
+ case Qt::Key_AudioRandomPlay:
+ return ui::DomKey::RANDOM_TOGGLE;
+ case Qt::Key_Settings:
+ return ui::DomKey::SETTINGS;
+ case Qt::Key_SplitScreen:
+ return ui::DomKey::SPLIT_SCREEN_TOGGLE;
+ case Qt::Key_Subtitle:
+ return ui::DomKey::SUBTITLE;
+ case Qt::Key_Zoom:
+ return ui::DomKey::ZOOM_TOGGLE;
+
+ default:
+ return ui::DomKey::NONE;
+ }
+}
+
static inline double currentTimeForEvent(const QInputEvent* event)
{
Q_ASSERT(event);
@@ -699,6 +1248,13 @@ content::NativeWebKeyboardEvent WebEventFactory::toWebKeyboardEvent(QKeyEvent *e
webKitEvent.nativeKeyCode = ev->nativeVirtualKey();
webKitEvent.windowsKeyCode = windowsKeyCodeForKeyEvent(ev->key(), ev->modifiers() & Qt::KeypadModifier);
webKitEvent.setKeyIdentifierFromWindowsKeyCode();
+ webKitEvent.domKey = getDomKeyFromQKeyEvent(ev);
+
+ ui::DomCode domCode = ui::DomCode::NONE;
+ int scanCode = ev->nativeScanCode();
+ if (scanCode)
+ domCode = ui::KeycodeConverter::NativeKeycodeToDomCode(scanCode);
+ webKitEvent.domCode = static_cast<int>(domCode);
const ushort* text = ev->text().utf16();
memcpy(&webKitEvent.text, text, std::min(sizeof(webKitEvent.text), size_t(ev->text().length() * 2)));
diff --git a/src/core/yuv_video_node.cpp b/src/core/yuv_video_node.cpp
index f8290878b..16e52575d 100644
--- a/src/core/yuv_video_node.cpp
+++ b/src/core/yuv_video_node.cpp
@@ -283,8 +283,19 @@ void YUVVideoMaterialShader::updateState(const RenderState &state, QSGMaterial *
break;
}
- program()->setUniformValue(m_id_yuvMatrix, QMatrix3x3(yuv_to_rgb));
- program()->setUniformValue(m_id_yuvAdjust, QVector3D(yuv_adjust[0], yuv_adjust[1], yuv_adjust[2]));
+ float yuv_to_rgb_multiplied[9];
+ float yuv_adjust_with_offset[3];
+
+ for (int i = 0; i < 9; ++i)
+ yuv_to_rgb_multiplied[i] = yuv_to_rgb[i] * mat->m_resourceMultiplier;
+
+ for (int i = 0; i < 3; ++i)
+ yuv_adjust_with_offset[i] =
+ yuv_adjust[i] / mat->m_resourceMultiplier - mat->m_resourceOffset;
+
+
+ program()->setUniformValue(m_id_yuvMatrix, QMatrix3x3(yuv_to_rgb_multiplied));
+ program()->setUniformValue(m_id_yuvAdjust, QVector3D(yuv_adjust_with_offset[0], yuv_adjust_with_offset[1], yuv_adjust_with_offset[2]));
if (state.isOpacityDirty())
program()->setUniformValue(m_id_opacity, state.opacity());
@@ -312,7 +323,8 @@ void YUVAVideoMaterialShader::updateState(const RenderState &state, QSGMaterial
YUVVideoMaterial::YUVVideoMaterial(QSGTexture *yTexture, QSGTexture *uTexture, QSGTexture *vTexture,
const QRectF &yaTexCoordRect, const QRectF &uvTexCoordRect, const QSizeF &yaTexSize, const QSizeF &uvTexSize,
- YUVVideoMaterial::ColorSpace colorspace)
+ YUVVideoMaterial::ColorSpace colorspace,
+ float rMul, float rOff)
: m_yTexture(yTexture)
, m_uTexture(uTexture)
, m_vTexture(vTexture)
@@ -321,6 +333,8 @@ YUVVideoMaterial::YUVVideoMaterial(QSGTexture *yTexture, QSGTexture *uTexture, Q
, m_yaTexSize(yaTexSize)
, m_uvTexSize(uvTexSize)
, m_colorSpace(colorspace)
+ , m_resourceMultiplier(rMul)
+ , m_resourceOffset(rOff)
{
}
@@ -341,8 +355,9 @@ int YUVVideoMaterial::compare(const QSGMaterial *other) const
YUVAVideoMaterial::YUVAVideoMaterial(QSGTexture *yTexture, QSGTexture *uTexture, QSGTexture *vTexture, QSGTexture *aTexture,
const QRectF &yaTexCoordRect, const QRectF &uvTexCoordRect, const QSizeF &yaTexSize, const QSizeF &uvTexSize,
- YUVVideoMaterial::ColorSpace colorspace)
- : YUVVideoMaterial(yTexture, uTexture, vTexture, yaTexCoordRect, uvTexCoordRect, yaTexSize, uvTexSize, colorspace)
+ YUVVideoMaterial::ColorSpace colorspace,
+ float rMul, float rOff)
+ : YUVVideoMaterial(yTexture, uTexture, vTexture, yaTexCoordRect, uvTexCoordRect, yaTexSize, uvTexSize, colorspace, rMul, rOff)
, m_aTexture(aTexture)
{
setFlag(Blending, aTexture);
@@ -363,15 +378,15 @@ int YUVAVideoMaterial::compare(const QSGMaterial *other) const
YUVVideoNode::YUVVideoNode(QSGTexture *yTexture, QSGTexture *uTexture, QSGTexture *vTexture, QSGTexture *aTexture,
const QRectF &yaTexCoordRect, const QRectF &uvTexCoordRect, const QSizeF &yaTexSize, const QSizeF &uvTexSize,
- YUVVideoMaterial::ColorSpace colorspace)
+ YUVVideoMaterial::ColorSpace colorspace, float rMul, float rOff)
: m_geometry(QSGGeometry::defaultAttributes_TexturedPoint2D(), 4)
{
setGeometry(&m_geometry);
setFlag(QSGNode::OwnsMaterial);
if (aTexture)
- m_material = new YUVAVideoMaterial(yTexture, uTexture, vTexture, aTexture, yaTexCoordRect, uvTexCoordRect, yaTexSize, uvTexSize, colorspace);
+ m_material = new YUVAVideoMaterial(yTexture, uTexture, vTexture, aTexture, yaTexCoordRect, uvTexCoordRect, yaTexSize, uvTexSize, colorspace, rMul, rOff);
else
- m_material = new YUVVideoMaterial(yTexture, uTexture, vTexture, yaTexCoordRect, uvTexCoordRect, yaTexSize, uvTexSize, colorspace);
+ m_material = new YUVVideoMaterial(yTexture, uTexture, vTexture, yaTexCoordRect, uvTexCoordRect, yaTexSize, uvTexSize, colorspace, rMul, rOff);
setMaterial(m_material);
}
diff --git a/src/core/yuv_video_node.h b/src/core/yuv_video_node.h
index cce204fd3..670ec62b6 100644
--- a/src/core/yuv_video_node.h
+++ b/src/core/yuv_video_node.h
@@ -60,7 +60,7 @@ public:
};
YUVVideoMaterial(QSGTexture *yTexture, QSGTexture *uTexture, QSGTexture *vTexture,
const QRectF &yaTexCoordRect, const QRectF &uvTexCoordRect, const QSizeF &yaTexSize, const QSizeF &uvTexSize,
- ColorSpace colorspace);
+ ColorSpace colorspace, float rMul, float rOff);
virtual QSGMaterialType *type() const Q_DECL_OVERRIDE
{
@@ -79,7 +79,8 @@ public:
QSizeF m_yaTexSize;
QSizeF m_uvTexSize;
ColorSpace m_colorSpace;
-
+ float m_resourceMultiplier;
+ float m_resourceOffset;
};
class YUVAVideoMaterial : public YUVVideoMaterial
@@ -87,7 +88,7 @@ class YUVAVideoMaterial : public YUVVideoMaterial
public:
YUVAVideoMaterial(QSGTexture *yTexture, QSGTexture *uTexture, QSGTexture *vTexture, QSGTexture *aTexture,
const QRectF &yaTexCoordRect, const QRectF &uvTexCoordRect, const QSizeF &yaTexSize, const QSizeF &uvTexSize,
- ColorSpace colorspace);
+ ColorSpace colorspace, float rMul, float rOff);
virtual QSGMaterialType *type() const Q_DECL_OVERRIDE
{
@@ -106,7 +107,7 @@ class YUVVideoNode : public QSGGeometryNode
public:
YUVVideoNode(QSGTexture *yTexture, QSGTexture *uTexture, QSGTexture *vTexture, QSGTexture *aTexture,
const QRectF &yaTexCoordRect, const QRectF &uvTexCoordRect, const QSizeF &yaTexSize, const QSizeF &uvTexSize,
- YUVVideoMaterial::ColorSpace colorspace);
+ YUVVideoMaterial::ColorSpace colorspace, float rMul, float rOff);
void setRect(const QRectF &rect);
private:
diff --git a/src/process/process.pro b/src/process/process.pro
index cd60b1f91..5e2e734f4 100644
--- a/src/process/process.pro
+++ b/src/process/process.pro
@@ -16,9 +16,9 @@ win32 {
load(qt_app)
-contains(QT_CONFIG, build_all): CONFIG += build_all
+qtConfig(build_all): CONFIG += build_all
-contains(QT_CONFIG, qt_framework) {
+qtConfig(framework) {
# Deploy the QtWebEngineProcess app bundle into the QtWebEngineCore framework.
DESTDIR = $$MODULE_BASE_OUTDIR/lib/QtWebEngineCore.framework/Versions/5/Helpers
} else {
@@ -28,7 +28,7 @@ contains(QT_CONFIG, qt_framework) {
}
msvc: QMAKE_LFLAGS *= /LARGEADDRESSAWARE
-contains(QT_CONFIG, qt_framework) {
+qtConfig(framework) {
target.path = $$[QT_INSTALL_LIBS]/QtWebEngineCore.framework/Versions/5/Helpers
} else {
target.path = $$[QT_INSTALL_LIBEXECS]
diff --git a/src/src.pro b/src/src.pro
index 64c1703fe..495263846 100644
--- a/src/src.pro
+++ b/src/src.pro
@@ -6,20 +6,15 @@ webenginewidgets.depends = core webengine
webengine_plugin.subdir = webengine/plugin
webengine_plugin.target = sub-webengine-plugin
webengine_plugin.depends = webengine
-webengine_experimental_plugin.subdir = webengine/plugin/experimental
-webengine_experimental_plugin.target = sub-webengine-experimental-plugin
-webengine_experimental_plugin.depends = webengine
SUBDIRS += core \
process \
webengine \
webengine_plugin \
- webengine_experimental_plugin \
plugins
# allow only desktop builds of qwebengine_convert_dict
-# osx does not use hunspell
-!contains(WEBENGINE_CONFIG, no_spellcheck):!osx:!cross_compile {
+!contains(WEBENGINE_CONFIG, no_spellcheck):!contains(WEBENGINE_CONFIG, use_native_spellchecker):!cross_compile {
SUBDIRS += qwebengine_convert_dict
qwebengine_convert_dict.subdir = tools/qwebengine_convert_dict
qwebengine_convert_dict.depends = core
@@ -34,8 +29,10 @@ isQMLTestSupportApiEnabled() {
# FIXME: We probably want a bit more control over config options to tweak what to build/ship or not.
# Another example of where this could be necessary is to make it easy to build proprietery codecs support.
-!contains(WEBENGINE_CONFIG, no_ui_delegates): SUBDIRS += webengine/ui
-
+!contains(WEBENGINE_CONFIG, no_ui_delegates) {
+ SUBDIRS += webengine/ui \
+ webengine/ui2
+}
qtHaveModule(widgets) {
SUBDIRS += webenginewidgets
plugins.depends = webenginewidgets
diff --git a/src/tools/qwebengine_convert_dict/qwebengine_convert_dict.pro b/src/tools/qwebengine_convert_dict/qwebengine_convert_dict.pro
index de125cc76..715081b5f 100644
--- a/src/tools/qwebengine_convert_dict/qwebengine_convert_dict.pro
+++ b/src/tools/qwebengine_convert_dict/qwebengine_convert_dict.pro
@@ -1,15 +1,19 @@
option(host_build)
# Look for linking information produced by gyp for our target according to core_generated.gyp
-!include($$OUT_PWD/../../core/$$getConfigDir()/QtWebEngineCore_linking.pri) {
+!include($$OUT_PWD/../../core/$$getConfigDir()/convert_dict_linking.pri) {
error("Could not find the linking information that gyp should have generated.")
}
-# remove object files from linking information
+
+# skip dummy main.cpp file
OBJECTS =
# Fixme: -Werror=unused-parameter in core
QMAKE_CXXFLAGS_WARN_ON =
+# Disable MSVC2015 warning C4577 ('noexcept' used with no exception handling mode specified)
+win32: QMAKE_CXXFLAGS_WARN_ON = -wd4577
+
# Issue with some template compliation, smb smart should look at it
win32: DEFINES += NOMINMAX
diff --git a/src/webengine/api/qquickwebenginecertificateerror.cpp b/src/webengine/api/qquickwebenginecertificateerror.cpp
index 51a942abe..855e61817 100644
--- a/src/webengine/api/qquickwebenginecertificateerror.cpp
+++ b/src/webengine/api/qquickwebenginecertificateerror.cpp
@@ -93,7 +93,9 @@ QQuickWebEngineCertificateError::QQuickWebEngineCertificateError(const QSharedPo
QQuickWebEngineCertificateError::~QQuickWebEngineCertificateError()
{
- rejectCertificate();
+ Q_D(QQuickWebEngineCertificateError);
+ if (!d->answered)
+ rejectCertificate();
}
@@ -195,6 +197,9 @@ QUrl QQuickWebEngineCertificateError::url() const
\value WebEngineCertificateError.CertificateValidityTooLong
The certificate has a validity period that is too long.
(Added in 5.7)
+ \value WebEngineCertificateError.CertificateTransparencyRequired
+ Certificate Transparency was required for this connection, but the server
+ did not provide CT information that complied with the policy. (Added in 5.8)
*/
QQuickWebEngineCertificateError::Error QQuickWebEngineCertificateError::error() const
{
diff --git a/src/webengine/api/qquickwebenginecertificateerror_p.h b/src/webengine/api/qquickwebenginecertificateerror_p.h
index d04dc2c62..27b2efa14 100644
--- a/src/webengine/api/qquickwebenginecertificateerror_p.h
+++ b/src/webengine/api/qquickwebenginecertificateerror_p.h
@@ -84,6 +84,7 @@ public:
CertificateWeakKey = -211,
CertificateNameConstraintViolation = -212,
CertificateValidityTooLong = -213,
+ CertificateTransparencyRequired = -214,
};
Q_ENUM(Error)
diff --git a/src/webengine/api/qquickwebenginecontextmenudata.cpp b/src/webengine/api/qquickwebenginecontextmenudata.cpp
deleted file mode 100644
index 2cc6eaf4b..000000000
--- a/src/webengine/api/qquickwebenginecontextmenudata.cpp
+++ /dev/null
@@ -1,209 +0,0 @@
-/****************************************************************************
-**
-** 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 "qquickwebenginecontextmenudata_p.h"
-
-#include "web_contents_adapter_client.h"
-
-QT_BEGIN_NAMESPACE
-
-ASSERT_ENUMS_MATCH(QtWebEngineCore::WebEngineContextMenuData::MediaTypeNone, QQuickWebEngineContextMenuData::MediaTypeNone)
-ASSERT_ENUMS_MATCH(QtWebEngineCore::WebEngineContextMenuData::MediaTypeImage, QQuickWebEngineContextMenuData::MediaTypeImage)
-ASSERT_ENUMS_MATCH(QtWebEngineCore::WebEngineContextMenuData::MediaTypeAudio, QQuickWebEngineContextMenuData::MediaTypeAudio)
-ASSERT_ENUMS_MATCH(QtWebEngineCore::WebEngineContextMenuData::MediaTypeVideo, QQuickWebEngineContextMenuData::MediaTypeVideo)
-ASSERT_ENUMS_MATCH(QtWebEngineCore::WebEngineContextMenuData::MediaTypeCanvas, QQuickWebEngineContextMenuData::MediaTypeCanvas)
-ASSERT_ENUMS_MATCH(QtWebEngineCore::WebEngineContextMenuData::MediaTypeFile, QQuickWebEngineContextMenuData::MediaTypeFile)
-ASSERT_ENUMS_MATCH(QtWebEngineCore::WebEngineContextMenuData::MediaTypePlugin, QQuickWebEngineContextMenuData::MediaTypePlugin)
-
-/*!
- \qmltype WebEngineContextMenuData
- \instantiates QQuickWebEngineContextMenuData
- \inqmlmodule QtWebEngine
- \since QtWebEngine 1.3
- \brief Provides context data for populating or extending a context menu with actions.
-
-
- WebEngineContextMenuData is returned by WebEngineView::contextMenuData() after a context menu event,
- and contains information about where the context menu event took place. This is also in the context
- in which any context specific WebEngineView::WebAction will be performed.
-*/
-
-QQuickWebEngineContextMenuData::QQuickWebEngineContextMenuData() : d(nullptr)
-{
-}
-
-QQuickWebEngineContextMenuData::~QQuickWebEngineContextMenuData()
-{
- delete d;
-}
-
-/*!
- \qmlproperty bool WebEngineContextMenuData::isValid
-
- Is \c true if the context data is valid; otherwise \c false.
-*/
-bool QQuickWebEngineContextMenuData::isValid() const
-{
- return d;
-}
-
-/*!
- \qmlproperty point WebEngineContextMenuData::position
-
-
- Returns the position of the context, usually the mouse position where the context menu event was triggered.
-*/
-QPoint QQuickWebEngineContextMenuData::position() const
-{
- return d ? d->pos : QPoint();
-}
-
-/*!
- \qmlproperty string WebEngineContextMenuData::linkText
-
- Returns the text of a link if the context is a link.
-*/
-QString QQuickWebEngineContextMenuData::linkText() const
-{
- return d ? d->linkText : QString();
-}
-
-/*!
- \qmlproperty url WebEngineContextMenuData::linkUrl
-
- Returns the URL of a link if the context is a link.
-*/
-QUrl QQuickWebEngineContextMenuData::linkUrl() const
-{
- return d ? d->linkUrl : QUrl();
-}
-
-/*!
- \qmlproperty string WebEngineContextMenuData::selectedText
-
- Returns the selected text of the context.
-*/
-QString QQuickWebEngineContextMenuData::selectedText() const
-{
- return d ? d->selectedText : QString();
-}
-
-/*!
- \qmlproperty url WebEngineContextMenuData::mediaUrl
-
- If the context is a media element, returns the URL of that media.
-*/
-QUrl QQuickWebEngineContextMenuData::mediaUrl() const
-{
- return d ? d->mediaUrl : QUrl();
-}
-
-/*!
- \qmlproperty enumeration WebEngineContextMenuData::mediaType
-
- Returns the type of the media element or \c MediaTypeNone if the context is not a media element.
-
- \value WebEngineContextMenuData.MediaTypeNone
- The context is not a media element.
- \value WebEngineContextMenuData.MediaTypeImage
- The context is an image element
- \value WebEngineContextMenuData.MediaTypeVideo
- The context is a video element
- \value WebEngineContextMenuData.MediaTypeAudio
- The context is an audio element
- \value WebEngineContextMenuData.MediaTypeCanvas
- The context is a canvas element
- \value WebEngineContextMenuData.MediaTypeFile
- The context is a file
- \value WebEngineContextMenuData.MediaTypePlugin
- The context is a plugin
-*/
-
-QQuickWebEngineContextMenuData::MediaType QQuickWebEngineContextMenuData::mediaType() const
-{
- return d ? static_cast<QQuickWebEngineContextMenuData::MediaType>(d->mediaType) : MediaTypeNone;
-}
-
-/*!
- \qmlproperty bool WebEngineContextMenuData::isContentEditable
-
- Returns \c true if the content is editable by the user; otherwise returns \c false.
-*/
-bool QQuickWebEngineContextMenuData::isContentEditable() const
-{
- return d ? d->isEditable : false;
-}
-
-void QQuickWebEngineContextMenuData::update(const QtWebEngineCore::WebEngineContextMenuData &update)
-{
- const QQuickWebEngineContextMenuData old(d);
- d = new QtWebEngineCore::WebEngineContextMenuData(update);
-
- if (isValid() != old.isValid())
- Q_EMIT isValidChanged();
-
- if (position() != old.position())
- Q_EMIT positionChanged();
-
- if (selectedText() != old.selectedText())
- Q_EMIT selectedTextChanged();
-
- if (linkText() != old.linkText())
- Q_EMIT linkTextChanged();
-
- if (linkUrl() != old.linkUrl())
- Q_EMIT linkUrlChanged();
-
- if (mediaUrl() != old.mediaUrl())
- Q_EMIT mediaUrlChanged();
-
- if (mediaType() != old.mediaType())
- Q_EMIT mediaTypeChanged();
-
- if (isContentEditable() != old.isContentEditable())
- Q_EMIT isContentEditableChanged();
-}
-
-QQuickWebEngineContextMenuData::QQuickWebEngineContextMenuData(const QQuickWebEngineContextMenuDataPrivate *p, QObject *parent)
- : QObject(parent)
- , d(p)
-{
-}
-
-QT_END_NAMESPACE
diff --git a/src/webengine/api/qquickwebenginecontextmenurequest.cpp b/src/webengine/api/qquickwebenginecontextmenurequest.cpp
new file mode 100644
index 000000000..df57442a1
--- /dev/null
+++ b/src/webengine/api/qquickwebenginecontextmenurequest.cpp
@@ -0,0 +1,274 @@
+/****************************************************************************
+**
+** 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 "qquickwebenginecontextmenurequest_p.h"
+#include "web_contents_adapter_client.h"
+
+QT_BEGIN_NAMESPACE
+
+ASSERT_ENUMS_MATCH(QtWebEngineCore::WebEngineContextMenuData::MediaTypeNone,
+ QQuickWebEngineContextMenuRequest::MediaTypeNone)
+ASSERT_ENUMS_MATCH(QtWebEngineCore::WebEngineContextMenuData::MediaTypeImage,
+ QQuickWebEngineContextMenuRequest::MediaTypeImage)
+ASSERT_ENUMS_MATCH(QtWebEngineCore::WebEngineContextMenuData::MediaTypeAudio,
+ QQuickWebEngineContextMenuRequest::MediaTypeAudio)
+ASSERT_ENUMS_MATCH(QtWebEngineCore::WebEngineContextMenuData::MediaTypeVideo,
+ QQuickWebEngineContextMenuRequest::MediaTypeVideo)
+ASSERT_ENUMS_MATCH(QtWebEngineCore::WebEngineContextMenuData::MediaTypeCanvas,
+ QQuickWebEngineContextMenuRequest::MediaTypeCanvas)
+ASSERT_ENUMS_MATCH(QtWebEngineCore::WebEngineContextMenuData::MediaTypeFile,
+ QQuickWebEngineContextMenuRequest::MediaTypeFile)
+ASSERT_ENUMS_MATCH(QtWebEngineCore::WebEngineContextMenuData::MediaTypePlugin,
+ QQuickWebEngineContextMenuRequest::MediaTypePlugin)
+
+/*!
+ \qmltype ContextMenuRequest
+ \instantiates QQuickWebEngineContextMenuRequest
+ \inqmlmodule QtWebEngine
+ \since QtWebEngine 1.4
+
+ \brief A request for showing a context menu.
+
+ A ContextMenuRequest is passed as an argument of the
+ WebEngineView::contextMenuRequested signal. It provides further
+ information about the context of the request. The position of the
+ request origin can be found via the \l x and \l y properties.
+
+ The \l accepted property of the request indicates whether the request
+ is handled by the user code or the default context menu should
+ be displayed.
+
+ The following code uses a custom menu to handle the request:
+
+ \code
+ WebEngineView {
+ id: view
+ // ...
+ onContextMenuRequested: function(request) {
+ request.accepted = true;
+ myMenu.x = request.x;
+ myMenu.y = request.y;
+ myMenu.trigger.connect(view.triggerWebAction);
+ myMenu.popup();
+ }
+ // ...
+ }
+ \endcode
+*/
+
+QQuickWebEngineContextMenuRequest::QQuickWebEngineContextMenuRequest(
+ const QtWebEngineCore::WebEngineContextMenuData &data, QObject *parent):
+ QObject(parent)
+ , m_data(new QtWebEngineCore::WebEngineContextMenuData(data))
+ , m_accepted(false)
+{
+}
+
+QQuickWebEngineContextMenuRequest::~QQuickWebEngineContextMenuRequest()
+{
+}
+
+/*!
+ \qmlproperty int ContextMenuRequest::x
+ \readonly
+
+ The x coordinate of the user action from where the context
+ menu request originates.
+*/
+
+int QQuickWebEngineContextMenuRequest::x() const
+{
+ return m_data->position().x();
+}
+
+/*!
+ \qmlproperty int ContextMenuRequest::y
+ \readonly
+
+ The y coordinate of the user action from where the context
+ menu request originates.
+*/
+
+int QQuickWebEngineContextMenuRequest::y() const
+{
+ return m_data->position().y();
+}
+
+/*!
+ \qmlproperty string ContextMenuRequest::selectedText
+ \readonly
+
+ The selected text the context menu was created for.
+*/
+
+QString QQuickWebEngineContextMenuRequest::selectedText() const
+{
+ return m_data->selectedText();
+}
+
+/*!
+ \qmlproperty string ContextMenuRequest::linkText
+ \readonly
+
+ The text of the link if the context menu was requested for a link.
+*/
+
+QString QQuickWebEngineContextMenuRequest::linkText() const
+{
+ return m_data->linkText();
+}
+
+/*!
+ \qmlproperty url ContextMenuRequest::linkUrl
+ \readonly
+
+ The URL of the link if the selected web page content is a link.
+*/
+
+QUrl QQuickWebEngineContextMenuRequest::linkUrl() const
+{
+ return m_data->linkUrl();
+}
+
+/*!
+ \qmlproperty url ContextMenuRequest::mediaUrl
+ \readonly
+
+ The URL of media if the selected web content is a media element.
+*/
+
+QUrl QQuickWebEngineContextMenuRequest::mediaUrl() const
+{
+ return m_data->mediaUrl();
+}
+
+/*!
+ \qmlproperty enumeration ContextMenuRequest::mediaType
+ \readonly
+
+ The type of the media element or \c MediaTypeNone if
+ the selected web page content is not a media element.
+
+ \value ContextMenuRequest.MediaTypeNone
+ Not a media.
+ \value ContextMenuRequest.MediaTypeImage
+ An image.
+ \value ContextMenuRequest.MediaTypeVideo
+ A video.
+ \value ContextMenuRequest.MediaTypeAudio
+ An audio element.
+ \value ContextMenuRequest.MediaTypeCanvas
+ A canvas.
+ \value ContextMenuRequest.MediaTypeFile
+ A file.
+ \value ContextMenuRequest.MediaTypePlugin
+ A plugin.
+*/
+
+QQuickWebEngineContextMenuRequest::MediaType QQuickWebEngineContextMenuRequest::mediaType() const
+{
+ return static_cast<QQuickWebEngineContextMenuRequest::MediaType>(m_data->mediaType());
+}
+
+/*!
+ \qmlproperty bool ContextMenuRequest::isContentEditable
+ \readonly
+
+ Indicates whether the selected web content is editable.
+*/
+
+bool QQuickWebEngineContextMenuRequest::isContentEditable() const
+{
+ return m_data->isEditable();
+}
+
+/*!
+ \qmlproperty string ContextMenuRequest::misspelledWord
+ \readonly
+
+ If the context is a word considered misspelled by the spell-checker,
+ returns the misspelled word.
+*/
+
+QString QQuickWebEngineContextMenuRequest::misspelledWord() const
+{
+ return m_data->misspelledWord();
+}
+
+/*!
+ \qmlproperty stringlist ContextMenuRequest::spellCheckerSuggestions
+ \readonly
+
+ If the context is a word considered misspelled by the spell-checker,
+ returns a list of suggested replacements.
+*/
+
+QStringList QQuickWebEngineContextMenuRequest::spellCheckerSuggestions() const
+{
+ return m_data->spellCheckerSuggestions();
+}
+
+/*!
+ \qmlproperty bool ContextMenuRequest::accepted
+
+ Indicates whether the context menu request has been
+ handled by the signal handler.
+
+ If the property is \c false after any signal handlers
+ for WebEngineView::contextMenuRequested have been executed,
+ a default context menu will be shown.
+ To prevent this, set \c{request.accepted} to \c true.
+
+ The default is \c false.
+
+ \note The default content of the context menu depends on the
+ web element for which the request was actually generated.
+*/
+
+bool QQuickWebEngineContextMenuRequest::isAccepted() const
+{
+ return m_accepted;
+}
+
+void QQuickWebEngineContextMenuRequest::setAccepted(bool accepted)
+{
+ m_accepted = accepted;
+}
+
+QT_END_NAMESPACE
diff --git a/src/webengine/api/qquickwebenginecontextmenudata_p.h b/src/webengine/api/qquickwebenginecontextmenurequest_p.h
index aa081cbe6..3d2de14a2 100644
--- a/src/webengine/api/qquickwebenginecontextmenudata_p.h
+++ b/src/webengine/api/qquickwebenginecontextmenurequest_p.h
@@ -37,8 +37,8 @@
**
****************************************************************************/
-#ifndef QQUICKWEBENGINECONTEXTMENUDATA_P_H
-#define QQUICKWEBENGINECONTEXTMENUDATA_P_H
+#ifndef QQUICKWEBENGINECONTEXTMENUREQUEST_H
+#define QQUICKWEBENGINECONTEXTMENUREQUEST_H
//
// W A R N I N G
@@ -49,30 +49,21 @@
// version without notice, or even be removed.
//
// We mean it.
-//
#include <private/qtwebengineglobal_p.h>
+#include <QtCore/QScopedPointer>
#include <QtCore/QObject>
-#include <QtCore/QPoint>
-#include <QtCore/QString>
#include <QtCore/QUrl>
-#include <QtQuick/QQuickItem>
namespace QtWebEngineCore {
-class WebEngineContextMenuData;
+ class WebEngineContextMenuData;
}
QT_BEGIN_NAMESPACE
-class QQuickWebEngineView;
-class QQuickWebEngineViewPrivate;
-
-class Q_WEBENGINE_PRIVATE_EXPORT QQuickWebEngineContextMenuData : public QObject {
+class Q_WEBENGINE_PRIVATE_EXPORT QQuickWebEngineContextMenuRequest: public QObject {
Q_OBJECT
public:
- QQuickWebEngineContextMenuData();
- ~QQuickWebEngineContextMenuData();
-
enum MediaType {
MediaTypeNone,
MediaTypeImage,
@@ -84,49 +75,41 @@ public:
};
Q_ENUM(MediaType)
- Q_PROPERTY(bool isValid READ isValid NOTIFY isValidChanged)
- Q_PROPERTY(QPoint position READ position NOTIFY positionChanged)
- Q_PROPERTY(QString selectedText READ selectedText NOTIFY selectedTextChanged)
- Q_PROPERTY(QString linkText READ linkText NOTIFY linkTextChanged)
- Q_PROPERTY(QUrl linkUrl READ linkUrl NOTIFY linkUrlChanged)
- Q_PROPERTY(QUrl mediaUrl READ mediaUrl NOTIFY mediaUrlChanged)
- Q_PROPERTY(MediaType mediaType READ mediaType NOTIFY mediaTypeChanged)
- Q_PROPERTY(bool isContentEditable READ isContentEditable NOTIFY isContentEditableChanged)
-
- bool isValid() const;
-
- QPoint position() const;
+ Q_PROPERTY(int x READ x CONSTANT FINAL)
+ Q_PROPERTY(int y READ y CONSTANT FINAL)
+ Q_PROPERTY(QString selectedText READ selectedText CONSTANT FINAL)
+ Q_PROPERTY(QString linkText READ linkText CONSTANT FINAL)
+ Q_PROPERTY(QUrl linkUrl READ linkUrl CONSTANT FINAL)
+ Q_PROPERTY(QUrl mediaUrl READ mediaUrl CONSTANT FINAL)
+ Q_PROPERTY(MediaType mediaType READ mediaType CONSTANT FINAL)
+ Q_PROPERTY(bool isContentEditable READ isContentEditable CONSTANT FINAL)
+ Q_PROPERTY(QString misspelledWord READ misspelledWord CONSTANT FINAL)
+ Q_PROPERTY(QStringList spellCheckerSuggestions READ spellCheckerSuggestions CONSTANT FINAL)
+ Q_PROPERTY(bool accepted READ isAccepted WRITE setAccepted FINAL)
+
+ ~QQuickWebEngineContextMenuRequest();
+ int x() const;
+ int y() const;
QString selectedText() const;
QString linkText() const;
QUrl linkUrl() const;
QUrl mediaUrl() const;
MediaType mediaType() const;
bool isContentEditable() const;
-
-Q_SIGNALS:
- void isValidChanged();
- void positionChanged();
- void selectedTextChanged();
- void linkTextChanged();
- void linkUrlChanged();
- void mediaUrlChanged();
- void mediaTypeChanged();
- void isContentEditableChanged();
+ QString misspelledWord() const;
+ QStringList spellCheckerSuggestions() const;
+ bool isAccepted() const;
+ void setAccepted(bool accepted);
private:
- void update(const QtWebEngineCore::WebEngineContextMenuData &update);
-
+ QQuickWebEngineContextMenuRequest(const QtWebEngineCore::WebEngineContextMenuData &data, QObject *parent = nullptr);
+ QScopedPointer<QtWebEngineCore::WebEngineContextMenuData> m_data;
+ bool m_accepted;
friend class QQuickWebEngineView;
friend class QQuickWebEngineViewPrivate;
- Q_DISABLE_COPY(QQuickWebEngineContextMenuData)
- typedef QtWebEngineCore::WebEngineContextMenuData QQuickWebEngineContextMenuDataPrivate;
- QQuickWebEngineContextMenuData(const QQuickWebEngineContextMenuDataPrivate *priv, QObject *parent = 0);
- QQuickWebEngineContextMenuData &operator=(const QQuickWebEngineContextMenuDataPrivate *priv);
- const QQuickWebEngineContextMenuDataPrivate *d;
+ Q_DISABLE_COPY(QQuickWebEngineContextMenuRequest)
};
QT_END_NAMESPACE
-QML_DECLARE_TYPE(const QQuickWebEngineContextMenuData);
-
-#endif // QQUICKWEBENGINECONTEXTMENUDATA_P_H
+#endif // QQUICKWEBENGINECONTEXTMENUREQUEST_H
diff --git a/src/webengine/api/qquickwebenginedialogrequests.cpp b/src/webengine/api/qquickwebenginedialogrequests.cpp
new file mode 100644
index 000000000..641793e12
--- /dev/null
+++ b/src/webengine/api/qquickwebenginedialogrequests.cpp
@@ -0,0 +1,856 @@
+/****************************************************************************
+**
+** 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 "qquickwebenginedialogrequests_p.h"
+#include "authentication_dialog_controller.h"
+#include "javascript_dialog_controller.h"
+#include "color_chooser_controller.h"
+#include "file_picker_controller.h"
+#include "web_contents_adapter_client.h"
+
+QT_BEGIN_NAMESPACE
+
+using namespace QtWebEngineCore;
+
+ASSERT_ENUMS_MATCH(WebContentsAdapterClient::AlertDialog,
+ QQuickWebEngineJavaScriptDialogRequest::DialogTypeAlert)
+ASSERT_ENUMS_MATCH(WebContentsAdapterClient::ConfirmDialog,
+ QQuickWebEngineJavaScriptDialogRequest::DialogTypeConfirm)
+ASSERT_ENUMS_MATCH(WebContentsAdapterClient::PromptDialog,
+ QQuickWebEngineJavaScriptDialogRequest::DialogTypePrompt)
+ASSERT_ENUMS_MATCH(WebContentsAdapterClient::UnloadDialog,
+ QQuickWebEngineJavaScriptDialogRequest::DialogTypeBeforeUnload)
+
+ASSERT_ENUMS_MATCH(FilePickerController::Open,
+ QQuickWebEngineFileDialogRequest::FileModeOpen)
+ASSERT_ENUMS_MATCH(FilePickerController::OpenMultiple,
+ QQuickWebEngineFileDialogRequest::FileModeOpenMultiple)
+ASSERT_ENUMS_MATCH(FilePickerController::UploadFolder,
+ QQuickWebEngineFileDialogRequest::FileModeUploadFolder)
+ASSERT_ENUMS_MATCH(FilePickerController::Save,
+ QQuickWebEngineFileDialogRequest::FileModeSave)
+
+/*!
+ \qmltype AuthenticationDialogRequest
+ \instantiates QQuickWebEngineAuthenticationDialogRequest
+ \inqmlmodule QtWebEngine
+ \since QtWebEngine 1.4
+
+ \brief A request for providing authentication credentials required
+ by proxies or HTTP servers.
+
+ An AuthenticationDialogRequest is passed as an argument of the
+ WebEngineView::authenticationDialogRequested signal. It is generated
+ when basic HTTP or proxy authentication is required. The type
+ of authentication can be checked with the \l type property.
+
+ The \l accepted property of the request indicates whether the request
+ is handled by the user code or the default dialog should be displayed.
+ If you set the \l accepted property to \c true, make sure to call
+ either \l dialogAccept() or \l dialogReject() afterwards.
+
+ The following code uses a custom dialog to handle the request:
+ \code
+
+ WebEngineView {
+ // ...
+ onAuthenticationDialogRequested: function(request) {
+ request.accepted = true;
+ myDialog.request = request // keep the reference to the request
+ myDialog.accept.connect(request.dialogAccept);
+ myDialog.reject.connect(request.dialogReject);
+ myDialog.visible = true;
+ }
+ // ...
+ }
+
+ \endcode
+*/
+
+QQuickWebEngineAuthenticationDialogRequest::QQuickWebEngineAuthenticationDialogRequest(
+ QSharedPointer<AuthenticationDialogController> controller,
+ QObject *parent):
+ QObject(parent)
+ , m_controller(controller.toWeakRef())
+ , m_url(controller->url())
+ , m_realm(controller->realm())
+ , m_type(controller->isProxy() ? AuthenticationTypeProxy
+ : AuthenticationTypeHTTP)
+ , m_host(controller->host())
+ , m_accepted(false)
+{
+
+}
+
+QQuickWebEngineAuthenticationDialogRequest::~QQuickWebEngineAuthenticationDialogRequest()
+{
+}
+
+/*!
+ \qmlproperty url AuthenticationDialogRequest::url
+ \readonly
+
+ The URL of the HTTP request for which authentication was requested.
+ In case of proxy authentication, this is a request URL which is proxied
+ via host.
+
+ \sa proxyHost
+*/
+
+QUrl QQuickWebEngineAuthenticationDialogRequest::url() const
+{
+ return m_url;
+}
+
+/*!
+ \qmlproperty string AuthenticationDialogRequest::realm
+ \readonly
+
+ The HTTP authentication realm attribute value of the \c WWW-Authenticate
+ header. Empty if \l type is AuthenticationTypeProxy.
+*/
+
+QString QQuickWebEngineAuthenticationDialogRequest::realm() const
+{
+ return m_realm;
+}
+
+/*!
+ \qmlproperty string AuthenticationDialogRequest::proxyHost
+ \readonly
+
+ The hostname of the authentication proxy.
+ Empty if \l type is AuthenticationTypeHTTP.
+*/
+
+QString QQuickWebEngineAuthenticationDialogRequest::proxyHost() const
+{
+ return m_host;
+}
+
+/*!
+ \qmlproperty enumeration AuthenticationDialogRequest::type
+ \readonly
+
+ The type of the authentication request.
+
+ \value WebEngineAuthenticationDialogRequest.AuthenticationTypeHTTP
+ HTTP authentication.
+ \value WebEngineAuthenticationDialogRequest.AuthenticationTypeProxy
+ Proxy authentication.
+*/
+
+QQuickWebEngineAuthenticationDialogRequest::AuthenticationType
+QQuickWebEngineAuthenticationDialogRequest::type() const
+{
+ return m_type;
+}
+
+/*!
+ \qmlproperty bool AuthenticationDialogRequest::accepted
+
+ Indicates whether the authentication dialog request has been
+ accepted by the signal handler.
+
+ If the property is \c false after any signal handlers
+ for WebEngineView::authenticationDialogRequested have been executed,
+ a default authentication dialog will be shown.
+ To prevent this, set \c{request.accepted} to \c true.
+
+ The default is \c false.
+*/
+
+bool QQuickWebEngineAuthenticationDialogRequest::isAccepted() const
+{
+ return m_accepted;
+}
+
+void QQuickWebEngineAuthenticationDialogRequest::setAccepted(bool accepted)
+{
+ m_accepted = accepted;
+}
+
+/*!
+ \qmlmethod void AuthenticationDialogRequest::dialogAccept(string username, string password)
+
+ This function notifies the engine that the user accepted the dialog,
+ providing the \a username and the \a password required for authentication.
+*/
+
+void QQuickWebEngineAuthenticationDialogRequest::dialogAccept(const QString &user,
+ const QString &password)
+{
+ m_accepted = true;
+ QSharedPointer<AuthenticationDialogController> controller
+ = m_controller.toStrongRef();
+ if (controller)
+ controller->accept(user,password);
+}
+
+/*!
+ \qmlmethod void AuthenticationDialogRequest::dialogReject()
+
+ This function notifies the engine that the user rejected the dialog and the
+ authentication shall not proceed.
+*/
+
+void QQuickWebEngineAuthenticationDialogRequest::dialogReject()
+{
+ m_accepted = true;
+ QSharedPointer<AuthenticationDialogController> controller
+ = m_controller.toStrongRef();
+ if (controller)
+ controller->reject();
+}
+
+///////////////////////////////////////////////////////////////////////////////
+
+/*!
+ \qmltype JavaScriptDialogRequest
+ \instantiates QQuickWebEngineJavaScriptDialogRequest
+ \inqmlmodule QtWebEngine
+ \since QtWebEngine 1.4
+
+ \brief A request for showing an alert, a confirmation, or a prompt dialog
+ from within JavaScript to the user.
+
+ A JavaScriptDialogRequest is passed as an argument of the
+ WebEngineView::javaScriptDialogRequested signal. The request is emitted
+ if JavaScript on the page calls HTML5's
+ \l{https://www.w3.org/TR/html5/webappapis.html#simple-dialogs}{Simple Dialogs}
+ API, or in response to HTML5's
+ \l {https://www.w3.org/TR/html5/browsers.html#beforeunloadevent}{BeforeUnloadEvent}.
+ The type of a particular dialog can be checked with the \l type property.
+
+ The \l accepted property of the request indicates whether the request
+ is handled by the user code or the default dialog should be displayed.
+ If you set the \l accepted property to \c true, make sure to call either
+ \l dialogAccept() or \l dialogReject() afterwards. The JavaScript call
+ causing the request will be blocked until then.
+
+ The following code uses a custom dialog to handle the request:
+
+ \code
+ WebEngineView {
+ // ...
+ onJavaScriptDialogRequested: function(request) {
+ request.accepted = true;
+ myDialog.request = request // keep the reference to the request
+ myDialog.accept.connect(request.dialogAccept);
+ myDialog.reject.connect(request.dialogReject);
+ myDialog.visible = true;
+ }
+ // ...
+ }
+ \endcode
+*/
+
+QQuickWebEngineJavaScriptDialogRequest::QQuickWebEngineJavaScriptDialogRequest(
+ QSharedPointer<JavaScriptDialogController> controller, QObject *parent):
+ QObject(parent)
+ , m_controller(controller.toWeakRef())
+ , m_message(controller->message())
+ , m_defaultPrompt(controller->defaultPrompt())
+ , m_title(controller->title())
+ , m_type(static_cast<QQuickWebEngineJavaScriptDialogRequest::DialogType>(controller->type()))
+ , m_securityOrigin(controller->securityOrigin())
+ , m_accepted(false)
+{
+}
+
+QQuickWebEngineJavaScriptDialogRequest::~QQuickWebEngineJavaScriptDialogRequest()
+{
+
+}
+
+/*!
+ \qmlproperty string JavaScriptDialogRequest::message
+ \readonly
+
+ The message to be shown to the user.
+*/
+
+QString QQuickWebEngineJavaScriptDialogRequest::message() const
+{
+ return m_message;
+}
+
+/*!
+ \qmlproperty string JavaScriptDialogRequest::defaultPrompt
+ \readonly
+
+ The default text if the requested dialog box is of
+ the \l type PromptDialog.
+*/
+
+
+QString QQuickWebEngineJavaScriptDialogRequest::defaultText() const
+{
+ return m_defaultPrompt;
+}
+
+/*!
+ \qmlproperty string JavaScriptDialogRequest::title
+ \readonly
+
+ A default title for the dialog.
+*/
+
+QString QQuickWebEngineJavaScriptDialogRequest::title() const
+{
+ return m_title;
+}
+
+/*!
+ \qmlproperty enumeration JavaScriptDialogRequest::type
+ \readonly
+
+ Returns the type of the requested dialog box, see HTML5's
+
+ \l{https://www.w3.org/TR/html5/webappapis.html#simple-dialogs}{Simple Dialogs}.
+
+ \value JavaScriptDialogRequest.DialogTypeAlert
+ A JavaScript alert dialog.
+ \value JavaScriptDialogRequest.DialogTypeConfirm
+ A JavaScript confirmation dialog.
+ \value JavaScriptDialogRequest.DialogTypePrompt
+ A JavaScript prompt dialog.
+ \value JavaScriptDialogRequest.DialogTypeUnload
+ The users should be asked if they want to leave the page.
+*/
+
+QQuickWebEngineJavaScriptDialogRequest::DialogType QQuickWebEngineJavaScriptDialogRequest::type() const
+{
+ return m_type;
+}
+
+/*!
+ \qmlproperty url JavaScriptDialogRequest::securityOrigin
+ \readonly
+
+ The URL of the security origin.
+*/
+
+QUrl QQuickWebEngineJavaScriptDialogRequest::securityOrigin() const
+{
+ return m_securityOrigin;
+}
+
+/*!
+ \qmlproperty bool JavaScriptDialogRequest::accepted
+
+ Indicates whether the JavaScript dialog request has been
+ accepted by the signal handler.
+
+ If the property is \c false after any signal handlers
+ for WebEngineView::javaScriptDialogRequested have been executed,
+ a default dialog will be shown.
+ To prevent this, set \c{request.accepted} to \c true.
+
+ The default is \c false.
+*/
+
+bool QQuickWebEngineJavaScriptDialogRequest::isAccepted() const
+{
+ return m_accepted;
+}
+
+void QQuickWebEngineJavaScriptDialogRequest::setAccepted(bool accepted)
+{
+ m_accepted = accepted;
+}
+
+/*!
+ \qmlmethod void JavaScriptDialogRequest::dialogAccept()
+
+ This function notifies the engine that the user accepted the dialog.
+*/
+
+/*!
+ \qmlmethod void JavaScriptDialogRequest::dialogAccept(string text)
+
+ This function notifies the engine that the user accepted the dialog,
+ providing the \a text in case of a prompt message box.
+*/
+
+void QQuickWebEngineJavaScriptDialogRequest::dialogAccept(const QString& text)
+{
+ m_accepted = true;
+ QSharedPointer<JavaScriptDialogController> controller
+ = m_controller.toStrongRef();
+ if (controller) {
+ controller->textProvided(text);
+ controller->accept();
+ }
+}
+
+/*!
+ \qmlmethod void JavaScriptDialogRequest::dialogReject()
+
+ This function notifies the engine that the user rejected the dialog.
+*/
+
+void QQuickWebEngineJavaScriptDialogRequest::dialogReject()
+{
+ m_accepted = true;
+ QSharedPointer<JavaScriptDialogController> controller
+ = m_controller.toStrongRef();
+ if (controller)
+ controller->reject();
+}
+
+///////////////////////////////////////////////////////////////////////////////
+
+/*!
+ \qmltype ColorDialogRequest
+ \instantiates QQuickWebEngineColorDialogRequest
+ \inqmlmodule QtWebEngine
+ \since QtWebEngine 1.4
+
+ \brief A request for selecting a color by the user.
+
+ A ColorDialogRequest is passed as an argument of the
+ WebEngineView::colorDialogRequested signal. It is generated when
+ a color picker dialog is requested. See
+ \l { https://www.w3.org/TR/html5/forms.html#color-state-(type=color)}
+ {HTML5 Color State}.
+
+ The \l accepted property of the request indicates whether the request
+ is handled by the user code or the default dialog should be displayed.
+ If you set the \l accepted property to \c true, make sure to call either
+ \l dialogAccept() or \l dialogReject() afterwards.
+
+ The following code uses a custom dialog to handle the request:
+
+ \code
+ WebEngineView {
+ // ...
+ onColorDialogRequested: function(request) {
+ request.accepted = true;
+ myDialog.request = request // keep the reference to the request
+ myDialog.accept.connect(request.dialogAccept);
+ myDialog.reject.connect(request.dialogReject);
+ myDialog.visible = true;
+ }
+ // ...
+ }
+ \endcode
+*/
+
+QQuickWebEngineColorDialogRequest::QQuickWebEngineColorDialogRequest(
+ QSharedPointer<ColorChooserController> controller, QObject *parent):
+ QObject(parent)
+ , m_controller(controller.toWeakRef())
+ , m_color(controller->initialColor())
+ , m_accepted(false)
+{
+
+}
+
+QQuickWebEngineColorDialogRequest::~QQuickWebEngineColorDialogRequest()
+{
+
+}
+
+/*!
+ \qmlproperty color ColorDialogRequest::color
+ \readonly
+
+ The default color to be selected in the dialog.
+*/
+
+QColor QQuickWebEngineColorDialogRequest::color() const
+{
+ return m_color;
+}
+
+/*!
+ \qmlproperty bool ColorDialogRequest::accepted
+
+ Indicates whether the color picker dialog request has been
+ accepted by the signal handler.
+
+ If the property is \c false after any signal handlers
+ for WebEngineView::colorDialogRequested have been executed,
+ a default color picker dialog will be shown.
+ To prevent this, set \c{request.accepted} to \c true.
+
+ The default is \c false.
+*/
+
+bool QQuickWebEngineColorDialogRequest::isAccepted() const
+{
+ return m_accepted;
+}
+
+void QQuickWebEngineColorDialogRequest::setAccepted(bool accepted)
+{
+ m_accepted = accepted;
+}
+
+
+/*!
+ \qmlmethod void ColorDialogRequest::dialogAccept(color color)
+
+ This function notifies the engine that the user accepted the dialog,
+ providing the \a color.
+*/
+
+void QQuickWebEngineColorDialogRequest::dialogAccept(const QColor &color)
+{
+ m_accepted = true;
+ QSharedPointer<ColorChooserController> controller = m_controller.toStrongRef();
+ if (controller)
+ controller->accept(color);
+}
+
+/*!
+ \qmlmethod void ColorDialogRequest::dialogReject()
+
+ This function notifies the engine that the user rejected the dialog.
+*/
+
+void QQuickWebEngineColorDialogRequest::dialogReject()
+{
+ m_accepted = true;
+ QSharedPointer<ColorChooserController> controller = m_controller.toStrongRef();
+ if (controller)
+ controller->reject();
+}
+
+///////////////////////////////////////////////////////////////////////////////
+
+/*!
+ \qmltype FileDialogRequest
+ \instantiates QQuickWebEngineFileDialogRequest
+ \inqmlmodule QtWebEngine
+ \since QtWebEngine 1.4
+
+ \brief A request for letting the user choose a (new or existing) file or
+ directory.
+
+ A FileDialogRequest is passed as an argument of the
+ WebEngineView::fileDialogRequested signal. It is generated
+ when the file dialog is requested by the input element.
+ See \l {https://www.w3.org/TR/html5/forms.html#file-upload-state-(type=file)}{File Upload state}.
+
+ The \l accepted property of the request indicates whether the request
+ is handled by the user code or the default dialog should be displayed.
+ If you set the \l accepted property to \c true, make sure to call either
+ \l dialogAccept() or \l dialogReject() afterwards.
+
+ The following code uses a custom dialog to handle the request:
+
+ \code
+ WebEngineView {
+ // ...
+ onFileDialogRequested: function(request) {
+ request.accepted = true;
+ myDialog.request = request // keep the reference to the request
+ myDialog.accept.connect(request.dialogAccept);
+ myDialog.reject.connect(request.dialogReject);
+ myDialog.visible = true;
+ }
+ // ...
+ }
+ \endcode
+*/
+
+QQuickWebEngineFileDialogRequest::QQuickWebEngineFileDialogRequest(
+ QSharedPointer<FilePickerController> controller, QObject *parent):
+ QObject(parent)
+ , m_controller(controller.toWeakRef())
+ , m_filename(controller->defaultFileName())
+ , m_acceptedMimeTypes(controller->acceptedMimeTypes())
+ , m_mode(static_cast<QQuickWebEngineFileDialogRequest::FileMode>(controller->mode()))
+ , m_accepted(false)
+{
+
+}
+
+QQuickWebEngineFileDialogRequest::~QQuickWebEngineFileDialogRequest()
+{
+
+}
+
+/*!
+ \qmlproperty stringlist FileDialogRequest::acceptedMimeTypes
+ \readonly
+
+ A list of MIME types specified in the input element. The selection
+ should be restricted to only these types of files.
+*/
+
+QStringList QQuickWebEngineFileDialogRequest::acceptedMimeTypes() const
+{
+ return m_acceptedMimeTypes;
+}
+
+/*!
+ \qmlproperty string FileDialogRequest::defaultFileName
+ \readonly
+
+ The default name of the file to be selected in the dialog.
+*/
+
+QString QQuickWebEngineFileDialogRequest::defaultFileName() const
+{
+ return m_filename;
+}
+
+/*!
+ \qmlproperty enumeration FileDialogRequest::mode
+ \readonly
+
+ The mode of the file dialog.
+
+ \value FileDialogRequest.FileModeOpen
+ Allows users to specify a single existing file.
+ \value FileDialogRequest.FileModeOpenMultiple
+ Allows users to specify multiple existing files.
+ \value FileDialogRequest.FileModeUploadFolder
+ Allows users to specify a single existing folder for upload.
+ \value FileDialogRequest.FileModeSave
+ Allows users to specify a non-existing file. If an existing file
+ is selected, the users should be informed that the file is going
+ to be overwritten.
+*/
+
+QQuickWebEngineFileDialogRequest::FileMode QQuickWebEngineFileDialogRequest::mode() const
+{
+ return m_mode;
+}
+
+/*!
+ \qmlproperty bool FileDialogRequest::accepted
+
+ Indicates whether the file picker dialog request has been
+ handled by the signal handler.
+
+ If the property is \c false after any signal handlers
+ for WebEngineView::fileDialogRequested have been executed,
+ a default file picker dialog will be shown.
+ To prevent this, set \c{request.accepted} to \c true.
+
+ The default is \c false.
+*/
+
+bool QQuickWebEngineFileDialogRequest::isAccepted() const
+{
+ return m_accepted;
+}
+
+void QQuickWebEngineFileDialogRequest::setAccepted(bool accepted)
+{
+ m_accepted = accepted;
+}
+
+/*!
+ \qmlmethod void FileDialogRequest::dialogAccept(stringlist files)
+
+ This function needs to be called when the user accepted the dialog with
+ \a files.
+*/
+
+void QQuickWebEngineFileDialogRequest::dialogAccept(const QStringList &files)
+{
+ m_accepted = true;
+ QSharedPointer<FilePickerController> controller = m_controller.toStrongRef();
+ if (controller)
+ controller->accepted(files);
+}
+
+/*!
+ \qmlmethod void FileDialogRequest::dialogReject()
+
+ This function needs to be called when the user did not accepted the dialog.
+*/
+
+void QQuickWebEngineFileDialogRequest::dialogReject()
+{
+ m_accepted = true;
+ QSharedPointer<FilePickerController> controller = m_controller.toStrongRef();
+ if (controller)
+ controller->rejected();
+}
+
+///////////////////////////////////////////////////////////////////////////////
+
+/*!
+ \qmltype FormValidationMessageRequest
+ \instantiates QQuickWebEngineFormValidationMessageRequest
+ \inqmlmodule QtWebEngine
+ \since QtWebEngine 1.4
+
+ \brief A request for showing a HTML5 form validation message to the user.
+
+ A FormValidationMessageRequest is passed as an argument of the
+ WebEngineView::formValidationMessageRequested signal. It is generated when
+ the handling of the validation message is requested.
+
+ The \l accepted property of the request indicates whether the request
+ is handled by the user code or the default message should be displayed.
+
+ The following code uses a custom message to handle the request:
+
+ \code
+ WebEngineView {
+ // ...
+ onFormValidationMessageRequested: function(request) {
+ request.accepted = true;
+ switch (request.type) {
+ case FormValidationMessageRequest.Show:
+ validationMessage.text = request.text;
+ validationMessage.x = request.x;
+ validationMessage.y = request.y
+ validationMessage.visible = true;
+ break;
+ case FormValidationMessageRequest.Move:
+ break;
+ case FormValidationMessageRequest.Hide:
+ validationMessage.visible = false;
+ break;
+ }
+ }
+ // ...
+ }
+ \endcode
+*/
+
+QQuickWebEngineFormValidationMessageRequest::QQuickWebEngineFormValidationMessageRequest(
+ QQuickWebEngineFormValidationMessageRequest::RequestType type, const QRect& anchor,
+ const QString &mainText, const QString &subText, QObject *parent):
+ QObject(parent)
+ , m_anchor(anchor)
+ , m_mainText(mainText)
+ , m_subText(subText)
+ , m_type(type)
+ , m_accepted(false)
+{
+
+}
+
+QQuickWebEngineFormValidationMessageRequest::~QQuickWebEngineFormValidationMessageRequest()
+{
+
+}
+
+/*!
+ \qmlproperty rectangle FormValidationMessageRequest::anchor
+ \readonly
+
+ An anchor of an element in the viewport for which the form
+ validation message should be displayed.
+*/
+
+QRect QQuickWebEngineFormValidationMessageRequest::anchor() const
+{
+ return m_anchor;
+}
+
+/*!
+ \qmlproperty bool FormValidationMessageRequest::text
+ \readonly
+
+ The text of the form validation message.
+*/
+
+
+QString QQuickWebEngineFormValidationMessageRequest::text() const
+{
+ return m_mainText;
+}
+
+/*!
+ \qmlproperty bool FormValidationMessageRequest::subText
+ \readonly
+
+ The subtext of the form validation message.
+*/
+
+
+QString QQuickWebEngineFormValidationMessageRequest::subText() const
+{
+ return m_subText;
+}
+
+/*!
+ \qmlproperty enumeration ValidationMessageRequest::type
+ \readonly
+
+ The type of the form validation message request.
+
+ \value ValidationMessageRequest.Show
+ The form validation message should be shown.
+ \value ValidationMessageRequest.Hide
+ The form validation message should be hidden.
+ \value ValidationMessageRequest.Move
+ The form validation message should be moved.
+*/
+
+QQuickWebEngineFormValidationMessageRequest::RequestType QQuickWebEngineFormValidationMessageRequest::type() const
+{
+ return m_type;
+}
+
+/*!
+ \qmlproperty bool FormValidationMessageRequest::accepted
+
+ Indicates whether the form validation request has been
+ accepted by the signal handler.
+
+ If the property is \c false after any signal handlers
+ for WebEngineView::validationMessageRequested have been executed,
+ a default file validation message will be shown.
+ To prevent this, set \c {request.accepted} to \c true.
+
+ The default is \c false.
+*/
+
+bool QQuickWebEngineFormValidationMessageRequest::isAccepted() const
+{
+ return m_accepted;
+}
+
+void QQuickWebEngineFormValidationMessageRequest::setAccepted(bool accepted)
+{
+ m_accepted = accepted;
+}
+
+QT_END_NAMESPACE
diff --git a/src/webengine/api/qquickwebenginedialogrequests_p.h b/src/webengine/api/qquickwebenginedialogrequests_p.h
new file mode 100644
index 000000000..d8a0e004c
--- /dev/null
+++ b/src/webengine/api/qquickwebenginedialogrequests_p.h
@@ -0,0 +1,265 @@
+/****************************************************************************
+**
+** 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 QQUICKWEBENGINDIALOGREQUESTS_H
+#define QQUICKWEBENGINDIALOGREQUESTS_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include <private/qtwebengineglobal_p.h>
+#include <QtCore/QUrl>
+#include <QtCore/QWeakPointer>
+#include <QtCore/QRect>
+#include <QtGui/QColor>
+
+namespace QtWebEngineCore {
+ class AuthenticationDialogController;
+ class ColorChooserController;
+ class FilePickerController;
+ class JavaScriptDialogController;
+}
+
+QT_BEGIN_NAMESPACE
+
+class Q_WEBENGINE_PRIVATE_EXPORT QQuickWebEngineAuthenticationDialogRequest : public QObject {
+ Q_OBJECT
+public:
+
+ enum AuthenticationType {
+ AuthenticationTypeHTTP,
+ AuthenticationTypeProxy
+ };
+
+ Q_ENUM(AuthenticationType)
+
+ Q_PROPERTY(QUrl url READ url CONSTANT FINAL)
+ Q_PROPERTY(QString realm READ realm CONSTANT FINAL)
+ Q_PROPERTY(QString proxyHost READ proxyHost CONSTANT FINAL)
+ Q_PROPERTY(AuthenticationType type READ type CONSTANT FINAL)
+ Q_PROPERTY(bool accepted READ isAccepted WRITE setAccepted FINAL)
+
+ ~QQuickWebEngineAuthenticationDialogRequest();
+
+ QUrl url() const;
+ QString realm() const;
+ QString proxyHost() const;
+ AuthenticationType type() const;
+ bool isAccepted() const;
+ void setAccepted(bool accepted);
+
+public slots:
+ void dialogAccept(const QString &user, const QString &password);
+ void dialogReject();
+
+private:
+ QQuickWebEngineAuthenticationDialogRequest(QSharedPointer<QtWebEngineCore::AuthenticationDialogController> controller,
+ QObject *parent = nullptr);
+ QWeakPointer<QtWebEngineCore::AuthenticationDialogController> m_controller;
+ QUrl m_url;
+ QString m_realm;
+ AuthenticationType m_type;
+ QString m_host;
+ bool m_accepted;
+ friend class QQuickWebEngineViewPrivate;
+ Q_DISABLE_COPY(QQuickWebEngineAuthenticationDialogRequest)
+};
+
+class Q_WEBENGINE_PRIVATE_EXPORT QQuickWebEngineJavaScriptDialogRequest : public QObject {
+ Q_OBJECT
+public:
+
+ enum DialogType {
+ DialogTypeAlert,
+ DialogTypeConfirm,
+ DialogTypePrompt,
+ DialogTypeBeforeUnload,
+ };
+ Q_ENUM(DialogType)
+
+ Q_PROPERTY(QString message READ message CONSTANT FINAL)
+ Q_PROPERTY(QString defaultText READ defaultText CONSTANT FINAL)
+ Q_PROPERTY(QString title READ title CONSTANT FINAL)
+ Q_PROPERTY(DialogType type READ type CONSTANT FINAL)
+ Q_PROPERTY(QUrl securityOrigin READ securityOrigin CONSTANT FINAL)
+ Q_PROPERTY(bool accepted READ isAccepted WRITE setAccepted FINAL)
+
+ ~QQuickWebEngineJavaScriptDialogRequest();
+
+ QString message() const;
+ QString defaultText() const;
+ QString title() const;
+ DialogType type() const;
+ QUrl securityOrigin() const;
+ bool isAccepted() const;
+ void setAccepted(bool accepted);
+
+public slots:
+ void dialogAccept(const QString& text = QString());
+ void dialogReject();
+
+private:
+ QQuickWebEngineJavaScriptDialogRequest(QSharedPointer<QtWebEngineCore::JavaScriptDialogController> controller,
+ QObject *parent = nullptr);
+ QWeakPointer<QtWebEngineCore::JavaScriptDialogController> m_controller;
+ QString m_message;
+ QString m_defaultPrompt;
+ QString m_title;
+ DialogType m_type;
+ QUrl m_securityOrigin;
+ bool m_accepted;
+ friend class QQuickWebEngineViewPrivate;
+ Q_DISABLE_COPY(QQuickWebEngineJavaScriptDialogRequest)
+};
+
+class Q_WEBENGINE_PRIVATE_EXPORT QQuickWebEngineColorDialogRequest : public QObject {
+ Q_OBJECT
+public:
+
+ Q_PROPERTY(QColor color READ color CONSTANT FINAL)
+ Q_PROPERTY(bool accepted READ isAccepted WRITE setAccepted FINAL)
+
+ ~QQuickWebEngineColorDialogRequest();
+
+ QColor color() const;
+ bool isAccepted() const;
+ void setAccepted(bool accepted);
+
+public slots:
+ void dialogAccept(const QColor &color);
+ void dialogReject();
+
+private:
+ QQuickWebEngineColorDialogRequest(QSharedPointer<QtWebEngineCore::ColorChooserController> controller,
+ QObject *parent = nullptr);
+ QWeakPointer<QtWebEngineCore::ColorChooserController> m_controller;
+ QColor m_color;
+ bool m_accepted;
+ friend class QQuickWebEngineViewPrivate;
+ Q_DISABLE_COPY(QQuickWebEngineColorDialogRequest)
+};
+
+class Q_WEBENGINE_PRIVATE_EXPORT QQuickWebEngineFileDialogRequest : public QObject {
+ Q_OBJECT
+public:
+
+ enum FileMode {
+ FileModeOpen,
+ FileModeOpenMultiple,
+ FileModeUploadFolder,
+ FileModeSave
+ };
+ Q_ENUM(FileMode)
+
+ Q_PROPERTY(QString defaultFileName READ defaultFileName CONSTANT FINAL)
+ Q_PROPERTY(QStringList acceptedMimeTypes READ acceptedMimeTypes CONSTANT FINAL)
+ Q_PROPERTY(FileMode mode READ mode CONSTANT FINAL)
+ Q_PROPERTY(bool accepted READ isAccepted WRITE setAccepted FINAL)
+
+ ~QQuickWebEngineFileDialogRequest();
+
+ QStringList acceptedMimeTypes() const;
+ QString defaultFileName() const;
+ FileMode mode() const;
+ bool isAccepted() const;
+ void setAccepted(bool accepted);
+
+public slots:
+ void dialogAccept(const QStringList &files);
+ void dialogReject();
+
+private:
+ QQuickWebEngineFileDialogRequest(QSharedPointer<QtWebEngineCore::FilePickerController> controller,
+ QObject *parent = nullptr);
+ QWeakPointer<QtWebEngineCore::FilePickerController> m_controller;
+ QString m_filename;
+ QStringList m_acceptedMimeTypes;
+ FileMode m_mode;
+ bool m_accepted;
+ friend class QQuickWebEngineViewPrivate;
+ Q_DISABLE_COPY(QQuickWebEngineFileDialogRequest)
+};
+
+class Q_WEBENGINE_PRIVATE_EXPORT QQuickWebEngineFormValidationMessageRequest : public QObject {
+ Q_OBJECT
+public:
+ enum RequestType {
+ Show,
+ Hide,
+ Move,
+ };
+ Q_ENUM(RequestType)
+ Q_PROPERTY(QRect anchor READ anchor CONSTANT FINAL)
+ Q_PROPERTY(QString text READ text CONSTANT FINAL)
+ Q_PROPERTY(QString subText READ subText CONSTANT FINAL)
+ Q_PROPERTY(RequestType type READ type CONSTANT FINAL)
+ Q_PROPERTY(bool accepted READ isAccepted WRITE setAccepted FINAL)
+
+ ~QQuickWebEngineFormValidationMessageRequest();
+ QRect anchor() const;
+ QString text() const;
+ QString subText() const;
+ RequestType type() const;
+ bool isAccepted() const;
+ void setAccepted(bool accepted);
+
+private:
+ QQuickWebEngineFormValidationMessageRequest(RequestType type, const QRect &anchor = QRect(),
+ const QString &mainText = QString(),
+ const QString &subText = QString(),
+ QObject *parent = nullptr);
+ QRect m_anchor;
+ QString m_mainText;
+ QString m_subText;
+ RequestType m_type;
+ bool m_accepted;
+ friend class QQuickWebEngineViewPrivate;
+};
+
+QT_END_NAMESPACE
+
+#endif // QQUICKWEBENGINDIALOGREQUESTS_H
diff --git a/src/webengine/api/qquickwebenginedownloaditem.cpp b/src/webengine/api/qquickwebenginedownloaditem.cpp
index 9f0c747f9..8bf319b85 100644
--- a/src/webengine/api/qquickwebenginedownloaditem.cpp
+++ b/src/webengine/api/qquickwebenginedownloaditem.cpp
@@ -66,6 +66,7 @@ QQuickWebEngineDownloadItemPrivate::QQuickWebEngineDownloadItemPrivate(QQuickWeb
, downloadId(-1)
, downloadState(QQuickWebEngineDownloadItem::DownloadCancelled)
, savePageFormat(QQuickWebEngineDownloadItem::UnknownSaveFormat)
+ , type(QQuickWebEngineDownloadItem::Attachment)
, totalBytes(-1)
, receivedBytes(0)
{
@@ -299,6 +300,32 @@ void QQuickWebEngineDownloadItem::setSavePageFormat(QQuickWebEngineDownloadItem:
}
}
+/*!
+ \qmlproperty enumeration WebEngineDownloadItem::type
+ \readonly
+ \since QtWebEngine 1.4
+
+ Describes the requested download's type.
+
+ \value WebEngineDownloadItem.Attachment The web server's response includes a
+ \c Content-Disposition header with the \c attachment directive. If \c Content-Disposition
+ is present in the reply, the web server is indicating that the client should prompt the
+ user to save the content regardless of the content type.
+ See \l {RFC 2616 section 19.5.1} for details.
+ \value WebEngineDownloadItem.DownloadAttribute The user clicked a link with the \c download
+ attribute. See \l {HTML download attribute} for details.
+ \value WebEngineDownloadItem.UserRequested The user initiated the download, for example by
+ selecting a web action.
+ \value WebEngineDownloadItem.SavePage Saving of the current page was requested (for example by
+ the \l{WebEngineView::WebAction}{WebEngineView.SavePage} web action).
+ */
+
+QQuickWebEngineDownloadItem::DownloadType QQuickWebEngineDownloadItem::type() const
+{
+ Q_D(const QQuickWebEngineDownloadItem);
+ return d->type;
+}
+
QQuickWebEngineDownloadItem::QQuickWebEngineDownloadItem(QQuickWebEngineDownloadItemPrivate *p, QObject *parent)
: QObject(parent)
, d_ptr(p)
diff --git a/src/webengine/api/qquickwebenginedownloaditem_p.h b/src/webengine/api/qquickwebenginedownloaditem_p.h
index 0b01fe6fc..61e019b9e 100644
--- a/src/webengine/api/qquickwebenginedownloaditem_p.h
+++ b/src/webengine/api/qquickwebenginedownloaditem_p.h
@@ -82,6 +82,14 @@ public:
};
Q_ENUM(SavePageFormat)
+ enum DownloadType {
+ Attachment = 0,
+ DownloadAttribute,
+ UserRequested,
+ SavePage
+ };
+ Q_ENUM(DownloadType)
+
Q_PROPERTY(quint32 id READ id CONSTANT FINAL)
Q_PROPERTY(DownloadState state READ state NOTIFY stateChanged)
Q_PROPERTY(SavePageFormat savePageFormat READ savePageFormat WRITE setSavePageFormat NOTIFY savePageFormatChanged REVISION 2 FINAL)
@@ -89,6 +97,7 @@ public:
Q_PROPERTY(qint64 receivedBytes READ receivedBytes NOTIFY receivedBytesChanged)
Q_PROPERTY(QString mimeType READ mimeType NOTIFY mimeTypeChanged REVISION 1)
Q_PROPERTY(QString path READ path WRITE setPath NOTIFY pathChanged)
+ Q_PROPERTY(DownloadType type READ type NOTIFY typeChanged REVISION 3 FINAL)
Q_INVOKABLE void accept();
Q_INVOKABLE void cancel();
@@ -102,6 +111,7 @@ public:
void setPath(QString path);
SavePageFormat savePageFormat() const;
void setSavePageFormat(SavePageFormat format);
+ DownloadType type() const;
Q_SIGNALS:
void stateChanged();
@@ -110,6 +120,7 @@ Q_SIGNALS:
void totalBytesChanged();
Q_REVISION(1) void mimeTypeChanged();
void pathChanged();
+ Q_REVISION(3) void typeChanged();
private:
QQuickWebEngineDownloadItem(QQuickWebEngineDownloadItemPrivate*, QObject *parent = 0);
diff --git a/src/webengine/api/qquickwebenginedownloaditem_p_p.h b/src/webengine/api/qquickwebenginedownloaditem_p_p.h
index bdae54ca4..1789af462 100644
--- a/src/webengine/api/qquickwebenginedownloaditem_p_p.h
+++ b/src/webengine/api/qquickwebenginedownloaditem_p_p.h
@@ -73,6 +73,7 @@ public:
quint32 downloadId;
QQuickWebEngineDownloadItem::DownloadState downloadState;
QQuickWebEngineDownloadItem::SavePageFormat savePageFormat;
+ QQuickWebEngineDownloadItem::DownloadType type;
qint64 totalBytes;
qint64 receivedBytes;
QString mimeType;
diff --git a/src/webengine/api/qquickwebengineprofile.cpp b/src/webengine/api/qquickwebengineprofile.cpp
index d660f639d..871428f33 100644
--- a/src/webengine/api/qquickwebengineprofile.cpp
+++ b/src/webengine/api/qquickwebengineprofile.cpp
@@ -85,6 +85,10 @@ ASSERT_ENUMS_MATCH(QQuickWebEngineDownloadItem::MimeHtmlSaveFormat, QtWebEngineC
QQuickWebEngineProfile class, which exposes further functionality in C++. This allows Qt Quick
applications to intercept URL requests (QQuickWebEngineProfile::setRequestInterceptor), or
register custom URL schemes (QQuickWebEngineProfile::installUrlSchemeHandler).
+
+ Spellchecking HTML form fields can be enabled per profile by setting the \l spellCheckEnabled
+ property and the current languages used for spellchecking can be set by using the
+ \l spellCheckLanguages property.
*/
/*!
@@ -180,6 +184,7 @@ void QQuickWebEngineProfilePrivate::downloadRequested(DownloadItemInfo &info)
itemPrivate->downloadPath = info.path;
itemPrivate->savePageFormat = static_cast<QQuickWebEngineDownloadItem::SavePageFormat>(
info.savePageFormat);
+ itemPrivate->type = static_cast<QQuickWebEngineDownloadItem::DownloadType>(info.downloadType);
QQuickWebEngineDownloadItem *download = new QQuickWebEngineDownloadItem(itemPrivate, q);
@@ -613,6 +618,105 @@ QQuickWebEngineProfile *QQuickWebEngineProfile::defaultProfile()
}
/*!
+ \property QQuickWebEngineProfile::spellCheckLanguages
+ \brief The languages used by the spell checker.
+
+ \since QtWebEngine 1.4
+*/
+
+/*!
+ \qmlproperty list<string> WebEngineProfile::spellCheckLanguages
+
+ This property holds the list of languages used by the spell checker.
+ Each language should match the name of the \c .bdic dictionary.
+ For example, the language \c en-US will load the \c en-US.bdic
+ dictionary file.
+
+ Qt WebEngine checks for the \c qtwebengine_dictionaries subdirectory
+ first in the local directory and if it is not found, in the Qt
+ installation directory.
+
+ On macOS, depending on how Qt WebEngine is configured at build time, there are two possibilities
+ how spellchecking data is found:
+
+ \list
+ \li Hunspell dictionaries (default) - .bdic dictionaries are used, just like on other
+ platforms
+ \li Native dictionaries - the macOS spellchecking APIs are used (which means the results
+ will depend on the installed OS dictionaries)
+ \endlist
+
+ Thus, in the macOS Hunspell case, Qt WebEngine will look in the \e qtwebengine_dictionaries
+ subdirectory located inside the application bundle \c Resources directory, and also in the
+ \c Resources directory located inside the Qt framework bundle.
+
+ To summarize, in case of Hunspell usage, the following paths are considered:
+
+ \list
+ \li QCoreApplication::applicationDirPath()/qtwebengine_dictionaries
+ or QCoreApplication::applicationDirPath()/../Contents/Resources/qtwebengine_dictionaries
+ (on macOS)
+ \li [QLibraryInfo::DataPath]/qtwebengine_dictionaries
+ or path/to/QtWebEngineCore.framework/Resources/qtwebengine_dictionaries (Qt framework
+ bundle on macOS)
+ \endlist
+
+ For more information about how to compile \c .bdic dictionaries, see the
+ \l{WebEngine Widgets Spellchecker Example}{Spellchecker Example}.
+
+ \since QtWebEngine 1.4
+*/
+void QQuickWebEngineProfile::setSpellCheckLanguages(const QStringList &languages)
+{
+ Q_D(QQuickWebEngineProfile);
+ if (languages != d->browserContext()->spellCheckLanguages()) {
+ d->browserContext()->setSpellCheckLanguages(languages);
+ emit spellCheckLanguagesChanged();
+ }
+}
+
+/*!
+ \since 5.8
+
+ Returns the list of languages used by the spell checker.
+*/
+QStringList QQuickWebEngineProfile::spellCheckLanguages() const
+{
+ const Q_D(QQuickWebEngineProfile);
+ return d->browserContext()->spellCheckLanguages();
+}
+
+/*!
+ \property QQuickWebEngineProfile::spellCheckEnabled
+ \brief whether the web engine spell checker is enabled.
+
+ \since QtWebEngine 1.4
+*/
+
+/*!
+ \qmlproperty bool WebEngineProfile::spellCheckEnabled
+
+ This property holds whether the web engine spell checker is enabled.
+
+ \since QtWebEngine 1.4
+*/
+void QQuickWebEngineProfile::setSpellCheckEnabled(bool enable)
+{
+ Q_D(QQuickWebEngineProfile);
+ if (enable != isSpellCheckEnabled()) {
+ d->browserContext()->setSpellCheckEnabled(enable);
+ emit spellCheckEnabledChanged();
+ }
+}
+
+bool QQuickWebEngineProfile::isSpellCheckEnabled() const
+{
+ const Q_D(QQuickWebEngineProfile);
+ return d->browserContext()->isSpellCheckEnabled();
+}
+
+/*!
+
Returns the cookie store for this profile.
*/
QWebEngineCookieStore *QQuickWebEngineProfile::cookieStore() const
diff --git a/src/webengine/api/qquickwebengineprofile.h b/src/webengine/api/qquickwebengineprofile.h
index dc5aa7df8..d0d925930 100644
--- a/src/webengine/api/qquickwebengineprofile.h
+++ b/src/webengine/api/qquickwebengineprofile.h
@@ -71,6 +71,8 @@ class Q_WEBENGINE_EXPORT QQuickWebEngineProfile : public QObject {
Q_PROPERTY(QString httpAcceptLanguage READ httpAcceptLanguage WRITE setHttpAcceptLanguage NOTIFY httpAcceptLanguageChanged FINAL REVISION 1)
Q_PROPERTY(PersistentCookiesPolicy persistentCookiesPolicy READ persistentCookiesPolicy WRITE setPersistentCookiesPolicy NOTIFY persistentCookiesPolicyChanged FINAL)
Q_PROPERTY(int httpCacheMaximumSize READ httpCacheMaximumSize WRITE setHttpCacheMaximumSize NOTIFY httpCacheMaximumSizeChanged FINAL)
+ Q_PROPERTY(QStringList spellCheckLanguages READ spellCheckLanguages WRITE setSpellCheckLanguages NOTIFY spellCheckLanguagesChanged FINAL REVISION 3)
+ Q_PROPERTY(bool spellCheckEnabled READ isSpellCheckEnabled WRITE setSpellCheckEnabled NOTIFY spellCheckEnabledChanged FINAL REVISION 3)
public:
QQuickWebEngineProfile(QObject *parent = Q_NULLPTR);
@@ -129,6 +131,11 @@ public:
Q_REVISION(2) Q_INVOKABLE void clearHttpCache();
+ void setSpellCheckLanguages(const QStringList &languages);
+ QStringList spellCheckLanguages() const;
+ void setSpellCheckEnabled(bool enabled);
+ bool isSpellCheckEnabled() const;
+
static QQuickWebEngineProfile *defaultProfile();
Q_SIGNALS:
@@ -141,6 +148,8 @@ Q_SIGNALS:
void persistentCookiesPolicyChanged();
void httpCacheMaximumSizeChanged();
Q_REVISION(1) void httpAcceptLanguageChanged();
+ Q_REVISION(3) void spellCheckLanguagesChanged();
+ Q_REVISION(3) void spellCheckEnabledChanged();
void downloadRequested(QQuickWebEngineDownloadItem *download);
void downloadFinished(QQuickWebEngineDownloadItem *download);
diff --git a/src/webengine/api/qquickwebenginescript.cpp b/src/webengine/api/qquickwebenginescript.cpp
index 7e08e2fd5..5d5173144 100644
--- a/src/webengine/api/qquickwebenginescript.cpp
+++ b/src/webengine/api/qquickwebenginescript.cpp
@@ -44,7 +44,7 @@
#include <QtCore/QDebug>
#include <QtCore/QFile>
#include <QtCore/QTimerEvent>
-#include "user_resource_controller_host.h"
+#include "renderer_host/user_resource_controller_host.h"
using QtWebEngineCore::UserScript;
@@ -65,7 +65,8 @@ using QtWebEngineCore::UserScript;
not accessible from a different one. The worldId property provides some predefined IDs for this
purpose.
- \note Chromium extensions, such as \c @include, \c @match, and \c @exclude, are not supported.
+ The following \l Greasemonkey attributes are supported since Qt 5.8:
+ \c @exclude, \c @include, \c @name, \c @match, and \c @run-at.
Use \l{WebEngineView::userScripts}{WebEngineView.userScripts} to access a list of scripts
attached to the web view.
diff --git a/src/webengine/api/qquickwebenginesettings.cpp b/src/webengine/api/qquickwebenginesettings.cpp
index b12e59576..09bf2708e 100644
--- a/src/webengine/api/qquickwebenginesettings.cpp
+++ b/src/webengine/api/qquickwebenginesettings.cpp
@@ -304,6 +304,49 @@ bool QQuickWebEngineSettings::touchIconsEnabled() const
}
/*!
+ \qmlproperty bool WebEngineSettings::focusOnNavigationEnabled
+ \since QtWebEngine 1.4
+
+ Focus is given to the view whenever a navigation operation occurs
+ (load, stop, reload, reload and bypass cache, forward, backward, set content, and so on).
+
+ Enabled by default. See \l{WebEngine Recipe Browser} for an example where
+ this property is disabled.
+*/
+bool QQuickWebEngineSettings::focusOnNavigationEnabled() const
+{
+ return d_ptr->testAttribute(WebEngineSettings::FocusOnNavigationEnabled);
+}
+
+/*!
+ \qmlproperty bool WebEngineSettings::printElementBackgrounds
+ \since QtWebEngine 1.4
+
+ Turns on printing of CSS backgrounds when printing a web page.
+
+ Enabled by default.
+*/
+bool QQuickWebEngineSettings::printElementBackgrounds() const
+{
+ return d_ptr->testAttribute(WebEngineSettings::PrintElementBackgrounds);
+}
+
+/*!
+ \qmlproperty bool WebEngineSettings::allowRunningInsecureContent
+ \since QtWebEngine 1.4
+
+ By default, HTTPS pages cannot run JavaScript, CSS, plugins or
+ web-sockets from HTTP URLs. This used to be possible and this
+ provides an override to get the old behavior.
+
+ Disabled by default.
+*/
+bool QQuickWebEngineSettings::allowRunningInsecureContent() const
+{
+ return d_ptr->testAttribute(WebEngineSettings::AllowRunningInsecureContent);
+}
+
+/*!
\qmlproperty string WebEngineSettings::defaultTextEncoding
\since QtWebEngine 1.2
@@ -464,6 +507,14 @@ void QQuickWebEngineSettings::setTouchIconsEnabled(bool on)
Q_EMIT touchIconsEnabledChanged();
}
+void QQuickWebEngineSettings::setPrintElementBackgrounds(bool on)
+{
+ bool wasOn = d_ptr->testAttribute(WebEngineSettings::PrintElementBackgrounds);
+ d_ptr->setAttribute(WebEngineSettings::PrintElementBackgrounds, on);
+ if (wasOn != on)
+ Q_EMIT printElementBackgroundsChanged();
+}
+
void QQuickWebEngineSettings::setDefaultTextEncoding(QString encoding)
{
const QString oldDefaultTextEncoding = d_ptr->defaultTextEncoding();
@@ -472,6 +523,23 @@ void QQuickWebEngineSettings::setDefaultTextEncoding(QString encoding)
Q_EMIT defaultTextEncodingChanged();
}
+void QQuickWebEngineSettings::setFocusOnNavigationEnabled(bool on)
+{
+ bool wasOn = d_ptr->testAttribute(WebEngineSettings::FocusOnNavigationEnabled);
+ d_ptr->setAttribute(WebEngineSettings::FocusOnNavigationEnabled, on);
+ if (wasOn != on)
+ Q_EMIT focusOnNavigationEnabledChanged();
+}
+
+
+void QQuickWebEngineSettings::setAllowRunningInsecureContent(bool on)
+{
+ bool wasOn = d_ptr->testAttribute(WebEngineSettings::AllowRunningInsecureContent);
+ d_ptr->setAttribute(WebEngineSettings::AllowRunningInsecureContent, on);
+ if (wasOn != on)
+ Q_EMIT allowRunningInsecureContentChanged();
+}
+
void QQuickWebEngineSettings::setParentSettings(QQuickWebEngineSettings *parentSettings)
{
d_ptr->setParentSettings(parentSettings->d_ptr.data());
diff --git a/src/webengine/api/qquickwebenginesettings_p.h b/src/webengine/api/qquickwebenginesettings_p.h
index 584027260..a53c7cdb3 100644
--- a/src/webengine/api/qquickwebenginesettings_p.h
+++ b/src/webengine/api/qquickwebenginesettings_p.h
@@ -82,6 +82,9 @@ class Q_WEBENGINE_PRIVATE_EXPORT QQuickWebEngineSettings : public QObject {
Q_PROPERTY(bool accelerated2dCanvasEnabled READ accelerated2dCanvasEnabled WRITE setAccelerated2dCanvasEnabled NOTIFY accelerated2dCanvasEnabledChanged REVISION 2)
Q_PROPERTY(bool autoLoadIconsForPage READ autoLoadIconsForPage WRITE setAutoLoadIconsForPage NOTIFY autoLoadIconsForPageChanged REVISION 2)
Q_PROPERTY(bool touchIconsEnabled READ touchIconsEnabled WRITE setTouchIconsEnabled NOTIFY touchIconsEnabledChanged REVISION 2)
+ Q_PROPERTY(bool focusOnNavigationEnabled READ focusOnNavigationEnabled WRITE setFocusOnNavigationEnabled NOTIFY focusOnNavigationEnabledChanged REVISION 3)
+ Q_PROPERTY(bool printElementBackgrounds READ printElementBackgrounds WRITE setPrintElementBackgrounds NOTIFY printElementBackgroundsChanged REVISION 3)
+ Q_PROPERTY(bool allowRunningInsecureContent READ allowRunningInsecureContent WRITE setAllowRunningInsecureContent NOTIFY allowRunningInsecureContentChanged REVISION 3)
public:
~QQuickWebEngineSettings();
@@ -105,6 +108,9 @@ public:
bool accelerated2dCanvasEnabled() const;
bool autoLoadIconsForPage() const;
bool touchIconsEnabled() const;
+ bool focusOnNavigationEnabled() const;
+ bool printElementBackgrounds() const;
+ bool allowRunningInsecureContent() const;
void setAutoLoadImages(bool on);
void setJavascriptEnabled(bool on);
@@ -125,6 +131,9 @@ public:
void setAccelerated2dCanvasEnabled(bool on);
void setAutoLoadIconsForPage(bool on);
void setTouchIconsEnabled(bool on);
+ void setFocusOnNavigationEnabled(bool on);
+ void setPrintElementBackgrounds(bool on);
+ void setAllowRunningInsecureContent(bool on);
signals:
void autoLoadImagesChanged();
@@ -146,6 +155,9 @@ signals:
Q_REVISION(2) void accelerated2dCanvasEnabledChanged();
Q_REVISION(2) void autoLoadIconsForPageChanged();
Q_REVISION(2) void touchIconsEnabledChanged();
+ Q_REVISION(3) void focusOnNavigationEnabledChanged();
+ Q_REVISION(3) void printElementBackgroundsChanged();
+ Q_REVISION(3) void allowRunningInsecureContentChanged();
private:
explicit QQuickWebEngineSettings(QQuickWebEngineSettings *parentSettings = 0);
diff --git a/src/webengine/api/qquickwebengineview.cpp b/src/webengine/api/qquickwebengineview.cpp
index 31a258b0c..6ca9954cf 100644
--- a/src/webengine/api/qquickwebengineview.cpp
+++ b/src/webengine/api/qquickwebengineview.cpp
@@ -47,6 +47,8 @@
#include "javascript_dialog_controller.h"
#include "qquickwebenginehistory_p.h"
#include "qquickwebenginecertificateerror_p.h"
+#include "qquickwebenginecontextmenurequest_p.h"
+#include "qquickwebenginedialogrequests_p.h"
#include "qquickwebenginefaviconprovider_p_p.h"
#include "qquickwebengineloadrequest_p.h"
#include "qquickwebenginenavigationrequest_p.h"
@@ -61,8 +63,8 @@
#include "render_widget_host_view_qt_delegate_quick.h"
#include "render_widget_host_view_qt_delegate_quickwindow.h"
+#include "renderer_host/user_resource_controller_host.h"
#include "ui_delegates_manager.h"
-#include "user_resource_controller_host.h"
#include "web_contents_adapter.h"
#include "web_engine_error.h"
#include "web_engine_settings.h"
@@ -125,8 +127,6 @@ static QAccessibleInterface *webAccessibleFactory(const QString &, QObject *obje
QQuickWebEngineViewPrivate::QQuickWebEngineViewPrivate()
: adapter(0)
- , e(new QQuickWebEngineViewExperimental(this))
- , v(new QQuickWebEngineViewport(this))
, m_history(new QQuickWebEngineHistory(this))
, m_profile(QQuickWebEngineProfile::defaultProfile())
, m_settings(new QQuickWebEngineSettings(m_profile->settings()))
@@ -145,27 +145,28 @@ QQuickWebEngineViewPrivate::QQuickWebEngineViewPrivate()
, m_dpiScale(1.0)
, m_backgroundColor(Qt::white)
, m_defaultZoomFactor(1.0)
- // QTBUG-53467
- , m_menuEnabled(true)
-{
- // The gold standard for mobile web content is 160 dpi, and the devicePixelRatio expected
- // is the (possibly quantized) ratio of device dpi to 160 dpi.
- // However GUI toolkits on non-iOS platforms may be using different criteria than relative
- // DPI (depending on the history of that platform), dictating the choice of
- // QScreen::devicePixelRatio().
- // Where applicable (i.e. non-iOS mobile platforms), override QScreen::devicePixelRatio
- // and instead use a reasonable default value for viewport.devicePixelRatio to avoid every
- // app having to use this experimental API.
+ , m_ui2Enabled(false)
+{
QString platform = qApp->platformName().toLower();
- if (platform == QLatin1String("qnx")) {
- qreal webPixelRatio = QGuiApplication::primaryScreen()->physicalDotsPerInch() / 160;
-
- // Quantize devicePixelRatio to increments of 1 to allow JS and media queries to select
- // 1x, 2x, 3x etc assets that fit an integral number of pixels.
- setDevicePixelRatio(qMax(1, qRound(webPixelRatio)));
- }
if (platform == QLatin1Literal("eglfs"))
- m_menuEnabled = false;
+ m_ui2Enabled = true;
+
+ const QByteArray dialogSet = qgetenv("QTWEBENGINE_DIALOG_SET");
+
+ if (!dialogSet.isEmpty()) {
+ if (dialogSet == QByteArrayLiteral("QtQuickControls2")) {
+ m_ui2Enabled = true;
+ } else if (dialogSet == QByteArrayLiteral("QtQuickControls1")
+ && m_ui2Enabled) {
+ m_ui2Enabled = false;
+ qWarning("QTWEBENGINE_DIALOG_SET=QtQuickControls1 forces use of Qt Quick Controls 1 "
+ "on an eglfs backend. This can crash your application!");
+ } else {
+ qWarning("Ignoring QTWEBENGINE_DIALOG_SET environment variable set to %s. Accepted "
+ "values are \"QtQuickControls1\" and \"QtQuickControls2\"", dialogSet.data());
+ }
+ }
+
#ifndef QT_NO_ACCESSIBILITY
QAccessible::installFactory(&webAccessibleFactory);
#endif // QT_NO_ACCESSIBILITY
@@ -175,21 +176,11 @@ QQuickWebEngineViewPrivate::~QQuickWebEngineViewPrivate()
{
}
-QQuickWebEngineViewExperimental *QQuickWebEngineViewPrivate::experimental() const
-{
- return e.data();
-}
-
-QQuickWebEngineViewport *QQuickWebEngineViewPrivate::viewport() const
-{
- return v.data();
-}
-
UIDelegatesManager *QQuickWebEngineViewPrivate::ui()
{
Q_Q(QQuickWebEngineView);
if (m_uIDelegatesManager.isNull())
- m_uIDelegatesManager.reset(new UIDelegatesManager(q));
+ m_uIDelegatesManager.reset(m_ui2Enabled ? new UI2DelegatesManager(q) : new UIDelegatesManager(q));
return m_uIDelegatesManager.data();
}
@@ -216,31 +207,41 @@ bool QQuickWebEngineViewPrivate::contextMenuRequested(const WebEngineContextMenu
{
Q_Q(QQuickWebEngineView);
- if (!m_menuEnabled) {
- qWarning("You are trying to open context menu on eglfs backend, which is not currently supported\n"
- "See QTBUG-53467.");
- return false;
- }
+ m_contextMenuData = data;
+
+ QQuickWebEngineContextMenuRequest *request = new QQuickWebEngineContextMenuRequest(data);
+ // mark the object for gc by creating temporary jsvalue
+ qmlEngine(q)->newQObject(request);
+ Q_EMIT q->contextMenuRequested(request);
+
+ if (request->isAccepted())
+ return true;
// Assign the WebEngineView as the parent of the menu, so mouse events are properly propagated
// on OSX.
- QObject *menu = ui()->addMenu(q, QString(), data.pos);
+ QObject *menu = ui()->addMenu(q, QString(), data.position());
if (!menu)
return false;
- contextMenuData.update(data);
- Q_EMIT q->experimental()->contextMenuDataChanged();
-
// Populate our menu
MenuItemHandler *item = 0;
-
- if (!data.linkText.isEmpty() && data.linkUrl.isValid()) {
+ if (data.isEditable() && !data.spellCheckerSuggestions().isEmpty()) {
+ const QPointer<QQuickWebEngineView> qRef(q);
+ for (int i=0; i < data.spellCheckerSuggestions().count() && i < 4; i++) {
+ item = new MenuItemHandler(menu);
+ QString replacement = data.spellCheckerSuggestions().at(i);
+ QObject::connect(item, &MenuItemHandler::triggered, [qRef, replacement] { qRef->replaceMisspelledWord(replacement); });
+ ui()->addMenuItem(item, replacement);
+ }
+ ui()->addMenuSeparator(menu);
+ }
+ if (!data.linkText().isEmpty() && data.linkUrl().isValid()) {
item = new MenuItemHandler(menu);
QObject::connect(item, &MenuItemHandler::triggered, [q] { q->triggerWebAction(QQuickWebEngineView::OpenLinkInThisWindow); });
ui()->addMenuItem(item, QQuickWebEngineView::tr("Follow Link"));
}
- if (data.selectedText.isEmpty()) {
+ if (data.selectedText().isEmpty()) {
item = new MenuItemHandler(menu);
QObject::connect(item, &MenuItemHandler::triggered, q, &QQuickWebEngineView::goBack);
ui()->addMenuItem(item, QQuickWebEngineView::tr("Back"), QStringLiteral("go-previous"), q->canGoBack());
@@ -252,6 +253,10 @@ bool QQuickWebEngineViewPrivate::contextMenuRequested(const WebEngineContextMenu
item = new MenuItemHandler(menu);
QObject::connect(item, &MenuItemHandler::triggered, q, &QQuickWebEngineView::reload);
ui()->addMenuItem(item, QQuickWebEngineView::tr("Reload"), QStringLiteral("view-refresh"));
+
+ item = new MenuItemHandler(menu);
+ QObject::connect(item, &MenuItemHandler::triggered, [q] { q->triggerWebAction(QQuickWebEngineView::ViewSource); });
+ ui()->addMenuItem(item, QQuickWebEngineView::tr("View Page Source"), QStringLiteral("view-source"), adapter->canViewSource());
} else {
item = new MenuItemHandler(menu);
QObject::connect(item, &MenuItemHandler::triggered, [q] { q->triggerWebAction(QQuickWebEngineView::Copy); });
@@ -261,7 +266,7 @@ bool QQuickWebEngineViewPrivate::contextMenuRequested(const WebEngineContextMenu
ui()->addMenuItem(item, QQuickWebEngineView::tr("Unselect"));
}
- if (!contextMenuData.linkText().isEmpty() && contextMenuData.linkUrl().isValid()) {
+ if (!data.linkText().isEmpty() && data.linkUrl().isValid()) {
item = new MenuItemHandler(menu);
QObject::connect(item, &MenuItemHandler::triggered, [q] { q->triggerWebAction(QQuickWebEngineView::CopyLinkToClipboard); });
ui()->addMenuItem(item, QQuickWebEngineView::tr("Copy Link URL"));
@@ -269,9 +274,9 @@ bool QQuickWebEngineViewPrivate::contextMenuRequested(const WebEngineContextMenu
QObject::connect(item, &MenuItemHandler::triggered, [q] { q->triggerWebAction(QQuickWebEngineView::DownloadLinkToDisk); });
ui()->addMenuItem(item, QQuickWebEngineView::tr("Save Link"));
}
- if (contextMenuData.mediaUrl().isValid()) {
- switch (contextMenuData.mediaType()) {
- case QQuickWebEngineContextMenuData::MediaTypeImage:
+ if (data.mediaUrl().isValid()) {
+ switch (data.mediaType()) {
+ case WebEngineContextMenuData::MediaTypeImage:
item = new MenuItemHandler(menu);
QObject::connect(item, &MenuItemHandler::triggered, [q] { q->triggerWebAction(QQuickWebEngineView::CopyImageUrlToClipboard); });
ui()->addMenuItem(item, QQuickWebEngineView::tr("Copy Image URL"));
@@ -282,11 +287,11 @@ bool QQuickWebEngineViewPrivate::contextMenuRequested(const WebEngineContextMenu
QObject::connect(item, &MenuItemHandler::triggered, [q] { q->triggerWebAction(QQuickWebEngineView::DownloadImageToDisk); });
ui()->addMenuItem(item, QQuickWebEngineView::tr("Save Image"));
break;
- case QQuickWebEngineContextMenuData::MediaTypeCanvas:
+ case WebEngineContextMenuData::MediaTypeCanvas:
Q_UNREACHABLE(); // mediaUrl is invalid for canvases
break;
- case QQuickWebEngineContextMenuData::MediaTypeAudio:
- case QQuickWebEngineContextMenuData::MediaTypeVideo:
+ case WebEngineContextMenuData::MediaTypeAudio:
+ case WebEngineContextMenuData::MediaTypeVideo:
item = new MenuItemHandler(menu);
QObject::connect(item, &MenuItemHandler::triggered, [q] { q->triggerWebAction(QQuickWebEngineView::CopyMediaUrlToClipboard); });
ui()->addMenuItem(item, QQuickWebEngineView::tr("Copy Media URL"));
@@ -299,12 +304,12 @@ bool QQuickWebEngineViewPrivate::contextMenuRequested(const WebEngineContextMenu
item = new MenuItemHandler(menu);
QObject::connect(item, &MenuItemHandler::triggered, [q] { q->triggerWebAction(QQuickWebEngineView::ToggleMediaLoop); });
ui()->addMenuItem(item, QQuickWebEngineView::tr("Toggle Looping"));
- if (data.mediaFlags & WebEngineContextMenuData::MediaHasAudio) {
+ if (data.mediaFlags() & WebEngineContextMenuData::MediaHasAudio) {
item = new MenuItemHandler(menu);
QObject::connect(item, &MenuItemHandler::triggered, [q] { q->triggerWebAction(QQuickWebEngineView::ToggleMediaMute); });
ui()->addMenuItem(item, QQuickWebEngineView::tr("Toggle Mute"));
}
- if (data.mediaFlags & WebEngineContextMenuData::MediaCanToggleControls) {
+ if (data.mediaFlags() & WebEngineContextMenuData::MediaCanToggleControls) {
item = new MenuItemHandler(menu);
QObject::connect(item, &MenuItemHandler::triggered, [q] { q->triggerWebAction(QQuickWebEngineView::ToggleMediaControls); });
ui()->addMenuItem(item, QQuickWebEngineView::tr("Toggle Media Controls"));
@@ -313,7 +318,7 @@ bool QQuickWebEngineViewPrivate::contextMenuRequested(const WebEngineContextMenu
default:
break;
}
- } else if (contextMenuData.mediaType() == QQuickWebEngineContextMenuData::MediaTypeCanvas) {
+ } else if (data.mediaType() == WebEngineContextMenuData::MediaTypeCanvas) {
item = new MenuItemHandler(menu);
QObject::connect(item, &MenuItemHandler::triggered, [q] { q->triggerWebAction(QQuickWebEngineView::CopyImageToClipboard); });
ui()->addMenuItem(item, QQuickWebEngineView::tr("Copy Image"));
@@ -341,7 +346,7 @@ bool QQuickWebEngineViewPrivate::contextMenuRequested(const WebEngineContextMenu
}
// Now fire the popup() method on the top level menu
- QMetaObject::invokeMethod(menu, "popup");
+ ui()->showMenu(menu);
return true;
}
@@ -356,7 +361,13 @@ void QQuickWebEngineViewPrivate::navigationRequested(int navigationType, const Q
void QQuickWebEngineViewPrivate::javascriptDialog(QSharedPointer<JavaScriptDialogController> dialog)
{
- ui()->showDialog(dialog);
+ Q_Q(QQuickWebEngineView);
+ QQuickWebEngineJavaScriptDialogRequest *request = new QQuickWebEngineJavaScriptDialogRequest(dialog);
+ // mark the object for gc by creating temporary jsvalue
+ qmlEngine(q)->newQObject(request);
+ Q_EMIT q->javaScriptDialogRequested(request);
+ if (!request->isAccepted())
+ ui()->showDialog(dialog);
}
void QQuickWebEngineViewPrivate::allowCertificateError(const QSharedPointer<CertificateErrorController> &errorController)
@@ -381,12 +392,24 @@ void QQuickWebEngineViewPrivate::runGeolocationPermissionRequest(const QUrl &url
void QQuickWebEngineViewPrivate::showColorDialog(QSharedPointer<ColorChooserController> controller)
{
- ui()->showColorDialog(controller);
+ Q_Q(QQuickWebEngineView);
+ QQuickWebEngineColorDialogRequest *request = new QQuickWebEngineColorDialogRequest(controller);
+ // mark the object for gc by creating temporary jsvalue
+ qmlEngine(q)->newQObject(request);
+ Q_EMIT q->colorDialogRequested(request);
+ if (!request->isAccepted())
+ ui()->showColorDialog(controller);
}
-void QQuickWebEngineViewPrivate::runFileChooser(FilePickerController* controller)
+void QQuickWebEngineViewPrivate::runFileChooser(QSharedPointer<FilePickerController> controller)
{
- ui()->showFilePicker(controller);
+ Q_Q(QQuickWebEngineView);
+ QQuickWebEngineFileDialogRequest *request = new QQuickWebEngineFileDialogRequest(controller);
+ // mark the object for gc by creating temporary jsvalue
+ qmlEngine(q)->newQObject(request);
+ Q_EMIT q->fileDialogRequested(request);
+ if (!request->isAccepted())
+ ui()->showFilePicker(controller);
}
void QQuickWebEngineViewPrivate::passOnFocus(bool reverse)
@@ -654,7 +677,13 @@ void QQuickWebEngineViewPrivate::javaScriptConsoleMessage(JavaScriptConsoleMessa
void QQuickWebEngineViewPrivate::authenticationRequired(QSharedPointer<AuthenticationDialogController> controller)
{
- ui()->showDialog(controller);
+ Q_Q(QQuickWebEngineView);
+ QQuickWebEngineAuthenticationDialogRequest *request = new QQuickWebEngineAuthenticationDialogRequest(controller);
+ // mark the object for gc by creating temporary jsvalue
+ qmlEngine(q)->newQObject(request);
+ Q_EMIT q->authenticationDialogRequested(request);
+ if (!request->isAccepted())
+ ui()->showDialog(controller);
}
void QQuickWebEngineViewPrivate::runMediaAccessPermissionRequest(const QUrl &securityOrigin, WebContentsAdapterClient::MediaRequestFlags requestFlags)
@@ -836,7 +865,7 @@ QQuickWebEngineView::QQuickWebEngineView(QQuickItem *parent)
, d_ptr(new QQuickWebEngineViewPrivate)
{
Q_D(QQuickWebEngineView);
- d->e->q_ptr = d->q_ptr = this;
+ d->q_ptr = this;
this->setActiveFocusOnTab(true);
this->setFlags(QQuickItem::ItemIsFocusScope | QQuickItem::ItemAcceptsInputMethod
| QQuickItem::ItemAcceptsDrops);
@@ -1078,18 +1107,40 @@ void QQuickWebEngineViewPrivate::showValidationMessage(const QRect &anchor, cons
if (m_testSupport)
Q_EMIT m_testSupport->validationMessageShown(mainText, subText);
#endif
-
- ui()->showMessageBubble(anchor, mainText, subText);
+ Q_Q(QQuickWebEngineView);
+ QQuickWebEngineFormValidationMessageRequest *request;
+ request = new QQuickWebEngineFormValidationMessageRequest(QQuickWebEngineFormValidationMessageRequest::Show,
+ anchor,mainText,subText);
+ // mark the object for gc by creating temporary jsvalue
+ qmlEngine(q)->newQObject(request);
+ Q_EMIT q->formValidationMessageRequested(request);
+ if (!request->isAccepted())
+ ui()->showMessageBubble(anchor, mainText, subText);
}
void QQuickWebEngineViewPrivate::hideValidationMessage()
{
- ui()->hideMessageBubble();
+ Q_Q(QQuickWebEngineView);
+ QQuickWebEngineFormValidationMessageRequest *request;
+ request = new QQuickWebEngineFormValidationMessageRequest(QQuickWebEngineFormValidationMessageRequest::Hide);
+ // mark the object for gc by creating temporary jsvalue
+ qmlEngine(q)->newQObject(request);
+ Q_EMIT q->formValidationMessageRequested(request);
+ if (!request->isAccepted())
+ ui()->hideMessageBubble();
}
void QQuickWebEngineViewPrivate::moveValidationMessage(const QRect &anchor)
{
- ui()->moveMessageBubble(anchor);
+ Q_Q(QQuickWebEngineView);
+ QQuickWebEngineFormValidationMessageRequest *request;
+ request = new QQuickWebEngineFormValidationMessageRequest(QQuickWebEngineFormValidationMessageRequest::Move,
+ anchor);
+ // mark the object for gc by creating temporary jsvalue
+ qmlEngine(q)->newQObject(request);
+ Q_EMIT q->formValidationMessageRequested(request);
+ if (!request->isAccepted())
+ ui()->moveMessageBubble(anchor);
}
void QQuickWebEngineViewPrivate::updateScrollPosition(const QPointF &position)
@@ -1125,6 +1176,11 @@ bool QQuickWebEngineViewPrivate::isEnabled() const
return q->isEnabled();
}
+void QQuickWebEngineViewPrivate::setToolTip(const QString &toolTipText)
+{
+ ui()->showToolTip(toolTipText);
+}
+
bool QQuickWebEngineView::isLoading() const
{
Q_D(const QQuickWebEngineView);
@@ -1184,12 +1240,6 @@ void QQuickWebEngineView::runJavaScript(const QString &script, quint32 worldId,
d->adapter->runJavaScript(script, worldId);
}
-QQuickWebEngineViewExperimental *QQuickWebEngineView::experimental() const
-{
- Q_D(const QQuickWebEngineView);
- return d->e.data();
-}
-
qreal QQuickWebEngineView::zoomFactor() const
{
Q_D(const QQuickWebEngineView);
@@ -1274,23 +1324,16 @@ void QQuickWebEngineView::printToPdf(const QJSValue &callback, PrintedPageSizeId
d->m_callbacks.insert(requestId, callback);
}
-bool QQuickWebEngineView::isFullScreen() const
-{
- Q_D(const QQuickWebEngineView);
- return d->m_fullscreenMode;
-}
-
-void QQuickWebEngineViewExperimental::setExtraContextMenuEntriesComponent(QQmlComponent *contextMenuExtras)
+void QQuickWebEngineView::replaceMisspelledWord(const QString &replacement)
{
- if (d_ptr->contextMenuExtraItems == contextMenuExtras)
- return;
- d_ptr->contextMenuExtraItems = contextMenuExtras;
- emit extraContextMenuEntriesComponentChanged();
+ Q_D(QQuickWebEngineView);
+ d->adapter->replaceMisspelling(replacement);
}
-QQmlComponent *QQuickWebEngineViewExperimental::extraContextMenuEntriesComponent() const
+bool QQuickWebEngineView::isFullScreen() const
{
- return d_ptr->contextMenuExtraItems;
+ Q_D(const QQuickWebEngineView);
+ return d->m_fullscreenMode;
}
void QQuickWebEngineView::findText(const QString &subString, FindFlags options, const QJSValue &callback)
@@ -1514,118 +1557,118 @@ void QQuickWebEngineView::triggerWebAction(WebAction action)
d->adapter->unselect();
break;
case OpenLinkInThisWindow:
- if (d->contextMenuData.linkUrl().isValid())
- setUrl(d->contextMenuData.linkUrl());
+ if (d->m_contextMenuData.linkUrl().isValid())
+ setUrl(d->m_contextMenuData.linkUrl());
break;
case OpenLinkInNewWindow:
- if (d->contextMenuData.linkUrl().isValid()) {
+ if (d->m_contextMenuData.linkUrl().isValid()) {
QQuickWebEngineNewViewRequest request;
- request.m_requestedUrl = d->contextMenuData.linkUrl();
+ request.m_requestedUrl = d->m_contextMenuData.linkUrl();
request.m_isUserInitiated = true;
request.m_destination = NewViewInWindow;
Q_EMIT newViewRequested(&request);
}
break;
case OpenLinkInNewTab:
- if (d->contextMenuData.linkUrl().isValid()) {
+ if (d->m_contextMenuData.linkUrl().isValid()) {
QQuickWebEngineNewViewRequest request;
- request.m_requestedUrl = d->contextMenuData.linkUrl();
+ request.m_requestedUrl = d->m_contextMenuData.linkUrl();
request.m_isUserInitiated = true;
request.m_destination = NewViewInBackgroundTab;
Q_EMIT newViewRequested(&request);
}
break;
case CopyLinkToClipboard:
- if (d->contextMenuData.linkUrl().isValid()) {
- QString urlString = d->contextMenuData.linkUrl().toString(QUrl::FullyEncoded);
- QString title = d->contextMenuData.linkText().toHtmlEscaped();
+ if (d->m_contextMenuData.linkUrl().isValid()) {
+ QString urlString = d->m_contextMenuData.linkUrl().toString(QUrl::FullyEncoded);
+ QString title = d->m_contextMenuData.linkText().toHtmlEscaped();
QMimeData *data = new QMimeData();
data->setText(urlString);
QString html = QStringLiteral("<a href=\"") + urlString + QStringLiteral("\">") + title + QStringLiteral("</a>");
data->setHtml(html);
- data->setUrls(QList<QUrl>() << d->contextMenuData.linkUrl());
+ data->setUrls(QList<QUrl>() << d->m_contextMenuData.linkUrl());
qApp->clipboard()->setMimeData(data);
}
break;
case DownloadLinkToDisk:
- if (d->contextMenuData.linkUrl().isValid())
- d->adapter->download(d->contextMenuData.linkUrl(), d->contextMenuData.d->suggestedFileName);
+ if (d->m_contextMenuData.linkUrl().isValid())
+ d->adapter->download(d->m_contextMenuData.linkUrl(), d->m_contextMenuData.suggestedFileName());
break;
case CopyImageToClipboard:
- if (d->contextMenuData.d->hasImageContent &&
- (d->contextMenuData.mediaType() == QQuickWebEngineContextMenuData::MediaTypeImage ||
- d->contextMenuData.mediaType() == QQuickWebEngineContextMenuData::MediaTypeCanvas))
+ if (d->m_contextMenuData.hasImageContent() &&
+ (d->m_contextMenuData.mediaType() == WebEngineContextMenuData::MediaTypeImage ||
+ d->m_contextMenuData.mediaType() == WebEngineContextMenuData::MediaTypeCanvas))
{
- d->adapter->copyImageAt(d->contextMenuData.position());
+ d->adapter->copyImageAt(d->m_contextMenuData.position());
}
break;
case CopyImageUrlToClipboard:
- if (d->contextMenuData.mediaUrl().isValid() && d->contextMenuData.mediaType() == QQuickWebEngineContextMenuData::MediaTypeImage) {
- QString urlString = d->contextMenuData.mediaUrl().toString(QUrl::FullyEncoded);
- QString title = d->contextMenuData.linkText();
+ if (d->m_contextMenuData.mediaUrl().isValid() && d->m_contextMenuData.mediaType() == WebEngineContextMenuData::MediaTypeImage) {
+ QString urlString = d->m_contextMenuData.mediaUrl().toString(QUrl::FullyEncoded);
+ QString title = d->m_contextMenuData.linkText();
if (!title.isEmpty())
title = QStringLiteral(" alt=\"%1\"").arg(title.toHtmlEscaped());
QMimeData *data = new QMimeData();
data->setText(urlString);
QString html = QStringLiteral("<img src=\"") + urlString + QStringLiteral("\"") + title + QStringLiteral("></img>");
data->setHtml(html);
- data->setUrls(QList<QUrl>() << d->contextMenuData.mediaUrl());
+ data->setUrls(QList<QUrl>() << d->m_contextMenuData.mediaUrl());
qApp->clipboard()->setMimeData(data);
}
break;
case DownloadImageToDisk:
case DownloadMediaToDisk:
- if (d->contextMenuData.mediaUrl().isValid())
- d->adapter->download(d->contextMenuData.mediaUrl(), d->contextMenuData.d->suggestedFileName);
+ if (d->m_contextMenuData.mediaUrl().isValid())
+ d->adapter->download(d->m_contextMenuData.mediaUrl(), d->m_contextMenuData.suggestedFileName());
break;
case CopyMediaUrlToClipboard:
- if (d->contextMenuData.mediaUrl().isValid() &&
- (d->contextMenuData.mediaType() == QQuickWebEngineContextMenuData::MediaTypeAudio ||
- d->contextMenuData.mediaType() == QQuickWebEngineContextMenuData::MediaTypeVideo))
+ if (d->m_contextMenuData.mediaUrl().isValid() &&
+ (d->m_contextMenuData.mediaType() == WebEngineContextMenuData::MediaTypeAudio ||
+ d->m_contextMenuData.mediaType() == WebEngineContextMenuData::MediaTypeVideo))
{
- QString urlString = d->contextMenuData.mediaUrl().toString(QUrl::FullyEncoded);
+ QString urlString = d->m_contextMenuData.mediaUrl().toString(QUrl::FullyEncoded);
QMimeData *data = new QMimeData();
data->setText(urlString);
- if (d->contextMenuData.mediaType() == QQuickWebEngineContextMenuData::MediaTypeAudio)
+ if (d->m_contextMenuData.mediaType() == WebEngineContextMenuData::MediaTypeAudio)
data->setHtml(QStringLiteral("<audio src=\"") + urlString + QStringLiteral("\"></audio>"));
else
data->setHtml(QStringLiteral("<video src=\"") + urlString + QStringLiteral("\"></video>"));
- data->setUrls(QList<QUrl>() << d->contextMenuData.mediaUrl());
+ data->setUrls(QList<QUrl>() << d->m_contextMenuData.mediaUrl());
qApp->clipboard()->setMimeData(data);
}
break;
case ToggleMediaControls:
- if (d->contextMenuData.mediaUrl().isValid() && d->contextMenuData.d->mediaFlags & WebEngineContextMenuData::MediaCanToggleControls) {
- bool enable = !(d->contextMenuData.d->mediaFlags & WebEngineContextMenuData::MediaControls);
- d->adapter->executeMediaPlayerActionAt(d->contextMenuData.position(), WebContentsAdapter::MediaPlayerControls, enable);
+ if (d->m_contextMenuData.mediaUrl().isValid() && d->m_contextMenuData.mediaFlags() & WebEngineContextMenuData::MediaCanToggleControls) {
+ bool enable = !(d->m_contextMenuData.mediaFlags() & WebEngineContextMenuData::MediaControls);
+ d->adapter->executeMediaPlayerActionAt(d->m_contextMenuData.position(), WebContentsAdapter::MediaPlayerControls, enable);
}
break;
case ToggleMediaLoop:
- if (d->contextMenuData.mediaUrl().isValid() &&
- (d->contextMenuData.mediaType() == QQuickWebEngineContextMenuData::MediaTypeAudio ||
- d->contextMenuData.mediaType() == QQuickWebEngineContextMenuData::MediaTypeVideo))
+ if (d->m_contextMenuData.mediaUrl().isValid() &&
+ (d->m_contextMenuData.mediaType() == WebEngineContextMenuData::MediaTypeAudio ||
+ d->m_contextMenuData.mediaType() == WebEngineContextMenuData::MediaTypeVideo))
{
- bool enable = !(d->contextMenuData.d->mediaFlags & WebEngineContextMenuData::MediaLoop);
- d->adapter->executeMediaPlayerActionAt(d->contextMenuData.position(), WebContentsAdapter::MediaPlayerLoop, enable);
+ bool enable = !(d->m_contextMenuData.mediaFlags() & WebEngineContextMenuData::MediaLoop);
+ d->adapter->executeMediaPlayerActionAt(d->m_contextMenuData.position(), WebContentsAdapter::MediaPlayerLoop, enable);
}
break;
case ToggleMediaPlayPause:
- if (d->contextMenuData.mediaUrl().isValid() &&
- (d->contextMenuData.mediaType() == QQuickWebEngineContextMenuData::MediaTypeAudio ||
- d->contextMenuData.mediaType() == QQuickWebEngineContextMenuData::MediaTypeVideo))
+ if (d->m_contextMenuData.mediaUrl().isValid() &&
+ (d->m_contextMenuData.mediaType() == WebEngineContextMenuData::MediaTypeAudio ||
+ d->m_contextMenuData.mediaType() == WebEngineContextMenuData::MediaTypeVideo))
{
- bool enable = (d->contextMenuData.d->mediaFlags & WebEngineContextMenuData::MediaPaused);
- d->adapter->executeMediaPlayerActionAt(d->contextMenuData.position(), WebContentsAdapter::MediaPlayerPlay, enable);
+ bool enable = (d->m_contextMenuData.mediaFlags() & WebEngineContextMenuData::MediaPaused);
+ d->adapter->executeMediaPlayerActionAt(d->m_contextMenuData.position(), WebContentsAdapter::MediaPlayerPlay, enable);
}
break;
case ToggleMediaMute:
- if (d->contextMenuData.mediaUrl().isValid() && d->contextMenuData.d->mediaFlags & WebEngineContextMenuData::MediaHasAudio) {
- bool enable = !(d->contextMenuData.d->mediaFlags & WebEngineContextMenuData::MediaMuted);
- d->adapter->executeMediaPlayerActionAt(d->contextMenuData.position(), WebContentsAdapter::MediaPlayerMute, enable);
+ if (d->m_contextMenuData.mediaUrl().isValid() && d->m_contextMenuData.mediaFlags() & WebEngineContextMenuData::MediaHasAudio) {
+ bool enable = !(d->m_contextMenuData.mediaFlags() & WebEngineContextMenuData::MediaMuted);
+ d->adapter->executeMediaPlayerActionAt(d->m_contextMenuData.position(), WebContentsAdapter::MediaPlayerMute, enable);
}
break;
case InspectElement:
- d->adapter->inspectElementAt(d->contextMenuData.position());
+ d->adapter->inspectElementAt(d->m_contextMenuData.position());
break;
case ExitFullScreen:
d->adapter->exitFullScreen();
@@ -1636,17 +1679,14 @@ void QQuickWebEngineView::triggerWebAction(WebAction action)
case SavePage:
d->adapter->save();
break;
+ case ViewSource:
+ d->adapter->viewSource();
+ break;
default:
Q_UNREACHABLE();
}
}
-const QQuickWebEngineContextMenuData *QQuickWebEngineViewExperimental::contextMenuData() const
-{
- Q_D(const QQuickWebEngineView);
- return &d->contextMenuData;
-}
-
QSizeF QQuickWebEngineView::contentsSize() const
{
Q_D(const QQuickWebEngineView);
@@ -1731,42 +1771,5 @@ void QQuickWebEngineFullScreenRequest::reject()
m_viewPrivate->setFullScreenMode(!m_toggleOn);
}
-QQuickWebEngineViewExperimental::QQuickWebEngineViewExperimental(QQuickWebEngineViewPrivate *viewPrivate)
- : q_ptr(0)
- , d_ptr(viewPrivate)
-{
-}
-
-QQuickWebEngineViewport *QQuickWebEngineViewExperimental::viewport() const
-{
- Q_D(const QQuickWebEngineView);
- return d->viewport();
-}
-
-QQuickWebEngineViewport::QQuickWebEngineViewport(QQuickWebEngineViewPrivate *viewPrivate)
- : d_ptr(viewPrivate)
-{
-}
-
-qreal QQuickWebEngineViewport::devicePixelRatio() const
-{
- Q_D(const QQuickWebEngineView);
- return d->devicePixelRatio;
-}
-
-void QQuickWebEngineViewport::setDevicePixelRatio(qreal devicePixelRatio)
-{
- Q_D(QQuickWebEngineView);
- // Valid range is [1, inf)
- devicePixelRatio = qMax(qreal(1.0), devicePixelRatio);
- if (d->devicePixelRatio == devicePixelRatio)
- return;
- d->setDevicePixelRatio(devicePixelRatio);
- if (!d->adapter)
- return;
- d->adapter->dpiScaleChanged();
- Q_EMIT devicePixelRatioChanged();
-}
-
QT_END_NAMESPACE
diff --git a/src/webengine/api/qquickwebengineview_p.h b/src/webengine/api/qquickwebengineview_p.h
index b9555d2d9..16c4799b5 100644
--- a/src/webengine/api/qquickwebengineview_p.h
+++ b/src/webengine/api/qquickwebengineview_p.h
@@ -59,16 +59,20 @@
QT_BEGIN_NAMESPACE
class QQmlWebChannel;
+class QQuickWebEngineAuthenticationDialogRequest;
class QQuickWebEngineCertificateError;
-class QQuickWebEngineContextMenuData;
+class QQuickWebEngineColorDialogRequest;
+class QQuickWebEngineContextMenuRequest;
class QQuickWebEngineFaviconProvider;
+class QQuickWebEngineFileDialogRequest;
class QQuickWebEngineHistory;
+class QQuickWebEngineJavaScriptDialogRequest;
class QQuickWebEngineLoadRequest;
class QQuickWebEngineNavigationRequest;
class QQuickWebEngineNewViewRequest;
class QQuickWebEngineProfile;
class QQuickWebEngineSettings;
-class QQuickWebEngineViewExperimental;
+class QQuickWebEngineFormValidationMessageRequest;
class QQuickWebEngineViewPrivate;
#ifdef ENABLE_QML_TESTSUPPORT_API
@@ -94,7 +98,7 @@ private:
const bool m_toggleOn;
};
-#define LATEST_WEBENGINEVIEW_REVISION 3
+#define LATEST_WEBENGINEVIEW_REVISION 4
class Q_WEBENGINE_PRIVATE_EXPORT QQuickWebEngineView : public QQuickItem {
Q_OBJECT
@@ -146,13 +150,11 @@ public:
QSizeF contentsSize() const;
QPointF scrollPosition() const;
- QQuickWebEngineViewExperimental *experimental() const;
-
// must match WebContentsAdapterClient::NavigationRequestAction
enum NavigationRequestAction {
AcceptRequest,
// Make room in the valid range of the enum so
- // we can expose extra actions in experimental.
+ // we can expose extra actions.
IgnoreRequest = 0xFF
};
Q_ENUM(NavigationRequestAction)
@@ -243,6 +245,7 @@ public:
RequestClose,
Unselect,
SavePage,
+ ViewSource,
WebActionCount
};
Q_ENUM(WebAction)
@@ -472,6 +475,8 @@ public Q_SLOTS:
Q_REVISION(2) void triggerWebAction(WebAction action);
Q_REVISION(3) void printToPdf(const QString &filePath, PrintedPageSizeId pageSizeId = PrintedPageSizeId::A4, PrintedPageOrientation orientation = PrintedPageOrientation::Portrait);
Q_REVISION(3) void printToPdf(const QJSValue &callback, PrintedPageSizeId pageSizeId = PrintedPageSizeId::A4, PrintedPageOrientation orientation = PrintedPageOrientation::Portrait);
+ Q_REVISION(4) void replaceMisspelledWord(const QString &replacement);
+
private Q_SLOTS:
void lazyInitialize();
@@ -501,6 +506,12 @@ Q_SIGNALS:
Q_REVISION(3) void audioMutedChanged(bool muted);
Q_REVISION(3) void recentlyAudibleChanged(bool recentlyAudible);
Q_REVISION(3) void webChannelWorldChanged(uint);
+ Q_REVISION(4) void contextMenuRequested(QQuickWebEngineContextMenuRequest *request);
+ Q_REVISION(4) void authenticationDialogRequested(QQuickWebEngineAuthenticationDialogRequest *request);
+ Q_REVISION(4) void javaScriptDialogRequested(QQuickWebEngineJavaScriptDialogRequest *request);
+ Q_REVISION(4) void colorDialogRequested(QQuickWebEngineColorDialogRequest *request);
+ Q_REVISION(4) void fileDialogRequested(QQuickWebEngineFileDialogRequest *request);
+ Q_REVISION(4) void formValidationMessageRequested(QQuickWebEngineFormValidationMessageRequest *request);
protected:
void geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry) Q_DECL_OVERRIDE;
@@ -514,8 +525,6 @@ private:
Q_DECLARE_PRIVATE(QQuickWebEngineView)
QScopedPointer<QQuickWebEngineViewPrivate> d_ptr;
- friend class QQuickWebEngineViewExperimental;
- friend class QQuickWebEngineViewExperimentalExtension;
friend class QQuickWebEngineNewViewRequest;
friend class QQuickWebEngineFaviconProvider;
#ifndef QT_NO_ACCESSIBILITY
diff --git a/src/webengine/api/qquickwebengineview_p_p.h b/src/webengine/api/qquickwebengineview_p_p.h
index 769e41a44..b111e92cd 100644
--- a/src/webengine/api/qquickwebengineview_p_p.h
+++ b/src/webengine/api/qquickwebengineview_p_p.h
@@ -52,7 +52,6 @@
//
#include "qquickwebengineview_p.h"
-#include "qquickwebenginecontextmenudata_p.h"
#include "web_contents_adapter_client.h"
#include <QScopedPointer>
@@ -70,6 +69,7 @@ QT_BEGIN_NAMESPACE
class QQuickWebEngineView;
class QQmlComponent;
class QQmlContext;
+class QQuickWebEngineContextMenuRequest;
class QQuickWebEngineSettings;
class QQuickWebEngineFaviconProvider;
@@ -79,49 +79,6 @@ QQuickWebEngineView::WebAction editorActionForKeyEvent(QKeyEvent* event);
class QQuickWebEngineTestSupport;
#endif
-class Q_WEBENGINE_PRIVATE_EXPORT QQuickWebEngineViewport : public QObject {
- Q_OBJECT
- Q_PROPERTY(qreal devicePixelRatio READ devicePixelRatio WRITE setDevicePixelRatio NOTIFY devicePixelRatioChanged)
-public:
- QQuickWebEngineViewport(QQuickWebEngineViewPrivate *viewPrivate);
-
- qreal devicePixelRatio() const;
- void setDevicePixelRatio(qreal);
-
-Q_SIGNALS:
- void devicePixelRatioChanged();
-
-private:
- QQuickWebEngineViewPrivate *d_ptr;
-
- Q_DECLARE_PRIVATE(QQuickWebEngineView)
-};
-
-class Q_WEBENGINE_PRIVATE_EXPORT QQuickWebEngineViewExperimental : public QObject {
- Q_OBJECT
- Q_PROPERTY(QQuickWebEngineViewport *viewport READ viewport)
- Q_PROPERTY(QQmlComponent *extraContextMenuEntriesComponent READ extraContextMenuEntriesComponent WRITE setExtraContextMenuEntriesComponent NOTIFY extraContextMenuEntriesComponentChanged)
- Q_PROPERTY(const QQuickWebEngineContextMenuData *contextMenuData READ contextMenuData NOTIFY contextMenuDataChanged)
-
- QQuickWebEngineViewport *viewport() const;
- void setExtraContextMenuEntriesComponent(QQmlComponent *);
- QQmlComponent *extraContextMenuEntriesComponent() const;
-
- const QQuickWebEngineContextMenuData *contextMenuData() const;
-
-Q_SIGNALS:
- void extraContextMenuEntriesComponentChanged();
- void contextMenuDataChanged();
-
-private:
- QQuickWebEngineViewExperimental(QQuickWebEngineViewPrivate* viewPrivate);
- QQuickWebEngineView *q_ptr;
- QQuickWebEngineViewPrivate *d_ptr;
-
- Q_DECLARE_PRIVATE(QQuickWebEngineView)
- Q_DECLARE_PUBLIC(QQuickWebEngineView)
-};
-
class Q_WEBENGINE_PRIVATE_EXPORT QQuickWebEngineViewPrivate : public QtWebEngineCore::WebContentsAdapterClient
{
public:
@@ -130,8 +87,6 @@ public:
QQuickWebEngineViewPrivate();
~QQuickWebEngineViewPrivate();
- QQuickWebEngineViewExperimental *experimental() const;
- QQuickWebEngineViewport *viewport() const;
QtWebEngineCore::UIDelegatesManager *ui();
virtual QtWebEngineCore::RenderWidgetHostViewQtDelegate* CreateRenderWidgetHostViewQtDelegate(QtWebEngineCore::RenderWidgetHostViewQtDelegateClient *client) Q_DECL_OVERRIDE;
@@ -161,13 +116,16 @@ public:
virtual bool contextMenuRequested(const QtWebEngineCore::WebEngineContextMenuData &) Q_DECL_OVERRIDE;
virtual void navigationRequested(int navigationType, const QUrl &url, int &navigationRequestAction, bool isMainFrame) Q_DECL_OVERRIDE;
virtual void javascriptDialog(QSharedPointer<QtWebEngineCore::JavaScriptDialogController>) Q_DECL_OVERRIDE;
- virtual void runFileChooser(QtWebEngineCore::FilePickerController *controller) Q_DECL_OVERRIDE;
+ virtual void runFileChooser(QSharedPointer<QtWebEngineCore::FilePickerController>) Q_DECL_OVERRIDE;
virtual void showColorDialog(QSharedPointer<QtWebEngineCore::ColorChooserController>) Q_DECL_OVERRIDE;
virtual void didRunJavaScript(quint64, const QVariant&) Q_DECL_OVERRIDE;
virtual void didFetchDocumentMarkup(quint64, const QString&) Q_DECL_OVERRIDE { }
virtual void didFetchDocumentInnerText(quint64, const QString&) Q_DECL_OVERRIDE { }
virtual void didFindText(quint64, int) Q_DECL_OVERRIDE;
virtual void didPrintPage(quint64 requestId, const QByteArray &result) Q_DECL_OVERRIDE;
+#if !defined(QT_NO_WIDGETS) && !defined(QT_NO_PRINTER)
+ virtual void didPrintPageOnPrinter(quint64, bool) Q_DECL_OVERRIDE { }
+#endif
virtual void passOnFocus(bool reverse) Q_DECL_OVERRIDE;
virtual void javaScriptConsoleMessage(JavaScriptConsoleMessageLevel level, const QString& message, int lineNumber, const QString& sourceID) Q_DECL_OVERRIDE;
virtual void authenticationRequired(QSharedPointer<QtWebEngineCore::AuthenticationDialogController>) Q_DECL_OVERRIDE;
@@ -190,6 +148,7 @@ public:
void startDragging(const content::DropData &dropData, Qt::DropActions allowedActions,
const QPixmap &pixmap, const QPoint &offset) Q_DECL_OVERRIDE;
virtual bool isEnabled() const Q_DECL_OVERRIDE;
+ virtual void setToolTip(const QString &toolTipText) Q_DECL_OVERRIDE;
const QObject *holdingQObject() const Q_DECL_OVERRIDE;
virtual QSharedPointer<QtWebEngineCore::BrowserContextAdapter> browserContextAdapter() Q_DECL_OVERRIDE;
@@ -208,8 +167,6 @@ public:
static void userScripts_clear(QQmlListProperty<QQuickWebEngineScript> *p);
QSharedPointer<QtWebEngineCore::WebContentsAdapter> adapter;
- QScopedPointer<QQuickWebEngineViewExperimental> e;
- QScopedPointer<QQuickWebEngineViewport> v;
QScopedPointer<QQuickWebEngineHistory> m_history;
QQuickWebEngineProfile *m_profile;
QScopedPointer<QQuickWebEngineSettings> m_settings;
@@ -217,7 +174,7 @@ public:
QQuickWebEngineTestSupport *m_testSupport;
#endif
QQmlComponent *contextMenuExtraItems;
- QQuickWebEngineContextMenuData contextMenuData;
+ QtWebEngineCore::WebEngineContextMenuData m_contextMenuData;
QUrl explicitUrl;
QUrl iconUrl;
QQuickWebEngineFaviconProvider *faviconProvider;
@@ -225,6 +182,7 @@ public:
bool m_fullscreenMode;
bool isLoading;
bool m_activeFocusOnPress;
+ bool m_navigationActionTriggered;
qreal devicePixelRatio;
QMap<quint64, QJSValue> m_callbacks;
QList<QSharedPointer<CertificateErrorController> > m_certificateErrorControllers;
@@ -237,8 +195,7 @@ private:
qreal m_dpiScale;
QColor m_backgroundColor;
qreal m_defaultZoomFactor;
- // QTBUG-53467
- bool m_menuEnabled;
+ bool m_ui2Enabled;
};
#ifndef QT_NO_ACCESSIBILITY
@@ -260,7 +217,4 @@ private:
#endif // QT_NO_ACCESSIBILITY
QT_END_NAMESPACE
-QML_DECLARE_TYPE(QQuickWebEngineViewExperimental)
-QML_DECLARE_TYPE(QQuickWebEngineViewport)
-
#endif // QQUICKWEBENGINEVIEW_P_P_H
diff --git a/src/webengine/doc/qtwebengine.qdocconf b/src/webengine/doc/qtwebengine.qdocconf
index 6fd93dc20..fe83b082f 100644
--- a/src/webengine/doc/qtwebengine.qdocconf
+++ b/src/webengine/doc/qtwebengine.qdocconf
@@ -47,6 +47,7 @@ depends += qtcore \
qtqml \
qtquick \
qtquickcontrols \
+ qtquickcontrols2 \
qtdoc \
qtwebchannel \
qtwebview \
@@ -66,6 +67,7 @@ exampledirs += . \
../../core/doc/snippets \
../../webenginewidgets/doc/snippets
+examples.fileextensions += *.aff *.dic
imagedirs += images
diff --git a/src/webengine/doc/snippets/qtwebengine_build_snippet.qdoc b/src/webengine/doc/snippets/qtwebengine_build_snippet.qdoc
new file mode 100644
index 000000000..248296588
--- /dev/null
+++ b/src/webengine/doc/snippets/qtwebengine_build_snippet.qdoc
@@ -0,0 +1,8 @@
+//! [0]
+QT += webengine
+//! [0]
+
+
+//! [1]
+#include <QtWebEngine>
+//! [1]
diff --git a/src/webengine/doc/snippets/qtwebengine_webengineview_newviewrequested.qml b/src/webengine/doc/snippets/qtwebengine_webengineview_newviewrequested.qml
index 4d3095af2..e7e6790f2 100644
--- a/src/webengine/doc/snippets/qtwebengine_webengineview_newviewrequested.qml
+++ b/src/webengine/doc/snippets/qtwebengine_webengineview_newviewrequested.qml
@@ -57,8 +57,8 @@ QtObject {
id: windowParent
// Create the initial browsing windows and open the startup page.
Component.onCompleted: {
- var firstWindow = windowComponent.createObject(windowParent)
- firstWindow.webView.loadHtml('<input type="button" value="Click!" onclick="window.open(&quot;http://qt.io&quot;)">')
+ var firstWindow = windowComponent.createObject(windowParent);
+ firstWindow.webView.loadHtml('<input type="button" value="Click!" onclick="window.open(&quot;http://qt.io&quot;)">');
}
property Component windowComponent: Window {
@@ -74,9 +74,9 @@ QtObject {
// Handle the signal. Dynamically create the window and
// use its WebEngineView as the destination of our request.
- onNewViewRequested: {
- var newWindow = windowComponent.createObject(windowParent)
- request.openIn(newWindow.webView)
+ onNewViewRequested: function(request) {
+ var newWindow = windowComponent.createObject(windowParent);
+ request.openIn(newWindow.webView);
}
}
}
diff --git a/src/webengine/doc/src/external-resources.qdoc b/src/webengine/doc/src/external-resources.qdoc
index c4cfe24af..0d9f80c16 100644
--- a/src/webengine/doc/src/external-resources.qdoc
+++ b/src/webengine/doc/src/external-resources.qdoc
@@ -90,6 +90,11 @@
\title Shaka Player
*/
+/*!
+ \externalpage https://sourceforge.net/projects/hunspell/
+ \title Hunspell Project
+*/
+
/*
This prevents autolinking of each occurrence of 'WebEngine'
To link to the WebEngine QML type, use explicit linking:
@@ -101,3 +106,23 @@
\title WebEngine
\internal
*/
+
+/*!
+ \externalpage https://www.w3.org/Protocols/rfc2616/rfc2616-sec19.html#sec19.5.1
+ \title RFC 2616 section 19.5.1
+*/
+
+/*!
+ \externalpage https://www.w3.org/TR/html5/links.html#downloading-resources
+ \title HTML download attribute
+*/
+
+/*!
+ \externalpage https://www.iana.org/assignments/uri-schemes/prov/view-source
+ \title view-source URI scheme
+*/
+
+/*!
+ \externalpage https://wiki.greasespot.net/Metadata_Block
+ \title Greasemonkey
+*/
diff --git a/src/webengine/doc/src/qtwebengine-3rdparty.qdoc b/src/webengine/doc/src/qtwebengine-3rdparty.qdoc
deleted file mode 100644
index 756df7bcd..000000000
--- a/src/webengine/doc/src/qtwebengine-3rdparty.qdoc
+++ /dev/null
@@ -1,15371 +0,0 @@
-<!-- Generated by licenses.py; do not edit. -->/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-Almost-Native-Graphics-Layer-Engine.html
-\ingroup qtwebengine-licensing
-\brief BSD
-\title Almost Native Graphics Layer Engine
-
-\l{http://code.google.com/p/angleproject/}{Project Homepage}
-
-\badcode
-// Copyright (C) 2002-2013 The ANGLE Project Authors.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions
-// are met:
-//
-// Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-//
-// Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following
-// disclaimer in the documentation and/or other materials provided
-// with the distribution.
-//
-// Neither the name of TransGaming Inc., Google Inc., 3DLabs Inc.
-// Ltd., nor the names of their contributors may be used to endorse
-// or promote products derived from this software without specific
-// prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-Blackmagic-DeckLink-SDK---Mac.html
-\ingroup qtwebengine-licensing
-\brief BSL (v 1.0)
-\title Blackmagic DeckLink SDK - Mac
-
-\l{http://sw.blackmagicdesign.com/DeckLink/v10.5.2/Blackmagic_DeckLink_SDK_10.5.2.zip?Key-Pair-Id=APKAJTKA3ZJMJRQITVEA&amp;Signature=YRlsDaU0gNjrPNSoPp1IoTBQDavl09RGMnj1exrwAP+jbrNvSX2EuYTqOn2twguM+pQ8W0cqmIl/IHSVnEXJgQB6Eh57x+ba79t9z3fPsD8lb/a6PtK4qlFeqpLK5UBQ9yl18zxtHIZCnBBIeBNoj0G2CxX2Z4IXHVJmZ1KTbECIGaLyj+tBonW+cgIBQ7yw0dQHxGLJD+xzlCrZOXpGRmhJUBs981yLrnfZ7/LirvrHT+8CyzajzEgl9xBB7TFiZUh2DLXf1BvC4NeH0g/OnYRiR7F0VWh/ZiQM/KjCPbn2MajPo5Og0jVjzxYJbIhZf0HhB6ZN0ZI8aaiMMkmHMg==&amp;Expires=1448991563}{Project Homepage}
-
-\badcode
-Extracted from mac/include/DeckLinkAPI.h:
-
-** Copyright (c) 2014 Blackmagic Design
-**
-** Permission is hereby granted, free of charge, to any person or organization
-** obtaining a copy of the software and accompanying documentation covered by
-** this license (the "Software") to use, reproduce, display, distribute,
-** execute, and transmit the Software, and to prepare derivative works of the
-** Software, and to permit third-parties to whom the Software is furnished to
-** do so, all subject to the following:
-**
-** The copyright notices in the Software and this entire statement, including
-** the above license grant, this restriction and the following disclaimer,
-** must be included in all copies of the Software, in whole or in part, and
-** all derivative works of the Software, unless such copies or derivative
-** works are solely in the form of machine-executable object code generated by
-** a source language processor.
-**
-** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-** FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
-** SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
-** FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
-** ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-** DEALINGS IN THE SOFTWARE.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-Brotli.html
-\ingroup qtwebengine-licensing
-\brief Apache 2.0
-\title Brotli
-
-\l{https://github.com/google/brotli}{Project Homepage}
-
-\badcode
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-Chrome-Custom-Tabs---Example-and-Usage.html
-\ingroup qtwebengine-licensing
-\brief Apache 2.0
-\title Chrome Custom Tabs - Example and Usage
-
-\l{https://chromium.googlesource.com/external/github.com/GoogleChrome/custom-tabs-client}{Project Homepage}
-
-\badcode
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-ChromeVox.html
-\ingroup qtwebengine-licensing
-\brief Apache 2.0
-\title ChromeVox
-
-\l{http://code.google.com/p/google-axs-chrome/}{Project Homepage}
-
-\badcode
-// Copyright 2013 Google Inc.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-Chromium-OS-system-API.html
-\ingroup qtwebengine-licensing
-\brief BSD
-\title Chromium OS system API
-
-\l{http://www.chromium.org/chromium-os}{Project Homepage}
-
-\badcode
-// Copyright (c) 2006-2009 The Chromium OS Authors. All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-Closure-compiler.html
-\ingroup qtwebengine-licensing
-\brief Apache 2.0
-\title Closure compiler
-
-\l{http://github.com/google/closure-compiler}{Project Homepage}
-
-\badcode
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-Cocoa-extension-code-from-Camino.html
-\ingroup qtwebengine-licensing
-\brief MPL 1.1/GPL 2.0/LGPL 2.1
-\title Cocoa extension code from Camino
-
-\l{http://caminobrowser.org/}{Project Homepage}
-
-\badcode
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 2002
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** * /
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-Compact-Language-Detection.html
-\ingroup qtwebengine-licensing
-\brief BSD
-\title Compact Language Detection
-
-\l{http://src.chromium.org/viewvc/chrome/trunk/src/third_party/cld/}{Project Homepage}
-
-\badcode
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-Crashpad.html
-\ingroup qtwebengine-licensing
-\brief Apache 2.0
-\title Crashpad
-
-\l{https://crashpad.chromium.org/}{Project Homepage}
-
-\badcode
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-Darwin.html
-\ingroup qtwebengine-licensing
-\brief Apple Public Source License 2.0
-\title Darwin
-
-\l{http://www.opensource.apple.com/}{Project Homepage}
-
-\badcode
-APPLE PUBLIC SOURCE LICENSE Version 2.0 - August 6, 2003
-
-Please read this License carefully before downloading this software. By
-downloading or using this software, you are agreeing to be bound by the terms of
-this License. If you do not or cannot agree to the terms of this License,
-please do not download or use the software.
-
-Apple Note: In January 2007, Apple changed its corporate name from "Apple
-Computer, Inc." to "Apple Inc." This change has been reflected below and
-copyright years updated, but no other changes have been made to the APSL 2.0.
-
-1. General; Definitions. This License applies to any program or other work
-which Apple Inc. ("Apple") makes publicly available and which contains a notice
-placed by Apple identifying such program or work as "Original Code" and stating
-that it is subject to the terms of this Apple Public Source License version 2.0
-("License"). As used in this License:
-
-1.1 "Applicable Patent Rights" mean: (a) in the case where Apple is the
-grantor of rights, (i) claims of patents that are now or hereafter acquired,
-owned by or assigned to Apple and (ii) that cover subject matter contained in
-the Original Code, but only to the extent necessary to use, reproduce and/or
-distribute the Original Code without infringement; and (b) in the case where You
-are the grantor of rights, (i) claims of patents that are now or hereafter
-acquired, owned by or assigned to You and (ii) that cover subject matter in Your
-Modifications, taken alone or in combination with Original Code.
-
-1.2 "Contributor" means any person or entity that creates or contributes to the
-creation of Modifications.
-
-1.3 "Covered Code" means the Original Code, Modifications, the combination of
-Original Code and any Modifications, and/or any respective portions thereof.
-
-1.4 "Externally Deploy" means: (a) to sublicense, distribute or otherwise make
-Covered Code available, directly or indirectly, to anyone other than You; and/or
-(b) to use Covered Code, alone or as part of a Larger Work, in any way to
-provide a service, including but not limited to delivery of content, through
-electronic communication with a client other than You.
-
-1.5 "Larger Work" means a work which combines Covered Code or portions thereof
-with code not governed by the terms of this License.
-
-1.6 "Modifications" mean any addition to, deletion from, and/or change to, the
-substance and/or structure of the Original Code, any previous Modifications, the
-combination of Original Code and any previous Modifications, and/or any
-respective portions thereof. When code is released as a series of files, a
-Modification is: (a) any addition to or deletion from the contents of a file
-containing Covered Code; and/or (b) any new file or other representation of
-computer program statements that contains any part of Covered Code.
-
-1.7 "Original Code" means (a) the Source Code of a program or other work as
-originally made available by Apple under this License, including the Source Code
-of any updates or upgrades to such programs or works made available by Apple
-under this License, and that has been expressly identified by Apple as such in
-the header file(s) of such work; and (b) the object code compiled from such
-Source Code and originally made available by Apple under this License
-
-1.8 "Source Code" means the human readable form of a program or other work that
-is suitable for making modifications to it, including all modules it contains,
-plus any associated interface definition files, scripts used to control
-compilation and installation of an executable (object code).
-
-1.9 "You" or "Your" means an individual or a legal entity exercising rights
-under this License. For legal entities, "You" or "Your" includes any entity
-which controls, is controlled by, or is under common control with, You, where
-"control" means (a) the power, direct or indirect, to cause the direction or
-management of such entity, whether by contract or otherwise, or (b) ownership of
-fifty percent (50%) or more of the outstanding shares or beneficial ownership of
-such entity.
-
-2. Permitted Uses; Conditions &amp; Restrictions. Subject to the terms and
-conditions of this License, Apple hereby grants You, effective on the date You
-accept this License and download the Original Code, a world-wide, royalty-free,
-non-exclusive license, to the extent of Apple's Applicable Patent Rights and
-copyrights covering the Original Code, to do the following:
-
-2.1 Unmodified Code. You may use, reproduce, display, perform, internally
-distribute within Your organization, and Externally Deploy verbatim, unmodified
-copies of the Original Code, for commercial or non-commercial purposes, provided
-that in each instance:
-
-(a) You must retain and reproduce in all copies of Original Code the copyright
-and other proprietary notices and disclaimers of Apple as they appear in the
-Original Code, and keep intact all notices in the Original Code that refer to
-this License; and
-
-(b) You must include a copy of this License with every copy of Source Code of
-Covered Code and documentation You distribute or Externally Deploy, and You may
-not offer or impose any terms on such Source Code that alter or restrict this
-License or the recipients' rights hereunder, except as permitted under Section
-6.
-
-2.2 Modified Code. You may modify Covered Code and use, reproduce, display,
-perform, internally distribute within Your organization, and Externally Deploy
-Your Modifications and Covered Code, for commercial or non-commercial purposes,
-provided that in each instance You also meet all of these conditions:
-
-(a) You must satisfy all the conditions of Section 2.1 with respect to the
-Source Code of the Covered Code;
-
-(b) You must duplicate, to the extent it does not already exist, the notice in
-Exhibit A in each file of the Source Code of all Your Modifications, and cause
-the modified files to carry prominent notices stating that You changed the files
-and the date of any change; and
-
-(c) If You Externally Deploy Your Modifications, You must make Source Code of
-all Your Externally Deployed Modifications either available to those to whom You
-have Externally Deployed Your Modifications, or publicly available. Source Code
-of Your Externally Deployed Modifications must be released under the terms set
-forth in this License, including the license grants set forth in Section 3
-below, for as long as you Externally Deploy the Covered Code or twelve (12)
-months from the date of initial External Deployment, whichever is longer. You
-should preferably distribute the Source Code of Your Externally Deployed
-Modifications electronically (e.g. download from a web site).
-
-2.3 Distribution of Executable Versions. In addition, if You Externally Deploy
-Covered Code (Original Code and/or Modifications) in object code, executable
-form only, You must include a prominent notice, in the code itself as well as in
-related documentation, stating that Source Code of the Covered Code is available
-under the terms of this License with information on how and where to obtain such
-Source Code.
-
-2.4 Third Party Rights. You expressly acknowledge and agree that although
-Apple and each Contributor grants the licenses to their respective portions of
-the Covered Code set forth herein, no assurances are provided by Apple or any
-Contributor that the Covered Code does not infringe the patent or other
-intellectual property rights of any other entity. Apple and each Contributor
-disclaim any liability to You for claims brought by any other entity based on
-infringement of intellectual property rights or otherwise. As a condition to
-exercising the rights and licenses granted hereunder, You hereby assume sole
-responsibility to secure any other intellectual property rights needed, if any.
-For example, if a third party patent license is required to allow You to
-distribute the Covered Code, it is Your responsibility to acquire that license
-before distributing the Covered Code.
-
-3. Your Grants. In consideration of, and as a condition to, the licenses
-granted to You under this License, You hereby grant to any person or entity
-receiving or distributing Covered Code under this License a non-exclusive,
-royalty-free, perpetual, irrevocable license, under Your Applicable Patent
-Rights and other intellectual property rights (other than patent) owned or
-controlled by You, to use, reproduce, display, perform, modify, sublicense,
-distribute and Externally Deploy Your Modifications of the same scope and extent
-as Apple's licenses under Sections 2.1 and 2.2 above.
-
-4. Larger Works. You may create a Larger Work by combining Covered Code with
-other code not governed by the terms of this License and distribute the Larger
-Work as a single product. In each such instance, You must make sure the
-requirements of this License are fulfilled for the Covered Code or any portion
-thereof.
-
-5. Limitations on Patent License. Except as expressly stated in Section 2, no
-other patent rights, express or implied, are granted by Apple herein.
-Modifications and/or Larger Works may require additional patent licenses from
-Apple which Apple may grant in its sole discretion.
-
-6. Additional Terms. You may choose to offer, and to charge a fee for,
-warranty, support, indemnity or liability obligations and/or other rights
-consistent with the scope of the license granted herein ("Additional Terms") to
-one or more recipients of Covered Code. However, You may do so only on Your own
-behalf and as Your sole responsibility, and not on behalf of Apple or any
-Contributor. You must obtain the recipient's agreement that any such Additional
-Terms are offered by You alone, and You hereby agree to indemnify, defend and
-hold Apple and every Contributor harmless for any liability incurred by or
-claims asserted against Apple or such Contributor by reason of any such
-Additional Terms.
-
-7. Versions of the License. Apple may publish revised and/or new versions of
-this License from time to time. Each version will be given a distinguishing
-version number. Once Original Code has been published under a particular
-version of this License, You may continue to use it under the terms of that
-version. You may also choose to use such Original Code under the terms of any
-subsequent version of this License published by Apple. No one other than Apple
-has the right to modify the terms applicable to Covered Code created under this
-License.
-
-8. NO WARRANTY OR SUPPORT. The Covered Code may contain in whole or in part
-pre-release, untested, or not fully tested works. The Covered Code may contain
-errors that could cause failures or loss of data, and may be incomplete or
-contain inaccuracies. You expressly acknowledge and agree that use of the
-Covered Code, or any portion thereof, is at Your sole and entire risk. THE
-COVERED CODE IS PROVIDED "AS IS" AND WITHOUT WARRANTY, UPGRADES OR SUPPORT OF
-ANY KIND AND APPLE AND APPLE'S LICENSOR(S) (COLLECTIVELY REFERRED TO AS "APPLE"
-FOR THE PURPOSES OF SECTIONS 8 AND 9) AND ALL CONTRIBUTORS EXPRESSLY DISCLAIM
-ALL WARRANTIES AND/OR CONDITIONS, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED
-TO, THE IMPLIED WARRANTIES AND/OR CONDITIONS OF MERCHANTABILITY, OF SATISFACTORY
-QUALITY, OF FITNESS FOR A PARTICULAR PURPOSE, OF ACCURACY, OF QUIET ENJOYMENT,
-AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. APPLE AND EACH CONTRIBUTOR DOES NOT
-WARRANT AGAINST INTERFERENCE WITH YOUR ENJOYMENT OF THE COVERED CODE, THAT THE
-FUNCTIONS CONTAINED IN THE COVERED CODE WILL MEET YOUR REQUIREMENTS, THAT THE
-OPERATION OF THE COVERED CODE WILL BE UNINTERRUPTED OR ERROR-FREE, OR THAT
-DEFECTS IN THE COVERED CODE WILL BE CORRECTED. NO ORAL OR WRITTEN INFORMATION
-OR ADVICE GIVEN BY APPLE, AN APPLE AUTHORIZED REPRESENTATIVE OR ANY CONTRIBUTOR
-SHALL CREATE A WARRANTY. You acknowledge that the Covered Code is not intended
-for use in the operation of nuclear facilities, aircraft navigation,
-communication systems, or air traffic control machines in which case the failure
-of the Covered Code could lead to death, personal injury, or severe physical or
-environmental damage.
-
-9. LIMITATION OF LIABILITY. TO THE EXTENT NOT PROHIBITED BY LAW, IN NO EVENT
-SHALL APPLE OR ANY CONTRIBUTOR BE LIABLE FOR ANY INCIDENTAL, SPECIAL, INDIRECT
-OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR RELATING TO THIS LICENSE OR YOUR USE
-OR INABILITY TO USE THE COVERED CODE, OR ANY PORTION THEREOF, WHETHER UNDER A
-THEORY OF CONTRACT, WARRANTY, TORT (INCLUDING NEGLIGENCE), PRODUCTS LIABILITY OR
-OTHERWISE, EVEN IF APPLE OR SUCH CONTRIBUTOR HAS BEEN ADVISED OF THE POSSIBILITY
-OF SUCH DAMAGES AND NOTWITHSTANDING THE FAILURE OF ESSENTIAL PURPOSE OF ANY
-REMEDY. SOME JURISDICTIONS DO NOT ALLOW THE LIMITATION OF LIABILITY OF
-INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS LIMITATION MAY NOT APPLY TO YOU. In
-no event shall Apple's total liability to You for all damages (other than as may
-be required by applicable law) under this License exceed the amount of fifty
-dollars ($50.00).
-
-10. Trademarks. This License does not grant any rights to use the trademarks
-or trade names "Apple", "Mac", "Mac OS", "QuickTime", "QuickTime Streaming
-Server" or any other trademarks, service marks, logos or trade names belonging
-to Apple (collectively "Apple Marks") or to any trademark, service mark, logo or
-trade name belonging to any Contributor. You agree not to use any Apple Marks
-in or as part of the name of products derived from the Original Code or to
-endorse or promote products derived from the Original Code other than as
-expressly permitted by and in strict compliance at all times with Apple's third
-party trademark usage guidelines which are posted at
-http://www.apple.com/legal/guidelinesfor3rdparties.html.
-
-11. Ownership. Subject to the licenses granted under this License, each
-Contributor retains all rights, title and interest in and to any Modifications
-made by such Contributor. Apple retains all rights, title and interest in and
-to the Original Code and any Modifications made by or on behalf of Apple ("Apple
-Modifications"), and such Apple Modifications will not be automatically subject
-to this License. Apple may, at its sole discretion, choose to license such
-Apple Modifications under this License, or on different terms from those
-contained in this License or may choose not to license them at all.
-
-12. Termination.
-
-12.1 Termination. This License and the rights granted hereunder will
-terminate:
-
-(a) automatically without notice from Apple if You fail to comply with any
-term(s) of this License and fail to cure such breach within 30 days of becoming
-aware of such breach; (b) immediately in the event of the circumstances
-described in Section 13.5(b); or (c) automatically without notice from Apple if
-You, at any time during the term of this License, commence an action for patent
-infringement against Apple; provided that Apple did not first commence an action
-for patent infringement against You in that instance.
-
-12.2 Effect of Termination. Upon termination, You agree to immediately stop
-any further use, reproduction, modification, sublicensing and distribution of
-the Covered Code. All sublicenses to the Covered Code which have been properly
-granted prior to termination shall survive any termination of this License.
-Provisions which, by their nature, should remain in effect beyond the
-termination of this License shall survive, including but not limited to Sections
-3, 5, 8, 9, 10, 11, 12.2 and 13. No party will be liable to any other for
-compensation, indemnity or damages of any sort solely as a result of terminating
-this License in accordance with its terms, and termination of this License will
-be without prejudice to any other right or remedy of any party.
-
-13. Miscellaneous.
-
-13.1 Government End Users. The Covered Code is a "commercial item" as defined
-in FAR 2.101. Government software and technical data rights in the Covered Code
-include only those rights customarily provided to the public as defined in this
-License. This customary commercial license in technical data and software is
-provided in accordance with FAR 12.211 (Technical Data) and 12.212 (Computer
-Software) and, for Department of Defense purchases, DFAR 252.227-7015 (Technical
-Data -- Commercial Items) and 227.7202-3 (Rights in Commercial Computer Software
-or Computer Software Documentation). Accordingly, all U.S. Government End Users
-acquire Covered Code with only those rights set forth herein.
-
-13.2 Relationship of Parties. This License will not be construed as creating
-an agency, partnership, joint venture or any other form of legal association
-between or among You, Apple or any Contributor, and You will not represent to
-the contrary, whether expressly, by implication, appearance or otherwise.
-
-13.3 Independent Development. Nothing in this License will impair Apple's
-right to acquire, license, develop, have others develop for it, market and/or
-distribute technology or products that perform the same or similar functions as,
-or otherwise compete with, Modifications, Larger Works, technology or products
-that You may develop, produce, market or distribute.
-
-13.4 Waiver; Construction. Failure by Apple or any Contributor to enforce any
-provision of this License will not be deemed a waiver of future enforcement of
-that or any other provision. Any law or regulation which provides that the
-language of a contract shall be construed against the drafter will not apply to
-this License.
-
-13.5 Severability. (a) If for any reason a court of competent jurisdiction
-finds any provision of this License, or portion thereof, to be unenforceable,
-that provision of the License will be enforced to the maximum extent permissible
-so as to effect the economic benefits and intent of the parties, and the
-remainder of this License will continue in full force and effect. (b)
-Notwithstanding the foregoing, if applicable law prohibits or restricts You from
-fully and/or specifically complying with Sections 2 and/or 3 or prevents the
-enforceability of either of those Sections, this License will immediately
-terminate and You must immediately discontinue any use of the Covered Code and
-destroy all copies of it that are in your possession or control.
-
-13.6 Dispute Resolution. Any litigation or other dispute resolution between
-You and Apple relating to this License shall take place in the Northern District
-of California, and You and Apple hereby consent to the personal jurisdiction of,
-and venue in, the state and federal courts within that District with respect to
-this License. The application of the United Nations Convention on Contracts for
-the International Sale of Goods is expressly excluded.
-
-13.7 Entire Agreement; Governing Law. This License constitutes the entire
-agreement between the parties with respect to the subject matter hereof. This
-License shall be governed by the laws of the United States and the State of
-California, except that body of California law concerning conflicts of law.
-
-Where You are located in the province of Quebec, Canada, the following clause
-applies: The parties hereby confirm that they have requested that this License
-and all related documents be drafted in English. Les parties ont exigé que le
-présent contrat et tous les documents connexes soient rédigés en anglais.
-
-EXHIBIT A.
-
-"Portions Copyright (c) 1999-2007 Apple Inc. All Rights Reserved.
-
-This file contains Original Code and/or Modifications of Original Code as
-defined in and that are subject to the Apple Public Source License Version 2.0
-(the 'License'). You may not use this file except in compliance with the
-License. Please obtain a copy of the License at
-http://www.opensource.apple.com/apsl/ and read it before using this file.
-
-The Original Code and all software distributed under the License are distributed
-on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
-AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, INCLUDING WITHOUT LIMITATION,
-ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, QUIET
-ENJOYMENT OR NON-INFRINGEMENT. Please see the License for the specific language
-governing rights and limitations under the License."
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-David-M.-Gay's-floating-point-routines.html
-\ingroup qtwebengine-licensing
-\brief MIT-like
-\title David M. Gay's floating point routines
-
-\l{http://www.netlib.org/fp/}{Project Homepage}
-
-\badcode
-/****************************************************************
- *
- * The author of this software is David M. Gay.
- *
- * Copyright (c) 1991, 2000, 2001 by Lucent Technologies.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose without fee is hereby granted, provided that this entire notice
- * is included in all copies of any software which is or includes a copy
- * or modification of this software and in all copies of the supporting
- * documentation for such software.
- *
- * THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED
- * WARRANTY. IN PARTICULAR, NEITHER THE AUTHOR NOR LUCENT MAKES ANY
- * REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY
- * OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE.
- *
- *************************************************************** /
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-Error-Prone.html
-\ingroup qtwebengine-licensing
-\brief Apache 2.0
-\title Error Prone
-
-\l{http://errorprone.info/}{Project Homepage}
-
-\badcode
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-Expat-XML-Parser.html
-\ingroup qtwebengine-licensing
-\brief MIT
-\title Expat XML Parser
-
-\l{http://sourceforge.net/projects/expat/}{Project Homepage}
-
-\badcode
-Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd
- and Clark Cooper
-Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006 Expat maintainers.
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be included
-in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-Flot-Javascript/JQuery-library-for-creating-graphs.html
-\ingroup qtwebengine-licensing
-\brief MIT
-\title Flot Javascript/JQuery library for creating graphs
-
-\l{http://www.flotcharts.org}{Project Homepage}
-
-\badcode
-Copyright (c) 2007-2013 IOLA and Ole Laursen
-
-Permission is hereby granted, free of charge, to any person
-obtaining a copy of this software and associated documentation
-files (the "Software"), to deal in the Software without
-restriction, including without limitation the rights to use,
-copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the
-Software is furnished to do so, subject to the following
-conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
-OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-GifPlayer-Animated-GIF-Library.html
-\ingroup qtwebengine-licensing
-\brief Apache License 2.0
-\title GifPlayer Animated GIF Library
-
-\l{http://android-gifview.googlecode.com/svn/!svn/bc/8/trunk/}{Project Homepage}
-
-\badcode
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-Google-Cardboard.html
-\ingroup qtwebengine-licensing
-\brief Apache 2.0
-\title Google Cardboard
-
-\l{https://github.com/googlesamples/cardboard-java/}{Project Homepage}
-
-\badcode
- Copyright (c) 2014, Google Inc.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
-
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-Hardware-Composer-Plus.html
-\ingroup qtwebengine-licensing
-\brief Apache 2.0
-\title Hardware Composer Plus
-
-\l{https://chromium.googlesource.com/chromium/src/third_party/hwcplus/}{Project Homepage}
-
-\badcode
-// Copyright 2014 The Chromium Authors. All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-IAccessible2-COM-interfaces-for-accessibility.html
-\ingroup qtwebengine-licensing
-\brief BSD
-\title IAccessible2 COM interfaces for accessibility
-
-\l{http://www.linuxfoundation.org/collaborate/workgroups/accessibility/iaccessible2}{Project Homepage}
-
-\badcode
-/*************************************************************************
- *
- * IAccessible2 IDL Specification
- *
- * Copyright (c) 2007, 2010 Linux Foundation
- * Copyright (c) 2006 IBM Corporation
- * Copyright (c) 2000, 2006 Sun Microsystems, Inc.
- * All rights reserved.
- *
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following
- * disclaimer in the documentation and/or other materials
- * provided with the distribution.
- *
- * 3. Neither the name of the Linux Foundation nor the names of its
- * contributors may be used to endorse or promote products
- * derived from this software without specific prior written
- * permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
- * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
- * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * This BSD License conforms to the Open Source Initiative "Simplified
- * BSD License" as published at:
- * http://www.opensource.org/licenses/bsd-license.php
- *
- * IAccessible2 is a trademark of the Linux Foundation. The IAccessible2
- * mark may be used in accordance with the Linux Foundation Trademark
- * Policy to indicate compliance with the IAccessible2 specification.
- *
- ************************************************************************ /
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-ISimpleDOM-COM-interfaces-for-accessibility.html
-\ingroup qtwebengine-licensing
-\brief MPL 1.1/GPL 2.0/LGPL 2.1
-\title ISimpleDOM COM interfaces for accessibility
-
-\l{http://developer.mozilla.org/en-US/docs/Accessibility/AT-APIs}{Project Homepage}
-
-\badcode
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 2002
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** * /
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-JMake.html
-\ingroup qtwebengine-licensing
-\brief GPL 2.0
-\title JMake
-
-\l{https://github.com/pantsbuild/jmake}{Project Homepage}
-
-\badcode
- GNU GENERAL PUBLIC LICENSE
- Version 2, June 1991
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users. This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it. (Some other Free Software Foundation software is covered by
-the GNU Library General Public License instead.) You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
- To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have. You must make sure that they, too, receive or can get the
-source code. And you must show them these terms so they know their
-rights.
-
- We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
- Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software. If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
- Finally, any free program is threatened constantly by software
-patents. We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary. To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- GNU GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License. The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language. (Hereinafter, translation is included without limitation in
-the term "modification".) Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
- 1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
- 2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) You must cause the modified files to carry prominent notices
- stating that you changed the files and the date of any change.
-
- b) You must cause any work that you distribute or publish, that in
- whole or in part contains or is derived from the Program or any
- part thereof, to be licensed as a whole at no charge to all third
- parties under the terms of this License.
-
- c) If the modified program normally reads commands interactively
- when run, you must cause it, when started running for such
- interactive use in the most ordinary way, to print or display an
- announcement including an appropriate copyright notice and a
- notice that there is no warranty (or else, saying that you provide
- a warranty) and that users may redistribute the program under
- these conditions, and telling the user how to view a copy of this
- License. (Exception: if the Program itself is interactive but
- does not normally print such an announcement, your work based on
- the Program is not required to print an announcement.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
- a) Accompany it with the complete corresponding machine-readable
- source code, which must be distributed under the terms of Sections
- 1 and 2 above on a medium customarily used for software interchange; or,
-
- b) Accompany it with a written offer, valid for at least three
- years, to give any third party, for a charge no more than your
- cost of physically performing source distribution, a complete
- machine-readable copy of the corresponding source code, to be
- distributed under the terms of Sections 1 and 2 above on a medium
- customarily used for software interchange; or,
-
- c) Accompany it with the information you received as to the offer
- to distribute corresponding source code. (This alternative is
- allowed only for noncommercial distribution and only if you
- received the program in object code or executable form with such
- an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it. For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable. However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License. Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
- 5. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Program or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
- 6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
- 7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all. For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 8. If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded. In such case, this License incorporates
-the limitation as if written in the body of this License.
-
- 9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation. If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
- 10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission. For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this. Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
- NO WARRANTY
-
- 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
- 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Programs
-
- If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
- To do so, attach the following notices to the program. It is safest
-to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
- &lt;one line to give the program's name and a brief idea of what it does.&gt;
- Copyright (C) &lt;year&gt; &lt;name of author&gt;
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
-
-
-Also add information on how to contact you by electronic and paper mail.
-
-If the program is interactive, make it output a short notice like this
-when it starts in an interactive mode:
-
- Gnomovision version 69, Copyright (C) year name of author
- Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
- This is free software, and you are welcome to redistribute it
- under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License. Of course, the commands you use may
-be called something other than `show w' and `show c'; they could even be
-mouse-clicks or menu items--whatever suits your program.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the program, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the program
- `Gnomovision' (which makes passes at compilers) written by James Hacker.
-
- &lt;signature of Ty Coon&gt;, 1 April 1989
- Ty Coon, President of Vice
-
-This General Public License does not permit incorporating your program into
-proprietary programs. If your program is a subroutine library, you may
-consider it more useful to permit linking proprietary applications with the
-library. If this is what you want to do, use the GNU Lesser General
-Public License instead of this License.
-
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-Khronos-header-files.html
-\ingroup qtwebengine-licensing
-\brief MIT/X11, SGI Free Software License B
-\title Khronos header files
-
-\l{http://www.khronos.org/registry}{Project Homepage}
-
-\badcode
-Copyright (c) 2007-2010 The Khronos Group Inc.
-
-Permission is hereby granted, free of charge, to any person obtaining a
-copy of this software and/or associated documentation files (the
-"Materials"), to deal in the Materials without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Materials, and to
-permit persons to whom the Materials are furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be included
-in all copies or substantial portions of the Materials.
-
-THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
-
-
-SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008)
-
-Copyright (C) 1992 Silicon Graphics, Inc. All Rights Reserved.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of
-this software and associated documentation files (the "Software"), to deal in
-the Software without restriction, including without limitation the rights to
-use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
-of the Software, and to permit persons to whom the Software is furnished to do
-so, subject to the following conditions:
-
-The above copyright notice including the dates of first publication and either
-this permission notice or a reference to http://oss.sgi.com/projects/FreeB/
-shall be included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL SILICON
-GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of Silicon Graphics, Inc. shall
-not be used in advertising or otherwise to promote the sale, use or other
-dealings in this Software without prior written authorization from Silicon
-Graphics, Inc.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-LCOV---the-LTP-GCOV-extension.html
-\ingroup qtwebengine-licensing
-\brief GPL v2
-\title LCOV - the LTP GCOV extension
-
-\l{http://ltp.sourceforge.net/coverage/lcov.php}{Project Homepage}
-
-\badcode
- GNU GENERAL PUBLIC LICENSE
- Version 2, June 1991
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users. This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it. (Some other Free Software Foundation software is covered by
-the GNU Lesser General Public License instead.) You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
- To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have. You must make sure that they, too, receive or can get the
-source code. And you must show them these terms so they know their
-rights.
-
- We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
- Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software. If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
- Finally, any free program is threatened constantly by software
-patents. We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary. To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- GNU GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License. The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language. (Hereinafter, translation is included without limitation in
-the term "modification".) Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
- 1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
- 2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) You must cause the modified files to carry prominent notices
- stating that you changed the files and the date of any change.
-
- b) You must cause any work that you distribute or publish, that in
- whole or in part contains or is derived from the Program or any
- part thereof, to be licensed as a whole at no charge to all third
- parties under the terms of this License.
-
- c) If the modified program normally reads commands interactively
- when run, you must cause it, when started running for such
- interactive use in the most ordinary way, to print or display an
- announcement including an appropriate copyright notice and a
- notice that there is no warranty (or else, saying that you provide
- a warranty) and that users may redistribute the program under
- these conditions, and telling the user how to view a copy of this
- License. (Exception: if the Program itself is interactive but
- does not normally print such an announcement, your work based on
- the Program is not required to print an announcement.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
- a) Accompany it with the complete corresponding machine-readable
- source code, which must be distributed under the terms of Sections
- 1 and 2 above on a medium customarily used for software interchange; or,
-
- b) Accompany it with a written offer, valid for at least three
- years, to give any third party, for a charge no more than your
- cost of physically performing source distribution, a complete
- machine-readable copy of the corresponding source code, to be
- distributed under the terms of Sections 1 and 2 above on a medium
- customarily used for software interchange; or,
-
- c) Accompany it with the information you received as to the offer
- to distribute corresponding source code. (This alternative is
- allowed only for noncommercial distribution and only if you
- received the program in object code or executable form with such
- an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it. For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable. However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License. Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
- 5. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Program or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
- 6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
- 7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all. For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 8. If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded. In such case, this License incorporates
-the limitation as if written in the body of this License.
-
- 9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation. If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
- 10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission. For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this. Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
- NO WARRANTY
-
- 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
- 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Programs
-
- If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
- To do so, attach the following notices to the program. It is safest
-to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
- &lt;one line to give the program's name and a brief idea of what it does.&gt;
- Copyright (C) &lt;year&gt; &lt;name of author&gt;
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License along
- with this program; if not, write to the Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-Also add information on how to contact you by electronic and paper mail.
-
-If the program is interactive, make it output a short notice like this
-when it starts in an interactive mode:
-
- Gnomovision version 69, Copyright (C) year name of author
- Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
- This is free software, and you are welcome to redistribute it
- under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License. Of course, the commands you use may
-be called something other than `show w' and `show c'; they could even be
-mouse-clicks or menu items--whatever suits your program.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the program, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the program
- `Gnomovision' (which makes passes at compilers) written by James Hacker.
-
- &lt;signature of Ty Coon&gt;, 1 April 1989
- Ty Coon, President of Vice
-
-This General Public License does not permit incorporating your program into
-proprietary programs. If your program is a subroutine library, you may
-consider it more useful to permit linking proprietary applications with the
-library. If this is what you want to do, use the GNU Lesser General
-Public License instead of this License.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-LZMA-SDK.html
-\ingroup qtwebengine-licensing
-\brief Public domain
-\title LZMA SDK
-
-\l{http://www.7-zip.org/sdk.html}{Project Homepage}
-
-\badcode
-LZMA SDK is placed in the public domain.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-LevelDB:-A-Fast-Persistent-Key-Value-Store.html
-\ingroup qtwebengine-licensing
-\brief New BSD
-\title LevelDB: A Fast Persistent Key-Value Store
-
-\l{https://github.com/google/leveldb.git}{Project Homepage}
-
-\badcode
-Copyright (c) 2011 The LevelDB Authors. All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
- * Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above
-copyright notice, this list of conditions and the following disclaimer
-in the documentation and/or other materials provided with the
-distribution.
- * Neither the name of Google Inc. nor the names of its
-contributors may be used to endorse or promote products derived from
-this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-Mojo.html
-\ingroup qtwebengine-licensing
-\brief Chromium
-\title Mojo
-
-\l{https://github.com/domokit/mojo}{Project Homepage}
-
-\badcode
-// Copyright 2014 The Chromium Authors. All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-NSBezierPath-additions-from-Sean-Patrick-O'Brien.html
-\ingroup qtwebengine-licensing
-\brief BSD
-\title NSBezierPath additions from Sean Patrick O'Brien
-
-\l{http://www.seanpatrickobrien.com/journal/posts/3}{Project Homepage}
-
-\badcode
-Copyright 2008 MolokoCacao
-All rights reserved
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted providing that the following conditions
-are met:
-1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
-THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
-DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
-STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
-IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGE.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-NVidia-Control-X-Extension-Library.html
-\ingroup qtwebengine-licensing
-\brief MIT
-\title NVidia Control X Extension Library
-
-\l{http://cgit.freedesktop.org/~aplattner/nvidia-settings/}{Project Homepage}
-
-\badcode
-/*
- * Copyright (c) 2008 NVIDIA, Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- * /
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-Netscape-Plugin-Application-Programming-Interface-(NPAPI).html
-\ingroup qtwebengine-licensing
-\brief MPL 1.1/GPL 2.0/LGPL 2.1
-\title Netscape Plugin Application Programming Interface (NPAPI)
-
-\l{http://mxr.mozilla.org/mozilla-central/source/modules/plugin/base/public/}{Project Homepage}
-
-\badcode
-Version: MPL 1.1/GPL 2.0/LGPL 2.1
-
-The contents of this file are subject to the Mozilla Public License Version
-1.1 (the "License"); you may not use this file except in compliance with
-the License. You may obtain a copy of the License at
-http://www.mozilla.org/MPL/
-
-Software distributed under the License is distributed on an "AS IS" basis,
-WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
-for the specific language governing rights and limitations under the
-License.
-
-The Original Code is mozilla.org code.
-
-The Initial Developer of the Original Code is
-Netscape Communications Corporation.
-Portions created by the Initial Developer are Copyright (C) 1998
-the Initial Developer. All Rights Reserved.
-
-Contributor(s):
-
-Alternatively, the contents of this file may be used under the terms of
-either the GNU General Public License Version 2 or later (the "GPL"), or
-the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
-in which case the provisions of the GPL or the LGPL are applicable instead
-of those above. If you wish to allow use of your version of this file only
-under the terms of either the GPL or the LGPL, and not to allow others to
-use your version of this file under the terms of the MPL, indicate your
-decision by deleting the provisions above and replace them with the notice
-and other provisions required by the GPL or the LGPL. If you do not delete
-the provisions above, a recipient may use your version of this file under
-the terms of any one of the MPL, the GPL or the LGPL.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-Netscape-Portable-Runtime-(NSPR).html
-\ingroup qtwebengine-licensing
-\brief MPL 1.1/GPL 2.0/LGPL 2.1
-\title Netscape Portable Runtime (NSPR)
-
-\l{http://www.mozilla.org/projects/nspr/}{Project Homepage}
-
-\badcode
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is the Netscape Portable Runtime (NSPR).
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998-2000
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** * /
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-Network-Security-Services-(NSS).html
-\ingroup qtwebengine-licensing
-\brief MPL 1.1/GPL 2.0/LGPL 2.1
-\title Network Security Services (NSS)
-
-\l{http://www.mozilla.org/projects/security/pki/nss/}{Project Homepage}
-
-\badcode
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is the Netscape security libraries.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1994-2000
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** * /
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-OTS-(OpenType-Sanitizer).html
-\ingroup qtwebengine-licensing
-\brief BSD
-\title OTS (OpenType Sanitizer)
-
-\l{https://github.com/khaledhosny/ots.git}{Project Homepage}
-
-\badcode
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-OpenH264.html
-\ingroup qtwebengine-licensing
-\brief 2-Clause BSD
-\title OpenH264
-
-\l{http://www.openh264.org/}{Project Homepage}
-
-\badcode
-Copyright (c) 2013, Cisco Systems
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
-* Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
-* Redistributions in binary form must reproduce the above copyright notice, this
- list of conditions and the following disclaimer in the documentation and/or
- other materials provided with the distribution.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
-ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
-ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-OpenMAX-DL.html
-\ingroup qtwebengine-licensing
-\brief BSD
-\title OpenMAX DL
-
-\l{https://silver.arm.com/download/Software/Graphics/OX000-BU-00010-r1p0-00bet0/OX000-BU-00010-r1p0-00bet0.tgz}{Project Homepage}
-
-\badcode
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file in the root of the source tree. All
-contributing project authors may be found in the AUTHORS file in the
-root of the source tree.
-
-The files were originally licensed by ARM Limited.
-
-The following files:
-
- * dl/api/omxtypes.h
- * dl/sp/api/omxSP.h
-
-are licensed by Khronos:
-
-Copyright © 2005-2008 The Khronos Group Inc. All Rights Reserved.
-
-These materials are protected by copyright laws and contain material
-proprietary to the Khronos Group, Inc. You may use these materials
-for implementing Khronos specifications, without altering or removing
-any trademark, copyright or other notice from the specification.
-
-Khronos Group makes no, and expressly disclaims any, representations
-or warranties, express or implied, regarding these materials, including,
-without limitation, any implied warranties of merchantability or fitness
-for a particular purpose or non-infringement of any intellectual property.
-Khronos Group makes no, and expressly disclaims any, warranties, express
-or implied, regarding the correctness, accuracy, completeness, timeliness,
-and reliability of these materials.
-
-Under no circumstances will the Khronos Group, or any of its Promoters,
-Contributors or Members or their respective partners, officers, directors,
-employees, agents or representatives be liable for any damages, whether
-direct, indirect, special or consequential damages for lost revenues,
-lost profits, or otherwise, arising from or in connection with these
-materials.
-
-Khronos and OpenMAX are trademarks of the Khronos Group Inc.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-PLY-(Python-Lex-Yacc).html
-\ingroup qtwebengine-licensing
-\brief BSD
-\title PLY (Python Lex-Yacc)
-
-\l{http://www.dabeaz.com/ply/ply-3.4.tar.gz}{Project Homepage}
-
-\badcode
-PLY (Python Lex-Yacc) Version 3.4
-
-Copyright (C) 2001-2011,
-David M. Beazley (Dabeaz LLC)
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
-* Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-* Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-* Neither the name of the David Beazley or Dabeaz LLC may be used to
- endorse or promote products derived from this software without
- specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-Paul-Hsieh's-SuperFastHash.html
-\ingroup qtwebengine-licensing
-\brief BSD
-\title Paul Hsieh's SuperFastHash
-
-\l{http://www.azillionmonkeys.com/qed/hash.html}{Project Homepage}
-
-\badcode
-Paul Hsieh OLD BSD license
-
-Copyright (c) 2010, Paul Hsieh
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
-* Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-* Redistributions in binary form must reproduce the above copyright notice, this
- list of conditions and the following disclaimer in the documentation and/or
- other materials provided with the distribution.
-* Neither my name, Paul Hsieh, nor the names of any other contributors to the
- code use may not be used to endorse or promote products derived from this
- software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
-ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-Proguard.html
-\ingroup qtwebengine-licensing
-\brief GNU General Public License (GPL), version 2
-\title Proguard
-
-\l{http://proguard.sourceforge.net/}{Project Homepage}
-
-\badcode
- GNU GENERAL PUBLIC LICENSE
- Version 2, June 1991
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users. This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it. (Some other Free Software Foundation software is covered by
-the GNU Library General Public License instead.) You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
- To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have. You must make sure that they, too, receive or can get the
-source code. And you must show them these terms so they know their
-rights.
-
- We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
- Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software. If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
- Finally, any free program is threatened constantly by software
-patents. We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary. To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- GNU GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License. The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language. (Hereinafter, translation is included without limitation in
-the term "modification".) Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
- 1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
- 2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) You must cause the modified files to carry prominent notices
- stating that you changed the files and the date of any change.
-
- b) You must cause any work that you distribute or publish, that in
- whole or in part contains or is derived from the Program or any
- part thereof, to be licensed as a whole at no charge to all third
- parties under the terms of this License.
-
- c) If the modified program normally reads commands interactively
- when run, you must cause it, when started running for such
- interactive use in the most ordinary way, to print or display an
- announcement including an appropriate copyright notice and a
- notice that there is no warranty (or else, saying that you provide
- a warranty) and that users may redistribute the program under
- these conditions, and telling the user how to view a copy of this
- License. (Exception: if the Program itself is interactive but
- does not normally print such an announcement, your work based on
- the Program is not required to print an announcement.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
- a) Accompany it with the complete corresponding machine-readable
- source code, which must be distributed under the terms of Sections
- 1 and 2 above on a medium customarily used for software interchange; or,
-
- b) Accompany it with a written offer, valid for at least three
- years, to give any third party, for a charge no more than your
- cost of physically performing source distribution, a complete
- machine-readable copy of the corresponding source code, to be
- distributed under the terms of Sections 1 and 2 above on a medium
- customarily used for software interchange; or,
-
- c) Accompany it with the information you received as to the offer
- to distribute corresponding source code. (This alternative is
- allowed only for noncommercial distribution and only if you
- received the program in object code or executable form with such
- an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it. For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable. However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License. Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
- 5. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Program or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
- 6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
- 7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all. For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 8. If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded. In such case, this License incorporates
-the limitation as if written in the body of this License.
-
- 9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation. If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
- 10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission. For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this. Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
- NO WARRANTY
-
- 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
- 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Programs
-
- If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
- To do so, attach the following notices to the program. It is safest
-to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
- &lt;one line to give the program's name and a brief idea of what it does.&gt;
- Copyright (C) &lt;year&gt; &lt;name of author&gt;
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
-
-Also add information on how to contact you by electronic and paper mail.
-
-If the program is interactive, make it output a short notice like this
-when it starts in an interactive mode:
-
- Gnomovision version 69, Copyright (C) year name of author
- Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
- This is free software, and you are welcome to redistribute it
- under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License. Of course, the commands you use may
-be called something other than `show w' and `show c'; they could even be
-mouse-clicks or menu items--whatever suits your program.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the program, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the program
- `Gnomovision' (which makes passes at compilers) written by James Hacker.
-
- &lt;signature of Ty Coon&gt;, 1 April 1989
- Ty Coon, President of Vice
-
-This General Public License does not permit incorporating your program into
-proprietary programs. If your program is a subroutine library, you may
-consider it more useful to permit linking proprietary applications with the
-library. If this is what you want to do, use the GNU Library General
-Public License instead of this License.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-Protocol-Buffers.html
-\ingroup qtwebengine-licensing
-\brief BSD
-\title Protocol Buffers
-
-\l{http://protobuf.googlecode.com/svn/trunk}{Project Homepage}
-
-\badcode
-Copyright 2008, Google Inc.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
- * Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above
-copyright notice, this list of conditions and the following disclaimer
-in the documentation and/or other materials provided with the
-distribution.
- * Neither the name of Google Inc. nor the names of its
-contributors may be used to endorse or promote products derived from
-this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-Code generated by the Protocol Buffer compiler is owned by the owner
-of the input file used when generating it. This code is not
-standalone and requires a support library to be linked with it. This
-support library is itself covered by the above license.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-Quick-Color-Management-System.html
-\ingroup qtwebengine-licensing
-\brief MIT
-\title Quick Color Management System
-
-\l{https://github.com/jrmuizel/qcms/tree/v4}{Project Homepage}
-
-\badcode
-qcms
-Copyright (C) 2009 Mozilla Corporation
-Copyright (C) 1998-2007 Marti Maria
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the "Software"),
-to deal in the Software without restriction, including without limitation
-the rights to use, copy, modify, merge, publish, distribute, sublicense,
-and/or sell copies of the Software, and to permit persons to whom the Software
-is furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
-THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-SMHasher.html
-\ingroup qtwebengine-licensing
-\brief MIT, Public Domain
-\title SMHasher
-
-\l{http://code.google.com/p/smhasher/}{Project Homepage}
-
-\badcode
-All MurmurHash source files are placed in the public domain.
-
-The license below applies to all other code in SMHasher:
-
-Copyright (c) 2011 Google, Inc.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-Skia.html
-\ingroup qtwebengine-licensing
-\brief BSD
-\title Skia
-
-\l{https://skia.org/}{Project Homepage}
-
-\badcode
-// Copyright (c) 2011 Google Inc. All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
---------------------------------------------------------------------------------
-third_party/etc1 is under the following license:
-
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
---------------------------------------------------------------------------------
-Some files under resources are under the following license:
-
-Unlimited Commercial Use
-We try to make it clear that you may use all clipart from Openclipart even for unlimited commercial use. We believe that giving away our images is a great way to share with the world our talents and that will come back around in a better form.
-
-May I Use Openclipart for?
-We put together a small chart of as many possibilities and questions we have heard from people asking how they may use Openclipart. If you have an additional question, please email love@openclipart.org.
-
-All Clipart are Released into the Public Domain.
-Each artist at Openclipart releases all rights to the images they share at Openclipart. The reason is so that there is no friction in using and sharing images authors make available at this website so that each artist might also receive the same benefit in using other artists clipart totally for any possible reason.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-Snappy:-A-fast-compressor/decompressor.html
-\ingroup qtwebengine-licensing
-\brief New BSD
-\title Snappy: A fast compressor/decompressor
-
-\l{http://google.github.io/snappy/}{Project Homepage}
-
-\badcode
-Copyright 2011, Google Inc.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
- * Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above
-copyright notice, this list of conditions and the following disclaimer
-in the documentation and/or other materials provided with the
-distribution.
- * Neither the name of Google Inc. nor the names of its
-contributors may be used to endorse or promote products derived from
-this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-Speech-Dispatcher.html
-\ingroup qtwebengine-licensing
-\brief GPL (v2 or later)
-\title Speech Dispatcher
-
-\l{http://devel.freebsoft.org/speechd}{Project Homepage}
-
-\badcode
- GNU GENERAL PUBLIC LICENSE
- Version 2, June 1991
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
- 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users. This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it. (Some other Free Software Foundation software is covered by
-the GNU Library General Public License instead.) You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
- To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have. You must make sure that they, too, receive or can get the
-source code. And you must show them these terms so they know their
-rights.
-
- We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
- Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software. If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
- Finally, any free program is threatened constantly by software
-patents. We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary. To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- GNU GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License. The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language. (Hereinafter, translation is included without limitation in
-the term "modification".) Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
- 1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
- 2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) You must cause the modified files to carry prominent notices
- stating that you changed the files and the date of any change.
-
- b) You must cause any work that you distribute or publish, that in
- whole or in part contains or is derived from the Program or any
- part thereof, to be licensed as a whole at no charge to all third
- parties under the terms of this License.
-
- c) If the modified program normally reads commands interactively
- when run, you must cause it, when started running for such
- interactive use in the most ordinary way, to print or display an
- announcement including an appropriate copyright notice and a
- notice that there is no warranty (or else, saying that you provide
- a warranty) and that users may redistribute the program under
- these conditions, and telling the user how to view a copy of this
- License. (Exception: if the Program itself is interactive but
- does not normally print such an announcement, your work based on
- the Program is not required to print an announcement.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
- a) Accompany it with the complete corresponding machine-readable
- source code, which must be distributed under the terms of Sections
- 1 and 2 above on a medium customarily used for software interchange; or,
-
- b) Accompany it with a written offer, valid for at least three
- years, to give any third party, for a charge no more than your
- cost of physically performing source distribution, a complete
- machine-readable copy of the corresponding source code, to be
- distributed under the terms of Sections 1 and 2 above on a medium
- customarily used for software interchange; or,
-
- c) Accompany it with the information you received as to the offer
- to distribute corresponding source code. (This alternative is
- allowed only for noncommercial distribution and only if you
- received the program in object code or executable form with such
- an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it. For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable. However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License. Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
- 5. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Program or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
- 6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
- 7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all. For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 8. If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded. In such case, this License incorporates
-the limitation as if written in the body of this License.
-
- 9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation. If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
- 10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission. For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this. Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
- NO WARRANTY
-
- 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
- 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Programs
-
- If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
- To do so, attach the following notices to the program. It is safest
-to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
- &lt;one line to give the program's name and a brief idea of what it does.&gt;
- Copyright (C) &lt;year&gt; &lt;name of author&gt;
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-
-
-Also add information on how to contact you by electronic and paper mail.
-
-If the program is interactive, make it output a short notice like this
-when it starts in an interactive mode:
-
- Gnomovision version 69, Copyright (C) year name of author
- Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
- This is free software, and you are welcome to redistribute it
- under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License. Of course, the commands you use may
-be called something other than `show w' and `show c'; they could even be
-mouse-clicks or menu items--whatever suits your program.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the program, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the program
- `Gnomovision' (which makes passes at compilers) written by James Hacker.
-
- &lt;signature of Ty Coon&gt;, 1 April 1989
- Ty Coon, President of Vice
-
-This General Public License does not permit incorporating your program into
-proprietary programs. If your program is a subroutine library, you may
-consider it more useful to permit linking proprietary applications with the
-library. If this is what you want to do, use the GNU Library General
-Public License instead of this License.
-
-
-
-
-
- GNU LESSER GENERAL PUBLIC LICENSE
- Version 2.1, February 1999
-
- Copyright (C) 1991, 1999 Free Software Foundation, Inc.
- 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-[This is the first released version of the Lesser GPL. It also counts
- as the successor of the GNU Library Public License, version 2, hence
- the version number 2.1.]
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-Licenses are intended to guarantee your freedom to share and change
-free software--to make sure the software is free for all its users.
-
- This license, the Lesser General Public License, applies to some
-specially designated software packages--typically libraries--of the
-Free Software Foundation and other authors who decide to use it. You
-can use it too, but we suggest you first think carefully about whether
-this license or the ordinary General Public License is the better
-strategy to use in any particular case, based on the explanations
-below.
-
- When we speak of free software, we are referring to freedom of use,
-not price. Our General Public Licenses are designed to make sure that
-you have the freedom to distribute copies of free software (and charge
-for this service if you wish); that you receive source code or can get
-it if you want it; that you can change the software and use pieces of
-it in new free programs; and that you are informed that you can do
-these things.
-
- To protect your rights, we need to make restrictions that forbid
-distributors to deny you these rights or to ask you to surrender these
-rights. These restrictions translate to certain responsibilities for
-you if you distribute copies of the library or if you modify it.
-
- For example, if you distribute copies of the library, whether gratis
-or for a fee, you must give the recipients all the rights that we gave
-you. You must make sure that they, too, receive or can get the source
-code. If you link other code with the library, you must provide
-complete object files to the recipients, so that they can relink them
-with the library after making changes to the library and recompiling
-it. And you must show them these terms so they know their rights.
-
- We protect your rights with a two-step method: (1) we copyright the
-library, and (2) we offer you this license, which gives you legal
-permission to copy, distribute and/or modify the library.
-
- To protect each distributor, we want to make it very clear that
-there is no warranty for the free library. Also, if the library is
-modified by someone else and passed on, the recipients should know
-that what they have is not the original version, so that the original
-author's reputation will not be affected by problems that might be
-introduced by others.
-
- Finally, software patents pose a constant threat to the existence of
-any free program. We wish to make sure that a company cannot
-effectively restrict the users of a free program by obtaining a
-restrictive license from a patent holder. Therefore, we insist that
-any patent license obtained for a version of the library must be
-consistent with the full freedom of use specified in this license.
-
- Most GNU software, including some libraries, is covered by the
-ordinary GNU General Public License. This license, the GNU Lesser
-General Public License, applies to certain designated libraries, and
-is quite different from the ordinary General Public License. We use
-this license for certain libraries in order to permit linking those
-libraries into non-free programs.
-
- When a program is linked with a library, whether statically or using
-a shared library, the combination of the two is legally speaking a
-combined work, a derivative of the original library. The ordinary
-General Public License therefore permits such linking only if the
-entire combination fits its criteria of freedom. The Lesser General
-Public License permits more lax criteria for linking other code with
-the library.
-
- We call this license the "Lesser" General Public License because it
-does Less to protect the user's freedom than the ordinary General
-Public License. It also provides other free software developers Less
-of an advantage over competing non-free programs. These disadvantages
-are the reason we use the ordinary General Public License for many
-libraries. However, the Lesser license provides advantages in certain
-special circumstances.
-
- For example, on rare occasions, there may be a special need to
-encourage the widest possible use of a certain library, so that it
-becomes a de-facto standard. To achieve this, non-free programs must
-be allowed to use the library. A more frequent case is that a free
-library does the same job as widely used non-free libraries. In this
-case, there is little to gain by limiting the free library to free
-software only, so we use the Lesser General Public License.
-
- In other cases, permission to use a particular library in non-free
-programs enables a greater number of people to use a large body of
-free software. For example, permission to use the GNU C Library in
-non-free programs enables many more people to use the whole GNU
-operating system, as well as its variant, the GNU/Linux operating
-system.
-
- Although the Lesser General Public License is Less protective of the
-users' freedom, it does ensure that the user of a program that is
-linked with the Library has the freedom and the wherewithal to run
-that program using a modified version of the Library.
-
- The precise terms and conditions for copying, distribution and
-modification follow. Pay close attention to the difference between a
-"work based on the library" and a "work that uses the library". The
-former contains code derived from the library, whereas the latter must
-be combined with the library in order to run.
-
- GNU LESSER GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License Agreement applies to any software library or other
-program which contains a notice placed by the copyright holder or
-other authorized party saying it may be distributed under the terms of
-this Lesser General Public License (also called "this License").
-Each licensee is addressed as "you".
-
- A "library" means a collection of software functions and/or data
-prepared so as to be conveniently linked with application programs
-(which use some of those functions and data) to form executables.
-
- The "Library", below, refers to any such software library or work
-which has been distributed under these terms. A "work based on the
-Library" means either the Library or any derivative work under
-copyright law: that is to say, a work containing the Library or a
-portion of it, either verbatim or with modifications and/or translated
-straightforwardly into another language. (Hereinafter, translation is
-included without limitation in the term "modification".)
-
- "Source code" for a work means the preferred form of the work for
-making modifications to it. For a library, complete source code means
-all the source code for all modules it contains, plus any associated
-interface definition files, plus the scripts used to control
-compilation and installation of the library.
-
- Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running a program using the Library is not restricted, and output from
-such a program is covered only if its contents constitute a work based
-on the Library (independent of the use of the Library in a tool for
-writing it). Whether that is true depends on what the Library does
-and what the program that uses the Library does.
-
- 1. You may copy and distribute verbatim copies of the Library's
-complete source code as you receive it, in any medium, provided that
-you conspicuously and appropriately publish on each copy an
-appropriate copyright notice and disclaimer of warranty; keep intact
-all the notices that refer to this License and to the absence of any
-warranty; and distribute a copy of this License along with the
-Library.
-
- You may charge a fee for the physical act of transferring a copy,
-and you may at your option offer warranty protection in exchange for a
-fee.
-
- 2. You may modify your copy or copies of the Library or any portion
-of it, thus forming a work based on the Library, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) The modified work must itself be a software library.
-
- b) You must cause the files modified to carry prominent notices
- stating that you changed the files and the date of any change.
-
- c) You must cause the whole of the work to be licensed at no
- charge to all third parties under the terms of this License.
-
- d) If a facility in the modified Library refers to a function or a
- table of data to be supplied by an application program that uses
- the facility, other than as an argument passed when the facility
- is invoked, then you must make a good faith effort to ensure that,
- in the event an application does not supply such function or
- table, the facility still operates, and performs whatever part of
- its purpose remains meaningful.
-
- (For example, a function in a library to compute square roots has
- a purpose that is entirely well-defined independent of the
- application. Therefore, Subsection 2d requires that any
- application-supplied function or table used by this function must
- be optional: if the application does not supply it, the square
- root function must still compute square roots.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Library,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Library, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote
-it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Library.
-
-In addition, mere aggregation of another work not based on the Library
-with the Library (or with a work based on the Library) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may opt to apply the terms of the ordinary GNU General Public
-License instead of this License to a given copy of the Library. To do
-this, you must alter all the notices that refer to this License, so
-that they refer to the ordinary GNU General Public License, version 2,
-instead of to this License. (If a newer version than version 2 of the
-ordinary GNU General Public License has appeared, then you can specify
-that version instead if you wish.) Do not make any other change in
-these notices.
-
- Once this change is made in a given copy, it is irreversible for
-that copy, so the ordinary GNU General Public License applies to all
-subsequent copies and derivative works made from that copy.
-
- This option is useful when you wish to copy part of the code of
-the Library into a program that is not a library.
-
- 4. You may copy and distribute the Library (or a portion or
-derivative of it, under Section 2) in object code or executable form
-under the terms of Sections 1 and 2 above provided that you accompany
-it with the complete corresponding machine-readable source code, which
-must be distributed under the terms of Sections 1 and 2 above on a
-medium customarily used for software interchange.
-
- If distribution of object code is made by offering access to copy
-from a designated place, then offering equivalent access to copy the
-source code from the same place satisfies the requirement to
-distribute the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 5. A program that contains no derivative of any portion of the
-Library, but is designed to work with the Library by being compiled or
-linked with it, is called a "work that uses the Library". Such a
-work, in isolation, is not a derivative work of the Library, and
-therefore falls outside the scope of this License.
-
- However, linking a "work that uses the Library" with the Library
-creates an executable that is a derivative of the Library (because it
-contains portions of the Library), rather than a "work that uses the
-library". The executable is therefore covered by this License.
-Section 6 states terms for distribution of such executables.
-
- When a "work that uses the Library" uses material from a header file
-that is part of the Library, the object code for the work may be a
-derivative work of the Library even though the source code is not.
-Whether this is true is especially significant if the work can be
-linked without the Library, or if the work is itself a library. The
-threshold for this to be true is not precisely defined by law.
-
- If such an object file uses only numerical parameters, data
-structure layouts and accessors, and small macros and small inline
-functions (ten lines or less in length), then the use of the object
-file is unrestricted, regardless of whether it is legally a derivative
-work. (Executables containing this object code plus portions of the
-Library will still fall under Section 6.)
-
- Otherwise, if the work is a derivative of the Library, you may
-distribute the object code for the work under the terms of Section 6.
-Any executables containing that work also fall under Section 6,
-whether or not they are linked directly with the Library itself.
-
- 6. As an exception to the Sections above, you may also combine or
-link a "work that uses the Library" with the Library to produce a
-work containing portions of the Library, and distribute that work
-under terms of your choice, provided that the terms permit
-modification of the work for the customer's own use and reverse
-engineering for debugging such modifications.
-
- You must give prominent notice with each copy of the work that the
-Library is used in it and that the Library and its use are covered by
-this License. You must supply a copy of this License. If the work
-during execution displays copyright notices, you must include the
-copyright notice for the Library among them, as well as a reference
-directing the user to the copy of this License. Also, you must do one
-of these things:
-
- a) Accompany the work with the complete corresponding
- machine-readable source code for the Library including whatever
- changes were used in the work (which must be distributed under
- Sections 1 and 2 above); and, if the work is an executable linked
- with the Library, with the complete machine-readable "work that
- uses the Library", as object code and/or source code, so that the
- user can modify the Library and then relink to produce a modified
- executable containing the modified Library. (It is understood
- that the user who changes the contents of definitions files in the
- Library will not necessarily be able to recompile the application
- to use the modified definitions.)
-
- b) Use a suitable shared library mechanism for linking with the
- Library. A suitable mechanism is one that (1) uses at run time a
- copy of the library already present on the user's computer system,
- rather than copying library functions into the executable, and (2)
- will operate properly with a modified version of the library, if
- the user installs one, as long as the modified version is
- interface-compatible with the version that the work was made with.
-
- c) Accompany the work with a written offer, valid for at least
- three years, to give the same user the materials specified in
- Subsection 6a, above, for a charge no more than the cost of
- performing this distribution.
-
- d) If distribution of the work is made by offering access to copy
- from a designated place, offer equivalent access to copy the above
- specified materials from the same place.
-
- e) Verify that the user has already received a copy of these
- materials or that you have already sent this user a copy.
-
- For an executable, the required form of the "work that uses the
-Library" must include any data and utility programs needed for
-reproducing the executable from it. However, as a special exception,
-the materials to be distributed need not include anything that is
-normally distributed (in either source or binary form) with the major
-components (compiler, kernel, and so on) of the operating system on
-which the executable runs, unless that component itself accompanies
-the executable.
-
- It may happen that this requirement contradicts the license
-restrictions of other proprietary libraries that do not normally
-accompany the operating system. Such a contradiction means you cannot
-use both them and the Library together in an executable that you
-distribute.
-
- 7. You may place library facilities that are a work based on the
-Library side-by-side in a single library together with other library
-facilities not covered by this License, and distribute such a combined
-library, provided that the separate distribution of the work based on
-the Library and of the other library facilities is otherwise
-permitted, and provided that you do these two things:
-
- a) Accompany the combined library with a copy of the same work
- based on the Library, uncombined with any other library
- facilities. This must be distributed under the terms of the
- Sections above.
-
- b) Give prominent notice with the combined library of the fact
- that part of it is a work based on the Library, and explaining
- where to find the accompanying uncombined form of the same work.
-
- 8. You may not copy, modify, sublicense, link with, or distribute
-the Library except as expressly provided under this License. Any
-attempt otherwise to copy, modify, sublicense, link with, or
-distribute the Library is void, and will automatically terminate your
-rights under this License. However, parties who have received copies,
-or rights, from you under this License will not have their licenses
-terminated so long as such parties remain in full compliance.
-
- 9. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Library or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Library (or any work based on the
-Library), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Library or works based on it.
-
- 10. Each time you redistribute the Library (or any work based on the
-Library), the recipient automatically receives a license from the
-original licensor to copy, distribute, link with or modify the Library
-subject to these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties with
-this License.
-
- 11. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Library at all. For example, if a patent
-license would not permit royalty-free redistribution of the Library by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Library.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply, and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 12. If the distribution and/or use of the Library is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Library under this License
-may add an explicit geographical distribution limitation excluding those
-countries, so that distribution is permitted only in or among
-countries not thus excluded. In such case, this License incorporates
-the limitation as if written in the body of this License.
-
- 13. The Free Software Foundation may publish revised and/or new
-versions of the Lesser General Public License from time to time.
-Such new versions will be similar in spirit to the present version,
-but may differ in detail to address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Library
-specifies a version number of this License which applies to it and
-"any later version", you have the option of following the terms and
-conditions either of that version or of any later version published by
-the Free Software Foundation. If the Library does not specify a
-license version number, you may choose any version ever published by
-the Free Software Foundation.
-
- 14. If you wish to incorporate parts of the Library into other free
-programs whose distribution conditions are incompatible with these,
-write to the author to ask for permission. For software which is
-copyrighted by the Free Software Foundation, write to the Free
-Software Foundation; we sometimes make exceptions for this. Our
-decision will be guided by the two goals of preserving the free status
-of all derivatives of our free software and of promoting the sharing
-and reuse of software generally.
-
- NO WARRANTY
-
- 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
-WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
-EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
-OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
-KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
-LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
-THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
- 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
-WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
-AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
-FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
-CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
-LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
-RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
-FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
-SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
-
-
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-Strongtalk.html
-\ingroup qtwebengine-licensing
-\brief BSD
-\title Strongtalk
-
-\l{http://www.strongtalk.org/}{Project Homepage}
-
-\badcode
-Copyright (c) 1994-2006 Sun Microsystems Inc.
-All Rights Reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
-- Redistributions of source code must retain the above copyright notice,
-this list of conditions and the following disclaimer.
-
-- Redistribution in binary form must reproduce the above copyright
-notice, this list of conditions and the following disclaimer in the
-documentation and/or other materials provided with the distribution.
-
-- Neither the name of Sun Microsystems or the names of contributors may
-be used to endorse or promote products derived from this software without
-specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
-IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
-CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-Sudden-Motion-Sensor-library.html
-\ingroup qtwebengine-licensing
-\brief University of Illinois/NCSA Open Source License
-\title Sudden Motion Sensor library
-
-\l{http://www.suitable.com/tools/smslib.html}{Project Homepage}
-
-\badcode
-SMSLib Sudden Motion Sensor Access Library
-Copyright (c) 2010 Suitable Systems
-All rights reserved.
-
-Developed by: Daniel Griscom
- Suitable Systems
- http://www.suitable.com
-
-Permission is hereby granted, free of charge, to any person obtaining a
-copy of this software and associated documentation files (the
-"Software"), to deal with the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-- Redistributions of source code must retain the above copyright notice,
-this list of conditions and the following disclaimers.
-
-- Redistributions in binary form must reproduce the above copyright
-notice, this list of conditions and the following disclaimers in the
-documentation and/or other materials provided with the distribution.
-
-- Neither the names of Suitable Systems nor the names of its
-contributors may be used to endorse or promote products derived from
-this Software without specific prior written permission.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR
-ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE SOFTWARE.
-
-For more information about SMSLib, see
- &lt;http://www.suitable.com/tools/smslib.html&gt;
-or contact
- Daniel Griscom
- Suitable Systems
- 1 Centre Street, Suite 204
- Wakefield, MA 01880
- (781) 665-0053
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-SwiftShader-software-renderer..html
-\ingroup qtwebengine-licensing
-\brief Proprietary
-\title SwiftShader software renderer.
-
-\l{http://transgaming.com/business/swiftshader}{Project Homepage}
-
-\badcode
-This product includes SwiftShader Software GPU Tookit,
-Copyright(c)2003-2011 TransGaming Inc
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-The-USB-ID-Repository.html
-\ingroup qtwebengine-licensing
-\brief BSD
-\title The USB ID Repository
-
-\l{http://www.linux-usb.org/usb-ids.html}{Project Homepage}
-
-\badcode
-Copyright (c) 2012, Linux USB Project
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
-
-o Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
-o Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
-o Neither the name of the Linux USB Project nor the names of its
- contributors may be used to endorse or promote products derived from
- this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-V8-JavaScript-Engine.html
-\ingroup qtwebengine-licensing
-\brief BSD
-\title V8 JavaScript Engine
-
-\l{http://code.google.com/p/v8}{Project Homepage}
-
-\badcode
-This license applies to all parts of V8 that are not externally
-maintained libraries. The externally maintained libraries used by V8
-are:
-
- - PCRE test suite, located in
- test/mjsunit/third_party/regexp-pcre/regexp-pcre.js. This is based on the
- test suite from PCRE-7.3, which is copyrighted by the University
- of Cambridge and Google, Inc. The copyright notice and license
- are embedded in regexp-pcre.js.
-
- - Layout tests, located in test/mjsunit/third_party/object-keys. These are
- based on layout tests from webkit.org which are copyrighted by
- Apple Computer, Inc. and released under a 3-clause BSD license.
-
- - Strongtalk assembler, the basis of the files assembler-arm-inl.h,
- assembler-arm.cc, assembler-arm.h, assembler-ia32-inl.h,
- assembler-ia32.cc, assembler-ia32.h, assembler-x64-inl.h,
- assembler-x64.cc, assembler-x64.h, assembler-mips-inl.h,
- assembler-mips.cc, assembler-mips.h, assembler.cc and assembler.h.
- This code is copyrighted by Sun Microsystems Inc. and released
- under a 3-clause BSD license.
-
- - Valgrind client API header, located at third_party/valgrind/valgrind.h
- This is release under the BSD license.
-
-These libraries have their own licenses; we recommend you read them,
-as their terms may differ from the terms below.
-
-Further license information can be found in LICENSE files located in
-sub-directories.
-
-Copyright 2014, the V8 project authors. All rights reserved.
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
- * Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above
- copyright notice, this list of conditions and the following
- disclaimer in the documentation and/or other materials provided
- with the distribution.
- * Neither the name of Google Inc. nor the names of its
- contributors may be used to endorse or promote products derived
- from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-Web-Animations-JS.html
-\ingroup qtwebengine-licensing
-\brief Apache 2.0
-\title Web Animations JS
-
-\l{https://github.com/web-animations/web-animations-js}{Project Homepage}
-
-\badcode
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-WebKit.html
-\ingroup qtwebengine-licensing
-\brief BSD and GPL v2
-\title WebKit
-
-\l{http://webkit.org/}{Project Homepage}
-
-\badcode
-(WebKit doesn't distribute an explicit license. This LICENSE is derived from
-license text in the source.)
-
-Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
-2006, 2007 Alexander Kellett, Alexey Proskuryakov, Alex Mathews, Allan
-Sandfeld Jensen, Alp Toker, Anders Carlsson, Andrew Wellington, Antti
-Koivisto, Apple Inc., Arthur Langereis, Baron Schwartz, Bjoern Graf,
-Brent Fulgham, Cameron Zwarich, Charles Samuels, Christian Dywan,
-Collabora Ltd., Cyrus Patel, Daniel Molkentin, Dave Maclachlan, David
-Smith, Dawit Alemayehu, Dirk Mueller, Dirk Schulze, Don Gibson, Enrico
-Ros, Eric Seidel, Frederik Holljen, Frerich Raabe, Friedmann Kleint,
-George Staikos, Google Inc., Graham Dennis, Harri Porten, Henry Mason,
-Hiroyuki Ikezoe, Holger Hans Peter Freyther, IBM, James G. Speth, Jan
-Alonzo, Jean-Loup Gailly, John Reis, Jonas Witt, Jon Shier, Jonas
-Witt, Julien Chaffraix, Justin Haygood, Kevin Ollivier, Kevin Watters,
-Kimmo Kinnunen, Kouhei Sutou, Krzysztof Kowalczyk, Lars Knoll, Luca
-Bruno, Maks Orlovich, Malte Starostik, Mark Adler, Martin Jones,
-Marvin Decker, Matt Lilek, Michael Emmel, Mitz Pettel, mozilla.org,
-Netscape Communications Corporation, Nicholas Shanks, Nikolas
-Zimmermann, Nokia, Oliver Hunt, Opened Hand, Paul Johnston, Peter
-Kelly, Pioneer Research Center USA, Rich Moore, Rob Buis, Robin Dunn,
-Ronald Tschalär, Samuel Weinig, Simon Hausmann, Staikos Computing
-Services Inc., Stefan Schimanski, Symantec Corporation, The Dojo
-Foundation, The Karbon Developers, Thomas Boyer, Tim Copperfield,
-Tobias Anton, Torben Weis, Trolltech, University of Cambridge, Vaclav
-Slavik, Waldo Bastian, Xan Lopez, Zack Rusin
-
-The terms and conditions vary from file to file, but are one of:
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
-1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
-2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the
- distribution.
-
-*OR*
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
-1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the
- distribution.
-3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
- its contributors may be used to endorse or promote products derived
- from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
-EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
-CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-
- GNU LIBRARY GENERAL PUBLIC LICENSE
- Version 2, June 1991
-
- Copyright (C) 1991 Free Software Foundation, Inc.
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-[This is the first released version of the library GPL. It is
- numbered 2 because it goes with version 2 of the ordinary GPL.]
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-Licenses are intended to guarantee your freedom to share and change
-free software--to make sure the software is free for all its users.
-
- This license, the Library General Public License, applies to some
-specially designated Free Software Foundation software, and to any
-other libraries whose authors decide to use it. You can use it for
-your libraries, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
- To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if
-you distribute copies of the library, or if you modify it.
-
- For example, if you distribute copies of the library, whether gratis
-or for a fee, you must give the recipients all the rights that we gave
-you. You must make sure that they, too, receive or can get the source
-code. If you link a program with the library, you must provide
-complete object files to the recipients so that they can relink them
-with the library, after making changes to the library and recompiling
-it. And you must show them these terms so they know their rights.
-
- Our method of protecting your rights has two steps: (1) copyright
-the library, and (2) offer you this license which gives you legal
-permission to copy, distribute and/or modify the library.
-
- Also, for each distributor's protection, we want to make certain
-that everyone understands that there is no warranty for this free
-library. If the library is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original
-version, so that any problems introduced by others will not reflect on
-the original authors' reputations.
-
- Finally, any free program is threatened constantly by software
-patents. We wish to avoid the danger that companies distributing free
-software will individually obtain patent licenses, thus in effect
-transforming the program into proprietary software. To prevent this,
-we have made it clear that any patent must be licensed for everyone's
-free use or not licensed at all.
-
- Most GNU software, including some libraries, is covered by the ordinary
-GNU General Public License, which was designed for utility programs. This
-license, the GNU Library General Public License, applies to certain
-designated libraries. This license is quite different from the ordinary
-one; be sure to read it in full, and don't assume that anything in it is
-the same as in the ordinary license.
-
- The reason we have a separate public license for some libraries is that
-they blur the distinction we usually make between modifying or adding to a
-program and simply using it. Linking a program with a library, without
-changing the library, is in some sense simply using the library, and is
-analogous to running a utility program or application program. However, in
-a textual and legal sense, the linked executable is a combined work, a
-derivative of the original library, and the ordinary General Public License
-treats it as such.
-
- Because of this blurred distinction, using the ordinary General
-Public License for libraries did not effectively promote software
-sharing, because most developers did not use the libraries. We
-concluded that weaker conditions might promote sharing better.
-
- However, unrestricted linking of non-free programs would deprive the
-users of those programs of all benefit from the free status of the
-libraries themselves. This Library General Public License is intended to
-permit developers of non-free programs to use free libraries, while
-preserving your freedom as a user of such programs to change the free
-libraries that are incorporated in them. (We have not seen how to achieve
-this as regards changes in header files, but we have achieved it as regards
-changes in the actual functions of the Library.) The hope is that this
-will lead to faster development of free libraries.
-
- The precise terms and conditions for copying, distribution and
-modification follow. Pay close attention to the difference between a
-"work based on the library" and a "work that uses the library". The
-former contains code derived from the library, while the latter only
-works together with the library.
-
- Note that it is possible for a library to be covered by the ordinary
-General Public License rather than by this special one.
-
- GNU LIBRARY GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License Agreement applies to any software library which
-contains a notice placed by the copyright holder or other authorized
-party saying it may be distributed under the terms of this Library
-General Public License (also called "this License"). Each licensee is
-addressed as "you".
-
- A "library" means a collection of software functions and/or data
-prepared so as to be conveniently linked with application programs
-(which use some of those functions and data) to form executables.
-
- The "Library", below, refers to any such software library or work
-which has been distributed under these terms. A "work based on the
-Library" means either the Library or any derivative work under
-copyright law: that is to say, a work containing the Library or a
-portion of it, either verbatim or with modifications and/or translated
-straightforwardly into another language. (Hereinafter, translation is
-included without limitation in the term "modification".)
-
- "Source code" for a work means the preferred form of the work for
-making modifications to it. For a library, complete source code means
-all the source code for all modules it contains, plus any associated
-interface definition files, plus the scripts used to control compilation
-and installation of the library.
-
- Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running a program using the Library is not restricted, and output from
-such a program is covered only if its contents constitute a work based
-on the Library (independent of the use of the Library in a tool for
-writing it). Whether that is true depends on what the Library does
-and what the program that uses the Library does.
-
- 1. You may copy and distribute verbatim copies of the Library's
-complete source code as you receive it, in any medium, provided that
-you conspicuously and appropriately publish on each copy an
-appropriate copyright notice and disclaimer of warranty; keep intact
-all the notices that refer to this License and to the absence of any
-warranty; and distribute a copy of this License along with the
-Library.
-
- You may charge a fee for the physical act of transferring a copy,
-and you may at your option offer warranty protection in exchange for a
-fee.
-
- 2. You may modify your copy or copies of the Library or any portion
-of it, thus forming a work based on the Library, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) The modified work must itself be a software library.
-
- b) You must cause the files modified to carry prominent notices
- stating that you changed the files and the date of any change.
-
- c) You must cause the whole of the work to be licensed at no
- charge to all third parties under the terms of this License.
-
- d) If a facility in the modified Library refers to a function or a
- table of data to be supplied by an application program that uses
- the facility, other than as an argument passed when the facility
- is invoked, then you must make a good faith effort to ensure that,
- in the event an application does not supply such function or
- table, the facility still operates, and performs whatever part of
- its purpose remains meaningful.
-
- (For example, a function in a library to compute square roots has
- a purpose that is entirely well-defined independent of the
- application. Therefore, Subsection 2d requires that any
- application-supplied function or table used by this function must
- be optional: if the application does not supply it, the square
- root function must still compute square roots.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Library,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Library, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote
-it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Library.
-
-In addition, mere aggregation of another work not based on the Library
-with the Library (or with a work based on the Library) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may opt to apply the terms of the ordinary GNU General Public
-License instead of this License to a given copy of the Library. To do
-this, you must alter all the notices that refer to this License, so
-that they refer to the ordinary GNU General Public License, version 2,
-instead of to this License. (If a newer version than version 2 of the
-ordinary GNU General Public License has appeared, then you can specify
-that version instead if you wish.) Do not make any other change in
-these notices.
-
- Once this change is made in a given copy, it is irreversible for
-that copy, so the ordinary GNU General Public License applies to all
-subsequent copies and derivative works made from that copy.
-
- This option is useful when you wish to copy part of the code of
-the Library into a program that is not a library.
-
- 4. You may copy and distribute the Library (or a portion or
-derivative of it, under Section 2) in object code or executable form
-under the terms of Sections 1 and 2 above provided that you accompany
-it with the complete corresponding machine-readable source code, which
-must be distributed under the terms of Sections 1 and 2 above on a
-medium customarily used for software interchange.
-
- If distribution of object code is made by offering access to copy
-from a designated place, then offering equivalent access to copy the
-source code from the same place satisfies the requirement to
-distribute the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 5. A program that contains no derivative of any portion of the
-Library, but is designed to work with the Library by being compiled or
-linked with it, is called a "work that uses the Library". Such a
-work, in isolation, is not a derivative work of the Library, and
-therefore falls outside the scope of this License.
-
- However, linking a "work that uses the Library" with the Library
-creates an executable that is a derivative of the Library (because it
-contains portions of the Library), rather than a "work that uses the
-library". The executable is therefore covered by this License.
-Section 6 states terms for distribution of such executables.
-
- When a "work that uses the Library" uses material from a header file
-that is part of the Library, the object code for the work may be a
-derivative work of the Library even though the source code is not.
-Whether this is true is especially significant if the work can be
-linked without the Library, or if the work is itself a library. The
-threshold for this to be true is not precisely defined by law.
-
- If such an object file uses only numerical parameters, data
-structure layouts and accessors, and small macros and small inline
-functions (ten lines or less in length), then the use of the object
-file is unrestricted, regardless of whether it is legally a derivative
-work. (Executables containing this object code plus portions of the
-Library will still fall under Section 6.)
-
- Otherwise, if the work is a derivative of the Library, you may
-distribute the object code for the work under the terms of Section 6.
-Any executables containing that work also fall under Section 6,
-whether or not they are linked directly with the Library itself.
-
- 6. As an exception to the Sections above, you may also compile or
-link a "work that uses the Library" with the Library to produce a
-work containing portions of the Library, and distribute that work
-under terms of your choice, provided that the terms permit
-modification of the work for the customer's own use and reverse
-engineering for debugging such modifications.
-
- You must give prominent notice with each copy of the work that the
-Library is used in it and that the Library and its use are covered by
-this License. You must supply a copy of this License. If the work
-during execution displays copyright notices, you must include the
-copyright notice for the Library among them, as well as a reference
-directing the user to the copy of this License. Also, you must do one
-of these things:
-
- a) Accompany the work with the complete corresponding
- machine-readable source code for the Library including whatever
- changes were used in the work (which must be distributed under
- Sections 1 and 2 above); and, if the work is an executable linked
- with the Library, with the complete machine-readable "work that
- uses the Library", as object code and/or source code, so that the
- user can modify the Library and then relink to produce a modified
- executable containing the modified Library. (It is understood
- that the user who changes the contents of definitions files in the
- Library will not necessarily be able to recompile the application
- to use the modified definitions.)
-
- b) Accompany the work with a written offer, valid for at
- least three years, to give the same user the materials
- specified in Subsection 6a, above, for a charge no more
- than the cost of performing this distribution.
-
- c) If distribution of the work is made by offering access to copy
- from a designated place, offer equivalent access to copy the above
- specified materials from the same place.
-
- d) Verify that the user has already received a copy of these
- materials or that you have already sent this user a copy.
-
- For an executable, the required form of the "work that uses the
-Library" must include any data and utility programs needed for
-reproducing the executable from it. However, as a special exception,
-the source code distributed need not include anything that is normally
-distributed (in either source or binary form) with the major
-components (compiler, kernel, and so on) of the operating system on
-which the executable runs, unless that component itself accompanies
-the executable.
-
- It may happen that this requirement contradicts the license
-restrictions of other proprietary libraries that do not normally
-accompany the operating system. Such a contradiction means you cannot
-use both them and the Library together in an executable that you
-distribute.
-
- 7. You may place library facilities that are a work based on the
-Library side-by-side in a single library together with other library
-facilities not covered by this License, and distribute such a combined
-library, provided that the separate distribution of the work based on
-the Library and of the other library facilities is otherwise
-permitted, and provided that you do these two things:
-
- a) Accompany the combined library with a copy of the same work
- based on the Library, uncombined with any other library
- facilities. This must be distributed under the terms of the
- Sections above.
-
- b) Give prominent notice with the combined library of the fact
- that part of it is a work based on the Library, and explaining
- where to find the accompanying uncombined form of the same work.
-
- 8. You may not copy, modify, sublicense, link with, or distribute
-the Library except as expressly provided under this License. Any
-attempt otherwise to copy, modify, sublicense, link with, or
-distribute the Library is void, and will automatically terminate your
-rights under this License. However, parties who have received copies,
-or rights, from you under this License will not have their licenses
-terminated so long as such parties remain in full compliance.
-
- 9. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Library or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Library (or any work based on the
-Library), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Library or works based on it.
-
- 10. Each time you redistribute the Library (or any work based on the
-Library), the recipient automatically receives a license from the
-original licensor to copy, distribute, link with or modify the Library
-subject to these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
- 11. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Library at all. For example, if a patent
-license would not permit royalty-free redistribution of the Library by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Library.
-
-If any portion of this section is held invalid or unenforceable under any
-particular circumstance, the balance of the section is intended to apply,
-and the section as a whole is intended to apply in other circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 12. If the distribution and/or use of the Library is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Library under this License may add
-an explicit geographical distribution limitation excluding those countries,
-so that distribution is permitted only in or among countries not thus
-excluded. In such case, this License incorporates the limitation as if
-written in the body of this License.
-
- 13. The Free Software Foundation may publish revised and/or new
-versions of the Library General Public License from time to time.
-Such new versions will be similar in spirit to the present version,
-but may differ in detail to address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Library
-specifies a version number of this License which applies to it and
-"any later version", you have the option of following the terms and
-conditions either of that version or of any later version published by
-the Free Software Foundation. If the Library does not specify a
-license version number, you may choose any version ever published by
-the Free Software Foundation.
-
- 14. If you wish to incorporate parts of the Library into other free
-programs whose distribution conditions are incompatible with these,
-write to the author to ask for permission. For software which is
-copyrighted by the Free Software Foundation, write to the Free
-Software Foundation; we sometimes make exceptions for this. Our
-decision will be guided by the two goals of preserving the free status
-of all derivatives of our free software and of promoting the sharing
-and reuse of software generally.
-
- NO WARRANTY
-
- 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
-WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
-EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
-OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
-KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
-LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
-THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
- 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
-WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
-AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
-FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
-CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
-LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
-RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
-FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
-SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
- GNU LESSER GENERAL PUBLIC LICENSE
- Version 2.1, February 1999
-
- Copyright (C) 1991, 1999 Free Software Foundation, Inc.
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-[This is the first released version of the Lesser GPL. It also counts
- as the successor of the GNU Library Public License, version 2, hence
- the version number 2.1.]
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-Licenses are intended to guarantee your freedom to share and change
-free software--to make sure the software is free for all its users.
-
- This license, the Lesser General Public License, applies to some
-specially designated software packages--typically libraries--of the
-Free Software Foundation and other authors who decide to use it. You
-can use it too, but we suggest you first think carefully about whether
-this license or the ordinary General Public License is the better
-strategy to use in any particular case, based on the explanations below.
-
- When we speak of free software, we are referring to freedom of use,
-not price. Our General Public Licenses are designed to make sure that
-you have the freedom to distribute copies of free software (and charge
-for this service if you wish); that you receive source code or can get
-it if you want it; that you can change the software and use pieces of
-it in new free programs; and that you are informed that you can do
-these things.
-
- To protect your rights, we need to make restrictions that forbid
-distributors to deny you these rights or to ask you to surrender these
-rights. These restrictions translate to certain responsibilities for
-you if you distribute copies of the library or if you modify it.
-
- For example, if you distribute copies of the library, whether gratis
-or for a fee, you must give the recipients all the rights that we gave
-you. You must make sure that they, too, receive or can get the source
-code. If you link other code with the library, you must provide
-complete object files to the recipients, so that they can relink them
-with the library after making changes to the library and recompiling
-it. And you must show them these terms so they know their rights.
-
- We protect your rights with a two-step method: (1) we copyright the
-library, and (2) we offer you this license, which gives you legal
-permission to copy, distribute and/or modify the library.
-
- To protect each distributor, we want to make it very clear that
-there is no warranty for the free library. Also, if the library is
-modified by someone else and passed on, the recipients should know
-that what they have is not the original version, so that the original
-author's reputation will not be affected by problems that might be
-introduced by others.
-
- Finally, software patents pose a constant threat to the existence of
-any free program. We wish to make sure that a company cannot
-effectively restrict the users of a free program by obtaining a
-restrictive license from a patent holder. Therefore, we insist that
-any patent license obtained for a version of the library must be
-consistent with the full freedom of use specified in this license.
-
- Most GNU software, including some libraries, is covered by the
-ordinary GNU General Public License. This license, the GNU Lesser
-General Public License, applies to certain designated libraries, and
-is quite different from the ordinary General Public License. We use
-this license for certain libraries in order to permit linking those
-libraries into non-free programs.
-
- When a program is linked with a library, whether statically or using
-a shared library, the combination of the two is legally speaking a
-combined work, a derivative of the original library. The ordinary
-General Public License therefore permits such linking only if the
-entire combination fits its criteria of freedom. The Lesser General
-Public License permits more lax criteria for linking other code with
-the library.
-
- We call this license the "Lesser" General Public License because it
-does Less to protect the user's freedom than the ordinary General
-Public License. It also provides other free software developers Less
-of an advantage over competing non-free programs. These disadvantages
-are the reason we use the ordinary General Public License for many
-libraries. However, the Lesser license provides advantages in certain
-special circumstances.
-
- For example, on rare occasions, there may be a special need to
-encourage the widest possible use of a certain library, so that it becomes
-a de-facto standard. To achieve this, non-free programs must be
-allowed to use the library. A more frequent case is that a free
-library does the same job as widely used non-free libraries. In this
-case, there is little to gain by limiting the free library to free
-software only, so we use the Lesser General Public License.
-
- In other cases, permission to use a particular library in non-free
-programs enables a greater number of people to use a large body of
-free software. For example, permission to use the GNU C Library in
-non-free programs enables many more people to use the whole GNU
-operating system, as well as its variant, the GNU/Linux operating
-system.
-
- Although the Lesser General Public License is Less protective of the
-users' freedom, it does ensure that the user of a program that is
-linked with the Library has the freedom and the wherewithal to run
-that program using a modified version of the Library.
-
- The precise terms and conditions for copying, distribution and
-modification follow. Pay close attention to the difference between a
-"work based on the library" and a "work that uses the library". The
-former contains code derived from the library, whereas the latter must
-be combined with the library in order to run.
-
- GNU LESSER GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License Agreement applies to any software library or other
-program which contains a notice placed by the copyright holder or
-other authorized party saying it may be distributed under the terms of
-this Lesser General Public License (also called "this License").
-Each licensee is addressed as "you".
-
- A "library" means a collection of software functions and/or data
-prepared so as to be conveniently linked with application programs
-(which use some of those functions and data) to form executables.
-
- The "Library", below, refers to any such software library or work
-which has been distributed under these terms. A "work based on the
-Library" means either the Library or any derivative work under
-copyright law: that is to say, a work containing the Library or a
-portion of it, either verbatim or with modifications and/or translated
-straightforwardly into another language. (Hereinafter, translation is
-included without limitation in the term "modification".)
-
- "Source code" for a work means the preferred form of the work for
-making modifications to it. For a library, complete source code means
-all the source code for all modules it contains, plus any associated
-interface definition files, plus the scripts used to control compilation
-and installation of the library.
-
- Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running a program using the Library is not restricted, and output from
-such a program is covered only if its contents constitute a work based
-on the Library (independent of the use of the Library in a tool for
-writing it). Whether that is true depends on what the Library does
-and what the program that uses the Library does.
-
- 1. You may copy and distribute verbatim copies of the Library's
-complete source code as you receive it, in any medium, provided that
-you conspicuously and appropriately publish on each copy an
-appropriate copyright notice and disclaimer of warranty; keep intact
-all the notices that refer to this License and to the absence of any
-warranty; and distribute a copy of this License along with the
-Library.
-
- You may charge a fee for the physical act of transferring a copy,
-and you may at your option offer warranty protection in exchange for a
-fee.
-
- 2. You may modify your copy or copies of the Library or any portion
-of it, thus forming a work based on the Library, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) The modified work must itself be a software library.
-
- b) You must cause the files modified to carry prominent notices
- stating that you changed the files and the date of any change.
-
- c) You must cause the whole of the work to be licensed at no
- charge to all third parties under the terms of this License.
-
- d) If a facility in the modified Library refers to a function or a
- table of data to be supplied by an application program that uses
- the facility, other than as an argument passed when the facility
- is invoked, then you must make a good faith effort to ensure that,
- in the event an application does not supply such function or
- table, the facility still operates, and performs whatever part of
- its purpose remains meaningful.
-
- (For example, a function in a library to compute square roots has
- a purpose that is entirely well-defined independent of the
- application. Therefore, Subsection 2d requires that any
- application-supplied function or table used by this function must
- be optional: if the application does not supply it, the square
- root function must still compute square roots.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Library,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Library, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote
-it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Library.
-
-In addition, mere aggregation of another work not based on the Library
-with the Library (or with a work based on the Library) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may opt to apply the terms of the ordinary GNU General Public
-License instead of this License to a given copy of the Library. To do
-this, you must alter all the notices that refer to this License, so
-that they refer to the ordinary GNU General Public License, version 2,
-instead of to this License. (If a newer version than version 2 of the
-ordinary GNU General Public License has appeared, then you can specify
-that version instead if you wish.) Do not make any other change in
-these notices.
-
- Once this change is made in a given copy, it is irreversible for
-that copy, so the ordinary GNU General Public License applies to all
-subsequent copies and derivative works made from that copy.
-
- This option is useful when you wish to copy part of the code of
-the Library into a program that is not a library.
-
- 4. You may copy and distribute the Library (or a portion or
-derivative of it, under Section 2) in object code or executable form
-under the terms of Sections 1 and 2 above provided that you accompany
-it with the complete corresponding machine-readable source code, which
-must be distributed under the terms of Sections 1 and 2 above on a
-medium customarily used for software interchange.
-
- If distribution of object code is made by offering access to copy
-from a designated place, then offering equivalent access to copy the
-source code from the same place satisfies the requirement to
-distribute the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 5. A program that contains no derivative of any portion of the
-Library, but is designed to work with the Library by being compiled or
-linked with it, is called a "work that uses the Library". Such a
-work, in isolation, is not a derivative work of the Library, and
-therefore falls outside the scope of this License.
-
- However, linking a "work that uses the Library" with the Library
-creates an executable that is a derivative of the Library (because it
-contains portions of the Library), rather than a "work that uses the
-library". The executable is therefore covered by this License.
-Section 6 states terms for distribution of such executables.
-
- When a "work that uses the Library" uses material from a header file
-that is part of the Library, the object code for the work may be a
-derivative work of the Library even though the source code is not.
-Whether this is true is especially significant if the work can be
-linked without the Library, or if the work is itself a library. The
-threshold for this to be true is not precisely defined by law.
-
- If such an object file uses only numerical parameters, data
-structure layouts and accessors, and small macros and small inline
-functions (ten lines or less in length), then the use of the object
-file is unrestricted, regardless of whether it is legally a derivative
-work. (Executables containing this object code plus portions of the
-Library will still fall under Section 6.)
-
- Otherwise, if the work is a derivative of the Library, you may
-distribute the object code for the work under the terms of Section 6.
-Any executables containing that work also fall under Section 6,
-whether or not they are linked directly with the Library itself.
-
- 6. As an exception to the Sections above, you may also combine or
-link a "work that uses the Library" with the Library to produce a
-work containing portions of the Library, and distribute that work
-under terms of your choice, provided that the terms permit
-modification of the work for the customer's own use and reverse
-engineering for debugging such modifications.
-
- You must give prominent notice with each copy of the work that the
-Library is used in it and that the Library and its use are covered by
-this License. You must supply a copy of this License. If the work
-during execution displays copyright notices, you must include the
-copyright notice for the Library among them, as well as a reference
-directing the user to the copy of this License. Also, you must do one
-of these things:
-
- a) Accompany the work with the complete corresponding
- machine-readable source code for the Library including whatever
- changes were used in the work (which must be distributed under
- Sections 1 and 2 above); and, if the work is an executable linked
- with the Library, with the complete machine-readable "work that
- uses the Library", as object code and/or source code, so that the
- user can modify the Library and then relink to produce a modified
- executable containing the modified Library. (It is understood
- that the user who changes the contents of definitions files in the
- Library will not necessarily be able to recompile the application
- to use the modified definitions.)
-
- b) Use a suitable shared library mechanism for linking with the
- Library. A suitable mechanism is one that (1) uses at run time a
- copy of the library already present on the user's computer system,
- rather than copying library functions into the executable, and (2)
- will operate properly with a modified version of the library, if
- the user installs one, as long as the modified version is
- interface-compatible with the version that the work was made with.
-
- c) Accompany the work with a written offer, valid for at
- least three years, to give the same user the materials
- specified in Subsection 6a, above, for a charge no more
- than the cost of performing this distribution.
-
- d) If distribution of the work is made by offering access to copy
- from a designated place, offer equivalent access to copy the above
- specified materials from the same place.
-
- e) Verify that the user has already received a copy of these
- materials or that you have already sent this user a copy.
-
- For an executable, the required form of the "work that uses the
-Library" must include any data and utility programs needed for
-reproducing the executable from it. However, as a special exception,
-the materials to be distributed need not include anything that is
-normally distributed (in either source or binary form) with the major
-components (compiler, kernel, and so on) of the operating system on
-which the executable runs, unless that component itself accompanies
-the executable.
-
- It may happen that this requirement contradicts the license
-restrictions of other proprietary libraries that do not normally
-accompany the operating system. Such a contradiction means you cannot
-use both them and the Library together in an executable that you
-distribute.
-
- 7. You may place library facilities that are a work based on the
-Library side-by-side in a single library together with other library
-facilities not covered by this License, and distribute such a combined
-library, provided that the separate distribution of the work based on
-the Library and of the other library facilities is otherwise
-permitted, and provided that you do these two things:
-
- a) Accompany the combined library with a copy of the same work
- based on the Library, uncombined with any other library
- facilities. This must be distributed under the terms of the
- Sections above.
-
- b) Give prominent notice with the combined library of the fact
- that part of it is a work based on the Library, and explaining
- where to find the accompanying uncombined form of the same work.
-
- 8. You may not copy, modify, sublicense, link with, or distribute
-the Library except as expressly provided under this License. Any
-attempt otherwise to copy, modify, sublicense, link with, or
-distribute the Library is void, and will automatically terminate your
-rights under this License. However, parties who have received copies,
-or rights, from you under this License will not have their licenses
-terminated so long as such parties remain in full compliance.
-
- 9. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Library or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Library (or any work based on the
-Library), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Library or works based on it.
-
- 10. Each time you redistribute the Library (or any work based on the
-Library), the recipient automatically receives a license from the
-original licensor to copy, distribute, link with or modify the Library
-subject to these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties with
-this License.
-
- 11. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Library at all. For example, if a patent
-license would not permit royalty-free redistribution of the Library by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Library.
-
-If any portion of this section is held invalid or unenforceable under any
-particular circumstance, the balance of the section is intended to apply,
-and the section as a whole is intended to apply in other circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 12. If the distribution and/or use of the Library is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Library under this License may add
-an explicit geographical distribution limitation excluding those countries,
-so that distribution is permitted only in or among countries not thus
-excluded. In such case, this License incorporates the limitation as if
-written in the body of this License.
-
- 13. The Free Software Foundation may publish revised and/or new
-versions of the Lesser General Public License from time to time.
-Such new versions will be similar in spirit to the present version,
-but may differ in detail to address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Library
-specifies a version number of this License which applies to it and
-"any later version", you have the option of following the terms and
-conditions either of that version or of any later version published by
-the Free Software Foundation. If the Library does not specify a
-license version number, you may choose any version ever published by
-the Free Software Foundation.
-
- 14. If you wish to incorporate parts of the Library into other free
-programs whose distribution conditions are incompatible with these,
-write to the author to ask for permission. For software which is
-copyrighted by the Free Software Foundation, write to the Free
-Software Foundation; we sometimes make exceptions for this. Our
-decision will be guided by the two goals of preserving the free status
-of all derivatives of our free software and of promoting the sharing
-and reuse of software generally.
-
- NO WARRANTY
-
- 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
-WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
-EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
-OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
-KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
-LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
-THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
- 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
-WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
-AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
-FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
-CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
-LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
-RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
-FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
-SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-WebM-container-parser-and-writer..html
-\ingroup qtwebengine-licensing
-\brief BSD
-\title WebM container parser and writer.
-
-\l{http://www.webmproject.org/code/}{Project Homepage}
-
-\badcode
-Copyright (c) 2010, Google Inc. All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
- * Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- * Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in
- the documentation and/or other materials provided with the
- distribution.
-
- * Neither the name of Google nor the names of its contributors may
- be used to endorse or promote products derived from this software
- without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-WebP-image-encoder/decoder.html
-\ingroup qtwebengine-licensing
-\brief BSD
-\title WebP image encoder/decoder
-
-\l{http://developers.google.com/speed/webp}{Project Homepage}
-
-\badcode
-Copyright (c) 2010, Google Inc. All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
- * Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- * Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in
- the documentation and/or other materials provided with the
- distribution.
-
- * Neither the name of Google nor the names of its contributors may
- be used to endorse or promote products derived from this software
- without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-Additional IP Rights Grant (Patents)
-------------------------------------
-
-"These implementations" means the copyrightable works that implement the WebM
-codecs distributed by Google as part of the WebM Project.
-
-Google hereby grants to you a perpetual, worldwide, non-exclusive, no-charge,
-royalty-free, irrevocable (except as stated in this section) patent license to
-make, have made, use, offer to sell, sell, import, transfer, and otherwise
-run, modify and propagate the contents of these implementations of WebM, where
-such license applies only to those patent claims, both currently owned by
-Google and acquired in the future, licensable by Google that are necessarily
-infringed by these implementations of WebM. This grant does not include claims
-that would be infringed only as a consequence of further modification of these
-implementations. If you or your agent or exclusive licensee institute or order
-or agree to the institution of patent litigation or any other patent
-enforcement activity against any entity (including a cross-claim or
-counterclaim in a lawsuit) alleging that any of these implementations of WebM
-or any code incorporated within any of these implementations of WebM
-constitute direct or contributory patent infringement, or inducement of
-patent infringement, then any patent rights granted to you under this License
-for these implementations of WebM shall terminate as of the date such
-litigation is filed.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-WebRTC.html
-\ingroup qtwebengine-licensing
-\brief BSD
-\title WebRTC
-
-\l{http://www.webrtc.org}{Project Homepage}
-
-\badcode
-Copyright (c) 2011, The WebRTC project authors. All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
- * Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- * Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in
- the documentation and/or other materials provided with the
- distribution.
-
- * Neither the name of Google nor the names of its contributors may
- be used to endorse or promote products derived from this software
- without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-Windows-Template-Library-(WTL).html
-\ingroup qtwebengine-licensing
-\brief Microsoft Permissive License
-\title Windows Template Library (WTL)
-
-\l{http://wtl.sourceforge.net/}{Project Homepage}
-
-\badcode
-Microsoft Permissive License (Ms-PL)
-Published: October 12, 2006
-
-
-This license governs use of the accompanying software. If you use the software,
-you accept this license. If you do not accept the license, do not use the
-software.
-
-
-1. Definitions
-
-The terms "reproduce," "reproduction," "derivative works," and "distribution"
-have the same meaning here as under U.S. copyright law.
-
-A "contribution" is the original software, or any additions or changes to the
-software.
-
-A "contributor" is any person that distributes its contribution under this
-license.
-
-"Licensed patents" are a contributor’s patent claims that read directly on its
-contribution.
-
-
-2. Grant of Rights
-
-(A) Copyright Grant- Subject to the terms of this license, including the
-license conditions and limitations in section 3, each contributor grants you a
-non-exclusive, worldwide, royalty-free copyright license to reproduce its
-contribution, prepare derivative works of its contribution, and distribute its
-contribution or any derivative works that you create.
-
-(B) Patent Grant- Subject to the terms of this license, including the license
-conditions and limitations in section 3, each contributor grants you a
-non-exclusive, worldwide, royalty-free license under its licensed patents to
-make, have made, use, sell, offer for sale, import, and/or otherwise dispose of
-its contribution in the software or derivative works of the contribution in the
-software.
-
-
-3. Conditions and Limitations
-
-(A) No Trademark License- This license does not grant you rights to use any
-contributors’ name, logo, or trademarks.
-
-(B) If you bring a patent claim against any contributor over patents that you
-claim are infringed by the software, your patent license from such contributor
-to the software ends automatically.
-
-(C) If you distribute any portion of the software, you must retain all
-copyright, patent, trademark, and attribution notices that are present in the
-software.
-
-(D) If you distribute any portion of the software in source code form, you may
-do so only under this license by including a complete copy of this license with
-your distribution. If you distribute any portion of the software in compiled or
-object code form, you may only do so under a license that complies with this
-license.
-
-(E) The software is licensed "as-is." You bear the risk of using it. The
-contributors give no express warranties, guarantees or conditions. You may have
-additional consumer rights under your local laws which this license cannot
-change. To the extent permitted under your local laws, the contributors exclude
-the implied warranties of merchantability, fitness for a particular purpose and
-non-infringement.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-boringssl.html
-\ingroup qtwebengine-licensing
-\brief BSDish
-\title boringssl
-
-\l{https://boringssl.googlesource.com/boringssl}{Project Homepage}
-
-\badcode
-
- LICENSE ISSUES
- ==============
-
- The OpenSSL toolkit stays under a dual license, i.e. both the conditions of
- the OpenSSL License and the original SSLeay license apply to the toolkit.
- See below for the actual license texts. Actually both licenses are BSD-style
- Open Source licenses. In case of any license issues related to OpenSSL
- please contact openssl-core@openssl.org.
-
- OpenSSL License
- ---------------
-
-/* ====================================================================
- * Copyright (c) 1998-2011 The OpenSSL Project. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * 3. All advertising materials mentioning features or use of this
- * software must display the following acknowledgment:
- * "This product includes software developed by the OpenSSL Project
- * for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
- *
- * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
- * endorse or promote products derived from this software without
- * prior written permission. For written permission, please contact
- * openssl-core@openssl.org.
- *
- * 5. Products derived from this software may not be called "OpenSSL"
- * nor may "OpenSSL" appear in their names without prior written
- * permission of the OpenSSL Project.
- *
- * 6. Redistributions of any form whatsoever must retain the following
- * acknowledgment:
- * "This product includes software developed by the OpenSSL Project
- * for use in the OpenSSL Toolkit (http://www.openssl.org/)"
- *
- * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
- * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
- * OF THE POSSIBILITY OF SUCH DAMAGE.
- * ====================================================================
- *
- * This product includes cryptographic software written by Eric Young
- * (eay@cryptsoft.com). This product includes software written by Tim
- * Hudson (tjh@cryptsoft.com).
- *
- * /
-
- Original SSLeay License
- -----------------------
-
-/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
- * All rights reserved.
- *
- * This package is an SSL implementation written
- * by Eric Young (eay@cryptsoft.com).
- * The implementation was written so as to conform with Netscapes SSL.
- *
- * This library is free for commercial and non-commercial use as long as
- * the following conditions are aheared to. The following conditions
- * apply to all code found in this distribution, be it the RC4, RSA,
- * lhash, DES, etc., code; not just the SSL code. The SSL documentation
- * included with this distribution is covered by the same copyright terms
- * except that the holder is Tim Hudson (tjh@cryptsoft.com).
- *
- * Copyright remains Eric Young's, and as such any Copyright notices in
- * the code are not to be removed.
- * If this package is used in a product, Eric Young should be given attribution
- * as the author of the parts of the library used.
- * This can be in the form of a textual message at program startup or
- * in documentation (online or textual) provided with the package.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * "This product includes cryptographic software written by
- * Eric Young (eay@cryptsoft.com)"
- * The word 'cryptographic' can be left out if the rouines from the library
- * being used are not cryptographic related :-).
- * 4. If you include any Windows specific code (or a derivative thereof) from
- * the apps directory (application code) you must include an acknowledgement:
- * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
- *
- * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * The licence and distribution terms for any publically available version or
- * derivative of this code cannot be changed. i.e. this code cannot simply be
- * copied and put under another distribution licence
- * [including the GNU Public Licence.]
- * /
-
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-bspatch.html
-\ingroup qtwebengine-licensing
-\brief BSD Protection license
-\title bspatch
-
-\l{http://lxr.mozilla.org/mozilla/source/toolkit/mozapps/update/src/updater/}{Project Homepage}
-
-\badcode
-BSD Protection License
-February 2002
-
-Preamble
---------
-
-The Berkeley Software Distribution ("BSD") license has proven very effective
-over the years at allowing for a wide spread of work throughout both
-commercial and non-commercial products. For programmers whose primary
-intention is to improve the general quality of available software, it is
-arguable that there is no better license than the BSD license, as it
-permits improvements to be used wherever they will help, without idealogical
-or metallic constraint.
-
-This is of particular value to those who produce reference implementations
-of proposed standards: The case of TCP/IP clearly illustrates that freely
-and universally available implementations leads the rapid acceptance of
-standards -- often even being used instead of a de jure standard (eg, OSI
-network models).
-
-With the rapid proliferation of software licensed under the GNU General
-Public License, however, the continued success of this role is called into
-question. Given that the inclusion of a few lines of "GPL-tainted" work
-into a larger body of work will result in restricted distribution -- and
-given that further work will likely build upon the "tainted" portions,
-making them difficult to remove at a future date -- there are inevitable
-circumstances where authors would, in order to protect their goal of
-providing for the widespread usage of their work, wish to guard against
-such "GPL-taint".
-
-In addition, one can imagine that companies which operate by producing and
-selling (possibly closed-source) code would wish to protect themselves
-against the rise of a GPL-licensed competitor. While under existing
-licenses this would mean not releasing their code under any form of open
-license, if a license existed under which they could incorporate any
-improvements back into their own (commercial) products then they might be
-far more willing to provide for non-closed distribution.
-
-For the above reasons, we put forth this "BSD Protection License": A
-license designed to retain the freedom granted by the BSD license to use
-licensed works in a wide variety of settings, both non-commercial and
-commercial, while protecting the work from having future contributors
-restrict that freedom.
-
-The precise terms and conditions for copying, distribution, and
-modification follow.
-
-BSD PROTECTION LICENSE
-TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION, AND MODIFICATION
-----------------------------------------------------------------
-
-0. Definitions.
- a) "Program", below, refers to any program or work distributed under
- the terms of this license.
- b) A "work based on the Program", below, refers to either the Program
- or any derivative work under copyright law.
- c) "Modification", below, refers to the act of creating derivative works.
- d) "You", below, refers to each licensee.
-
-1. Scope.
- This license governs the copying, distribution, and modification of the
- Program. Other activities are outside the scope of this license; The
- act of running the Program is not restricted, and the output from the
- Program is covered only if its contents constitute a work based on the
- Program.
-
-2. Verbatim copies.
- You may copy and distribute verbatim copies of the Program as you
- receive it, in any medium, provided that you conspicuously and
- appropriately publish on each copy an appropriate copyright notice; keep
- intact all the notices that refer to this License and to the absence of
- any warranty; and give any other recipients of the Program a copy of this
- License along with the Program.
-
-3. Modification and redistribution under closed license.
- You may modify your copy or copies of the Program, and distribute
- the resulting derivative works, provided that you meet the
- following conditions:
- a) The copyright notice and disclaimer on the Program must be reproduced
- and included in the source code, documentation, and/or other materials
- provided in a manner in which such notices are normally distributed.
- b) The derivative work must be clearly identified as such, in order that
- it may not be confused with the original work.
- c) The license under which the derivative work is distributed must
- expressly prohibit the distribution of further derivative works.
-
-4. Modification and redistribution under open license.
- You may modify your copy or copies of the Program, and distribute
- the resulting derivative works, provided that you meet the
- following conditions:
- a) The copyright notice and disclaimer on the Program must be reproduced
- and included in the source code, documentation, and/or other materials
- provided in a manner in which such notices are normally distributed.
- b) You must clearly indicate the nature and date of any changes made
- to the Program. The full details need not necessarily be included in
- the individual modified files, provided that each modified file is
- clearly marked as such and instructions are included on where the
- full details of the modifications may be found.
- c) You must cause any work that you distribute or publish, that in whole
- or in part contains or is derived from the Program or any part
- thereof, to be licensed as a whole at no charge to all third
- parties under the terms of this License.
-
-5. Implied acceptance.
- You may not copy or distribute the Program or any derivative works except
- as expressly provided under this license. Consequently, any such action
- will be taken as implied acceptance of the terms of this license.
-
-6. NO WARRANTY.
- THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
- THE COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
- REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE FOR ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING, BUT
- NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- TORT, EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGES.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-class-dump.html
-\ingroup qtwebengine-licensing
-\brief GPL
-\title class-dump
-
-\l{https://github.com/nygard/class-dump}{Project Homepage}
-
-\badcode
-(Copied from the README.)
-
---------------------------------------------------------------------------------
-
-This file is part of class-dump, a utility for examining the
-Objective-C segment of Mach-O files.
-Copyright (C) 1997-1998, 2000-2001, 2004-2013 Steve Nygard.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program 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 General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-Contact
--------
-
-You may contact the author by:
- e-mail: nygard at gmail.com
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-d3.html
-\ingroup qtwebengine-licensing
-\brief BSD 3-Clause
-\title d3
-
-\l{https://github.com/mbostock/d3}{Project Homepage}
-
-\badcode
-Copyright (c) 2010-2014, Michael Bostock
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-* Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
-* Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
-* The name Michael Bostock may not be used to endorse or promote products
- derived from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL MICHAEL BOSTOCK BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-dom-distiller-js.html
-\ingroup qtwebengine-licensing
-\brief BSD
-\title dom-distiller-js
-
-\l{https://github.com/chromium/dom-distiller}{Project Homepage}
-
-\badcode
-Copyright 2014 The Chromium Authors. All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
- * Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above
-copyright notice, this list of conditions and the following disclaimer
-in the documentation and/or other materials provided with the
-distribution.
- * Neither the name of Google Inc. nor the names of its
-contributors may be used to endorse or promote products derived from
-this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-
-
-Parts of the following directories are available under Apache v2.0
-
-src/de
-Copyright (c) 2009-2011 Christian Kohlschütter
-
-third_party/gwt_exporter
-Copyright 2007 Timepedia.org
-
-third_party/gwt-2.5.1
-Copyright 2008 Google
-
-java/org/chromium/distiller/dev
-Copyright 2008 Google
-
-Apache License
-
-Version 2.0, January 2004
-
-http://www.apache.org/licenses/
-
-TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-1. Definitions.
-
-"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
-
-"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
-
-"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
-
-"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
-
-"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
-
-"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
-
-"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
-
-"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
-
-"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
-
-"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
-
-2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
-
-3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
-
-4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
-
-You must give any other recipients of the Work or Derivative Works a copy of this License; and
-You must cause any modified files to carry prominent notices stating that You changed the files; and
-You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
-If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
-
-You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
-5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
-
-6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
-
-7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
-
-8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
-
-9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
-
-END OF TERMS AND CONDITIONS
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-dynamic-annotations.html
-\ingroup qtwebengine-licensing
-\brief BSD
-\title dynamic annotations
-
-\l{http://code.google.com/p/data-race-test/wiki/DynamicAnnotations}{Project Homepage}
-
-\badcode
-/* Copyright (c) 2008-2009, Google Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ---
- * Author: Kostya Serebryany
- * /
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-fdlibm.html
-\ingroup qtwebengine-licensing
-\brief Freely Distributable
-\title fdlibm
-
-\l{http://www.netlib.org/fdlibm/}{Project Homepage}
-
-\badcode
-Copyright (C) 1993-2004 by Sun Microsystems, Inc. All rights reserved.
-
-Developed at SunSoft, a Sun Microsystems, Inc. business.
-Permission to use, copy, modify, and distribute this
-software is freely granted, provided that this notice
-is preserved.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-ffmpeg.html
-\ingroup qtwebengine-licensing
-\brief LGPL 2.1
-\title ffmpeg
-
-\l{http://ffmpeg.org/}{Project Homepage}
-
-\badcode
-#FFmpeg:
-
-Most files in FFmpeg are under the GNU Lesser General Public License version 2.1
-or later (LGPL v2.1+). Read the file `COPYING.LGPLv2.1` for details. Some other
-files have MIT/X11/BSD-style licenses. In combination the LGPL v2.1+ applies to
-FFmpeg.
-
-Some optional parts of FFmpeg are licensed under the GNU General Public License
-version 2 or later (GPL v2+). See the file `COPYING.GPLv2` for details. None of
-these parts are used by default, you have to explicitly pass `--enable-gpl` to
-configure to activate them. In this case, FFmpeg's license changes to GPL v2+.
-
-Specifically, the GPL parts of FFmpeg are:
-
-- libpostproc
-- optional x86 optimizations in the files
- - `libavcodec/x86/flac_dsp_gpl.asm`
- - `libavcodec/x86/idct_mmx.c`
- - `libavfilter/x86/vf_removegrain.asm`
-- libutvideo encoding/decoding wrappers in
- `libavcodec/libutvideo*.cpp`
-- the X11 grabber in `libavdevice/x11grab.c`
-- the swresample test app in
- `libswresample/swresample-test.c`
-- the `texi2pod.pl` tool
-- the following filters in libavfilter:
- - `f_ebur128.c`
- - `vf_blackframe.c`
- - `vf_boxblur.c`
- - `vf_colormatrix.c`
- - `vf_cover_rect.c`
- - `vf_cropdetect.c`
- - `vf_delogo.c`
- - `vf_eq.c`
- - `vf_find_rect.c`
- - `vf_fspp.c`
- - `vf_geq.c`
- - `vf_histeq.c`
- - `vf_hqdn3d.c`
- - `vf_interlace.c`
- - `vf_kerndeint.c`
- - `vf_mcdeint.c`
- - `vf_mpdecimate.c`
- - `vf_owdenoise.c`
- - `vf_perspective.c`
- - `vf_phase.c`
- - `vf_pp.c`
- - `vf_pp7.c`
- - `vf_pullup.c`
- - `vf_sab.c`
- - `vf_smartblur.c`
- - `vf_repeatfields.c`
- - `vf_spp.c`
- - `vf_stereo3d.c`
- - `vf_super2xsai.c`
- - `vf_tinterlace.c`
- - `vf_uspp.c`
- - `vsrc_mptestsrc.c`
-
-Should you, for whatever reason, prefer to use version 3 of the (L)GPL, then
-the configure parameter `--enable-version3` will activate this licensing option
-for you. Read the file `COPYING.LGPLv3` or, if you have enabled GPL parts,
-`COPYING.GPLv3` to learn the exact legal terms that apply in this case.
-
-There are a handful of files under other licensing terms, namely:
-
-* The files `libavcodec/jfdctfst.c`, `libavcodec/jfdctint_template.c` and
- `libavcodec/jrevdct.c` are taken from libjpeg, see the top of the files for
- licensing details. Specifically note that you must credit the IJG in the
- documentation accompanying your program if you only distribute executables.
- You must also indicate any changes including additions and deletions to
- those three files in the documentation.
-* `tests/reference.pnm` is under the expat license.
-
-
-external libraries
-==================
-
-FFmpeg can be combined with a number of external libraries, which sometimes
-affect the licensing of binaries resulting from the combination.
-
-compatible libraries
---------------------
-
-The following libraries are under GPL:
-- frei0r
-- libcdio
-- librubberband
-- libutvideo
-- libvidstab
-- libx264
-- libx265
-- libxavs
-- libxvid
-
-When combining them with FFmpeg, FFmpeg needs to be licensed as GPL as well by
-passing `--enable-gpl` to configure.
-
-The OpenCORE and VisualOn libraries are under the Apache License 2.0. That
-license is incompatible with the LGPL v2.1 and the GPL v2, but not with
-version 3 of those licenses. So to combine these libraries with FFmpeg, the
-license version needs to be upgraded by passing `--enable-version3` to configure.
-
-incompatible libraries
-----------------------
-
-The Fraunhofer AAC library, FAAC and aacplus are under licenses which
-are incompatible with the GPLv2 and v3. We do not know for certain if their
-licenses are compatible with the LGPL.
-If you wish to enable these libraries, pass `--enable-nonfree` to configure.
-But note that if you enable any of these libraries the resulting binary will
-be under a complex license mix that is more restrictive than the LGPL and that
-may result in additional obligations. It is possible that these
-restrictions cause the resulting binary to be unredistributeable.
-
-
-********************************************************************************
-
-libavcodec/arm/vp8dsp_armv6.S
-
-VP8 ARMv6 optimisations
-
-Copyright (c) 2010 Google Inc.
-Copyright (c) 2010 Rob Clark &lt;rob@ti.com&gt;
-Copyright (c) 2011 Mans Rullgard &lt;mans@mansr.com&gt;
-
-This file is part of FFmpeg.
-
-FFmpeg is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2.1 of the License, or (at your option) any later version.
-
-FFmpeg 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
-Lesser General Public License for more details.
-
-You should have received a copy of the GNU Lesser General Public
-License along with FFmpeg; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
-This code was partially ported from libvpx, which uses this license:
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
-* Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
-
-* Redistributions in binary form must reproduce the above copyright
-notice, this list of conditions and the following disclaimer in
-the documentation and/or other materials provided with the
-distribution.
-
-* Neither the name of Google nor the names of its contributors may
-be used to endorse or promote products derived from this software
-without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-********************************************************************************
-
-libavformat/oggparsespeex.c
-
-Copyright (C) 2008 Reimar Döffinger
-
- Permission is hereby granted, free of charge, to any person
- obtaining a copy of this software and associated documentation
- files (the "Software"), to deal in the Software without
- restriction, including without limitation the rights to use, copy,
- modify, merge, publish, distribute, sublicense, and/or sell copies
- of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be
- included in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
- HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- DEALINGS IN THE SOFTWARE.
-
-********************************************************************************
-
-libavcodec/x86/xvididct.asm
-
-XVID MPEG-4 VIDEO CODEC
-
- Conversion from gcc syntax to x264asm syntax with modifications
- by Christophe Gisquet &lt;christophe.gisquet@gmail.com&gt;
-
- =========== SSE2 inverse discrete cosine transform ===========
-
- Copyright(C) 2003 Pascal Massimino &lt;skal@planet-d.net&gt;
-
- Conversion to gcc syntax with modifications
- by Alexander Strange &lt;astrange@ithinksw.com&gt;
-
- Originally from dct/x86_asm/fdct_sse2_skal.asm in Xvid.
-
- Vertical pass is an implementation of the scheme:
- Loeffler C., Ligtenberg A., and Moschytz C.S.:
- Practical Fast 1D DCT Algorithm with Eleven Multiplications,
- Proc. ICASSP 1989, 988-991.
-
- Horizontal pass is a double 4x4 vector/matrix multiplication,
- (see also Intel's Application Note 922:
- http://developer.intel.com/vtune/cbts/strmsimd/922down.htm
- Copyright (C) 1999 Intel Corporation)
-
- More details at http://skal.planet-d.net/coding/dct.html
-
- ======= MMX and XMM forward discrete cosine transform =======
-
- Copyright(C) 2001 Peter Ross &lt;pross@xvid.org&gt;
-
- Originally provided by Intel at AP-922
- http://developer.intel.com/vtune/cbts/strmsimd/922down.htm
- (See more app notes at http://developer.intel.com/vtune/cbts/strmsimd/appnotes.htm)
- but in a limited edition.
- New macro implements a column part for precise iDCT
- The routine precision now satisfies IEEE standard 1180-1990.
-
- Copyright(C) 2000-2001 Peter Gubanov &lt;peter@elecard.net.ru&gt;
- Rounding trick Copyright(C) 2000 Michel Lespinasse &lt;walken@zoy.org&gt;
-
- http://www.elecard.com/peter/idct.html
- http://www.linuxvideo.org/mpeg2dec/
-
- These examples contain code fragments for first stage iDCT 8x8
- (for rows) and first stage DCT 8x8 (for columns)
-
- conversion to gcc syntax by Michael Niedermayer
-
- ======================================================================
-
- This file is part of FFmpeg.
-
- FFmpeg is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- FFmpeg 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
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public License
- along with FFmpeg; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
-********************************************************************************
-
-libavcodec/arm/jrevdct_arm.S
-
-C-like prototype :
- void j_rev_dct_arm(DCTBLOCK data)
-
- With DCTBLOCK being a pointer to an array of 64 'signed shorts'
-
- Copyright (c) 2001 Lionel Ulmer (lionel.ulmer@free.fr / bbrox@bbrox.org)
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in
- all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
- IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-********************************************************************************
-
-libswresample/version.h
-
-Version macros.
-
-This file is part of libswresample
-
-libswresample is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2.1 of the License, or (at your option) any later version.
-
-libswresample 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
-Lesser General Public License for more details.
-
-You should have received a copy of the GNU Lesser General Public
-License along with libswresample; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
-********************************************************************************
-
-libavcodec/faandct.c
-
-Floating point AAN DCT
-this implementation is based upon the IJG integer AAN DCT (see jfdctfst.c)
-
-Copyright (c) 2003 Michael Niedermayer &lt;michaelni@gmx.at&gt;
-Copyright (c) 2003 Roman Shaposhnik
-
-Permission to use, copy, modify, and/or distribute this software for any
-purpose with or without fee is hereby granted, provided that the above
-copyright notice and this permission notice appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
-********************************************************************************
-
-libavformat/oggparsetheora.c
-
-Copyright (C) 2005 Matthieu CASTET, Alex Beregszaszi
-
-Permission is hereby granted, free of charge, to any person
-obtaining a copy of this software and associated documentation
-files (the "Software"), to deal in the Software without
-restriction, including without limitation the rights to use, copy,
-modify, merge, publish, distribute, sublicense, and/or sell copies
-of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-DEALINGS IN THE SOFTWARE.
-
-********************************************************************************
-
-libswresample/swresample.h
-
-Copyright (C) 2011-2013 Michael Niedermayer (michaelni@gmx.at)
-
-This file is part of libswresample
-
-libswresample is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2.1 of the License, or (at your option) any later version.
-
-libswresample 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
-Lesser General Public License for more details.
-
-You should have received a copy of the GNU Lesser General Public
-License along with libswresample; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
-********************************************************************************
-
-libavcodec/jfdctfst.c
-libavcodec/jfdctint_template.c
-libavcodec/jrevdct.c
-
-This file is part of the Independent JPEG Group's software.
-
-The authors make NO WARRANTY or representation, either express or implied,
-with respect to this software, its quality, accuracy, merchantability, or
-fitness for a particular purpose. This software is provided "AS IS", and
-you, its user, assume the entire risk as to its quality and accuracy.
-
-This software is copyright (C) 1994-1996, Thomas G. Lane.
-All Rights Reserved except as specified below.
-
-Permission is hereby granted to use, copy, modify, and distribute this
-software (or portions thereof) for any purpose, without fee, subject to
-these conditions:
-(1) If any part of the source code for this software is distributed, then
-this README file must be included, with this copyright and no-warranty
-notice unaltered; and any additions, deletions, or changes to the original
-files must be clearly indicated in accompanying documentation.
-(2) If only executable code is distributed, then the accompanying
-documentation must state that "this software is based in part on the work
-of the Independent JPEG Group".
-(3) Permission for use of this software is granted only if the user accepts
-full responsibility for any undesirable consequences; the authors accept
-NO LIABILITY for damages of any kind.
-
-These conditions apply to any software derived from or based on the IJG
-code, not just to the unmodified library. If you use our work, you ought
-to acknowledge us.
-
-Permission is NOT granted for the use of any IJG author's name or company
-name in advertising or publicity relating to this software or products
-derived from it. This software may be referred to only as "the Independent
-JPEG Group's software".
-
-We specifically permit and encourage the use of this software as the basis
-of commercial products, provided that all warranty or liability claims are
-assumed by the product vendor.
-
-********************************************************************************
-
-libavcodec/fft_fixed_32.c
-libavcodec/fft_init_table.c
-libavcodec/fft_table.h
-libavcodec/mdct_fixed_32.c
-libavcodec/mips/aacdec_mips.c
-libavcodec/mips/aacdec_mips.h
-libavcodec/mips/aacpsdsp_mips.c
-libavcodec/mips/aacsbr_mips.c
-libavcodec/mips/aacsbr_mips.h
-libavcodec/mips/amrwbdec_mips.h
-libavcodec/mips/compute_antialias_fixed.h
-libavcodec/mips/compute_antialias_float.h
-libavcodec/mips/lsp_mips.h
-libavcodec/mips/sbrdsp_mips.c
-libavutil/fixed_dsp.c
-libavutil/fixed_dsp.h
-libavutil/mips/float_dsp_mips.c
-libavutil/mips/libm_mips.h
-libavutil/softfloat_tables.h
-
-Copyright (c) 2012
-MIPS Technologies, Inc., California.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-1. Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
-2. Redistributions in binary form must reproduce the above copyright
-notice, this list of conditions and the following disclaimer in the
-documentation and/or other materials provided with the distribution.
-3. Neither the name of the MIPS Technologies, Inc., nor the names of its
-contributors may be used to endorse or promote products derived from
-this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE MIPS TECHNOLOGIES, INC. ``AS IS'' AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL THE MIPS TECHNOLOGIES, INC. BE LIABLE
-FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGE.
-
-Authors:
-Branimir Vasic (bvasic@mips.com)
-Darko Laus (darko@mips.com)
-Djordje Pesut (djordje@mips.com)
-Goran Cordasic (goran@mips.com)
-Nedeljko Babic (nedeljko.babic imgtec com)
-Mirjana Vulin (mvulin@mips.com)
-Stanislav Ocovaj (socovaj@mips.com)
-Zoran Lukic (zoranl@mips.com)
-
-********************************************************************************
-
-libavformat/oggdec.c
-libavformat/oggdec.h
-libavformat/oggparseogm.c
-libavformat/oggparsevorbis.c
-
-Copyright (C) 2005 Michael Ahlberg, Måns Rullgård
-
-Permission is hereby granted, free of charge, to any person
-obtaining a copy of this software and associated documentation
-files (the "Software"), to deal in the Software without
-restriction, including without limitation the rights to use, copy,
-modify, merge, publish, distribute, sublicense, and/or sell copies
-of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-DEALINGS IN THE SOFTWARE.
-
-********************************************************************************
-
- GNU LESSER GENERAL PUBLIC LICENSE
- Version 2.1, February 1999
-
- Copyright (C) 1991, 1999 Free Software Foundation, Inc.
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-[This is the first released version of the Lesser GPL. It also counts
- as the successor of the GNU Library Public License, version 2, hence
- the version number 2.1.]
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-Licenses are intended to guarantee your freedom to share and change
-free software--to make sure the software is free for all its users.
-
- This license, the Lesser General Public License, applies to some
-specially designated software packages--typically libraries--of the
-Free Software Foundation and other authors who decide to use it. You
-can use it too, but we suggest you first think carefully about whether
-this license or the ordinary General Public License is the better
-strategy to use in any particular case, based on the explanations below.
-
- When we speak of free software, we are referring to freedom of use,
-not price. Our General Public Licenses are designed to make sure that
-you have the freedom to distribute copies of free software (and charge
-for this service if you wish); that you receive source code or can get
-it if you want it; that you can change the software and use pieces of
-it in new free programs; and that you are informed that you can do
-these things.
-
- To protect your rights, we need to make restrictions that forbid
-distributors to deny you these rights or to ask you to surrender these
-rights. These restrictions translate to certain responsibilities for
-you if you distribute copies of the library or if you modify it.
-
- For example, if you distribute copies of the library, whether gratis
-or for a fee, you must give the recipients all the rights that we gave
-you. You must make sure that they, too, receive or can get the source
-code. If you link other code with the library, you must provide
-complete object files to the recipients, so that they can relink them
-with the library after making changes to the library and recompiling
-it. And you must show them these terms so they know their rights.
-
- We protect your rights with a two-step method: (1) we copyright the
-library, and (2) we offer you this license, which gives you legal
-permission to copy, distribute and/or modify the library.
-
- To protect each distributor, we want to make it very clear that
-there is no warranty for the free library. Also, if the library is
-modified by someone else and passed on, the recipients should know
-that what they have is not the original version, so that the original
-author's reputation will not be affected by problems that might be
-introduced by others.
-
- Finally, software patents pose a constant threat to the existence of
-any free program. We wish to make sure that a company cannot
-effectively restrict the users of a free program by obtaining a
-restrictive license from a patent holder. Therefore, we insist that
-any patent license obtained for a version of the library must be
-consistent with the full freedom of use specified in this license.
-
- Most GNU software, including some libraries, is covered by the
-ordinary GNU General Public License. This license, the GNU Lesser
-General Public License, applies to certain designated libraries, and
-is quite different from the ordinary General Public License. We use
-this license for certain libraries in order to permit linking those
-libraries into non-free programs.
-
- When a program is linked with a library, whether statically or using
-a shared library, the combination of the two is legally speaking a
-combined work, a derivative of the original library. The ordinary
-General Public License therefore permits such linking only if the
-entire combination fits its criteria of freedom. The Lesser General
-Public License permits more lax criteria for linking other code with
-the library.
-
- We call this license the "Lesser" General Public License because it
-does Less to protect the user's freedom than the ordinary General
-Public License. It also provides other free software developers Less
-of an advantage over competing non-free programs. These disadvantages
-are the reason we use the ordinary General Public License for many
-libraries. However, the Lesser license provides advantages in certain
-special circumstances.
-
- For example, on rare occasions, there may be a special need to
-encourage the widest possible use of a certain library, so that it becomes
-a de-facto standard. To achieve this, non-free programs must be
-allowed to use the library. A more frequent case is that a free
-library does the same job as widely used non-free libraries. In this
-case, there is little to gain by limiting the free library to free
-software only, so we use the Lesser General Public License.
-
- In other cases, permission to use a particular library in non-free
-programs enables a greater number of people to use a large body of
-free software. For example, permission to use the GNU C Library in
-non-free programs enables many more people to use the whole GNU
-operating system, as well as its variant, the GNU/Linux operating
-system.
-
- Although the Lesser General Public License is Less protective of the
-users' freedom, it does ensure that the user of a program that is
-linked with the Library has the freedom and the wherewithal to run
-that program using a modified version of the Library.
-
- The precise terms and conditions for copying, distribution and
-modification follow. Pay close attention to the difference between a
-"work based on the library" and a "work that uses the library". The
-former contains code derived from the library, whereas the latter must
-be combined with the library in order to run.
-
- GNU LESSER GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License Agreement applies to any software library or other
-program which contains a notice placed by the copyright holder or
-other authorized party saying it may be distributed under the terms of
-this Lesser General Public License (also called "this License").
-Each licensee is addressed as "you".
-
- A "library" means a collection of software functions and/or data
-prepared so as to be conveniently linked with application programs
-(which use some of those functions and data) to form executables.
-
- The "Library", below, refers to any such software library or work
-which has been distributed under these terms. A "work based on the
-Library" means either the Library or any derivative work under
-copyright law: that is to say, a work containing the Library or a
-portion of it, either verbatim or with modifications and/or translated
-straightforwardly into another language. (Hereinafter, translation is
-included without limitation in the term "modification".)
-
- "Source code" for a work means the preferred form of the work for
-making modifications to it. For a library, complete source code means
-all the source code for all modules it contains, plus any associated
-interface definition files, plus the scripts used to control compilation
-and installation of the library.
-
- Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running a program using the Library is not restricted, and output from
-such a program is covered only if its contents constitute a work based
-on the Library (independent of the use of the Library in a tool for
-writing it). Whether that is true depends on what the Library does
-and what the program that uses the Library does.
-
- 1. You may copy and distribute verbatim copies of the Library's
-complete source code as you receive it, in any medium, provided that
-you conspicuously and appropriately publish on each copy an
-appropriate copyright notice and disclaimer of warranty; keep intact
-all the notices that refer to this License and to the absence of any
-warranty; and distribute a copy of this License along with the
-Library.
-
- You may charge a fee for the physical act of transferring a copy,
-and you may at your option offer warranty protection in exchange for a
-fee.
-
- 2. You may modify your copy or copies of the Library or any portion
-of it, thus forming a work based on the Library, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) The modified work must itself be a software library.
-
- b) You must cause the files modified to carry prominent notices
- stating that you changed the files and the date of any change.
-
- c) You must cause the whole of the work to be licensed at no
- charge to all third parties under the terms of this License.
-
- d) If a facility in the modified Library refers to a function or a
- table of data to be supplied by an application program that uses
- the facility, other than as an argument passed when the facility
- is invoked, then you must make a good faith effort to ensure that,
- in the event an application does not supply such function or
- table, the facility still operates, and performs whatever part of
- its purpose remains meaningful.
-
- (For example, a function in a library to compute square roots has
- a purpose that is entirely well-defined independent of the
- application. Therefore, Subsection 2d requires that any
- application-supplied function or table used by this function must
- be optional: if the application does not supply it, the square
- root function must still compute square roots.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Library,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Library, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote
-it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Library.
-
-In addition, mere aggregation of another work not based on the Library
-with the Library (or with a work based on the Library) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may opt to apply the terms of the ordinary GNU General Public
-License instead of this License to a given copy of the Library. To do
-this, you must alter all the notices that refer to this License, so
-that they refer to the ordinary GNU General Public License, version 2,
-instead of to this License. (If a newer version than version 2 of the
-ordinary GNU General Public License has appeared, then you can specify
-that version instead if you wish.) Do not make any other change in
-these notices.
-
- Once this change is made in a given copy, it is irreversible for
-that copy, so the ordinary GNU General Public License applies to all
-subsequent copies and derivative works made from that copy.
-
- This option is useful when you wish to copy part of the code of
-the Library into a program that is not a library.
-
- 4. You may copy and distribute the Library (or a portion or
-derivative of it, under Section 2) in object code or executable form
-under the terms of Sections 1 and 2 above provided that you accompany
-it with the complete corresponding machine-readable source code, which
-must be distributed under the terms of Sections 1 and 2 above on a
-medium customarily used for software interchange.
-
- If distribution of object code is made by offering access to copy
-from a designated place, then offering equivalent access to copy the
-source code from the same place satisfies the requirement to
-distribute the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 5. A program that contains no derivative of any portion of the
-Library, but is designed to work with the Library by being compiled or
-linked with it, is called a "work that uses the Library". Such a
-work, in isolation, is not a derivative work of the Library, and
-therefore falls outside the scope of this License.
-
- However, linking a "work that uses the Library" with the Library
-creates an executable that is a derivative of the Library (because it
-contains portions of the Library), rather than a "work that uses the
-library". The executable is therefore covered by this License.
-Section 6 states terms for distribution of such executables.
-
- When a "work that uses the Library" uses material from a header file
-that is part of the Library, the object code for the work may be a
-derivative work of the Library even though the source code is not.
-Whether this is true is especially significant if the work can be
-linked without the Library, or if the work is itself a library. The
-threshold for this to be true is not precisely defined by law.
-
- If such an object file uses only numerical parameters, data
-structure layouts and accessors, and small macros and small inline
-functions (ten lines or less in length), then the use of the object
-file is unrestricted, regardless of whether it is legally a derivative
-work. (Executables containing this object code plus portions of the
-Library will still fall under Section 6.)
-
- Otherwise, if the work is a derivative of the Library, you may
-distribute the object code for the work under the terms of Section 6.
-Any executables containing that work also fall under Section 6,
-whether or not they are linked directly with the Library itself.
-
- 6. As an exception to the Sections above, you may also combine or
-link a "work that uses the Library" with the Library to produce a
-work containing portions of the Library, and distribute that work
-under terms of your choice, provided that the terms permit
-modification of the work for the customer's own use and reverse
-engineering for debugging such modifications.
-
- You must give prominent notice with each copy of the work that the
-Library is used in it and that the Library and its use are covered by
-this License. You must supply a copy of this License. If the work
-during execution displays copyright notices, you must include the
-copyright notice for the Library among them, as well as a reference
-directing the user to the copy of this License. Also, you must do one
-of these things:
-
- a) Accompany the work with the complete corresponding
- machine-readable source code for the Library including whatever
- changes were used in the work (which must be distributed under
- Sections 1 and 2 above); and, if the work is an executable linked
- with the Library, with the complete machine-readable "work that
- uses the Library", as object code and/or source code, so that the
- user can modify the Library and then relink to produce a modified
- executable containing the modified Library. (It is understood
- that the user who changes the contents of definitions files in the
- Library will not necessarily be able to recompile the application
- to use the modified definitions.)
-
- b) Use a suitable shared library mechanism for linking with the
- Library. A suitable mechanism is one that (1) uses at run time a
- copy of the library already present on the user's computer system,
- rather than copying library functions into the executable, and (2)
- will operate properly with a modified version of the library, if
- the user installs one, as long as the modified version is
- interface-compatible with the version that the work was made with.
-
- c) Accompany the work with a written offer, valid for at
- least three years, to give the same user the materials
- specified in Subsection 6a, above, for a charge no more
- than the cost of performing this distribution.
-
- d) If distribution of the work is made by offering access to copy
- from a designated place, offer equivalent access to copy the above
- specified materials from the same place.
-
- e) Verify that the user has already received a copy of these
- materials or that you have already sent this user a copy.
-
- For an executable, the required form of the "work that uses the
-Library" must include any data and utility programs needed for
-reproducing the executable from it. However, as a special exception,
-the materials to be distributed need not include anything that is
-normally distributed (in either source or binary form) with the major
-components (compiler, kernel, and so on) of the operating system on
-which the executable runs, unless that component itself accompanies
-the executable.
-
- It may happen that this requirement contradicts the license
-restrictions of other proprietary libraries that do not normally
-accompany the operating system. Such a contradiction means you cannot
-use both them and the Library together in an executable that you
-distribute.
-
- 7. You may place library facilities that are a work based on the
-Library side-by-side in a single library together with other library
-facilities not covered by this License, and distribute such a combined
-library, provided that the separate distribution of the work based on
-the Library and of the other library facilities is otherwise
-permitted, and provided that you do these two things:
-
- a) Accompany the combined library with a copy of the same work
- based on the Library, uncombined with any other library
- facilities. This must be distributed under the terms of the
- Sections above.
-
- b) Give prominent notice with the combined library of the fact
- that part of it is a work based on the Library, and explaining
- where to find the accompanying uncombined form of the same work.
-
- 8. You may not copy, modify, sublicense, link with, or distribute
-the Library except as expressly provided under this License. Any
-attempt otherwise to copy, modify, sublicense, link with, or
-distribute the Library is void, and will automatically terminate your
-rights under this License. However, parties who have received copies,
-or rights, from you under this License will not have their licenses
-terminated so long as such parties remain in full compliance.
-
- 9. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Library or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Library (or any work based on the
-Library), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Library or works based on it.
-
- 10. Each time you redistribute the Library (or any work based on the
-Library), the recipient automatically receives a license from the
-original licensor to copy, distribute, link with or modify the Library
-subject to these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties with
-this License.
-
- 11. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Library at all. For example, if a patent
-license would not permit royalty-free redistribution of the Library by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Library.
-
-If any portion of this section is held invalid or unenforceable under any
-particular circumstance, the balance of the section is intended to apply,
-and the section as a whole is intended to apply in other circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 12. If the distribution and/or use of the Library is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Library under this License may add
-an explicit geographical distribution limitation excluding those countries,
-so that distribution is permitted only in or among countries not thus
-excluded. In such case, this License incorporates the limitation as if
-written in the body of this License.
-
- 13. The Free Software Foundation may publish revised and/or new
-versions of the Lesser General Public License from time to time.
-Such new versions will be similar in spirit to the present version,
-but may differ in detail to address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Library
-specifies a version number of this License which applies to it and
-"any later version", you have the option of following the terms and
-conditions either of that version or of any later version published by
-the Free Software Foundation. If the Library does not specify a
-license version number, you may choose any version ever published by
-the Free Software Foundation.
-
- 14. If you wish to incorporate parts of the Library into other free
-programs whose distribution conditions are incompatible with these,
-write to the author to ask for permission. For software which is
-copyrighted by the Free Software Foundation, write to the Free
-Software Foundation; we sometimes make exceptions for this. Our
-decision will be guided by the two goals of preserving the free status
-of all derivatives of our free software and of promoting the sharing
-and reuse of software generally.
-
- NO WARRANTY
-
- 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
-WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
-EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
-OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
-KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
-LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
-THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
- 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
-WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
-AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
-FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
-CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
-LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
-RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
-FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
-SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Libraries
-
- If you develop a new library, and you want it to be of the greatest
-possible use to the public, we recommend making it free software that
-everyone can redistribute and change. You can do so by permitting
-redistribution under these terms (or, alternatively, under the terms of the
-ordinary General Public License).
-
- To apply these terms, attach the following notices to the library. It is
-safest to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least the
-"copyright" line and a pointer to where the full notice is found.
-
- &lt;one line to give the library's name and a brief idea of what it does.&gt;
- Copyright (C) &lt;year&gt; &lt;name of author&gt;
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 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
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
-Also add information on how to contact you by electronic and paper mail.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the library, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the
- library `Frob' (a library for tweaking knobs) written by James Random Hacker.
-
- &lt;signature of Ty Coon&gt;, 1 April 1990
- Ty Coon, President of Vice
-
-That's all there is to it!
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-fips181.html
-\ingroup qtwebengine-licensing
-\brief BSD 3-Clause
-\title fips181
-
-\l{http://www.adel.nursat.kz/apg/}{Project Homepage}
-
-\badcode
-Copyright (c) 1999, 2000, 2001, 2002
-Adel I. Mirzazhanov. All rights reserved
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-
- 1.Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
- 2.Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
- 3.The name of the author may not be used to endorse or promote products
- derived from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
-OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
-DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
-GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-flac.html
-\ingroup qtwebengine-licensing
-\brief BSD
-\title flac
-
-\l{http://sourceforge.net/projects/flac/files/flac-src/flac-1.2.1-src/flac-1.2.1.tar.gz/download}{Project Homepage}
-
-\badcode
-Copyright (C) 2000,2001,2002,2003,2004,2005,2006,2007 Josh Coalson
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-
-- Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
-
-- Redistributions in binary form must reproduce the above copyright
-notice, this list of conditions and the following disclaimer in the
-documentation and/or other materials provided with the distribution.
-
-- Neither the name of the Xiph.org Foundation nor the names of its
-contributors may be used to endorse or promote products derived from
-this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
-CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-fontconfig.html
-\ingroup qtwebengine-licensing
-\brief MIT
-\title fontconfig
-
-\l{http://www.freedesktop.org/wiki/Software/fontconfig/}{Project Homepage}
-
-\badcode
-fontconfig/COPYING
-
-Copyright © 2000,2001,2002,2003,2004,2006,2007 Keith Packard
-Copyright © 2005 Patrick Lam
-Copyright © 2009 Roozbeh Pournader
-Copyright © 2008,2009 Red Hat, Inc.
-Copyright © 2008 Danilo Šegan
-Copyright © 2012 Google, Inc.
-
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation, and that the name of the author(s) not be used in
-advertising or publicity pertaining to distribution of the software without
-specific, written prior permission. The authors make no
-representations about the suitability of this software for any purpose. It
-is provided "as is" without express or implied warranty.
-
-THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
-INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
-EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR
-CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
-DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
-TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
-PERFORMANCE OF THIS SOFTWARE.
-
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-google-glog's-symbolization-library.html
-\ingroup qtwebengine-licensing
-\brief BSD
-\title google-glog's symbolization library
-
-\l{https://github.com/google/glog}{Project Homepage}
-
-\badcode
-// Copyright (c) 2006, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-google-jstemplate.html
-\ingroup qtwebengine-licensing
-\brief Apache 2.0
-\title google-jstemplate
-
-\l{http://code.google.com/p/google-jstemplate/}{Project Homepage}
-
-\badcode
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-google-safe-browsing.html
-\ingroup qtwebengine-licensing
-\brief Apache 2.0
-\title google-safe-browsing
-
-\l{http://code.google.com/p/google-safe-browsing/}{Project Homepage}
-
-\badcode
-Copyright 2009 Google Inc.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-harfbuzz-ng.html
-\ingroup qtwebengine-licensing
-\brief MIT
-\title harfbuzz-ng
-
-\l{http://harfbuzz.org}{Project Homepage}
-
-\badcode
-HarfBuzz is licensed under the so-called "Old MIT" license. Details follow.
-For parts of HarfBuzz that are licensed under different licenses see individual
-files names COPYING in subdirectories where applicable.
-
-Copyright © 2010,2011,2012 Google, Inc.
-Copyright © 2012 Mozilla Foundation
-Copyright © 2011 Codethink Limited
-Copyright © 2008,2010 Nokia Corporation and/or its subsidiary(-ies)
-Copyright © 2009 Keith Stribley
-Copyright © 2009 Martin Hosken and SIL International
-Copyright © 2007 Chris Wilson
-Copyright © 2006 Behdad Esfahbod
-Copyright © 2005 David Turner
-Copyright © 2004,2007,2008,2009,2010 Red Hat, Inc.
-Copyright © 1998-2004 David Turner and Werner Lemberg
-
-For full copyright notices consult the individual files in the package.
-
-
-Permission is hereby granted, without written agreement and without
-license or royalty fees, to use, copy, modify, and distribute this
-software and its documentation for any purpose, provided that the
-above copyright notice and the following two paragraphs appear in
-all copies of this software.
-
-IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
-DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
-ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
-IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGE.
-
-THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
-BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
-FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
-ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
-PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-hunspell.html
-\ingroup qtwebengine-licensing
-\brief MPL 1.1/GPL 2.0/LGPL 2.1
-\title hunspell
-
-\l{http://hunspell.sourceforge.net/}{Project Homepage}
-
-\badcode
-GPL 2.0/LGPL 2.1/MPL 1.1 tri-license
-
-The contents of this software may be used under the terms of
-the GNU General Public License Version 2 or later (the "GPL"), or
-the GNU Lesser General Public License Version 2.1 or later (the "LGPL",
-see COPYING.LGPL) or (excepting the LGPLed GNU gettext library in the
-intl/ directory) the Mozilla Public License Version 1.1 or later
-(the "MPL", see COPYING.MPL).
-
-Software distributed under these licenses is distributed on an "AS IS" basis,
-WITHOUT WARRANTY OF ANY KIND, either express or implied. See the licences
-for the specific language governing rights and limitations under the licenses.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-iccjpeg.html
-\ingroup qtwebengine-licensing
-\brief Custom license
-\title iccjpeg
-
-\l{http://www.ijg.org}{Project Homepage}
-
-\badcode
-LICENSE extracted from IJG's jpeg distribution:
------------------------------------------------
-
-In plain English:
-
-1. We don't promise that this software works. (But if you find any bugs,
- please let us know!)
-2. You can use this software for whatever you want. You don't have to pay us.
-3. You may not pretend that you wrote this software. If you use it in a
- program, you must acknowledge somewhere in your documentation that
- you've used the IJG code.
-
-In legalese:
-
-The authors make NO WARRANTY or representation, either express or implied,
-with respect to this software, its quality, accuracy, merchantability, or
-fitness for a particular purpose. This software is provided "AS IS", and you,
-its user, assume the entire risk as to its quality and accuracy.
-
-This software is copyright (C) 1991-1998, Thomas G. Lane.
-All Rights Reserved except as specified below.
-
-Permission is hereby granted to use, copy, modify, and distribute this
-software (or portions thereof) for any purpose, without fee, subject to these
-conditions:
-(1) If any part of the source code for this software is distributed, then this
-README file must be included, with this copyright and no-warranty notice
-unaltered; and any additions, deletions, or changes to the original files
-must be clearly indicated in accompanying documentation.
-(2) If only executable code is distributed, then the accompanying
-documentation must state that "this software is based in part on the work of
-the Independent JPEG Group".
-(3) Permission for use of this software is granted only if the user accepts
-full responsibility for any undesirable consequences; the authors accept
-NO LIABILITY for damages of any kind.
-
-These conditions apply to any software derived from or based on the IJG code,
-not just to the unmodified library. If you use our work, you ought to
-acknowledge us.
-
-Permission is NOT granted for the use of any IJG author's name or company name
-in advertising or publicity relating to this software or products derived from
-it. This software may be referred to only as "the Independent JPEG Group's
-software".
-
-We specifically permit and encourage the use of this software as the basis of
-commercial products, provided that all warranty or liability claims are
-assumed by the product vendor.
-
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-icu.html
-\ingroup qtwebengine-licensing
-\brief MIT
-\title icu
-
-\l{http://site.icu-project.org/}{Project Homepage}
-
-\badcode
-ICU License - ICU 1.8.1 and later
-
- COPYRIGHT AND PERMISSION NOTICE
-
- Copyright (c) 1995-2014 International Business Machines Corporation and
- others
-
- All rights reserved.
-
- Permission is hereby granted, free of charge, to any person obtaining a
- copy of this software and associated documentation files (the
- "Software"), to deal in the Software without restriction, including
- without limitation the rights to use, copy, modify, merge, publish,
- distribute, and/or sell copies of the Software, and to permit persons to
- whom the Software is furnished to do so, provided that the above
- copyright notice(s) and this permission notice appear in all copies of
- the Software and that both the above copyright notice(s) and this
- permission notice appear in supporting documentation.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
- THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
- INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT
- OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
- OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- PERFORMANCE OF THIS SOFTWARE.
-
- Except as contained in this notice, the name of a copyright holder shall
- not be used in advertising or otherwise to promote the sale, use or
- other dealings in this Software without prior written authorization of
- the copyright holder.
- ___________________________________________________________________
-
- All trademarks and registered trademarks mentioned herein are the
- property of their respective owners.
- ___________________________________________________________________
-
-Third-Party Software Licenses
-
- This section contains third-party software notices and/or additional
- terms for licensed third-party software components included within ICU
- libraries.
-
- 1. Unicode Data Files and Software
-
-COPYRIGHT AND PERMISSION NOTICE
-
-Copyright © 1991-2014 Unicode, Inc. All rights reserved.
-Distributed under the Terms of Use in
-http://www.unicode.org/copyright.html.
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of the Unicode data files and any associated documentation
-(the "Data Files") or Unicode software and any associated documentation
-(the "Software") to deal in the Data Files or Software
-without restriction, including without limitation the rights to use,
-copy, modify, merge, publish, distribute, and/or sell copies of
-the Data Files or Software, and to permit persons to whom the Data Files
-or Software are furnished to do so, provided that
-(a) this copyright and permission notice appear with all copies
-of the Data Files or Software,
-(b) this copyright and permission notice appear in associated
-documentation, and
-(c) there is clear notice in each modified Data File or in the Software
-as well as in the documentation associated with the Data File(s) or
-Software that the data or software has been modified.
-
-THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF
-ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
-WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT OF THIRD PARTY RIGHTS.
-IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS
-NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL
-DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
-DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
-TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
-PERFORMANCE OF THE DATA FILES OR SOFTWARE.
-
-Except as contained in this notice, the name of a copyright holder
-shall not be used in advertising or otherwise to promote the sale,
-use or other dealings in these Data Files or Software without prior
-written authorization of the copyright holder.
-
- 2. Chinese/Japanese Word Break Dictionary Data (cjdict.txt)
-
- # The Google Chrome software developed by Google is licensed under the BSD li
-cense. Other software included in this distribution is provided under other licen
-ses, as set forth below.
- #
- # The BSD License
- # http://opensource.org/licenses/bsd-license.php
- # Copyright (C) 2006-2008, Google Inc.
- #
- # All rights reserved.
- #
- # Redistribution and use in source and binary forms, with or without modifi
-cation, are permitted provided that the following conditions are met:
- #
- # Redistributions of source code must retain the above copyright notice, th
-is list of conditions and the following disclaimer.
- # Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation and/or
- other materials provided with the distribution.
- # Neither the name of Google Inc. nor the names of its contributors may be
- used to endorse or promote products derived from this software without specific
-prior written permission.
- #
- #
- # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS I
-S" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPL
-IED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLA
-IMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIR
-ECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDIN
-G, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF L
-IABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED O
-F THE POSSIBILITY OF SUCH DAMAGE.
- #
- #
- # The word list in cjdict.txt are generated by combining three word lists l
-isted
- # below with further processing for compound word breaking. The frequency i
-s generated
- # with an iterative training against Google web corpora.
- #
- # * Libtabe (Chinese)
- # - https://sourceforge.net/project/?group_id=1519
- # - Its license terms and conditions are shown below.
- #
- # * IPADIC (Japanese)
- # - http://chasen.aist-nara.ac.jp/chasen/distribution.html
- # - Its license terms and conditions are shown below.
- #
- # ---------COPYING.libtabe ---- BEGIN--------------------
- #
- # /*
- # * Copyrighy (c) 1999 TaBE Project.
- # * Copyright (c) 1999 Pai-Hsiang Hsiao.
- # * All rights reserved.
- # *
- # * Redistribution and use in source and binary forms, with or without
- # * modification, are permitted provided that the following conditions
- # * are met:
- # *
- # * . Redistributions of source code must retain the above copyright
- # * notice, this list of conditions and the following disclaimer.
- # * . Redistributions in binary form must reproduce the above copyright
- # * notice, this list of conditions and the following disclaimer in
- # * the documentation and/or other materials provided with the
- # * distribution.
- # * . Neither the name of the TaBE Project nor the names of its
- # * contributors may be used to endorse or promote products derived
- # * from this software without specific prior written permission.
- # *
- # * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- # * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- # * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- # * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- # * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- # * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- # * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- # * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- # * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- # * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- # * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
- # * OF THE POSSIBILITY OF SUCH DAMAGE.
- # * /
- #
- # /*
- # * Copyright (c) 1999 Computer Systems and Communication Lab,
- # * Institute of Information Science, Academia Sinica.
- # * All rights reserved.
- # *
- # * Redistribution and use in source and binary forms, with or without
- # * modification, are permitted provided that the following conditions
- # * are met:
- # *
- # * . Redistributions of source code must retain the above copyright
- # * notice, this list of conditions and the following disclaimer.
- # * . Redistributions in binary form must reproduce the above copyright
- # * notice, this list of conditions and the following disclaimer in
- # * the documentation and/or other materials provided with the
- # * distribution.
- # * . Neither the name of the Computer Systems and Communication Lab
- # * nor the names of its contributors may be used to endorse or
- # * promote products derived from this software without specific
- # * prior written permission.
- # *
- # * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- # * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- # * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- # * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- # * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- # * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- # * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- # * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- # * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- # * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- # * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
- # * OF THE POSSIBILITY OF SUCH DAMAGE.
- # * /
- #
- # Copyright 1996 Chih-Hao Tsai @ Beckman Institute, University of Illinois
- # c-tsai4@uiuc.edu http://casper.beckman.uiuc.edu/~c-tsai4
- #
- # ---------------COPYING.libtabe-----END-----------------------------------
--
- #
- #
- # ---------------COPYING.ipadic-----BEGIN----------------------------------
---
- #
- # Copyright 2000, 2001, 2002, 2003 Nara Institute of Science
- # and Technology. All Rights Reserved.
- #
- # Use, reproduction, and distribution of this software is permitted.
- # Any copy of this software, whether in its original form or modified,
- # must include both the above copyright notice and the following
- # paragraphs.
- #
- # Nara Institute of Science and Technology (NAIST),
- # the copyright holders, disclaims all warranties with regard to this
- # software, including all implied warranties of merchantability and
- # fitness, in no event shall NAIST be liable for
- # any special, indirect or consequential damages or any damages
- # whatsoever resulting from loss of use, data or profits, whether in an
- # action of contract, negligence or other tortuous action, arising out
- # of or in connection with the use or performance of this software.
- #
- # A large portion of the dictionary entries
- # originate from ICOT Free Software. The following conditions for ICOT
- # Free Software applies to the current dictionary as well.
- #
- # Each User may also freely distribute the Program, whether in its
- # original form or modified, to any third party or parties, PROVIDED
- # that the provisions of Section 3 ("NO WARRANTY") will ALWAYS appear
- # on, or be attached to, the Program, which is distributed substantially
- # in the same form as set out herein and that such intended
- # distribution, if actually made, will neither violate or otherwise
- # contravene any of the laws and regulations of the countries having
- # jurisdiction over the User or the intended distribution itself.
- #
- # NO WARRANTY
- #
- # The program was produced on an experimental basis in the course of the
- # research and development conducted during the project and is provided
- # to users as so produced on an experimental basis. Accordingly, the
- # program is provided without any warranty whatsoever, whether express,
- # implied, statutory or otherwise. The term "warranty" used herein
- # includes, but is not limited to, any warranty of the quality,
- # performance, merchantability and fitness for a particular purpose of
- # the program and the nonexistence of any infringement or violation of
- # any right of any third party.
- #
- # Each user of the program will agree and understand, and be deemed to
- # have agreed and understood, that there is no warranty whatsoever for
- # the program and, accordingly, the entire risk arising from or
- # otherwise connected with the program is assumed by the user.
- #
- # Therefore, neither ICOT, the copyright holder, or any other
- # organization that participated in or was otherwise related to the
- # development of the program and their respective officials, directors,
- # officers and other employees shall be held liable for any and all
- # damages, including, without limitation, general, special, incidental
- # and consequential damages, arising out of or otherwise in connection
- # with the use or inability to use the program or any product, material
- # or result produced or otherwise obtained by using the program,
- # regardless of whether they have been advised of, or otherwise had
- # knowledge of, the possibility of such damages at any time during the
- # project or thereafter. Each user will be deemed to have agreed to the
- # foregoing by his or her commencement of use of the program. The term
- # "use" as used herein includes, but is not limited to, the use,
- # modification, copying and distribution of the program and the
- # production of secondary products from the program.
- #
- # In the case where the program, whether in its original form or
- # modified, was distributed or delivered to or received by a user from
- # any person, organization or entity other than ICOT, unless it makes or
- # grants independently of ICOT any specific warranty to the user in
- # writing, such person, organization or entity, will also be exempted
- # from and not be held liable to the user for any such damages as noted
- # above as far as the program is concerned.
- #
- # ---------------COPYING.ipadic-----END------------------------------------
-
- 3. Lao Word Break Dictionary Data (laodict.txt)
-
- # Copyright (c) 2013 International Business Machines Corporation
- # and others. All Rights Reserved.
- #
- # Project: http://code.google.com/p/lao-dictionary/
- # Dictionary: http://lao-dictionary.googlecode.com/git/Lao-Dictionary.txt
- # License: http://lao-dictionary.googlecode.com/git/Lao-Dictionary-LICEN
-SE.txt
- # (copied below)
- #
- # This file is derived from the above dictionary, with slight modifications
-.
- # -------------------------------------------------------------------------
--------
- # Copyright (C) 2013 Brian Eugene Wilson, Robert Martin Campbell.
- # All rights reserved.
- #
- # Redistribution and use in source and binary forms, with or without modifi
-cation,
- # are permitted provided that the following conditions are met:
- #
- # Redistributions of source code must retain the above copyright no
-tice, this
- # list of conditions and the following disclaimer. Redistributions
-in binary
- # form must reproduce the above copyright notice, this list of cond
-itions and
- # the following disclaimer in the documentation and/or other materi
-als
- # provided with the distribution.
- #
- # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS I
-S" AND
- # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMP
-LIED
- # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIA
-BLE FOR
- # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DA
-MAGES
- # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVIC
-ES;
- # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED A
-ND ON
- # ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-THIS
- # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- # -------------------------------------------------------------------------
--------
-
- 4. Burmese Word Break Dictionary Data (burmesedict.txt)
-
- # Copyright (c) 2014 International Business Machines Corporation
- # and others. All Rights Reserved.
- #
- # This list is part of a project hosted at:
- # github.com/kanyawtech/myanmar-karen-word-lists
- #
- # -------------------------------------------------------------------------
--------
- # Copyright (c) 2013, LeRoy Benjamin Sharon
- # All rights reserved.
- #
- # Redistribution and use in source and binary forms, with or without modifi
-cation,
- # are permitted provided that the following conditions are met:
- #
- # Redistributions of source code must retain the above copyright notice,
-this
- # list of conditions and the following disclaimer.
- #
- # Redistributions in binary form must reproduce the above copyright notic
-e, this
- # list of conditions and the following disclaimer in the documentation an
-d/or
- # other materials provided with the distribution.
- #
- # Neither the name Myanmar Karen Word Lists, nor the names of its
- # contributors may be used to endorse or promote products derived from
- # this software without specific prior written permission.
- #
- # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS I
-S" AND
- # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMP
-LIED
- # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIA
-BLE FOR
- # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DA
-MAGES
- # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVIC
-ES;
- # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED A
-ND ON
- # ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-THIS
- # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- # -------------------------------------------------------------------------
--------
-
- 5. Time Zone Database
-
- ICU uses the public domain data and code derived from Time Zone Database
- for its time zone support. The ownership of the TZ database is explained
- in BCP 175: Procedure for Maintaining the Time Zone Database section 7.
-
-7. Database Ownership
-
- The TZ database itself is not an IETF Contribution or an IETF
- document. Rather it is a pre-existing and regularly updated work
- that is in the public domain, and is intended to remain in the public
- domain. Therefore, BCPs 78 [RFC5378] and 79 [RFC3979] do not apply
- to the TZ Database or contributions that individuals make to it.
- Should any claims be made and substantiated against the TZ Database,
- the organization that is providing the IANA Considerations defined in
- this RFC, under the memorandum of understanding with the IETF,
- currently ICANN, may act in accordance with all competent court
- orders. No ownership claims will be made by ICANN or the IETF Trust
- on the database or the code. Any person making a contribution to the
- database or code waives all rights to future claims in that
- contribution or in the TZ Database.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-ijar.html
-\ingroup qtwebengine-licensing
-\brief Apache 2.0
-\title ijar
-
-\l{https://github.com/google/bazel/tree/master/third_party/ijar}{Project Homepage}
-
-\badcode
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-jsoncpp.html
-\ingroup qtwebengine-licensing
-\brief MIT
-\title jsoncpp
-
-\l{https://github.com/open-source-parsers/jsoncpp}{Project Homepage}
-
-\badcode
-The JsonCpp library's source code, including accompanying documentation,
-tests and demonstration applications, are licensed under the following
-conditions...
-
-The author (Baptiste Lepilleur) explicitly disclaims copyright in all
-jurisdictions which recognize such a disclaimer. In such jurisdictions,
-this software is released into the Public Domain.
-
-In jurisdictions which do not recognize Public Domain property (e.g. Germany as of
-2010), this software is Copyright (c) 2007-2010 by Baptiste Lepilleur, and is
-released under the terms of the MIT License (see below).
-
-In jurisdictions which recognize Public Domain property, the user of this
-software may choose to accept it either as 1) Public Domain, 2) under the
-conditions of the MIT License (see below), or 3) under the terms of dual
-Public Domain/MIT License conditions described here, as they choose.
-
-The MIT License is about as close to Public Domain as a license can get, and is
-described in clear, concise terms at:
-
- http://en.wikipedia.org/wiki/MIT_License
-
-The full text of the MIT License follows:
-
-========================================================================
-Copyright (c) 2007-2010 Baptiste Lepilleur
-
-Permission is hereby granted, free of charge, to any person
-obtaining a copy of this software and associated documentation
-files (the "Software"), to deal in the Software without
-restriction, including without limitation the rights to use, copy,
-modify, merge, publish, distribute, sublicense, and/or sell copies
-of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
-BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
-ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
-========================================================================
-(END LICENSE TEXT)
-
-The MIT license is compatible with both the GPL and commercial
-software, affording one all of the rights of Public Domain with the
-minor nuisance of being required to keep the above copyright notice
-and license text in the source code. Note also that by accepting the
-Public Domain "license" you can re-license your copy using whatever
-license you like.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-libevent.html
-\ingroup qtwebengine-licensing
-\brief BSD
-\title libevent
-
-\l{http://libevent.org/}{Project Homepage}
-
-\badcode
-Libevent is available for use under the following license, commonly known
-as the 3-clause (or "modified") BSD license:
-
-==============================
-Copyright (c) 2000-2007 Niels Provos &lt;provos@citi.umich.edu&gt;
-Copyright (c) 2007-2010 Niels Provos and Nick Mathewson
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-3. The name of the author may not be used to endorse or promote products
- derived from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-==============================
-
-Portions of Libevent are based on works by others, also made available by
-them under the three-clause BSD license above. The copyright notices are
-available in the corresponding source files; the license is as above. Here's
-a list:
-
-log.c:
- Copyright (c) 2000 Dug Song &lt;dugsong@monkey.org&gt;
- Copyright (c) 1993 The Regents of the University of California.
-
-strlcpy.c:
- Copyright (c) 1998 Todd C. Miller &lt;Todd.Miller@courtesan.com&gt;
-
-win32.c:
- Copyright (c) 2003 Michael A. Davis &lt;mike@datanerds.net&gt;
-
-evport.c:
- Copyright (c) 2007 Sun Microsystems
-
-min_heap.h:
- Copyright (c) 2006 Maxim Yegorushkin &lt;maxim.yegorushkin@gmail.com&gt;
-
-tree.h:
- Copyright 2002 Niels Provos &lt;provos@citi.umich.edu&gt;
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-libexif.html
-\ingroup qtwebengine-licensing
-\brief LGPL 2.1
-\title libexif
-
-\l{http://libexif.sourceforge.net/}{Project Homepage}
-
-\badcode
- GNU LESSER GENERAL PUBLIC LICENSE
- Version 2.1, February 1999
-
- Copyright (C) 1991, 1999 Free Software Foundation, Inc.
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-[This is the first released version of the Lesser GPL. It also counts
- as the successor of the GNU Library Public License, version 2, hence
- the version number 2.1.]
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-Licenses are intended to guarantee your freedom to share and change
-free software--to make sure the software is free for all its users.
-
- This license, the Lesser General Public License, applies to some
-specially designated software packages--typically libraries--of the
-Free Software Foundation and other authors who decide to use it. You
-can use it too, but we suggest you first think carefully about whether
-this license or the ordinary General Public License is the better
-strategy to use in any particular case, based on the explanations below.
-
- When we speak of free software, we are referring to freedom of use,
-not price. Our General Public Licenses are designed to make sure that
-you have the freedom to distribute copies of free software (and charge
-for this service if you wish); that you receive source code or can get
-it if you want it; that you can change the software and use pieces of
-it in new free programs; and that you are informed that you can do
-these things.
-
- To protect your rights, we need to make restrictions that forbid
-distributors to deny you these rights or to ask you to surrender these
-rights. These restrictions translate to certain responsibilities for
-you if you distribute copies of the library or if you modify it.
-
- For example, if you distribute copies of the library, whether gratis
-or for a fee, you must give the recipients all the rights that we gave
-you. You must make sure that they, too, receive or can get the source
-code. If you link other code with the library, you must provide
-complete object files to the recipients, so that they can relink them
-with the library after making changes to the library and recompiling
-it. And you must show them these terms so they know their rights.
-
- We protect your rights with a two-step method: (1) we copyright the
-library, and (2) we offer you this license, which gives you legal
-permission to copy, distribute and/or modify the library.
-
- To protect each distributor, we want to make it very clear that
-there is no warranty for the free library. Also, if the library is
-modified by someone else and passed on, the recipients should know
-that what they have is not the original version, so that the original
-author's reputation will not be affected by problems that might be
-introduced by others.
-
- Finally, software patents pose a constant threat to the existence of
-any free program. We wish to make sure that a company cannot
-effectively restrict the users of a free program by obtaining a
-restrictive license from a patent holder. Therefore, we insist that
-any patent license obtained for a version of the library must be
-consistent with the full freedom of use specified in this license.
-
- Most GNU software, including some libraries, is covered by the
-ordinary GNU General Public License. This license, the GNU Lesser
-General Public License, applies to certain designated libraries, and
-is quite different from the ordinary General Public License. We use
-this license for certain libraries in order to permit linking those
-libraries into non-free programs.
-
- When a program is linked with a library, whether statically or using
-a shared library, the combination of the two is legally speaking a
-combined work, a derivative of the original library. The ordinary
-General Public License therefore permits such linking only if the
-entire combination fits its criteria of freedom. The Lesser General
-Public License permits more lax criteria for linking other code with
-the library.
-
- We call this license the "Lesser" General Public License because it
-does Less to protect the user's freedom than the ordinary General
-Public License. It also provides other free software developers Less
-of an advantage over competing non-free programs. These disadvantages
-are the reason we use the ordinary General Public License for many
-libraries. However, the Lesser license provides advantages in certain
-special circumstances.
-
- For example, on rare occasions, there may be a special need to
-encourage the widest possible use of a certain library, so that it becomes
-a de-facto standard. To achieve this, non-free programs must be
-allowed to use the library. A more frequent case is that a free
-library does the same job as widely used non-free libraries. In this
-case, there is little to gain by limiting the free library to free
-software only, so we use the Lesser General Public License.
-
- In other cases, permission to use a particular library in non-free
-programs enables a greater number of people to use a large body of
-free software. For example, permission to use the GNU C Library in
-non-free programs enables many more people to use the whole GNU
-operating system, as well as its variant, the GNU/Linux operating
-system.
-
- Although the Lesser General Public License is Less protective of the
-users' freedom, it does ensure that the user of a program that is
-linked with the Library has the freedom and the wherewithal to run
-that program using a modified version of the Library.
-
- The precise terms and conditions for copying, distribution and
-modification follow. Pay close attention to the difference between a
-"work based on the library" and a "work that uses the library". The
-former contains code derived from the library, whereas the latter must
-be combined with the library in order to run.
-
- GNU LESSER GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License Agreement applies to any software library or other
-program which contains a notice placed by the copyright holder or
-other authorized party saying it may be distributed under the terms of
-this Lesser General Public License (also called "this License").
-Each licensee is addressed as "you".
-
- A "library" means a collection of software functions and/or data
-prepared so as to be conveniently linked with application programs
-(which use some of those functions and data) to form executables.
-
- The "Library", below, refers to any such software library or work
-which has been distributed under these terms. A "work based on the
-Library" means either the Library or any derivative work under
-copyright law: that is to say, a work containing the Library or a
-portion of it, either verbatim or with modifications and/or translated
-straightforwardly into another language. (Hereinafter, translation is
-included without limitation in the term "modification".)
-
- "Source code" for a work means the preferred form of the work for
-making modifications to it. For a library, complete source code means
-all the source code for all modules it contains, plus any associated
-interface definition files, plus the scripts used to control compilation
-and installation of the library.
-
- Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running a program using the Library is not restricted, and output from
-such a program is covered only if its contents constitute a work based
-on the Library (independent of the use of the Library in a tool for
-writing it). Whether that is true depends on what the Library does
-and what the program that uses the Library does.
-
- 1. You may copy and distribute verbatim copies of the Library's
-complete source code as you receive it, in any medium, provided that
-you conspicuously and appropriately publish on each copy an
-appropriate copyright notice and disclaimer of warranty; keep intact
-all the notices that refer to this License and to the absence of any
-warranty; and distribute a copy of this License along with the
-Library.
-
- You may charge a fee for the physical act of transferring a copy,
-and you may at your option offer warranty protection in exchange for a
-fee.
-
- 2. You may modify your copy or copies of the Library or any portion
-of it, thus forming a work based on the Library, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) The modified work must itself be a software library.
-
- b) You must cause the files modified to carry prominent notices
- stating that you changed the files and the date of any change.
-
- c) You must cause the whole of the work to be licensed at no
- charge to all third parties under the terms of this License.
-
- d) If a facility in the modified Library refers to a function or a
- table of data to be supplied by an application program that uses
- the facility, other than as an argument passed when the facility
- is invoked, then you must make a good faith effort to ensure that,
- in the event an application does not supply such function or
- table, the facility still operates, and performs whatever part of
- its purpose remains meaningful.
-
- (For example, a function in a library to compute square roots has
- a purpose that is entirely well-defined independent of the
- application. Therefore, Subsection 2d requires that any
- application-supplied function or table used by this function must
- be optional: if the application does not supply it, the square
- root function must still compute square roots.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Library,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Library, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote
-it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Library.
-
-In addition, mere aggregation of another work not based on the Library
-with the Library (or with a work based on the Library) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may opt to apply the terms of the ordinary GNU General Public
-License instead of this License to a given copy of the Library. To do
-this, you must alter all the notices that refer to this License, so
-that they refer to the ordinary GNU General Public License, version 2,
-instead of to this License. (If a newer version than version 2 of the
-ordinary GNU General Public License has appeared, then you can specify
-that version instead if you wish.) Do not make any other change in
-these notices.
-
- Once this change is made in a given copy, it is irreversible for
-that copy, so the ordinary GNU General Public License applies to all
-subsequent copies and derivative works made from that copy.
-
- This option is useful when you wish to copy part of the code of
-the Library into a program that is not a library.
-
- 4. You may copy and distribute the Library (or a portion or
-derivative of it, under Section 2) in object code or executable form
-under the terms of Sections 1 and 2 above provided that you accompany
-it with the complete corresponding machine-readable source code, which
-must be distributed under the terms of Sections 1 and 2 above on a
-medium customarily used for software interchange.
-
- If distribution of object code is made by offering access to copy
-from a designated place, then offering equivalent access to copy the
-source code from the same place satisfies the requirement to
-distribute the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 5. A program that contains no derivative of any portion of the
-Library, but is designed to work with the Library by being compiled or
-linked with it, is called a "work that uses the Library". Such a
-work, in isolation, is not a derivative work of the Library, and
-therefore falls outside the scope of this License.
-
- However, linking a "work that uses the Library" with the Library
-creates an executable that is a derivative of the Library (because it
-contains portions of the Library), rather than a "work that uses the
-library". The executable is therefore covered by this License.
-Section 6 states terms for distribution of such executables.
-
- When a "work that uses the Library" uses material from a header file
-that is part of the Library, the object code for the work may be a
-derivative work of the Library even though the source code is not.
-Whether this is true is especially significant if the work can be
-linked without the Library, or if the work is itself a library. The
-threshold for this to be true is not precisely defined by law.
-
- If such an object file uses only numerical parameters, data
-structure layouts and accessors, and small macros and small inline
-functions (ten lines or less in length), then the use of the object
-file is unrestricted, regardless of whether it is legally a derivative
-work. (Executables containing this object code plus portions of the
-Library will still fall under Section 6.)
-
- Otherwise, if the work is a derivative of the Library, you may
-distribute the object code for the work under the terms of Section 6.
-Any executables containing that work also fall under Section 6,
-whether or not they are linked directly with the Library itself.
-
- 6. As an exception to the Sections above, you may also combine or
-link a "work that uses the Library" with the Library to produce a
-work containing portions of the Library, and distribute that work
-under terms of your choice, provided that the terms permit
-modification of the work for the customer's own use and reverse
-engineering for debugging such modifications.
-
- You must give prominent notice with each copy of the work that the
-Library is used in it and that the Library and its use are covered by
-this License. You must supply a copy of this License. If the work
-during execution displays copyright notices, you must include the
-copyright notice for the Library among them, as well as a reference
-directing the user to the copy of this License. Also, you must do one
-of these things:
-
- a) Accompany the work with the complete corresponding
- machine-readable source code for the Library including whatever
- changes were used in the work (which must be distributed under
- Sections 1 and 2 above); and, if the work is an executable linked
- with the Library, with the complete machine-readable "work that
- uses the Library", as object code and/or source code, so that the
- user can modify the Library and then relink to produce a modified
- executable containing the modified Library. (It is understood
- that the user who changes the contents of definitions files in the
- Library will not necessarily be able to recompile the application
- to use the modified definitions.)
-
- b) Use a suitable shared library mechanism for linking with the
- Library. A suitable mechanism is one that (1) uses at run time a
- copy of the library already present on the user's computer system,
- rather than copying library functions into the executable, and (2)
- will operate properly with a modified version of the library, if
- the user installs one, as long as the modified version is
- interface-compatible with the version that the work was made with.
-
- c) Accompany the work with a written offer, valid for at
- least three years, to give the same user the materials
- specified in Subsection 6a, above, for a charge no more
- than the cost of performing this distribution.
-
- d) If distribution of the work is made by offering access to copy
- from a designated place, offer equivalent access to copy the above
- specified materials from the same place.
-
- e) Verify that the user has already received a copy of these
- materials or that you have already sent this user a copy.
-
- For an executable, the required form of the "work that uses the
-Library" must include any data and utility programs needed for
-reproducing the executable from it. However, as a special exception,
-the materials to be distributed need not include anything that is
-normally distributed (in either source or binary form) with the major
-components (compiler, kernel, and so on) of the operating system on
-which the executable runs, unless that component itself accompanies
-the executable.
-
- It may happen that this requirement contradicts the license
-restrictions of other proprietary libraries that do not normally
-accompany the operating system. Such a contradiction means you cannot
-use both them and the Library together in an executable that you
-distribute.
-
- 7. You may place library facilities that are a work based on the
-Library side-by-side in a single library together with other library
-facilities not covered by this License, and distribute such a combined
-library, provided that the separate distribution of the work based on
-the Library and of the other library facilities is otherwise
-permitted, and provided that you do these two things:
-
- a) Accompany the combined library with a copy of the same work
- based on the Library, uncombined with any other library
- facilities. This must be distributed under the terms of the
- Sections above.
-
- b) Give prominent notice with the combined library of the fact
- that part of it is a work based on the Library, and explaining
- where to find the accompanying uncombined form of the same work.
-
- 8. You may not copy, modify, sublicense, link with, or distribute
-the Library except as expressly provided under this License. Any
-attempt otherwise to copy, modify, sublicense, link with, or
-distribute the Library is void, and will automatically terminate your
-rights under this License. However, parties who have received copies,
-or rights, from you under this License will not have their licenses
-terminated so long as such parties remain in full compliance.
-
- 9. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Library or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Library (or any work based on the
-Library), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Library or works based on it.
-
- 10. Each time you redistribute the Library (or any work based on the
-Library), the recipient automatically receives a license from the
-original licensor to copy, distribute, link with or modify the Library
-subject to these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties with
-this License.
-
- 11. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Library at all. For example, if a patent
-license would not permit royalty-free redistribution of the Library by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Library.
-
-If any portion of this section is held invalid or unenforceable under any
-particular circumstance, the balance of the section is intended to apply,
-and the section as a whole is intended to apply in other circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 12. If the distribution and/or use of the Library is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Library under this License may add
-an explicit geographical distribution limitation excluding those countries,
-so that distribution is permitted only in or among countries not thus
-excluded. In such case, this License incorporates the limitation as if
-written in the body of this License.
-
- 13. The Free Software Foundation may publish revised and/or new
-versions of the Lesser General Public License from time to time.
-Such new versions will be similar in spirit to the present version,
-but may differ in detail to address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Library
-specifies a version number of this License which applies to it and
-"any later version", you have the option of following the terms and
-conditions either of that version or of any later version published by
-the Free Software Foundation. If the Library does not specify a
-license version number, you may choose any version ever published by
-the Free Software Foundation.
-
- 14. If you wish to incorporate parts of the Library into other free
-programs whose distribution conditions are incompatible with these,
-write to the author to ask for permission. For software which is
-copyrighted by the Free Software Foundation, write to the Free
-Software Foundation; we sometimes make exceptions for this. Our
-decision will be guided by the two goals of preserving the free status
-of all derivatives of our free software and of promoting the sharing
-and reuse of software generally.
-
- NO WARRANTY
-
- 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
-WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
-EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
-OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
-KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
-LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
-THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
- 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
-WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
-AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
-FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
-CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
-LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
-RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
-FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
-SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Libraries
-
- If you develop a new library, and you want it to be of the greatest
-possible use to the public, we recommend making it free software that
-everyone can redistribute and change. You can do so by permitting
-redistribution under these terms (or, alternatively, under the terms of the
-ordinary General Public License).
-
- To apply these terms, attach the following notices to the library. It is
-safest to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least the
-"copyright" line and a pointer to where the full notice is found.
-
- &lt;one line to give the library's name and a brief idea of what it does.&gt;
- Copyright (C) &lt;year&gt; &lt;name of author&gt;
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 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
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
-Also add information on how to contact you by electronic and paper mail.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the library, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the
- library `Frob' (a library for tweaking knobs) written by James Random Hacker.
-
- &lt;signature of Ty Coon&gt;, 1 April 1990
- Ty Coon, President of Vice
-
-That's all there is to it!
-
-
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-libjingle.html
-\ingroup qtwebengine-licensing
-\brief BSD
-\title libjingle
-
-\l{http://www.webrtc.org}{Project Homepage}
-
-\badcode
-Copyright (c) 2013, Google Inc.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
- * Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
- * The name of the author may not be used to endorse or promote products
- derived from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
-LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
-GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
-STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
-WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGE.
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-libjpeg.html
-\ingroup qtwebengine-licensing
-\brief Custom license
-\title libjpeg
-
-\l{http://www.ijg.org/}{Project Homepage}
-
-\badcode
-(Copied from the README.)
-
---------------------------------------------------------------------------------
-
-The authors make NO WARRANTY or representation, either express or implied,
-with respect to this software, its quality, accuracy, merchantability, or
-fitness for a particular purpose. This software is provided "AS IS", and you,
-its user, assume the entire risk as to its quality and accuracy.
-
-This software is copyright (C) 1991-1998, Thomas G. Lane.
-All Rights Reserved except as specified below.
-
-Permission is hereby granted to use, copy, modify, and distribute this
-software (or portions thereof) for any purpose, without fee, subject to these
-conditions:
-(1) If any part of the source code for this software is distributed, then this
-README file must be included, with this copyright and no-warranty notice
-unaltered; and any additions, deletions, or changes to the original files
-must be clearly indicated in accompanying documentation.
-(2) If only executable code is distributed, then the accompanying
-documentation must state that "this software is based in part on the work of
-the Independent JPEG Group".
-(3) Permission for use of this software is granted only if the user accepts
-full responsibility for any undesirable consequences; the authors accept
-NO LIABILITY for damages of any kind.
-
-These conditions apply to any software derived from or based on the IJG code,
-not just to the unmodified library. If you use our work, you ought to
-acknowledge us.
-
-Permission is NOT granted for the use of any IJG author's name or company name
-in advertising or publicity relating to this software or products derived from
-it. This software may be referred to only as "the Independent JPEG Group's
-software".
-
-We specifically permit and encourage the use of this software as the basis of
-commercial products, provided that all warranty or liability claims are
-assumed by the product vendor.
-
-
-ansi2knr.c is included in this distribution by permission of L. Peter Deutsch,
-sole proprietor of its copyright holder, Aladdin Enterprises of Menlo Park, CA.
-ansi2knr.c is NOT covered by the above copyright and conditions, but instead
-by the usual distribution terms of the Free Software Foundation; principally,
-that you must include source code if you redistribute it. (See the file
-ansi2knr.c for full details.) However, since ansi2knr.c is not needed as part
-of any program generated from the IJG code, this does not limit you more than
-the foregoing paragraphs do.
-
-The Unix configuration script "configure" was produced with GNU Autoconf.
-It is copyright by the Free Software Foundation but is freely distributable.
-The same holds for its supporting scripts (config.guess, config.sub,
-ltconfig, ltmain.sh). Another support script, install-sh, is copyright
-by M.I.T. but is also freely distributable.
-
-It appears that the arithmetic coding option of the JPEG spec is covered by
-patents owned by IBM, AT&amp;T, and Mitsubishi. Hence arithmetic coding cannot
-legally be used without obtaining one or more licenses. For this reason,
-support for arithmetic coding has been removed from the free JPEG software.
-(Since arithmetic coding provides only a marginal gain over the unpatented
-Huffman mode, it is unlikely that very many implementations will support it.)
-So far as we are aware, there are no patent restrictions on the remaining
-code.
-
-The IJG distribution formerly included code to read and write GIF files.
-To avoid entanglement with the Unisys LZW patent, GIF reading support has
-been removed altogether, and the GIF writer has been simplified to produce
-"uncompressed GIFs". This technique does not use the LZW algorithm; the
-resulting GIF files are larger than usual, but are readable by all standard
-GIF decoders.
-
-We are required to state that
- "The Graphics Interchange Format(c) is the Copyright property of
- CompuServe Incorporated. GIF(sm) is a Service Mark property of
- CompuServe Incorporated."
-
---------------------------------------------------------------------------------
-
-jconfig.h is distributed under the MPL 1.1/GPL 2.0/LGPL 2.1 tri-license.
-
-jmorecfg.h contains modifications, which are distributed under the Netscape
-Public License.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-libjpeg-turbo.html
-\ingroup qtwebengine-licensing
-\brief Custom license
-\title libjpeg-turbo
-
-\l{http://sourceforge.net/projects/libjpeg-turbo/}{Project Homepage}
-
-\badcode
-libjpeg-turbo is licensed under a non-restrictive, BSD-style license
-(see README.) The TurboJPEG/OSS wrapper (both C and Java versions) and
-associated test programs bear a similar license, which is reproduced below:
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-- Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-- Neither the name of the libjpeg-turbo Project nor the names of its
- contributors may be used to endorse or promote products derived from this
- software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS",
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE
-LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGE.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-libpng.html
-\ingroup qtwebengine-licensing
-\brief libpng license
-\title libpng
-
-\l{http://libpng.org/}{Project Homepage}
-
-\badcode
-
-This copy of the libpng notices is provided for your convenience. In case of
-any discrepancy between this copy and the notices in the file png.h that is
-included in the libpng distribution, the latter shall prevail.
-
-COPYRIGHT NOTICE, DISCLAIMER, and LICENSE:
-
-If you modify libpng you may insert additional notices immediately following
-this sentence.
-
-pngusr.h is distributed under the MPL 1.1/GPL 2.0/LGPL 2.1 tri-license.
-
-This code is released under the libpng license.
-
-libpng versions 1.0.7, July 1, 2000, through 1.2.54, November 12, 2015, are
-Copyright (c) 2000-2002, 2004, 2006-2015 Glenn Randers-Pehrson, are
-derived from libpng-1.0.6, and are distributed according to the same
-disclaimer and license as libpng-1.0.6 with the following individuals
-added to the list of Contributing Authors:
-
- Simon-Pierre Cadieux
- Eric S. Raymond
- Cosmin Truta
- Gilles Vollant
-
-and with the following additions to the disclaimer:
-
- There is no warranty against interference with your enjoyment of the
- library or against infringement. There is no warranty that our
- efforts or the library will fulfill any of your particular purposes
- or needs. This library is provided with all faults, and the entire
- risk of satisfactory quality, performance, accuracy, and effort is with
- the user.
-
-libpng versions 0.97, January 1998, through 1.0.6, March 20, 2000, are
-Copyright (c) 1998-2000 Glenn Randers-Pehrson, are derived from
-libpng-0.96, and are distributed according to the same disclaimer and
-license as libpng-0.96, with the following individuals added to the list
-of Contributing Authors:
-
- Tom Lane
- Glenn Randers-Pehrson
- Willem van Schaik
-
-libpng versions 0.89, June 1996, through 0.96, May 1997, are
-Copyright (c) 1996-1997 Andreas Dilger, are derived from libpng-0.88,
-and are distributed according to the same disclaimer and license as
-libpng-0.88, with the following individuals added to the list of
-Contributing Authors:
-
- John Bowler
- Kevin Bracey
- Sam Bushell
- Magnus Holmgren
- Greg Roelofs
- Tom Tanner
-
-libpng versions 0.5, May 1995, through 0.88, January 1996, are
-Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
-
-For the purposes of this copyright and license, "Contributing Authors"
-is defined as the following set of individuals:
-
- Andreas Dilger
- Dave Martindale
- Guy Eric Schalnat
- Paul Schmidt
- Tim Wegner
-
-The PNG Reference Library is supplied "AS IS". The Contributing Authors
-and Group 42, Inc. disclaim all warranties, expressed or implied,
-including, without limitation, the warranties of merchantability and of
-fitness for any purpose. The Contributing Authors and Group 42, Inc.
-assume no liability for direct, indirect, incidental, special, exemplary,
-or consequential damages, which may result from the use of the PNG
-Reference Library, even if advised of the possibility of such damage.
-
-Permission is hereby granted to use, copy, modify, and distribute this
-source code, or portions hereof, for any purpose, without fee, subject
-to the following restrictions:
-
- 1. The origin of this source code must not be misrepresented.
-
- 2. Altered versions must be plainly marked as such and must not
- be misrepresented as being the original source.
-
- 3. This Copyright notice may not be removed or altered from any
- source or altered source distribution.
-
-The Contributing Authors and Group 42, Inc. specifically permit, without
-fee, and encourage the use of this source code as a component to
-supporting the PNG file format in commercial products. If you use this
-source code in a product, acknowledgment is not required but would be
-appreciated.
-
-END OF COPYRIGHT NOTICE, DISCLAIMER, and LICENSE.
-
-A "png_get_copyright" function is available, for convenient use in "about"
-boxes and the like:
-
- printf("%s", png_get_copyright(NULL));
-
-Also, the PNG logo (in PNG format, of course) is supplied in the
-files "pngbar.png" and "pngbar.jpg (88x31) and "pngnow.png" (98x31).
-
-Libpng is OSI Certified Open Source Software. OSI Certified Open Source is
-a certification mark of the Open Source Initiative. OSI has not addressed
-the additional disclaimers inserted at version 1.0.7.
-
-Glenn Randers-Pehrson
-glennrp at users.sourceforge.net
-November 12, 2015
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-libsecret.html
-\ingroup qtwebengine-licensing
-\brief LGPL 2.1
-\title libsecret
-
-\l{https://git.gnome.org/browse/libsecret/}{Project Homepage}
-
-\badcode
- GNU LESSER GENERAL PUBLIC LICENSE
- Version 2.1, February 1999
-
- Copyright (C) 1991, 1999 Free Software Foundation, Inc.
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-[This is the first released version of the Lesser GPL. It also counts
- as the successor of the GNU Library Public License, version 2, hence
- the version number 2.1.]
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-Licenses are intended to guarantee your freedom to share and change
-free software--to make sure the software is free for all its users.
-
- This license, the Lesser General Public License, applies to some
-specially designated software packages--typically libraries--of the
-Free Software Foundation and other authors who decide to use it. You
-can use it too, but we suggest you first think carefully about whether
-this license or the ordinary General Public License is the better
-strategy to use in any particular case, based on the explanations below.
-
- When we speak of free software, we are referring to freedom of use,
-not price. Our General Public Licenses are designed to make sure that
-you have the freedom to distribute copies of free software (and charge
-for this service if you wish); that you receive source code or can get
-it if you want it; that you can change the software and use pieces of
-it in new free programs; and that you are informed that you can do
-these things.
-
- To protect your rights, we need to make restrictions that forbid
-distributors to deny you these rights or to ask you to surrender these
-rights. These restrictions translate to certain responsibilities for
-you if you distribute copies of the library or if you modify it.
-
- For example, if you distribute copies of the library, whether gratis
-or for a fee, you must give the recipients all the rights that we gave
-you. You must make sure that they, too, receive or can get the source
-code. If you link other code with the library, you must provide
-complete object files to the recipients, so that they can relink them
-with the library after making changes to the library and recompiling
-it. And you must show them these terms so they know their rights.
-
- We protect your rights with a two-step method: (1) we copyright the
-library, and (2) we offer you this license, which gives you legal
-permission to copy, distribute and/or modify the library.
-
- To protect each distributor, we want to make it very clear that
-there is no warranty for the free library. Also, if the library is
-modified by someone else and passed on, the recipients should know
-that what they have is not the original version, so that the original
-author's reputation will not be affected by problems that might be
-introduced by others.
-
- Finally, software patents pose a constant threat to the existence of
-any free program. We wish to make sure that a company cannot
-effectively restrict the users of a free program by obtaining a
-restrictive license from a patent holder. Therefore, we insist that
-any patent license obtained for a version of the library must be
-consistent with the full freedom of use specified in this license.
-
- Most GNU software, including some libraries, is covered by the
-ordinary GNU General Public License. This license, the GNU Lesser
-General Public License, applies to certain designated libraries, and
-is quite different from the ordinary General Public License. We use
-this license for certain libraries in order to permit linking those
-libraries into non-free programs.
-
- When a program is linked with a library, whether statically or using
-a shared library, the combination of the two is legally speaking a
-combined work, a derivative of the original library. The ordinary
-General Public License therefore permits such linking only if the
-entire combination fits its criteria of freedom. The Lesser General
-Public License permits more lax criteria for linking other code with
-the library.
-
- We call this license the "Lesser" General Public License because it
-does Less to protect the user's freedom than the ordinary General
-Public License. It also provides other free software developers Less
-of an advantage over competing non-free programs. These disadvantages
-are the reason we use the ordinary General Public License for many
-libraries. However, the Lesser license provides advantages in certain
-special circumstances.
-
- For example, on rare occasions, there may be a special need to
-encourage the widest possible use of a certain library, so that it becomes
-a de-facto standard. To achieve this, non-free programs must be
-allowed to use the library. A more frequent case is that a free
-library does the same job as widely used non-free libraries. In this
-case, there is little to gain by limiting the free library to free
-software only, so we use the Lesser General Public License.
-
- In other cases, permission to use a particular library in non-free
-programs enables a greater number of people to use a large body of
-free software. For example, permission to use the GNU C Library in
-non-free programs enables many more people to use the whole GNU
-operating system, as well as its variant, the GNU/Linux operating
-system.
-
- Although the Lesser General Public License is Less protective of the
-users' freedom, it does ensure that the user of a program that is
-linked with the Library has the freedom and the wherewithal to run
-that program using a modified version of the Library.
-
- The precise terms and conditions for copying, distribution and
-modification follow. Pay close attention to the difference between a
-"work based on the library" and a "work that uses the library". The
-former contains code derived from the library, whereas the latter must
-be combined with the library in order to run.
-
- GNU LESSER GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License Agreement applies to any software library or other
-program which contains a notice placed by the copyright holder or
-other authorized party saying it may be distributed under the terms of
-this Lesser General Public License (also called "this License").
-Each licensee is addressed as "you".
-
- A "library" means a collection of software functions and/or data
-prepared so as to be conveniently linked with application programs
-(which use some of those functions and data) to form executables.
-
- The "Library", below, refers to any such software library or work
-which has been distributed under these terms. A "work based on the
-Library" means either the Library or any derivative work under
-copyright law: that is to say, a work containing the Library or a
-portion of it, either verbatim or with modifications and/or translated
-straightforwardly into another language. (Hereinafter, translation is
-included without limitation in the term "modification".)
-
- "Source code" for a work means the preferred form of the work for
-making modifications to it. For a library, complete source code means
-all the source code for all modules it contains, plus any associated
-interface definition files, plus the scripts used to control compilation
-and installation of the library.
-
- Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running a program using the Library is not restricted, and output from
-such a program is covered only if its contents constitute a work based
-on the Library (independent of the use of the Library in a tool for
-writing it). Whether that is true depends on what the Library does
-and what the program that uses the Library does.
-
- 1. You may copy and distribute verbatim copies of the Library's
-complete source code as you receive it, in any medium, provided that
-you conspicuously and appropriately publish on each copy an
-appropriate copyright notice and disclaimer of warranty; keep intact
-all the notices that refer to this License and to the absence of any
-warranty; and distribute a copy of this License along with the
-Library.
-
- You may charge a fee for the physical act of transferring a copy,
-and you may at your option offer warranty protection in exchange for a
-fee.
-
- 2. You may modify your copy or copies of the Library or any portion
-of it, thus forming a work based on the Library, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) The modified work must itself be a software library.
-
- b) You must cause the files modified to carry prominent notices
- stating that you changed the files and the date of any change.
-
- c) You must cause the whole of the work to be licensed at no
- charge to all third parties under the terms of this License.
-
- d) If a facility in the modified Library refers to a function or a
- table of data to be supplied by an application program that uses
- the facility, other than as an argument passed when the facility
- is invoked, then you must make a good faith effort to ensure that,
- in the event an application does not supply such function or
- table, the facility still operates, and performs whatever part of
- its purpose remains meaningful.
-
- (For example, a function in a library to compute square roots has
- a purpose that is entirely well-defined independent of the
- application. Therefore, Subsection 2d requires that any
- application-supplied function or table used by this function must
- be optional: if the application does not supply it, the square
- root function must still compute square roots.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Library,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Library, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote
-it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Library.
-
-In addition, mere aggregation of another work not based on the Library
-with the Library (or with a work based on the Library) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may opt to apply the terms of the ordinary GNU General Public
-License instead of this License to a given copy of the Library. To do
-this, you must alter all the notices that refer to this License, so
-that they refer to the ordinary GNU General Public License, version 2,
-instead of to this License. (If a newer version than version 2 of the
-ordinary GNU General Public License has appeared, then you can specify
-that version instead if you wish.) Do not make any other change in
-these notices.
-
- Once this change is made in a given copy, it is irreversible for
-that copy, so the ordinary GNU General Public License applies to all
-subsequent copies and derivative works made from that copy.
-
- This option is useful when you wish to copy part of the code of
-the Library into a program that is not a library.
-
- 4. You may copy and distribute the Library (or a portion or
-derivative of it, under Section 2) in object code or executable form
-under the terms of Sections 1 and 2 above provided that you accompany
-it with the complete corresponding machine-readable source code, which
-must be distributed under the terms of Sections 1 and 2 above on a
-medium customarily used for software interchange.
-
- If distribution of object code is made by offering access to copy
-from a designated place, then offering equivalent access to copy the
-source code from the same place satisfies the requirement to
-distribute the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 5. A program that contains no derivative of any portion of the
-Library, but is designed to work with the Library by being compiled or
-linked with it, is called a "work that uses the Library". Such a
-work, in isolation, is not a derivative work of the Library, and
-therefore falls outside the scope of this License.
-
- However, linking a "work that uses the Library" with the Library
-creates an executable that is a derivative of the Library (because it
-contains portions of the Library), rather than a "work that uses the
-library". The executable is therefore covered by this License.
-Section 6 states terms for distribution of such executables.
-
- When a "work that uses the Library" uses material from a header file
-that is part of the Library, the object code for the work may be a
-derivative work of the Library even though the source code is not.
-Whether this is true is especially significant if the work can be
-linked without the Library, or if the work is itself a library. The
-threshold for this to be true is not precisely defined by law.
-
- If such an object file uses only numerical parameters, data
-structure layouts and accessors, and small macros and small inline
-functions (ten lines or less in length), then the use of the object
-file is unrestricted, regardless of whether it is legally a derivative
-work. (Executables containing this object code plus portions of the
-Library will still fall under Section 6.)
-
- Otherwise, if the work is a derivative of the Library, you may
-distribute the object code for the work under the terms of Section 6.
-Any executables containing that work also fall under Section 6,
-whether or not they are linked directly with the Library itself.
-
- 6. As an exception to the Sections above, you may also combine or
-link a "work that uses the Library" with the Library to produce a
-work containing portions of the Library, and distribute that work
-under terms of your choice, provided that the terms permit
-modification of the work for the customer's own use and reverse
-engineering for debugging such modifications.
-
- You must give prominent notice with each copy of the work that the
-Library is used in it and that the Library and its use are covered by
-this License. You must supply a copy of this License. If the work
-during execution displays copyright notices, you must include the
-copyright notice for the Library among them, as well as a reference
-directing the user to the copy of this License. Also, you must do one
-of these things:
-
- a) Accompany the work with the complete corresponding
- machine-readable source code for the Library including whatever
- changes were used in the work (which must be distributed under
- Sections 1 and 2 above); and, if the work is an executable linked
- with the Library, with the complete machine-readable "work that
- uses the Library", as object code and/or source code, so that the
- user can modify the Library and then relink to produce a modified
- executable containing the modified Library. (It is understood
- that the user who changes the contents of definitions files in the
- Library will not necessarily be able to recompile the application
- to use the modified definitions.)
-
- b) Use a suitable shared library mechanism for linking with the
- Library. A suitable mechanism is one that (1) uses at run time a
- copy of the library already present on the user's computer system,
- rather than copying library functions into the executable, and (2)
- will operate properly with a modified version of the library, if
- the user installs one, as long as the modified version is
- interface-compatible with the version that the work was made with.
-
- c) Accompany the work with a written offer, valid for at
- least three years, to give the same user the materials
- specified in Subsection 6a, above, for a charge no more
- than the cost of performing this distribution.
-
- d) If distribution of the work is made by offering access to copy
- from a designated place, offer equivalent access to copy the above
- specified materials from the same place.
-
- e) Verify that the user has already received a copy of these
- materials or that you have already sent this user a copy.
-
- For an executable, the required form of the "work that uses the
-Library" must include any data and utility programs needed for
-reproducing the executable from it. However, as a special exception,
-the materials to be distributed need not include anything that is
-normally distributed (in either source or binary form) with the major
-components (compiler, kernel, and so on) of the operating system on
-which the executable runs, unless that component itself accompanies
-the executable.
-
- It may happen that this requirement contradicts the license
-restrictions of other proprietary libraries that do not normally
-accompany the operating system. Such a contradiction means you cannot
-use both them and the Library together in an executable that you
-distribute.
-
- 7. You may place library facilities that are a work based on the
-Library side-by-side in a single library together with other library
-facilities not covered by this License, and distribute such a combined
-library, provided that the separate distribution of the work based on
-the Library and of the other library facilities is otherwise
-permitted, and provided that you do these two things:
-
- a) Accompany the combined library with a copy of the same work
- based on the Library, uncombined with any other library
- facilities. This must be distributed under the terms of the
- Sections above.
-
- b) Give prominent notice with the combined library of the fact
- that part of it is a work based on the Library, and explaining
- where to find the accompanying uncombined form of the same work.
-
- 8. You may not copy, modify, sublicense, link with, or distribute
-the Library except as expressly provided under this License. Any
-attempt otherwise to copy, modify, sublicense, link with, or
-distribute the Library is void, and will automatically terminate your
-rights under this License. However, parties who have received copies,
-or rights, from you under this License will not have their licenses
-terminated so long as such parties remain in full compliance.
-
- 9. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Library or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Library (or any work based on the
-Library), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Library or works based on it.
-
- 10. Each time you redistribute the Library (or any work based on the
-Library), the recipient automatically receives a license from the
-original licensor to copy, distribute, link with or modify the Library
-subject to these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties with
-this License.
-
- 11. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Library at all. For example, if a patent
-license would not permit royalty-free redistribution of the Library by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Library.
-
-If any portion of this section is held invalid or unenforceable under any
-particular circumstance, the balance of the section is intended to apply,
-and the section as a whole is intended to apply in other circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 12. If the distribution and/or use of the Library is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Library under this License may add
-an explicit geographical distribution limitation excluding those countries,
-so that distribution is permitted only in or among countries not thus
-excluded. In such case, this License incorporates the limitation as if
-written in the body of this License.
-
- 13. The Free Software Foundation may publish revised and/or new
-versions of the Lesser General Public License from time to time.
-Such new versions will be similar in spirit to the present version,
-but may differ in detail to address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Library
-specifies a version number of this License which applies to it and
-"any later version", you have the option of following the terms and
-conditions either of that version or of any later version published by
-the Free Software Foundation. If the Library does not specify a
-license version number, you may choose any version ever published by
-the Free Software Foundation.
-
- 14. If you wish to incorporate parts of the Library into other free
-programs whose distribution conditions are incompatible with these,
-write to the author to ask for permission. For software which is
-copyrighted by the Free Software Foundation, write to the Free
-Software Foundation; we sometimes make exceptions for this. Our
-decision will be guided by the two goals of preserving the free status
-of all derivatives of our free software and of promoting the sharing
-and reuse of software generally.
-
- NO WARRANTY
-
- 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
-WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
-EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
-OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
-KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
-LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
-THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
- 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
-WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
-AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
-FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
-CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
-LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
-RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
-FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
-SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Libraries
-
- If you develop a new library, and you want it to be of the greatest
-possible use to the public, we recommend making it free software that
-everyone can redistribute and change. You can do so by permitting
-redistribution under these terms (or, alternatively, under the terms of the
-ordinary General Public License).
-
- To apply these terms, attach the following notices to the library. It is
-safest to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least the
-"copyright" line and a pointer to where the full notice is found.
-
- &lt;one line to give the library's name and a brief idea of what it does.&gt;
- Copyright (C) &lt;year&gt; &lt;name of author&gt;
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 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
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
-Also add information on how to contact you by electronic and paper mail.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the library, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the
- library `Frob' (a library for tweaking knobs) written by James Random Hacker.
-
- &lt;signature of Ty Coon&gt;, 1 April 1990
- Ty Coon, President of Vice
-
-That's all there is to it!
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-libsrtp.html
-\ingroup qtwebengine-licensing
-\brief 3-clause BSD
-\title libsrtp
-
-\l{https://github.com/cisco/libsrtp}{Project Homepage}
-
-\badcode
-/*
- *
- * Copyright (c) 2001-2006 Cisco Systems, Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided
- * with the distribution.
- *
- * Neither the name of the Cisco Systems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
- * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
- * OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * /
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-libudev.html
-\ingroup qtwebengine-licensing
-\brief LGPL 2.1
-\title libudev
-
-\l{http://www.freedesktop.org/wiki/Software/systemd/}{Project Homepage}
-
-\badcode
- GNU LESSER GENERAL PUBLIC LICENSE
- Version 2.1, February 1999
-
- Copyright (C) 1991, 1999 Free Software Foundation, Inc.
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-[This is the first released version of the Lesser GPL. It also counts
- as the successor of the GNU Library Public License, version 2, hence
- the version number 2.1.]
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-Licenses are intended to guarantee your freedom to share and change
-free software--to make sure the software is free for all its users.
-
- This license, the Lesser General Public License, applies to some
-specially designated software packages--typically libraries--of the
-Free Software Foundation and other authors who decide to use it. You
-can use it too, but we suggest you first think carefully about whether
-this license or the ordinary General Public License is the better
-strategy to use in any particular case, based on the explanations below.
-
- When we speak of free software, we are referring to freedom of use,
-not price. Our General Public Licenses are designed to make sure that
-you have the freedom to distribute copies of free software (and charge
-for this service if you wish); that you receive source code or can get
-it if you want it; that you can change the software and use pieces of
-it in new free programs; and that you are informed that you can do
-these things.
-
- To protect your rights, we need to make restrictions that forbid
-distributors to deny you these rights or to ask you to surrender these
-rights. These restrictions translate to certain responsibilities for
-you if you distribute copies of the library or if you modify it.
-
- For example, if you distribute copies of the library, whether gratis
-or for a fee, you must give the recipients all the rights that we gave
-you. You must make sure that they, too, receive or can get the source
-code. If you link other code with the library, you must provide
-complete object files to the recipients, so that they can relink them
-with the library after making changes to the library and recompiling
-it. And you must show them these terms so they know their rights.
-
- We protect your rights with a two-step method: (1) we copyright the
-library, and (2) we offer you this license, which gives you legal
-permission to copy, distribute and/or modify the library.
-
- To protect each distributor, we want to make it very clear that
-there is no warranty for the free library. Also, if the library is
-modified by someone else and passed on, the recipients should know
-that what they have is not the original version, so that the original
-author's reputation will not be affected by problems that might be
-introduced by others.
-
- Finally, software patents pose a constant threat to the existence of
-any free program. We wish to make sure that a company cannot
-effectively restrict the users of a free program by obtaining a
-restrictive license from a patent holder. Therefore, we insist that
-any patent license obtained for a version of the library must be
-consistent with the full freedom of use specified in this license.
-
- Most GNU software, including some libraries, is covered by the
-ordinary GNU General Public License. This license, the GNU Lesser
-General Public License, applies to certain designated libraries, and
-is quite different from the ordinary General Public License. We use
-this license for certain libraries in order to permit linking those
-libraries into non-free programs.
-
- When a program is linked with a library, whether statically or using
-a shared library, the combination of the two is legally speaking a
-combined work, a derivative of the original library. The ordinary
-General Public License therefore permits such linking only if the
-entire combination fits its criteria of freedom. The Lesser General
-Public License permits more lax criteria for linking other code with
-the library.
-
- We call this license the "Lesser" General Public License because it
-does Less to protect the user's freedom than the ordinary General
-Public License. It also provides other free software developers Less
-of an advantage over competing non-free programs. These disadvantages
-are the reason we use the ordinary General Public License for many
-libraries. However, the Lesser license provides advantages in certain
-special circumstances.
-
- For example, on rare occasions, there may be a special need to
-encourage the widest possible use of a certain library, so that it becomes
-a de-facto standard. To achieve this, non-free programs must be
-allowed to use the library. A more frequent case is that a free
-library does the same job as widely used non-free libraries. In this
-case, there is little to gain by limiting the free library to free
-software only, so we use the Lesser General Public License.
-
- In other cases, permission to use a particular library in non-free
-programs enables a greater number of people to use a large body of
-free software. For example, permission to use the GNU C Library in
-non-free programs enables many more people to use the whole GNU
-operating system, as well as its variant, the GNU/Linux operating
-system.
-
- Although the Lesser General Public License is Less protective of the
-users' freedom, it does ensure that the user of a program that is
-linked with the Library has the freedom and the wherewithal to run
-that program using a modified version of the Library.
-
- The precise terms and conditions for copying, distribution and
-modification follow. Pay close attention to the difference between a
-"work based on the library" and a "work that uses the library". The
-former contains code derived from the library, whereas the latter must
-be combined with the library in order to run.
-
- GNU LESSER GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License Agreement applies to any software library or other
-program which contains a notice placed by the copyright holder or
-other authorized party saying it may be distributed under the terms of
-this Lesser General Public License (also called "this License").
-Each licensee is addressed as "you".
-
- A "library" means a collection of software functions and/or data
-prepared so as to be conveniently linked with application programs
-(which use some of those functions and data) to form executables.
-
- The "Library", below, refers to any such software library or work
-which has been distributed under these terms. A "work based on the
-Library" means either the Library or any derivative work under
-copyright law: that is to say, a work containing the Library or a
-portion of it, either verbatim or with modifications and/or translated
-straightforwardly into another language. (Hereinafter, translation is
-included without limitation in the term "modification".)
-
- "Source code" for a work means the preferred form of the work for
-making modifications to it. For a library, complete source code means
-all the source code for all modules it contains, plus any associated
-interface definition files, plus the scripts used to control compilation
-and installation of the library.
-
- Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running a program using the Library is not restricted, and output from
-such a program is covered only if its contents constitute a work based
-on the Library (independent of the use of the Library in a tool for
-writing it). Whether that is true depends on what the Library does
-and what the program that uses the Library does.
-
- 1. You may copy and distribute verbatim copies of the Library's
-complete source code as you receive it, in any medium, provided that
-you conspicuously and appropriately publish on each copy an
-appropriate copyright notice and disclaimer of warranty; keep intact
-all the notices that refer to this License and to the absence of any
-warranty; and distribute a copy of this License along with the
-Library.
-
- You may charge a fee for the physical act of transferring a copy,
-and you may at your option offer warranty protection in exchange for a
-fee.
-
- 2. You may modify your copy or copies of the Library or any portion
-of it, thus forming a work based on the Library, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) The modified work must itself be a software library.
-
- b) You must cause the files modified to carry prominent notices
- stating that you changed the files and the date of any change.
-
- c) You must cause the whole of the work to be licensed at no
- charge to all third parties under the terms of this License.
-
- d) If a facility in the modified Library refers to a function or a
- table of data to be supplied by an application program that uses
- the facility, other than as an argument passed when the facility
- is invoked, then you must make a good faith effort to ensure that,
- in the event an application does not supply such function or
- table, the facility still operates, and performs whatever part of
- its purpose remains meaningful.
-
- (For example, a function in a library to compute square roots has
- a purpose that is entirely well-defined independent of the
- application. Therefore, Subsection 2d requires that any
- application-supplied function or table used by this function must
- be optional: if the application does not supply it, the square
- root function must still compute square roots.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Library,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Library, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote
-it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Library.
-
-In addition, mere aggregation of another work not based on the Library
-with the Library (or with a work based on the Library) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may opt to apply the terms of the ordinary GNU General Public
-License instead of this License to a given copy of the Library. To do
-this, you must alter all the notices that refer to this License, so
-that they refer to the ordinary GNU General Public License, version 2,
-instead of to this License. (If a newer version than version 2 of the
-ordinary GNU General Public License has appeared, then you can specify
-that version instead if you wish.) Do not make any other change in
-these notices.
-
- Once this change is made in a given copy, it is irreversible for
-that copy, so the ordinary GNU General Public License applies to all
-subsequent copies and derivative works made from that copy.
-
- This option is useful when you wish to copy part of the code of
-the Library into a program that is not a library.
-
- 4. You may copy and distribute the Library (or a portion or
-derivative of it, under Section 2) in object code or executable form
-under the terms of Sections 1 and 2 above provided that you accompany
-it with the complete corresponding machine-readable source code, which
-must be distributed under the terms of Sections 1 and 2 above on a
-medium customarily used for software interchange.
-
- If distribution of object code is made by offering access to copy
-from a designated place, then offering equivalent access to copy the
-source code from the same place satisfies the requirement to
-distribute the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 5. A program that contains no derivative of any portion of the
-Library, but is designed to work with the Library by being compiled or
-linked with it, is called a "work that uses the Library". Such a
-work, in isolation, is not a derivative work of the Library, and
-therefore falls outside the scope of this License.
-
- However, linking a "work that uses the Library" with the Library
-creates an executable that is a derivative of the Library (because it
-contains portions of the Library), rather than a "work that uses the
-library". The executable is therefore covered by this License.
-Section 6 states terms for distribution of such executables.
-
- When a "work that uses the Library" uses material from a header file
-that is part of the Library, the object code for the work may be a
-derivative work of the Library even though the source code is not.
-Whether this is true is especially significant if the work can be
-linked without the Library, or if the work is itself a library. The
-threshold for this to be true is not precisely defined by law.
-
- If such an object file uses only numerical parameters, data
-structure layouts and accessors, and small macros and small inline
-functions (ten lines or less in length), then the use of the object
-file is unrestricted, regardless of whether it is legally a derivative
-work. (Executables containing this object code plus portions of the
-Library will still fall under Section 6.)
-
- Otherwise, if the work is a derivative of the Library, you may
-distribute the object code for the work under the terms of Section 6.
-Any executables containing that work also fall under Section 6,
-whether or not they are linked directly with the Library itself.
-
- 6. As an exception to the Sections above, you may also combine or
-link a "work that uses the Library" with the Library to produce a
-work containing portions of the Library, and distribute that work
-under terms of your choice, provided that the terms permit
-modification of the work for the customer's own use and reverse
-engineering for debugging such modifications.
-
- You must give prominent notice with each copy of the work that the
-Library is used in it and that the Library and its use are covered by
-this License. You must supply a copy of this License. If the work
-during execution displays copyright notices, you must include the
-copyright notice for the Library among them, as well as a reference
-directing the user to the copy of this License. Also, you must do one
-of these things:
-
- a) Accompany the work with the complete corresponding
- machine-readable source code for the Library including whatever
- changes were used in the work (which must be distributed under
- Sections 1 and 2 above); and, if the work is an executable linked
- with the Library, with the complete machine-readable "work that
- uses the Library", as object code and/or source code, so that the
- user can modify the Library and then relink to produce a modified
- executable containing the modified Library. (It is understood
- that the user who changes the contents of definitions files in the
- Library will not necessarily be able to recompile the application
- to use the modified definitions.)
-
- b) Use a suitable shared library mechanism for linking with the
- Library. A suitable mechanism is one that (1) uses at run time a
- copy of the library already present on the user's computer system,
- rather than copying library functions into the executable, and (2)
- will operate properly with a modified version of the library, if
- the user installs one, as long as the modified version is
- interface-compatible with the version that the work was made with.
-
- c) Accompany the work with a written offer, valid for at
- least three years, to give the same user the materials
- specified in Subsection 6a, above, for a charge no more
- than the cost of performing this distribution.
-
- d) If distribution of the work is made by offering access to copy
- from a designated place, offer equivalent access to copy the above
- specified materials from the same place.
-
- e) Verify that the user has already received a copy of these
- materials or that you have already sent this user a copy.
-
- For an executable, the required form of the "work that uses the
-Library" must include any data and utility programs needed for
-reproducing the executable from it. However, as a special exception,
-the materials to be distributed need not include anything that is
-normally distributed (in either source or binary form) with the major
-components (compiler, kernel, and so on) of the operating system on
-which the executable runs, unless that component itself accompanies
-the executable.
-
- It may happen that this requirement contradicts the license
-restrictions of other proprietary libraries that do not normally
-accompany the operating system. Such a contradiction means you cannot
-use both them and the Library together in an executable that you
-distribute.
-
- 7. You may place library facilities that are a work based on the
-Library side-by-side in a single library together with other library
-facilities not covered by this License, and distribute such a combined
-library, provided that the separate distribution of the work based on
-the Library and of the other library facilities is otherwise
-permitted, and provided that you do these two things:
-
- a) Accompany the combined library with a copy of the same work
- based on the Library, uncombined with any other library
- facilities. This must be distributed under the terms of the
- Sections above.
-
- b) Give prominent notice with the combined library of the fact
- that part of it is a work based on the Library, and explaining
- where to find the accompanying uncombined form of the same work.
-
- 8. You may not copy, modify, sublicense, link with, or distribute
-the Library except as expressly provided under this License. Any
-attempt otherwise to copy, modify, sublicense, link with, or
-distribute the Library is void, and will automatically terminate your
-rights under this License. However, parties who have received copies,
-or rights, from you under this License will not have their licenses
-terminated so long as such parties remain in full compliance.
-
- 9. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Library or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Library (or any work based on the
-Library), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Library or works based on it.
-
- 10. Each time you redistribute the Library (or any work based on the
-Library), the recipient automatically receives a license from the
-original licensor to copy, distribute, link with or modify the Library
-subject to these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties with
-this License.
-
- 11. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Library at all. For example, if a patent
-license would not permit royalty-free redistribution of the Library by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Library.
-
-If any portion of this section is held invalid or unenforceable under any
-particular circumstance, the balance of the section is intended to apply,
-and the section as a whole is intended to apply in other circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 12. If the distribution and/or use of the Library is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Library under this License may add
-an explicit geographical distribution limitation excluding those countries,
-so that distribution is permitted only in or among countries not thus
-excluded. In such case, this License incorporates the limitation as if
-written in the body of this License.
-
- 13. The Free Software Foundation may publish revised and/or new
-versions of the Lesser General Public License from time to time.
-Such new versions will be similar in spirit to the present version,
-but may differ in detail to address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Library
-specifies a version number of this License which applies to it and
-"any later version", you have the option of following the terms and
-conditions either of that version or of any later version published by
-the Free Software Foundation. If the Library does not specify a
-license version number, you may choose any version ever published by
-the Free Software Foundation.
-
- 14. If you wish to incorporate parts of the Library into other free
-programs whose distribution conditions are incompatible with these,
-write to the author to ask for permission. For software which is
-copyrighted by the Free Software Foundation, write to the Free
-Software Foundation; we sometimes make exceptions for this. Our
-decision will be guided by the two goals of preserving the free status
-of all derivatives of our free software and of promoting the sharing
-and reuse of software generally.
-
- NO WARRANTY
-
- 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
-WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
-EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
-OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
-KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
-LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
-THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
- 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
-WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
-AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
-FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
-CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
-LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
-RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
-FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
-SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Libraries
-
- If you develop a new library, and you want it to be of the greatest
-possible use to the public, we recommend making it free software that
-everyone can redistribute and change. You can do so by permitting
-redistribution under these terms (or, alternatively, under the terms of the
-ordinary General Public License).
-
- To apply these terms, attach the following notices to the library. It is
-safest to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least the
-"copyright" line and a pointer to where the full notice is found.
-
- &lt;one line to give the library's name and a brief idea of what it does.&gt;
- Copyright (C) &lt;year&gt; &lt;name of author&gt;
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 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
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
-Also add information on how to contact you by electronic and paper mail.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the library, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the
- library `Frob' (a library for tweaking knobs) written by James Random Hacker.
-
- &lt;signature of Ty Coon&gt;, 1 April 1990
- Ty Coon, President of Vice
-
-That's all there is to it!
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-libusbx.html
-\ingroup qtwebengine-licensing
-\brief LGPL 2.1
-\title libusbx
-
-\l{http://libusb.org}{Project Homepage}
-
-\badcode
- GNU LESSER GENERAL PUBLIC LICENSE
- Version 2.1, February 1999
-
- Copyright (C) 1991, 1999 Free Software Foundation, Inc.
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-[This is the first released version of the Lesser GPL. It also counts
- as the successor of the GNU Library Public License, version 2, hence
- the version number 2.1.]
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-Licenses are intended to guarantee your freedom to share and change
-free software--to make sure the software is free for all its users.
-
- This license, the Lesser General Public License, applies to some
-specially designated software packages--typically libraries--of the
-Free Software Foundation and other authors who decide to use it. You
-can use it too, but we suggest you first think carefully about whether
-this license or the ordinary General Public License is the better
-strategy to use in any particular case, based on the explanations below.
-
- When we speak of free software, we are referring to freedom of use,
-not price. Our General Public Licenses are designed to make sure that
-you have the freedom to distribute copies of free software (and charge
-for this service if you wish); that you receive source code or can get
-it if you want it; that you can change the software and use pieces of
-it in new free programs; and that you are informed that you can do
-these things.
-
- To protect your rights, we need to make restrictions that forbid
-distributors to deny you these rights or to ask you to surrender these
-rights. These restrictions translate to certain responsibilities for
-you if you distribute copies of the library or if you modify it.
-
- For example, if you distribute copies of the library, whether gratis
-or for a fee, you must give the recipients all the rights that we gave
-you. You must make sure that they, too, receive or can get the source
-code. If you link other code with the library, you must provide
-complete object files to the recipients, so that they can relink them
-with the library after making changes to the library and recompiling
-it. And you must show them these terms so they know their rights.
-
- We protect your rights with a two-step method: (1) we copyright the
-library, and (2) we offer you this license, which gives you legal
-permission to copy, distribute and/or modify the library.
-
- To protect each distributor, we want to make it very clear that
-there is no warranty for the free library. Also, if the library is
-modified by someone else and passed on, the recipients should know
-that what they have is not the original version, so that the original
-author's reputation will not be affected by problems that might be
-introduced by others.
-
- Finally, software patents pose a constant threat to the existence of
-any free program. We wish to make sure that a company cannot
-effectively restrict the users of a free program by obtaining a
-restrictive license from a patent holder. Therefore, we insist that
-any patent license obtained for a version of the library must be
-consistent with the full freedom of use specified in this license.
-
- Most GNU software, including some libraries, is covered by the
-ordinary GNU General Public License. This license, the GNU Lesser
-General Public License, applies to certain designated libraries, and
-is quite different from the ordinary General Public License. We use
-this license for certain libraries in order to permit linking those
-libraries into non-free programs.
-
- When a program is linked with a library, whether statically or using
-a shared library, the combination of the two is legally speaking a
-combined work, a derivative of the original library. The ordinary
-General Public License therefore permits such linking only if the
-entire combination fits its criteria of freedom. The Lesser General
-Public License permits more lax criteria for linking other code with
-the library.
-
- We call this license the "Lesser" General Public License because it
-does Less to protect the user's freedom than the ordinary General
-Public License. It also provides other free software developers Less
-of an advantage over competing non-free programs. These disadvantages
-are the reason we use the ordinary General Public License for many
-libraries. However, the Lesser license provides advantages in certain
-special circumstances.
-
- For example, on rare occasions, there may be a special need to
-encourage the widest possible use of a certain library, so that it becomes
-a de-facto standard. To achieve this, non-free programs must be
-allowed to use the library. A more frequent case is that a free
-library does the same job as widely used non-free libraries. In this
-case, there is little to gain by limiting the free library to free
-software only, so we use the Lesser General Public License.
-
- In other cases, permission to use a particular library in non-free
-programs enables a greater number of people to use a large body of
-free software. For example, permission to use the GNU C Library in
-non-free programs enables many more people to use the whole GNU
-operating system, as well as its variant, the GNU/Linux operating
-system.
-
- Although the Lesser General Public License is Less protective of the
-users' freedom, it does ensure that the user of a program that is
-linked with the Library has the freedom and the wherewithal to run
-that program using a modified version of the Library.
-
- The precise terms and conditions for copying, distribution and
-modification follow. Pay close attention to the difference between a
-"work based on the library" and a "work that uses the library". The
-former contains code derived from the library, whereas the latter must
-be combined with the library in order to run.
-
- GNU LESSER GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License Agreement applies to any software library or other
-program which contains a notice placed by the copyright holder or
-other authorized party saying it may be distributed under the terms of
-this Lesser General Public License (also called "this License").
-Each licensee is addressed as "you".
-
- A "library" means a collection of software functions and/or data
-prepared so as to be conveniently linked with application programs
-(which use some of those functions and data) to form executables.
-
- The "Library", below, refers to any such software library or work
-which has been distributed under these terms. A "work based on the
-Library" means either the Library or any derivative work under
-copyright law: that is to say, a work containing the Library or a
-portion of it, either verbatim or with modifications and/or translated
-straightforwardly into another language. (Hereinafter, translation is
-included without limitation in the term "modification".)
-
- "Source code" for a work means the preferred form of the work for
-making modifications to it. For a library, complete source code means
-all the source code for all modules it contains, plus any associated
-interface definition files, plus the scripts used to control compilation
-and installation of the library.
-
- Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running a program using the Library is not restricted, and output from
-such a program is covered only if its contents constitute a work based
-on the Library (independent of the use of the Library in a tool for
-writing it). Whether that is true depends on what the Library does
-and what the program that uses the Library does.
-
- 1. You may copy and distribute verbatim copies of the Library's
-complete source code as you receive it, in any medium, provided that
-you conspicuously and appropriately publish on each copy an
-appropriate copyright notice and disclaimer of warranty; keep intact
-all the notices that refer to this License and to the absence of any
-warranty; and distribute a copy of this License along with the
-Library.
-
- You may charge a fee for the physical act of transferring a copy,
-and you may at your option offer warranty protection in exchange for a
-fee.
-
- 2. You may modify your copy or copies of the Library or any portion
-of it, thus forming a work based on the Library, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) The modified work must itself be a software library.
-
- b) You must cause the files modified to carry prominent notices
- stating that you changed the files and the date of any change.
-
- c) You must cause the whole of the work to be licensed at no
- charge to all third parties under the terms of this License.
-
- d) If a facility in the modified Library refers to a function or a
- table of data to be supplied by an application program that uses
- the facility, other than as an argument passed when the facility
- is invoked, then you must make a good faith effort to ensure that,
- in the event an application does not supply such function or
- table, the facility still operates, and performs whatever part of
- its purpose remains meaningful.
-
- (For example, a function in a library to compute square roots has
- a purpose that is entirely well-defined independent of the
- application. Therefore, Subsection 2d requires that any
- application-supplied function or table used by this function must
- be optional: if the application does not supply it, the square
- root function must still compute square roots.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Library,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Library, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote
-it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Library.
-
-In addition, mere aggregation of another work not based on the Library
-with the Library (or with a work based on the Library) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may opt to apply the terms of the ordinary GNU General Public
-License instead of this License to a given copy of the Library. To do
-this, you must alter all the notices that refer to this License, so
-that they refer to the ordinary GNU General Public License, version 2,
-instead of to this License. (If a newer version than version 2 of the
-ordinary GNU General Public License has appeared, then you can specify
-that version instead if you wish.) Do not make any other change in
-these notices.
-
- Once this change is made in a given copy, it is irreversible for
-that copy, so the ordinary GNU General Public License applies to all
-subsequent copies and derivative works made from that copy.
-
- This option is useful when you wish to copy part of the code of
-the Library into a program that is not a library.
-
- 4. You may copy and distribute the Library (or a portion or
-derivative of it, under Section 2) in object code or executable form
-under the terms of Sections 1 and 2 above provided that you accompany
-it with the complete corresponding machine-readable source code, which
-must be distributed under the terms of Sections 1 and 2 above on a
-medium customarily used for software interchange.
-
- If distribution of object code is made by offering access to copy
-from a designated place, then offering equivalent access to copy the
-source code from the same place satisfies the requirement to
-distribute the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 5. A program that contains no derivative of any portion of the
-Library, but is designed to work with the Library by being compiled or
-linked with it, is called a "work that uses the Library". Such a
-work, in isolation, is not a derivative work of the Library, and
-therefore falls outside the scope of this License.
-
- However, linking a "work that uses the Library" with the Library
-creates an executable that is a derivative of the Library (because it
-contains portions of the Library), rather than a "work that uses the
-library". The executable is therefore covered by this License.
-Section 6 states terms for distribution of such executables.
-
- When a "work that uses the Library" uses material from a header file
-that is part of the Library, the object code for the work may be a
-derivative work of the Library even though the source code is not.
-Whether this is true is especially significant if the work can be
-linked without the Library, or if the work is itself a library. The
-threshold for this to be true is not precisely defined by law.
-
- If such an object file uses only numerical parameters, data
-structure layouts and accessors, and small macros and small inline
-functions (ten lines or less in length), then the use of the object
-file is unrestricted, regardless of whether it is legally a derivative
-work. (Executables containing this object code plus portions of the
-Library will still fall under Section 6.)
-
- Otherwise, if the work is a derivative of the Library, you may
-distribute the object code for the work under the terms of Section 6.
-Any executables containing that work also fall under Section 6,
-whether or not they are linked directly with the Library itself.
-
- 6. As an exception to the Sections above, you may also combine or
-link a "work that uses the Library" with the Library to produce a
-work containing portions of the Library, and distribute that work
-under terms of your choice, provided that the terms permit
-modification of the work for the customer's own use and reverse
-engineering for debugging such modifications.
-
- You must give prominent notice with each copy of the work that the
-Library is used in it and that the Library and its use are covered by
-this License. You must supply a copy of this License. If the work
-during execution displays copyright notices, you must include the
-copyright notice for the Library among them, as well as a reference
-directing the user to the copy of this License. Also, you must do one
-of these things:
-
- a) Accompany the work with the complete corresponding
- machine-readable source code for the Library including whatever
- changes were used in the work (which must be distributed under
- Sections 1 and 2 above); and, if the work is an executable linked
- with the Library, with the complete machine-readable "work that
- uses the Library", as object code and/or source code, so that the
- user can modify the Library and then relink to produce a modified
- executable containing the modified Library. (It is understood
- that the user who changes the contents of definitions files in the
- Library will not necessarily be able to recompile the application
- to use the modified definitions.)
-
- b) Use a suitable shared library mechanism for linking with the
- Library. A suitable mechanism is one that (1) uses at run time a
- copy of the library already present on the user's computer system,
- rather than copying library functions into the executable, and (2)
- will operate properly with a modified version of the library, if
- the user installs one, as long as the modified version is
- interface-compatible with the version that the work was made with.
-
- c) Accompany the work with a written offer, valid for at
- least three years, to give the same user the materials
- specified in Subsection 6a, above, for a charge no more
- than the cost of performing this distribution.
-
- d) If distribution of the work is made by offering access to copy
- from a designated place, offer equivalent access to copy the above
- specified materials from the same place.
-
- e) Verify that the user has already received a copy of these
- materials or that you have already sent this user a copy.
-
- For an executable, the required form of the "work that uses the
-Library" must include any data and utility programs needed for
-reproducing the executable from it. However, as a special exception,
-the materials to be distributed need not include anything that is
-normally distributed (in either source or binary form) with the major
-components (compiler, kernel, and so on) of the operating system on
-which the executable runs, unless that component itself accompanies
-the executable.
-
- It may happen that this requirement contradicts the license
-restrictions of other proprietary libraries that do not normally
-accompany the operating system. Such a contradiction means you cannot
-use both them and the Library together in an executable that you
-distribute.
-
- 7. You may place library facilities that are a work based on the
-Library side-by-side in a single library together with other library
-facilities not covered by this License, and distribute such a combined
-library, provided that the separate distribution of the work based on
-the Library and of the other library facilities is otherwise
-permitted, and provided that you do these two things:
-
- a) Accompany the combined library with a copy of the same work
- based on the Library, uncombined with any other library
- facilities. This must be distributed under the terms of the
- Sections above.
-
- b) Give prominent notice with the combined library of the fact
- that part of it is a work based on the Library, and explaining
- where to find the accompanying uncombined form of the same work.
-
- 8. You may not copy, modify, sublicense, link with, or distribute
-the Library except as expressly provided under this License. Any
-attempt otherwise to copy, modify, sublicense, link with, or
-distribute the Library is void, and will automatically terminate your
-rights under this License. However, parties who have received copies,
-or rights, from you under this License will not have their licenses
-terminated so long as such parties remain in full compliance.
-
- 9. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Library or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Library (or any work based on the
-Library), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Library or works based on it.
-
- 10. Each time you redistribute the Library (or any work based on the
-Library), the recipient automatically receives a license from the
-original licensor to copy, distribute, link with or modify the Library
-subject to these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties with
-this License.
-
- 11. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Library at all. For example, if a patent
-license would not permit royalty-free redistribution of the Library by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Library.
-
-If any portion of this section is held invalid or unenforceable under any
-particular circumstance, the balance of the section is intended to apply,
-and the section as a whole is intended to apply in other circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 12. If the distribution and/or use of the Library is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Library under this License may add
-an explicit geographical distribution limitation excluding those countries,
-so that distribution is permitted only in or among countries not thus
-excluded. In such case, this License incorporates the limitation as if
-written in the body of this License.
-
- 13. The Free Software Foundation may publish revised and/or new
-versions of the Lesser General Public License from time to time.
-Such new versions will be similar in spirit to the present version,
-but may differ in detail to address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Library
-specifies a version number of this License which applies to it and
-"any later version", you have the option of following the terms and
-conditions either of that version or of any later version published by
-the Free Software Foundation. If the Library does not specify a
-license version number, you may choose any version ever published by
-the Free Software Foundation.
-
- 14. If you wish to incorporate parts of the Library into other free
-programs whose distribution conditions are incompatible with these,
-write to the author to ask for permission. For software which is
-copyrighted by the Free Software Foundation, write to the Free
-Software Foundation; we sometimes make exceptions for this. Our
-decision will be guided by the two goals of preserving the free status
-of all derivatives of our free software and of promoting the sharing
-and reuse of software generally.
-
- NO WARRANTY
-
- 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
-WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
-EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
-OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
-KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
-LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
-THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
- 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
-WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
-AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
-FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
-CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
-LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
-RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
-FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
-SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Libraries
-
- If you develop a new library, and you want it to be of the greatest
-possible use to the public, we recommend making it free software that
-everyone can redistribute and change. You can do so by permitting
-redistribution under these terms (or, alternatively, under the terms of the
-ordinary General Public License).
-
- To apply these terms, attach the following notices to the library. It is
-safest to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least the
-"copyright" line and a pointer to where the full notice is found.
-
- &lt;one line to give the library's name and a brief idea of what it does.&gt;
- Copyright (C) &lt;year&gt; &lt;name of author&gt;
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 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
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
-Also add information on how to contact you by electronic and paper mail.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the library, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the
- library `Frob' (a library for tweaking knobs) written by James Random Hacker.
-
- &lt;signature of Ty Coon&gt;, 1 April 1990
- Ty Coon, President of Vice
-
-That's all there is to it!
-
-
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-libva.html
-\ingroup qtwebengine-licensing
-\brief MIT
-\title libva
-
-\l{http://freedesktop.org/wiki/Software/vaapi}{Project Homepage}
-
-\badcode
- Permission is hereby granted, free of charge, to any person obtaining a
- copy of this software and associated documentation files (the
- "Software"), to deal in the Software without restriction, including
- without limitation the rights to use, copy, modify, merge, publish,
- distribute, sub license, and/or sell copies of the Software, and to
- permit persons to whom the Software is furnished to do so, subject to
- the following conditions:
-
- The above copyright notice and this permission notice (including the
- next paragraph) shall be included in all copies or substantial portions
- of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
- IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
- ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-libvpx.html
-\ingroup qtwebengine-licensing
-\brief BSD
-\title libvpx
-
-\l{http://www.webmproject.org}{Project Homepage}
-
-\badcode
-Copyright (c) 2010, The WebM Project authors. All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
- * Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- * Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in
- the documentation and/or other materials provided with the
- distribution.
-
- * Neither the name of Google, nor the WebM Project, nor the names
- of its contributors may be used to endorse or promote products
- derived from this software without specific prior written
- permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-libxml.html
-\ingroup qtwebengine-licensing
-\brief MIT
-\title libxml
-
-\l{http://xmlsoft.org}{Project Homepage}
-
-\badcode
-Except where otherwise noted in the source code (e.g. the files hash.c,
-list.c and the trio files, which are covered by a similar licence but
-with different Copyright notices) all the files are:
-
- Copyright (C) 1998-2012 Daniel Veillard. All Rights Reserved.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is fur-
-nished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FIT-
-NESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-libxslt.html
-\ingroup qtwebengine-licensing
-\brief MIT
-\title libxslt
-
-\l{http://xmlsoft.org/XSLT}{Project Homepage}
-
-\badcode
-Licence for libxslt except libexslt
-----------------------------------------------------------------------
- Copyright (C) 2001-2002 Daniel Veillard. All Rights Reserved.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is fur-
-nished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FIT-
-NESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-DANIEL VEILLARD BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
-IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CON-
-NECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of Daniel Veillard shall not
-be used in advertising or otherwise to promote the sale, use or other deal-
-ings in this Software without prior written authorization from him.
-
-----------------------------------------------------------------------
-
-Licence for libexslt
-----------------------------------------------------------------------
- Copyright (C) 2001-2002 Thomas Broyer, Charlie Bozeman and Daniel Veillard.
- All Rights Reserved.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is fur-
-nished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FIT-
-NESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
-IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CON-
-NECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of the authors shall not
-be used in advertising or otherwise to promote the sale, use or other deal-
-ings in this Software without prior written authorization from him.
-----------------------------------------------------------------------
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-libyuv.html
-\ingroup qtwebengine-licensing
-\brief BSD
-\title libyuv
-
-\l{http://code.google.com/p/libyuv/}{Project Homepage}
-
-\badcode
-Copyright 2011 The LibYuv Project Authors. All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
- * Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- * Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in
- the documentation and/or other materials provided with the
- distribution.
-
- * Neither the name of Google nor the names of its contributors may
- be used to endorse or promote products derived from this software
- without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-linux-syscall-support.html
-\ingroup qtwebengine-licensing
-\brief BSD
-\title linux-syscall-support
-
-\l{http://code.google.com/p/linux-syscall-support/}{Project Homepage}
-
-\badcode
-// Copyright 2015 The Chromium Authors. All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-mach_override.html
-\ingroup qtwebengine-licensing
-\brief MIT and 2-clause BSD
-\title mach_override
-
-\l{https://github.com/rentzsch/mach_override}{Project Homepage}
-
-\badcode
-Copyright (c) 2003-2012 Jonathan 'Wolf' Rentzsch: http://rentzsch.com
-Some rights reserved: http://opensource.org/licenses/mit
-
-mach_override includes a copy of libudis86, licensed as follows:
-
-Copyright (c) 2002-2009 Vivek Thampi
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
- * Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
-ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-mesa.html
-\ingroup qtwebengine-licensing
-\brief MIT and LGPL v2
-\title mesa
-
-\l{http://www.mesa3d.org/}{Project Homepage}
-
-\badcode
-The default Mesa license is as follows:
-
-Copyright (C) 1999-2007 Brian Paul All Rights Reserved.
-
-Permission is hereby granted, free of charge, to any person obtaining a
-copy of this software and associated documentation files (the "Software"),
-to deal in the Software without restriction, including without limitation
-the rights to use, copy, modify, merge, publish, distribute, sublicense,
-and/or sell copies of the Software, and to permit persons to whom the
-Software is furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included
-in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
-BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-
-
-Some parts of Mesa are copyrighted under the GNU LGPL. See the
-Mesa/docs/COPYRIGHT file for details.
-
-The following is the standard GNU copyright file.
-----------------------------------------------------------------------
-
-
- GNU LIBRARY GENERAL PUBLIC LICENSE
- Version 2, June 1991
-
- Copyright (C) 1991 Free Software Foundation, Inc.
- 675 Mass Ave, Cambridge, MA 02139, USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-[This is the first released version of the library GPL. It is
- numbered 2 because it goes with version 2 of the ordinary GPL.]
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-Licenses are intended to guarantee your freedom to share and change
-free software--to make sure the software is free for all its users.
-
- This license, the Library General Public License, applies to some
-specially designated Free Software Foundation software, and to any
-other libraries whose authors decide to use it. You can use it for
-your libraries, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
- To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if
-you distribute copies of the library, or if you modify it.
-
- For example, if you distribute copies of the library, whether gratis
-or for a fee, you must give the recipients all the rights that we gave
-you. You must make sure that they, too, receive or can get the source
-code. If you link a program with the library, you must provide
-complete object files to the recipients so that they can relink them
-with the library, after making changes to the library and recompiling
-it. And you must show them these terms so they know their rights.
-
- Our method of protecting your rights has two steps: (1) copyright
-the library, and (2) offer you this license which gives you legal
-permission to copy, distribute and/or modify the library.
-
- Also, for each distributor's protection, we want to make certain
-that everyone understands that there is no warranty for this free
-library. If the library is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original
-version, so that any problems introduced by others will not reflect on
-the original authors' reputations.
-
- Finally, any free program is threatened constantly by software
-patents. We wish to avoid the danger that companies distributing free
-software will individually obtain patent licenses, thus in effect
-transforming the program into proprietary software. To prevent this,
-we have made it clear that any patent must be licensed for everyone's
-free use or not licensed at all.
-
- Most GNU software, including some libraries, is covered by the ordinary
-GNU General Public License, which was designed for utility programs. This
-license, the GNU Library General Public License, applies to certain
-designated libraries. This license is quite different from the ordinary
-one; be sure to read it in full, and don't assume that anything in it is
-the same as in the ordinary license.
-
- The reason we have a separate public license for some libraries is that
-they blur the distinction we usually make between modifying or adding to a
-program and simply using it. Linking a program with a library, without
-changing the library, is in some sense simply using the library, and is
-analogous to running a utility program or application program. However, in
-a textual and legal sense, the linked executable is a combined work, a
-derivative of the original library, and the ordinary General Public License
-treats it as such.
-
- Because of this blurred distinction, using the ordinary General
-Public License for libraries did not effectively promote software
-sharing, because most developers did not use the libraries. We
-concluded that weaker conditions might promote sharing better.
-
- However, unrestricted linking of non-free programs would deprive the
-users of those programs of all benefit from the free status of the
-libraries themselves. This Library General Public License is intended to
-permit developers of non-free programs to use free libraries, while
-preserving your freedom as a user of such programs to change the free
-libraries that are incorporated in them. (We have not seen how to achieve
-this as regards changes in header files, but we have achieved it as regards
-changes in the actual functions of the Library.) The hope is that this
-will lead to faster development of free libraries.
-
- The precise terms and conditions for copying, distribution and
-modification follow. Pay close attention to the difference between a
-"work based on the library" and a "work that uses the library". The
-former contains code derived from the library, while the latter only
-works together with the library.
-
- Note that it is possible for a library to be covered by the ordinary
-General Public License rather than by this special one.
-
- GNU LIBRARY GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License Agreement applies to any software library which
-contains a notice placed by the copyright holder or other authorized
-party saying it may be distributed under the terms of this Library
-General Public License (also called "this License"). Each licensee is
-addressed as "you".
-
- A "library" means a collection of software functions and/or data
-prepared so as to be conveniently linked with application programs
-(which use some of those functions and data) to form executables.
-
- The "Library", below, refers to any such software library or work
-which has been distributed under these terms. A "work based on the
-Library" means either the Library or any derivative work under
-copyright law: that is to say, a work containing the Library or a
-portion of it, either verbatim or with modifications and/or translated
-straightforwardly into another language. (Hereinafter, translation is
-included without limitation in the term "modification".)
-
- "Source code" for a work means the preferred form of the work for
-making modifications to it. For a library, complete source code means
-all the source code for all modules it contains, plus any associated
-interface definition files, plus the scripts used to control compilation
-and installation of the library.
-
- Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running a program using the Library is not restricted, and output from
-such a program is covered only if its contents constitute a work based
-on the Library (independent of the use of the Library in a tool for
-writing it). Whether that is true depends on what the Library does
-and what the program that uses the Library does.
-
- 1. You may copy and distribute verbatim copies of the Library's
-complete source code as you receive it, in any medium, provided that
-you conspicuously and appropriately publish on each copy an
-appropriate copyright notice and disclaimer of warranty; keep intact
-all the notices that refer to this License and to the absence of any
-warranty; and distribute a copy of this License along with the
-Library.
-
- You may charge a fee for the physical act of transferring a copy,
-and you may at your option offer warranty protection in exchange for a
-fee.
-
- 2. You may modify your copy or copies of the Library or any portion
-of it, thus forming a work based on the Library, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) The modified work must itself be a software library.
-
- b) You must cause the files modified to carry prominent notices
- stating that you changed the files and the date of any change.
-
- c) You must cause the whole of the work to be licensed at no
- charge to all third parties under the terms of this License.
-
- d) If a facility in the modified Library refers to a function or a
- table of data to be supplied by an application program that uses
- the facility, other than as an argument passed when the facility
- is invoked, then you must make a good faith effort to ensure that,
- in the event an application does not supply such function or
- table, the facility still operates, and performs whatever part of
- its purpose remains meaningful.
-
- (For example, a function in a library to compute square roots has
- a purpose that is entirely well-defined independent of the
- application. Therefore, Subsection 2d requires that any
- application-supplied function or table used by this function must
- be optional: if the application does not supply it, the square
- root function must still compute square roots.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Library,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Library, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote
-it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Library.
-
-In addition, mere aggregation of another work not based on the Library
-with the Library (or with a work based on the Library) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may opt to apply the terms of the ordinary GNU General Public
-License instead of this License to a given copy of the Library. To do
-this, you must alter all the notices that refer to this License, so
-that they refer to the ordinary GNU General Public License, version 2,
-instead of to this License. (If a newer version than version 2 of the
-ordinary GNU General Public License has appeared, then you can specify
-that version instead if you wish.) Do not make any other change in
-these notices.
-
- Once this change is made in a given copy, it is irreversible for
-that copy, so the ordinary GNU General Public License applies to all
-subsequent copies and derivative works made from that copy.
-
- This option is useful when you wish to copy part of the code of
-the Library into a program that is not a library.
-
- 4. You may copy and distribute the Library (or a portion or
-derivative of it, under Section 2) in object code or executable form
-under the terms of Sections 1 and 2 above provided that you accompany
-it with the complete corresponding machine-readable source code, which
-must be distributed under the terms of Sections 1 and 2 above on a
-medium customarily used for software interchange.
-
- If distribution of object code is made by offering access to copy
-from a designated place, then offering equivalent access to copy the
-source code from the same place satisfies the requirement to
-distribute the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 5. A program that contains no derivative of any portion of the
-Library, but is designed to work with the Library by being compiled or
-linked with it, is called a "work that uses the Library". Such a
-work, in isolation, is not a derivative work of the Library, and
-therefore falls outside the scope of this License.
-
- However, linking a "work that uses the Library" with the Library
-creates an executable that is a derivative of the Library (because it
-contains portions of the Library), rather than a "work that uses the
-library". The executable is therefore covered by this License.
-Section 6 states terms for distribution of such executables.
-
- When a "work that uses the Library" uses material from a header file
-that is part of the Library, the object code for the work may be a
-derivative work of the Library even though the source code is not.
-Whether this is true is especially significant if the work can be
-linked without the Library, or if the work is itself a library. The
-threshold for this to be true is not precisely defined by law.
-
- If such an object file uses only numerical parameters, data
-structure layouts and accessors, and small macros and small inline
-functions (ten lines or less in length), then the use of the object
-file is unrestricted, regardless of whether it is legally a derivative
-work. (Executables containing this object code plus portions of the
-Library will still fall under Section 6.)
-
- Otherwise, if the work is a derivative of the Library, you may
-distribute the object code for the work under the terms of Section 6.
-Any executables containing that work also fall under Section 6,
-whether or not they are linked directly with the Library itself.
-
- 6. As an exception to the Sections above, you may also compile or
-link a "work that uses the Library" with the Library to produce a
-work containing portions of the Library, and distribute that work
-under terms of your choice, provided that the terms permit
-modification of the work for the customer's own use and reverse
-engineering for debugging such modifications.
-
- You must give prominent notice with each copy of the work that the
-Library is used in it and that the Library and its use are covered by
-this License. You must supply a copy of this License. If the work
-during execution displays copyright notices, you must include the
-copyright notice for the Library among them, as well as a reference
-directing the user to the copy of this License. Also, you must do one
-of these things:
-
- a) Accompany the work with the complete corresponding
- machine-readable source code for the Library including whatever
- changes were used in the work (which must be distributed under
- Sections 1 and 2 above); and, if the work is an executable linked
- with the Library, with the complete machine-readable "work that
- uses the Library", as object code and/or source code, so that the
- user can modify the Library and then relink to produce a modified
- executable containing the modified Library. (It is understood
- that the user who changes the contents of definitions files in the
- Library will not necessarily be able to recompile the application
- to use the modified definitions.)
-
- b) Accompany the work with a written offer, valid for at
- least three years, to give the same user the materials
- specified in Subsection 6a, above, for a charge no more
- than the cost of performing this distribution.
-
- c) If distribution of the work is made by offering access to copy
- from a designated place, offer equivalent access to copy the above
- specified materials from the same place.
-
- d) Verify that the user has already received a copy of these
- materials or that you have already sent this user a copy.
-
- For an executable, the required form of the "work that uses the
-Library" must include any data and utility programs needed for
-reproducing the executable from it. However, as a special exception,
-the source code distributed need not include anything that is normally
-distributed (in either source or binary form) with the major
-components (compiler, kernel, and so on) of the operating system on
-which the executable runs, unless that component itself accompanies
-the executable.
-
- It may happen that this requirement contradicts the license
-restrictions of other proprietary libraries that do not normally
-accompany the operating system. Such a contradiction means you cannot
-use both them and the Library together in an executable that you
-distribute.
-
- 7. You may place library facilities that are a work based on the
-Library side-by-side in a single library together with other library
-facilities not covered by this License, and distribute such a combined
-library, provided that the separate distribution of the work based on
-the Library and of the other library facilities is otherwise
-permitted, and provided that you do these two things:
-
- a) Accompany the combined library with a copy of the same work
- based on the Library, uncombined with any other library
- facilities. This must be distributed under the terms of the
- Sections above.
-
- b) Give prominent notice with the combined library of the fact
- that part of it is a work based on the Library, and explaining
- where to find the accompanying uncombined form of the same work.
-
- 8. You may not copy, modify, sublicense, link with, or distribute
-the Library except as expressly provided under this License. Any
-attempt otherwise to copy, modify, sublicense, link with, or
-distribute the Library is void, and will automatically terminate your
-rights under this License. However, parties who have received copies,
-or rights, from you under this License will not have their licenses
-terminated so long as such parties remain in full compliance.
-
- 9. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Library or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Library (or any work based on the
-Library), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Library or works based on it.
-
- 10. Each time you redistribute the Library (or any work based on the
-Library), the recipient automatically receives a license from the
-original licensor to copy, distribute, link with or modify the Library
-subject to these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
- 11. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Library at all. For example, if a patent
-license would not permit royalty-free redistribution of the Library by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Library.
-
-If any portion of this section is held invalid or unenforceable under any
-particular circumstance, the balance of the section is intended to apply,
-and the section as a whole is intended to apply in other circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 12. If the distribution and/or use of the Library is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Library under this License may add
-an explicit geographical distribution limitation excluding those countries,
-so that distribution is permitted only in or among countries not thus
-excluded. In such case, this License incorporates the limitation as if
-written in the body of this License.
-
- 13. The Free Software Foundation may publish revised and/or new
-versions of the Library General Public License from time to time.
-Such new versions will be similar in spirit to the present version,
-but may differ in detail to address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Library
-specifies a version number of this License which applies to it and
-"any later version", you have the option of following the terms and
-conditions either of that version or of any later version published by
-the Free Software Foundation. If the Library does not specify a
-license version number, you may choose any version ever published by
-the Free Software Foundation.
-
- 14. If you wish to incorporate parts of the Library into other free
-programs whose distribution conditions are incompatible with these,
-write to the author to ask for permission. For software which is
-copyrighted by the Free Software Foundation, write to the Free
-Software Foundation; we sometimes make exceptions for this. Our
-decision will be guided by the two goals of preserving the free status
-of all derivatives of our free software and of promoting the sharing
-and reuse of software generally.
-
- NO WARRANTY
-
- 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
-WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
-EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
-OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
-KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
-LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
-THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
- 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
-WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
-AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
-FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
-CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
-LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
-RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
-FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
-SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
- Appendix: How to Apply These Terms to Your New Libraries
-
- If you develop a new library, and you want it to be of the greatest
-possible use to the public, we recommend making it free software that
-everyone can redistribute and change. You can do so by permitting
-redistribution under these terms (or, alternatively, under the terms of the
-ordinary General Public License).
-
- To apply these terms, attach the following notices to the library. It is
-safest to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least the
-"copyright" line and a pointer to where the full notice is found.
-
- &lt;one line to give the library's name and a brief idea of what it does.&gt;
- Copyright (C) &lt;year&gt; &lt;name of author&gt;
-
- 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; if not, write to the Free
- Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-Also add information on how to contact you by electronic and paper mail.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the library, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the
- library `Frob' (a library for tweaking knobs) written by James Random Hacker.
-
- &lt;signature of Ty Coon&gt;, 1 April 1990
- Ty Coon, President of Vice
-
-That's all there is to it!
-
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-minigbm.html
-\ingroup qtwebengine-licensing
-\brief BSD
-\title minigbm
-
-\l{https://chromium.googlesource.com/chromiumos/platform/minigbm}{Project Homepage}
-
-\badcode
-// Copyright 2014 The Chromium OS Authors. All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-modp-base64-decoder.html
-\ingroup qtwebengine-licensing
-\brief BSD
-\title modp base64 decoder
-
-\l{https://github.com/client9/stringencoders}{Project Homepage}
-
-\badcode
- * MODP_B64 - High performance base64 encoder/decoder
- * Version 1.3 -- 17-Mar-2006
- * http://modp.com/release/base64
- *
- * Copyright (c) 2005, 2006 Nick Galbreath -- nickg [at] modp [dot] com
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of the modp.com nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-mt19937ar.html
-\ingroup qtwebengine-licensing
-\brief BSD
-\title mt19937ar
-
-\l{http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/MT2002/emt19937ar.html}{Project Homepage}
-
-\badcode
- A C-program for MT19937, with initialization improved 2002/1/26.
- Coded by Takuji Nishimura and Makoto Matsumoto.
-
- Before using, initialize the state by using init_genrand(seed)
- or init_by_array(init_key, key_length).
-
- Copyright (C) 1997 - 2002, Makoto Matsumoto and Takuji Nishimura,
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions
- are met:
-
- 1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- 3. The names of its contributors may not be used to endorse or promote
- products derived from this software without specific prior written
- permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-ocmock.html
-\ingroup qtwebengine-licensing
-\brief BSD with advertising clause
-\title ocmock
-
-\l{https://github.com/erikdoe/ocmock}{Project Homepage}
-
-\badcode
-
- Copyright (c) 2004-2012 by Mulle Kybernetik. All rights reserved.
-
- Permission to use, copy, modify and distribute this software and its documentation
- is hereby granted, provided that both the copyright notice and this permission
- notice appear in all copies of the software, derivative works or modified versions,
- and any portions thereof, and that both notices appear in supporting documentation,
- and that credit is given to Mulle Kybernetik in all documents and publicity
- pertaining to direct or indirect use of this code or its derivatives.
-
- THIS IS EXPERIMENTAL SOFTWARE AND IT IS KNOWN TO HAVE BUGS, SOME OF WHICH MAY HAVE
- SERIOUS CONSEQUENCES. THE COPYRIGHT HOLDER ALLOWS FREE USE OF THIS SOFTWARE IN ITS
- "AS IS" CONDITION. THE COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY OF ANY KIND FOR ANY
- DAMAGES WHATSOEVER RESULTING DIRECTLY OR INDIRECTLY FROM THE USE OF THIS SOFTWARE
- OR OF ANY DERIVATIVE WORK.
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-open-vcdiff.html
-\ingroup qtwebengine-licensing
-\brief Apache 2.0, MIT, GPL v2 and custom licenses
-\title open-vcdiff
-
-\l{https://github.com/google/open-vcdiff}{Project Homepage}
-
-\badcode
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright 2008 The open-vcdiff Authors. All Rights Reserved.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-opus.html
-\ingroup qtwebengine-licensing
-\brief BSD
-\title opus
-
-\l{http://git.xiph.org/?p=opus.git}{Project Homepage}
-
-\badcode
-Copyright 2001-2011 Xiph.Org, Skype Limited, Octasic,
- Jean-Marc Valin, Timothy B. Terriberry,
- CSIRO, Gregory Maxwell, Mark Borgerding,
- Erik de Castro Lopo
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-
-- Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
-
-- Redistributions in binary form must reproduce the above copyright
-notice, this list of conditions and the following disclaimer in the
-documentation and/or other materials provided with the distribution.
-
-- Neither the name of Internet Society, IETF or IETF Trust, nor the
-names of specific contributors, may be used to endorse or promote
-products derived from this software without specific prior written
-permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
-OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-Opus is subject to the royalty-free patent licenses which are
-specified at:
-
-Xiph.Org Foundation:
-https://datatracker.ietf.org/ipr/1524/
-
-Microsoft Corporation:
-https://datatracker.ietf.org/ipr/1914/
-
-Broadcom Corporation:
-https://datatracker.ietf.org/ipr/1526/
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-pyelftools.html
-\ingroup qtwebengine-licensing
-\brief Public Domain
-\title pyelftools
-
-\l{https://bitbucket.org/eliben/pyelftools}{Project Homepage}
-
-\badcode
-pyelftools is in the public domain (see below if you need more details).
-
-pyelftools uses the construct library for structured parsing of a binary
-stream. construct is packaged in pyelftools/construct - see its LICENSE
-file for the license.
-
--------------------------------------------------------------------------------
-
-This is free and unencumbered software released into the public domain.
-
-Anyone is free to copy, modify, publish, use, compile, sell, or
-distribute this software, either in source code form or as a compiled
-binary, for any purpose, commercial or non-commercial, and by any
-means.
-
-In jurisdictions that recognize copyright laws, the author or authors
-of this software dedicate any and all copyright interest in the
-software to the public domain. We make this dedication for the benefit
-of the public at large and to the detriment of our heirs and
-successors. We intend this dedication to be an overt act of
-relinquishment in perpetuity of all present and future rights to this
-software under copyright law.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
-OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
-
-For more information, please refer to &lt;http://unlicense.org/&gt;
-
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-re2---an-efficient,-principled-regular-expression-library.html
-\ingroup qtwebengine-licensing
-\brief BSD 3-Clause
-\title re2 - an efficient, principled regular expression library
-
-\l{https://github.com/google/re2}{Project Homepage}
-
-\badcode
-// Copyright (c) 2009 The RE2 Authors. All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-sfntly.html
-\ingroup qtwebengine-licensing
-\brief Apache 2.0
-\title sfntly
-
-\l{https://github.com/googlei18n/sfntly}{Project Homepage}
-
-\badcode
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright 2011 Google Inc. All Rights Reserved.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-simplejson.html
-\ingroup qtwebengine-licensing
-\brief MIT
-\title simplejson
-
-\l{https://github.com/simplejson/simplejson}{Project Homepage}
-
-\badcode
-Copyright (c) 2006 Bob Ippolito
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of
-this software and associated documentation files (the "Software"), to deal in
-the Software without restriction, including without limitation the rights to
-use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
-of the Software, and to permit persons to whom the Software is furnished to do
-so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-sqlite.html
-\ingroup qtwebengine-licensing
-\brief Public domain
-\title sqlite
-
-\l{http://sqlite.org/}{Project Homepage}
-
-\badcode
-The author disclaims copyright to this source code. In place of
-a legal notice, here is a blessing:
-
- May you do good and not evil.
- May you find forgiveness for yourself and forgive others.
- May you share freely, never taking more than you give.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-talloc.html
-\ingroup qtwebengine-licensing
-\brief LGPL v3
-\title talloc
-
-\l{http://talloc.samba.org/talloc/doc/html/index.html}{Project Homepage}
-
-\badcode
- Unix SMB/CIFS implementation.
- Samba temporary memory allocation functions
-
- Copyright (C) Andrew Tridgell 2004-2005
- Copyright (C) Stefan Metzmacher 2006
-
- ** NOTE! The following LGPL license applies to the talloc
- ** library. This does NOT imply that all of Samba is released
- ** under the LGPL
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 3 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
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, see &lt;http://www.gnu.org/licenses/&gt;.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-tcmalloc.html
-\ingroup qtwebengine-licensing
-\brief BSD
-\title tcmalloc
-
-\l{http://gperftools.googlecode.com/}{Project Homepage}
-
-\badcode
-// Copyright (c) 2005, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-tlslite.html
-\ingroup qtwebengine-licensing
-\brief Public domain and BSD
-\title tlslite
-
-\l{http://trevp.net/tlslite/}{Project Homepage}
-
-\badcode
-
-TLS Lite includes code from different sources. All code is either dedicated to
-the public domain by its authors, or available under a BSD-style license. In
-particular:
-
--
-
-Code written by Trevor Perrin, Kees Bos, Sam Rushing, Dimitris Moraitis,
-Marcelo Fernandez, Martin von Loewis, Dave Baggett, and Yngve Pettersen is
-available under the following terms:
-
-This is free and unencumbered software released into the public domain.
-
-Anyone is free to copy, modify, publish, use, compile, sell, or distribute
-this software, either in source code form or as a compiled binary, for any
-purpose, commercial or non-commercial, and by any means.
-
-In jurisdictions that recognize copyright laws, the author or authors of this
-software dedicate any and all copyright interest in the software to the public
-domain. We make this dedication for the benefit of the public at large and to
-the detriment of our heirs and successors. We intend this dedication to be an
-overt act of relinquishment in perpetuity of all present and future rights to
-this software under copyright law.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
-ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
--
-
-Code written by Bram Cohen (rijndael.py) was dedicated to the public domain by
-its author. See rijndael.py for details.
-
--
-
-Code written by Google is available under the following terms:
-
-Copyright (c) 2008, The Chromium Authors
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
- * Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- * Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
- * Neither the name of the Google Inc. nor the names of its contributors may
- be used to endorse or promote products derived from this software without
- specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
-FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-url_parse.html
-\ingroup qtwebengine-licensing
-\brief BSD and MPL 1.1/GPL 2.0/LGPL 2.1
-\title url_parse
-
-\l{http://mxr.mozilla.org/comm-central/source/mozilla/netwerk/base/src/nsURLParsers.cpp}{Project Homepage}
-
-\badcode
-Copyright 2007, Google Inc.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
- * Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above
-copyright notice, this list of conditions and the following disclaimer
-in the documentation and/or other materials provided with the
-distribution.
- * Neither the name of Google Inc. nor the names of its
-contributors may be used to endorse or promote products derived from
-this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
--------------------------------------------------------------------------------
-
-The file url_parse.cc is based on nsURLParsers.cc from Mozilla. This file is
-licensed separately as follows:
-
-The contents of this file are subject to the Mozilla Public License Version
-1.1 (the "License"); you may not use this file except in compliance with
-the License. You may obtain a copy of the License at
-http://www.mozilla.org/MPL/
-
-Software distributed under the License is distributed on an "AS IS" basis,
-WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
-for the specific language governing rights and limitations under the
-License.
-
-The Original Code is mozilla.org code.
-
-The Initial Developer of the Original Code is
-Netscape Communications Corporation.
-Portions created by the Initial Developer are Copyright (C) 1998
-the Initial Developer. All Rights Reserved.
-
-Contributor(s):
- Darin Fisher (original author)
-
-Alternatively, the contents of this file may be used under the terms of
-either the GNU General Public License Version 2 or later (the "GPL"), or
-the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
-in which case the provisions of the GPL or the LGPL are applicable instead
-of those above. If you wish to allow use of your version of this file only
-under the terms of either the GPL or the LGPL, and not to allow others to
-use your version of this file under the terms of the MPL, indicate your
-decision by deleting the provisions above and replace them with the notice
-and other provisions required by the GPL or the LGPL. If you do not delete
-the provisions above, a recipient may use your version of this file under
-the terms of any one of the MPL, the GPL or the LGPL.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-usrsctp.html
-\ingroup qtwebengine-licensing
-\brief New BSD
-\title usrsctp
-
-\l{http://github.com/sctplab/usrsctp}{Project Homepage}
-
-\badcode
-(Copied from the COPYRIGHT file of
-https://code.google.com/p/sctp-refimpl/source/browse/trunk/COPYRIGHT)
---------------------------------------------------------------------------------
-
-Copyright (c) 2001, 2002 Cisco Systems, Inc.
-Copyright (c) 2002-12 Randall R. Stewart
-Copyright (c) 2002-12 Michael Tuexen
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-
-1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
-THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
-FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGE.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-v4l-utils.html
-\ingroup qtwebengine-licensing
-\brief LGPL 2.1
-\title v4l-utils
-
-\l{http://git.linuxtv.org/v4l-utils.git}{Project Homepage}
-
-\badcode
-
- GNU LESSER GENERAL PUBLIC LICENSE
- Version 2.1, February 1999
-
- Copyright (C) 1991, 1999 Free Software Foundation, Inc.
- 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-[This is the first released version of the Lesser GPL. It also counts
- as the successor of the GNU Library Public License, version 2, hence
- the version number 2.1.]
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-Licenses are intended to guarantee your freedom to share and change
-free software--to make sure the software is free for all its users.
-
- This license, the Lesser General Public License, applies to some
-specially designated software packages--typically libraries--of the
-Free Software Foundation and other authors who decide to use it. You
-can use it too, but we suggest you first think carefully about whether
-this license or the ordinary General Public License is the better
-strategy to use in any particular case, based on the explanations
-below.
-
- When we speak of free software, we are referring to freedom of use,
-not price. Our General Public Licenses are designed to make sure that
-you have the freedom to distribute copies of free software (and charge
-for this service if you wish); that you receive source code or can get
-it if you want it; that you can change the software and use pieces of
-it in new free programs; and that you are informed that you can do
-these things.
-
- To protect your rights, we need to make restrictions that forbid
-distributors to deny you these rights or to ask you to surrender these
-rights. These restrictions translate to certain responsibilities for
-you if you distribute copies of the library or if you modify it.
-
- For example, if you distribute copies of the library, whether gratis
-or for a fee, you must give the recipients all the rights that we gave
-you. You must make sure that they, too, receive or can get the source
-code. If you link other code with the library, you must provide
-complete object files to the recipients, so that they can relink them
-with the library after making changes to the library and recompiling
-it. And you must show them these terms so they know their rights.
-
- We protect your rights with a two-step method: (1) we copyright the
-library, and (2) we offer you this license, which gives you legal
-permission to copy, distribute and/or modify the library.
-
- To protect each distributor, we want to make it very clear that
-there is no warranty for the free library. Also, if the library is
-modified by someone else and passed on, the recipients should know
-that what they have is not the original version, so that the original
-author's reputation will not be affected by problems that might be
-introduced by others.
-^L
- Finally, software patents pose a constant threat to the existence of
-any free program. We wish to make sure that a company cannot
-effectively restrict the users of a free program by obtaining a
-restrictive license from a patent holder. Therefore, we insist that
-any patent license obtained for a version of the library must be
-consistent with the full freedom of use specified in this license.
-
- Most GNU software, including some libraries, is covered by the
-ordinary GNU General Public License. This license, the GNU Lesser
-General Public License, applies to certain designated libraries, and
-is quite different from the ordinary General Public License. We use
-this license for certain libraries in order to permit linking those
-libraries into non-free programs.
-
- When a program is linked with a library, whether statically or using
-a shared library, the combination of the two is legally speaking a
-combined work, a derivative of the original library. The ordinary
-General Public License therefore permits such linking only if the
-entire combination fits its criteria of freedom. The Lesser General
-Public License permits more lax criteria for linking other code with
-the library.
-
- We call this license the "Lesser" General Public License because it
-does Less to protect the user's freedom than the ordinary General
-Public License. It also provides other free software developers Less
-of an advantage over competing non-free programs. These disadvantages
-are the reason we use the ordinary General Public License for many
-libraries. However, the Lesser license provides advantages in certain
-special circumstances.
-
- For example, on rare occasions, there may be a special need to
-encourage the widest possible use of a certain library, so that it
-becomes a de-facto standard. To achieve this, non-free programs must
-be allowed to use the library. A more frequent case is that a free
-library does the same job as widely used non-free libraries. In this
-case, there is little to gain by limiting the free library to free
-software only, so we use the Lesser General Public License.
-
- In other cases, permission to use a particular library in non-free
-programs enables a greater number of people to use a large body of
-free software. For example, permission to use the GNU C Library in
-non-free programs enables many more people to use the whole GNU
-operating system, as well as its variant, the GNU/Linux operating
-system.
-
- Although the Lesser General Public License is Less protective of the
-users' freedom, it does ensure that the user of a program that is
-linked with the Library has the freedom and the wherewithal to run
-that program using a modified version of the Library.
-
- The precise terms and conditions for copying, distribution and
-modification follow. Pay close attention to the difference between a
-"work based on the library" and a "work that uses the library". The
-former contains code derived from the library, whereas the latter must
-be combined with the library in order to run.
-^L
- GNU LESSER GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License Agreement applies to any software library or other
-program which contains a notice placed by the copyright holder or
-other authorized party saying it may be distributed under the terms of
-this Lesser General Public License (also called "this License").
-Each licensee is addressed as "you".
-
- A "library" means a collection of software functions and/or data
-prepared so as to be conveniently linked with application programs
-(which use some of those functions and data) to form executables.
-
- The "Library", below, refers to any such software library or work
-which has been distributed under these terms. A "work based on the
-Library" means either the Library or any derivative work under
-copyright law: that is to say, a work containing the Library or a
-portion of it, either verbatim or with modifications and/or translated
-straightforwardly into another language. (Hereinafter, translation is
-included without limitation in the term "modification".)
-
- "Source code" for a work means the preferred form of the work for
-making modifications to it. For a library, complete source code means
-all the source code for all modules it contains, plus any associated
-interface definition files, plus the scripts used to control
-compilation and installation of the library.
-
- Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running a program using the Library is not restricted, and output from
-such a program is covered only if its contents constitute a work based
-on the Library (independent of the use of the Library in a tool for
-writing it). Whether that is true depends on what the Library does
-and what the program that uses the Library does.
-
- 1. You may copy and distribute verbatim copies of the Library's
-complete source code as you receive it, in any medium, provided that
-you conspicuously and appropriately publish on each copy an
-appropriate copyright notice and disclaimer of warranty; keep intact
-all the notices that refer to this License and to the absence of any
-warranty; and distribute a copy of this License along with the
-Library.
-
- You may charge a fee for the physical act of transferring a copy,
-and you may at your option offer warranty protection in exchange for a
-fee.
-
- 2. You may modify your copy or copies of the Library or any portion
-of it, thus forming a work based on the Library, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) The modified work must itself be a software library.
-
- b) You must cause the files modified to carry prominent notices
- stating that you changed the files and the date of any change.
-
- c) You must cause the whole of the work to be licensed at no
- charge to all third parties under the terms of this License.
-
- d) If a facility in the modified Library refers to a function or a
- table of data to be supplied by an application program that uses
- the facility, other than as an argument passed when the facility
- is invoked, then you must make a good faith effort to ensure that,
- in the event an application does not supply such function or
- table, the facility still operates, and performs whatever part of
- its purpose remains meaningful.
-
- (For example, a function in a library to compute square roots has
- a purpose that is entirely well-defined independent of the
- application. Therefore, Subsection 2d requires that any
- application-supplied function or table used by this function must
- be optional: if the application does not supply it, the square
- root function must still compute square roots.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Library,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Library, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote
-it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Library.
-
-In addition, mere aggregation of another work not based on the Library
-with the Library (or with a work based on the Library) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may opt to apply the terms of the ordinary GNU General Public
-License instead of this License to a given copy of the Library. To do
-this, you must alter all the notices that refer to this License, so
-that they refer to the ordinary GNU General Public License, version 2,
-instead of to this License. (If a newer version than version 2 of the
-ordinary GNU General Public License has appeared, then you can specify
-that version instead if you wish.) Do not make any other change in
-these notices.
-^L
- Once this change is made in a given copy, it is irreversible for
-that copy, so the ordinary GNU General Public License applies to all
-subsequent copies and derivative works made from that copy.
-
- This option is useful when you wish to copy part of the code of
-the Library into a program that is not a library.
-
- 4. You may copy and distribute the Library (or a portion or
-derivative of it, under Section 2) in object code or executable form
-under the terms of Sections 1 and 2 above provided that you accompany
-it with the complete corresponding machine-readable source code, which
-must be distributed under the terms of Sections 1 and 2 above on a
-medium customarily used for software interchange.
-
- If distribution of object code is made by offering access to copy
-from a designated place, then offering equivalent access to copy the
-source code from the same place satisfies the requirement to
-distribute the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 5. A program that contains no derivative of any portion of the
-Library, but is designed to work with the Library by being compiled or
-linked with it, is called a "work that uses the Library". Such a
-work, in isolation, is not a derivative work of the Library, and
-therefore falls outside the scope of this License.
-
- However, linking a "work that uses the Library" with the Library
-creates an executable that is a derivative of the Library (because it
-contains portions of the Library), rather than a "work that uses the
-library". The executable is therefore covered by this License.
-Section 6 states terms for distribution of such executables.
-
- When a "work that uses the Library" uses material from a header file
-that is part of the Library, the object code for the work may be a
-derivative work of the Library even though the source code is not.
-Whether this is true is especially significant if the work can be
-linked without the Library, or if the work is itself a library. The
-threshold for this to be true is not precisely defined by law.
-
- If such an object file uses only numerical parameters, data
-structure layouts and accessors, and small macros and small inline
-functions (ten lines or less in length), then the use of the object
-file is unrestricted, regardless of whether it is legally a derivative
-work. (Executables containing this object code plus portions of the
-Library will still fall under Section 6.)
-
- Otherwise, if the work is a derivative of the Library, you may
-distribute the object code for the work under the terms of Section 6.
-Any executables containing that work also fall under Section 6,
-whether or not they are linked directly with the Library itself.
-^L
- 6. As an exception to the Sections above, you may also combine or
-link a "work that uses the Library" with the Library to produce a
-work containing portions of the Library, and distribute that work
-under terms of your choice, provided that the terms permit
-modification of the work for the customer's own use and reverse
-engineering for debugging such modifications.
-
- You must give prominent notice with each copy of the work that the
-Library is used in it and that the Library and its use are covered by
-this License. You must supply a copy of this License. If the work
-during execution displays copyright notices, you must include the
-copyright notice for the Library among them, as well as a reference
-directing the user to the copy of this License. Also, you must do one
-of these things:
-
- a) Accompany the work with the complete corresponding
- machine-readable source code for the Library including whatever
- changes were used in the work (which must be distributed under
- Sections 1 and 2 above); and, if the work is an executable linked
- with the Library, with the complete machine-readable "work that
- uses the Library", as object code and/or source code, so that the
- user can modify the Library and then relink to produce a modified
- executable containing the modified Library. (It is understood
- that the user who changes the contents of definitions files in the
- Library will not necessarily be able to recompile the application
- to use the modified definitions.)
-
- b) Use a suitable shared library mechanism for linking with the
- Library. A suitable mechanism is one that (1) uses at run time a
- copy of the library already present on the user's computer system,
- rather than copying library functions into the executable, and (2)
- will operate properly with a modified version of the library, if
- the user installs one, as long as the modified version is
- interface-compatible with the version that the work was made with.
-
- c) Accompany the work with a written offer, valid for at least
- three years, to give the same user the materials specified in
- Subsection 6a, above, for a charge no more than the cost of
- performing this distribution.
-
- d) If distribution of the work is made by offering access to copy
- from a designated place, offer equivalent access to copy the above
- specified materials from the same place.
-
- e) Verify that the user has already received a copy of these
- materials or that you have already sent this user a copy.
-
- For an executable, the required form of the "work that uses the
-Library" must include any data and utility programs needed for
-reproducing the executable from it. However, as a special exception,
-the materials to be distributed need not include anything that is
-normally distributed (in either source or binary form) with the major
-components (compiler, kernel, and so on) of the operating system on
-which the executable runs, unless that component itself accompanies
-the executable.
-
- It may happen that this requirement contradicts the license
-restrictions of other proprietary libraries that do not normally
-accompany the operating system. Such a contradiction means you cannot
-use both them and the Library together in an executable that you
-distribute.
-^L
- 7. You may place library facilities that are a work based on the
-Library side-by-side in a single library together with other library
-facilities not covered by this License, and distribute such a combined
-library, provided that the separate distribution of the work based on
-the Library and of the other library facilities is otherwise
-permitted, and provided that you do these two things:
-
- a) Accompany the combined library with a copy of the same work
- based on the Library, uncombined with any other library
- facilities. This must be distributed under the terms of the
- Sections above.
-
- b) Give prominent notice with the combined library of the fact
- that part of it is a work based on the Library, and explaining
- where to find the accompanying uncombined form of the same work.
-
- 8. You may not copy, modify, sublicense, link with, or distribute
-the Library except as expressly provided under this License. Any
-attempt otherwise to copy, modify, sublicense, link with, or
-distribute the Library is void, and will automatically terminate your
-rights under this License. However, parties who have received copies,
-or rights, from you under this License will not have their licenses
-terminated so long as such parties remain in full compliance.
-
- 9. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Library or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Library (or any work based on the
-Library), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Library or works based on it.
-
- 10. Each time you redistribute the Library (or any work based on the
-Library), the recipient automatically receives a license from the
-original licensor to copy, distribute, link with or modify the Library
-subject to these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties with
-this License.
-^L
- 11. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Library at all. For example, if a patent
-license would not permit royalty-free redistribution of the Library by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Library.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply, and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 12. If the distribution and/or use of the Library is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Library under this License
-may add an explicit geographical distribution limitation excluding those
-countries, so that distribution is permitted only in or among
-countries not thus excluded. In such case, this License incorporates
-the limitation as if written in the body of this License.
-
- 13. The Free Software Foundation may publish revised and/or new
-versions of the Lesser General Public License from time to time.
-Such new versions will be similar in spirit to the present version,
-but may differ in detail to address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Library
-specifies a version number of this License which applies to it and
-"any later version", you have the option of following the terms and
-conditions either of that version or of any later version published by
-the Free Software Foundation. If the Library does not specify a
-license version number, you may choose any version ever published by
-the Free Software Foundation.
-^L
- 14. If you wish to incorporate parts of the Library into other free
-programs whose distribution conditions are incompatible with these,
-write to the author to ask for permission. For software which is
-copyrighted by the Free Software Foundation, write to the Free
-Software Foundation; we sometimes make exceptions for this. Our
-decision will be guided by the two goals of preserving the free status
-of all derivatives of our free software and of promoting the sharing
-and reuse of software generally.
-
- NO WARRANTY
-
- 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
-WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
-EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
-OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
-KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
-LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
-THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
- 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
-WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
-AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
-FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
-CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
-LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
-RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
-FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
-SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGES.
-
- END OF TERMS AND CONDITIONS
-^L
- How to Apply These Terms to Your New Libraries
-
- If you develop a new library, and you want it to be of the greatest
-possible use to the public, we recommend making it free software that
-everyone can redistribute and change. You can do so by permitting
-redistribution under these terms (or, alternatively, under the terms
-of the ordinary General Public License).
-
- To apply these terms, attach the following notices to the library.
-It is safest to attach them to the start of each source file to most
-effectively convey the exclusion of warranty; and each file should
-have at least the "copyright" line and a pointer to where the full
-notice is found.
-
-
- &lt;one line to give the library's name and a brief idea of what it does.&gt;
- Copyright (C) &lt;year&gt; &lt;name of author&gt;
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 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
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02111-1307 USA
-
-Also add information on how to contact you by electronic and paper mail.
-
-You should also get your employer (if you work as a programmer) or
-your school, if any, to sign a "copyright disclaimer" for the library,
-if necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the
- library `Frob' (a library for tweaking knobs) written by James
- Random Hacker.
-
- &lt;signature of Ty Coon&gt;, 1 April 1990
- Ty Coon, President of Vice
-
-That's all there is to it!
-
-
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-valgrind.html
-\ingroup qtwebengine-licensing
-\brief BSD
-\title valgrind
-
-\l{http://valgrind.org}{Project Homepage}
-
-\badcode
- Notice that the following BSD-style license applies to the Valgrind header
- files used by Chromium (valgrind.h and memcheck.h). However, the rest of
- Valgrind is licensed under the terms of the GNU General Public License,
- version 2, unless otherwise indicated.
-
- ----------------------------------------------------------------
-
- Copyright (C) 2000-2008 Julian Seward. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions
- are met:
-
- 1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- 2. The origin of this software must not be misrepresented; you must
- not claim that you wrote the original software. If you use this
- software in a product, an acknowledgment in the product
- documentation would be appreciated but is not required.
-
- 3. Altered source versions must be plainly marked as such, and must
- not be misrepresented as being the original software.
-
- 4. The name of the author may not be used to endorse or promote
- products derived from this software without specific prior written
- permission.
-
- THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
- OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
- DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
- GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-wayland.html
-\ingroup qtwebengine-licensing
-\brief MIT
-\title wayland
-
-\l{http://wayland.freedesktop.org/}{Project Homepage}
-
-\badcode
-Copyright © 2008-2012 Kristian Høgsberg
-Copyright © 2010-2012 Intel Corporation
-Copyright © 2011 Benjamin Franzke
-Copyright © 2012 Collabora, Ltd.
-
-Permission is hereby granted, free of charge, to any person obtaining a
-copy of this software and associated documentation files (the "Software"),
-to deal in the Software without restriction, including without limitation
-the rights to use, copy, modify, merge, publish, distribute, sublicense,
-and/or sell copies of the Software, and to permit persons to whom the
-Software is furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice (including the next
-paragraph) shall be included in all copies or substantial portions of the
-Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
-THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-DEALINGS IN THE SOFTWARE.
-
----
-
-The above is the version of the MIT "Expat" License used by X.org:
-
- http://cgit.freedesktop.org/xorg/xserver/tree/COPYING
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-wayland-protocols.html
-\ingroup qtwebengine-licensing
-\brief MIT
-\title wayland-protocols
-
-\l{http://wayland.freedesktop.org/}{Project Homepage}
-
-\badcode
-Copyright © 2008-2013 Kristian Høgsberg
-Copyright © 2010-2013 Intel Corporation
-Copyright © 2013 Rafael Antognolli
-Copyright © 2013 Jasper St. Pierre
-Copyright © 2014 Jonas Ådahl
-Copyright © 2014 Jason Ekstrand
-Copyright © 2014-2015 Collabora, Ltd.
-Copyright © 2015 Red Hat Inc.
-
-Permission is hereby granted, free of charge, to any person obtaining a
-copy of this software and associated documentation files (the "Software"),
-to deal in the Software without restriction, including without limitation
-the rights to use, copy, modify, merge, publish, distribute, sublicense,
-and/or sell copies of the Software, and to permit persons to whom the
-Software is furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice (including the next
-paragraph) shall be included in all copies or substantial portions of the
-Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
-THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-DEALINGS IN THE SOFTWARE.
-
----
-
-The above is the version of the MIT "Expat" License used by X.org:
-
- http://cgit.freedesktop.org/xorg/xserver/tree/COPYING
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-woff2.html
-\ingroup qtwebengine-licensing
-\brief Apache 2.0
-\title woff2
-
-\l{https://github.com/google/woff2}{Project Homepage}
-
-\badcode
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-x86inc.html
-\ingroup qtwebengine-licensing
-\brief ISC from text in file header. Same text is copied to LICENSE file.
-\title x86inc
-
-\l{http://git.videolan.org/?p=x264.git;a=blob;f=common/x86/x86inc.asm}{Project Homepage}
-
-\badcode
-;*****************************************************************************
-;* x86inc.asm
-;*****************************************************************************
-;* Copyright (C) 2005-2011 x264 project
-;*
-;* Authors: Loren Merritt &lt;lorenm@u.washington.edu&gt;
-;* Anton Mitrofanov &lt;BugMaster@narod.ru&gt;
-;* Jason Garrett-Glaser &lt;darkshikari@gmail.com&gt;
-;*
-;* Permission to use, copy, modify, and/or distribute this software for any
-;* purpose with or without fee is hereby granted, provided that the above
-;* copyright notice and this permission notice appear in all copies.
-;*
-;* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-;* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-;* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-;* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-;* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-;* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-;* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-;*****************************************************************************
-
-; This is a header file for the x264ASM assembly language, which uses
-; NASM/YASM syntax combined with a large number of macros to provide easy
-; abstraction between different calling conventions (x86_32, win64, linux64).
-; It also has various other useful features to simplify writing the kind of
-; DSP functions that are most often used in x264.
-
-; Unlike the rest of x264, this file is available under an ISC license, as it
-; has significant usefulness outside of x264 and we want it to be available
-; to the largest audience possible. Of course, if you modify it for your own
-; purposes to add a new feature, we strongly encourage contributing a patch
-; as this feature might be useful for others as well. Send patches or ideas
-; to x264-devel@videolan.org .
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-xdg-mime.html
-\ingroup qtwebengine-licensing
-\brief Academic Free License version 2.0 or LGPL v2
-\title xdg-mime
-
-\l{http://freedesktop.org}{Project Homepage}
-
-\badcode
-Licensed under the Academic Free License version 2.0 (below)
-Or under the following terms:
-
-This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser 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
-Lesser General Public License for more details.
-
-You should have received a copy of the GNU Lesser General Public
-License along with this library; if not, write to the
-Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA.
-
-
---------------------------------------------------------------------------------
-Academic Free License v. 2.0
---------------------------------------------------------------------------------
-
-This Academic Free License (the "License") applies to any original work of
-authorship (the "Original Work") whose owner (the "Licensor") has placed the
-following notice immediately following the copyright notice for the Original
-Work:
-
-Licensed under the Academic Free License version 2.0
-1) Grant of Copyright License. Licensor hereby grants You a world-wide,
-royalty-free, non-exclusive, perpetual, sublicenseable license to do the
-following:
-
-a) to reproduce the Original Work in copies;
-b) to prepare derivative works ("Derivative Works") based upon the Original
- Work;
-c) to distribute copies of the Original Work and Derivative Works to the
- public;
-d) to perform the Original Work publicly; and
-e) to display the Original Work publicly.
-
-2) Grant of Patent License. Licensor hereby grants You a world-wide,
-royalty-free, non-exclusive, perpetual, sublicenseable license, under patent
-claims owned or controlled by the Licensor that are embodied in the Original
-Work as furnished by the Licensor, to make, use, sell and offer for sale the
-Original Work and Derivative Works.
-
-3) Grant of Source Code License. The term "Source Code" means the preferred
-form of the Original Work for making modifications to it and all available
-documentation describing how to modify the Original Work. Licensor hereby
-agrees to provide a machine-readable copy of the Source Code of the Original
-Work along with each copy of the Original Work that Licensor distributes.
-Licensor reserves the right to satisfy this obligation by placing a
-machine-readable copy of the Source Code in an information repository
-reasonably calculated to permit inexpensive and convenient access by You for as
-long as Licensor continues to distribute the Original Work, and by publishing
-the address of that information repository in a notice immediately following
-the copyright notice that applies to the Original Work.
-
-4) Exclusions From License Grant. Neither the names of Licensor, nor the names
-of any contributors to the Original Work, nor any of their trademarks or
-service marks, may be used to endorse or promote products derived from this
-Original Work without express prior written permission of the Licensor. Nothing
-in this License shall be deemed to grant any rights to trademarks, copyrights,
-patents, trade secrets or any other intellectual property of Licensor except as
-expressly stated herein. No patent license is granted to make, use, sell or
-offer to sell embodiments of any patent claims other than the licensed claims
-defined in Section 2. No right is granted to the trademarks of Licensor even if
-such marks are included in the Original Work. Nothing in this License shall be
-interpreted to prohibit Licensor from licensing under different terms from this
-License any Original Work that Licensor otherwise would have a right to
-license.
-
-5) This section intentionally omitted.
-
-6) Attribution Rights. You must retain, in the Source Code of any Derivative
-Works that You create, all copyright, patent or trademark notices from the
-Source Code of the Original Work, as well as any notices of licensing and any
-descriptive text identified therein as an "Attribution Notice." You must cause
-the Source Code for any Derivative Works that You create to carry a prominent
-Attribution Notice reasonably calculated to inform recipients that You have
-modified the Original Work.
-
-7) Warranty of Provenance and Disclaimer of Warranty. Licensor warrants that
-the copyright in and to the Original Work and the patent rights granted herein
-by Licensor are owned by the Licensor or are sublicensed to You under the terms
-of this License with the permission of the contributor(s) of those copyrights
-and patent rights. Except as expressly stated in the immediately proceeding
-sentence, the Original Work is provided under this License on an "AS IS" BASIS
-and WITHOUT WARRANTY, either express or implied, including, without limitation,
-the warranties of NON-INFRINGEMENT, MERCHANTABILITY or FITNESS FOR A PARTICULAR
-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL WORK IS WITH YOU.
-This DISCLAIMER OF WARRANTY constitutes an essential part of this License. No
-license to Original Work is granted hereunder except under this disclaimer.
-
-8) Limitation of Liability. Under no circumstances and under no legal theory,
-whether in tort (including negligence), contract, or otherwise, shall the
-Licensor be liable to any person for any direct, indirect, special, incidental,
-or consequential damages of any character arising as a result of this License
-or the use of the Original Work including, without limitation, damages for loss
-of goodwill, work stoppage, computer failure or malfunction, or any and all
-other commercial damages or losses. This limitation of liability shall not
-apply to liability for death or personal injury resulting from Licensor's
-negligence to the extent applicable law prohibits such limitation. Some
-jurisdictions do not allow the exclusion or limitation of incidental or
-consequential damages, so this exclusion and limitation may not apply to You.
-
-9) Acceptance and Termination. If You distribute copies of the Original Work or
-a Derivative Work, You must make a reasonable effort under the circumstances to
-obtain the express assent of recipients to the terms of this License. Nothing
-else but this License (or another written agreement between Licensor and You)
-grants You permission to create Derivative Works based upon the Original Work
-or to exercise any of the rights granted in Section 1 herein, and any attempt
-to do so except under the terms of this License (or another written agreement
-between Licensor and You) is expressly prohibited by U.S. copyright law, the
-equivalent laws of other countries, and by international treaty. Therefore, by
-exercising any of the rights granted to You in Section 1 herein, You indicate
-Your acceptance of this License and all of its terms and conditions.
-
-10) Termination for Patent Action. This License shall terminate automatically
-and You may no longer exercise any of the rights granted to You by this License
-as of the date You commence an action, including a cross-claim or counterclaim,
-for patent infringement (i) against Licensor with respect to a patent
-applicable to software or (ii) against any entity with respect to a patent
-applicable to the Original Work (but excluding combinations of the Original
-Work with other software or hardware).
-
-11) Jurisdiction, Venue and Governing Law. Any action or suit relating to this
-License may be brought only in the courts of a jurisdiction wherein the
-Licensor resides or in which Licensor conducts its primary business, and under
-the laws of that jurisdiction excluding its conflict-of-law provisions. The
-application of the United Nations Convention on Contracts for the International
-Sale of Goods is expressly excluded. Any use of the Original Work outside the
-scope of this License or after its termination shall be subject to the
-requirements and penalties of the U.S. Copyright Act, 17 U.S.C. 101 et seq.,
-the equivalent laws of other countries, and international treaty. This section
-shall survive the termination of this License.
-
-12) Attorneys Fees. In any action to enforce the terms of this License or
-seeking damages relating thereto, the prevailing party shall be entitled to
-recover its costs and expenses, including, without limitation, reasonable
-attorneys' fees and costs incurred in connection with such action, including
-any appeal of such action. This section shall survive the termination of this
-License.
-
-13) Miscellaneous. This License represents the complete agreement concerning
-the subject matter hereof. If any provision of this License is held to be
-unenforceable, such provision shall be reformed only to the extent necessary to
-make it enforceable.
-
-14) Definition of "You" in This License. "You" throughout this License, whether
-in upper or lower case, means an individual or a legal entity exercising rights
-under, and complying with all of the terms of, this License. For legal
-entities, "You" includes any entity that controls, is controlled by, or is
-under common control with you. For purposes of this definition, "control" means
-(i) the power, direct or indirect, to cause the direction or management of such
-entity, whether by contract or otherwise, or (ii) ownership of fifty percent
-(50%) or more of the outstanding shares, or (iii) beneficial ownership of such
-entity.
-
-15) Right to Use. You may use the Original Work in all ways not otherwise
-restricted or conditioned by this License or by law, and Licensor promises not
-to interfere with or be responsible for such uses by You.
-
-This license is Copyright (C) 2003 Lawrence E. Rosen. All rights reserved.
-Permission is hereby granted to copy and distribute this license without
-modification. This license may not be modified without the express written
-permission of its copyright owner.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-xdg-user-dirs.html
-\ingroup qtwebengine-licensing
-\brief MIT
-\title xdg-user-dirs
-
-\l{http://www.freedesktop.org/wiki/Software/xdg-user-dirs}{Project Homepage}
-
-\badcode
- Copyright (c) 2007 Red Hat, inc
-
- Permission is hereby granted, free of charge, to any person
- obtaining a copy of this software and associated documentation files
- (the "Software"), to deal in the Software without restriction,
- including without limitation the rights to use, copy, modify, merge,
- publish, distribute, sublicense, and/or sell copies of the Software,
- and to permit persons to whom the Software is furnished to do so,
- subject to the following conditions:
-
- The above copyright notice and this permission notice shall be
- included in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
- BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-xdg-utils.html
-\ingroup qtwebengine-licensing
-\brief MIT
-\title xdg-utils
-
-\l{http://portland.freedesktop.org/wiki/}{Project Homepage}
-
-\badcode
-#
-# Permission is hereby granted, free of charge, to any person obtaining a
-# copy of this software and associated documentation files (the "Software"),
-# to deal in the Software without restriction, including without limitation
-# the rights to use, copy, modify, merge, publish, distribute, sublicense,
-# and/or sell copies of the Software, and to permit persons to whom the
-# Software is furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included
-# in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
-# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
-# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-# OTHER DEALINGS IN THE SOFTWARE.
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-yasm.html
-\ingroup qtwebengine-licensing
-\brief 2-clause or 3-clause BSD licensed, with the exception of bitvect, which is triple-licensed under the Artistic license, GPL, and LGPL
-\title yasm
-
-\l{http://www.tortall.net/projects/yasm/}{Project Homepage}
-
-\badcode
-Yasm is Copyright (c) 2001-2010 Peter Johnson and other Yasm developers.
-
-Yasm developers and/or contributors include:
- Peter Johnson
- Michael Urman
- Brian Gladman (Visual Studio build files, other fixes)
- Stanislav Karchebny (options parser)
- Mathieu Monnier (SSE4 instruction patches, NASM preprocessor additions)
- Anonymous "NASM64" developer (NASM preprocessor fixes)
- Stephen Polkowski (x86 instruction patches)
- Henryk Richter (Mach-O object format)
- Ben Skeggs (patches, bug reports)
- Alexei Svitkine (GAS preprocessor)
- Samuel Thibault (TASM parser and frontend)
-
------------------------------------
-Yasm licensing overview and summary
------------------------------------
-
-Note: This document does not provide legal advice nor is it the actual
-license of any part of Yasm. See the individual licenses for complete
-details. Consult a lawyer for legal advice.
-
-The primary license of Yasm is the 2-clause BSD license. Please use this
-license if you plan on submitting code to the project.
-
-Yasm has absolutely no warranty; not even for merchantibility or fitness
-for a particular purpose.
-
--------
-Libyasm
--------
-Libyasm is 2-clause or 3-clause BSD licensed, with the exception of
-bitvect, which is triple-licensed under the Artistic license, GPL, and
-LGPL. Libyasm is thus GPL and LGPL compatible. In addition, this also
-means that libyasm is free for binary-only distribution as long as the
-terms of the 3-clause BSD license and Artistic license (as it applies to
-bitvect) are fulfilled.
-
--------
-Modules
--------
-The modules are 2-clause or 3-clause BSD licensed.
-
----------
-Frontends
----------
-The frontends are 2-clause BSD licensed.
-
--------------
-License Texts
--------------
-The full text of all licenses are provided in separate files in the source
-distribution. Each source file may include the entire license (in the case
-of the BSD and Artistic licenses), or may reference the GPL or LGPL license
-file.
-
-BSD.txt - 2-clause and 3-clause BSD licenses
-Artistic.txt - Artistic license
-GNU_GPL-2.0 - GNU General Public License
-GNU_LGPL-2.0 - GNU Library General Public License
-
-\endcode
-*/
-
-/*!
-\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-zlib.html
-\ingroup qtwebengine-licensing
-\brief Custom license
-\title zlib
-
-\l{http://zlib.net/}{Project Homepage}
-
-\badcode
-/* zlib.h -- interface of the 'zlib' general purpose compression library
- version 1.2.4, March 14th, 2010
-
- Copyright (C) 1995-2010 Jean-loup Gailly and Mark Adler
-
- This software is provided 'as-is', without any express or implied
- warranty. In no event will the authors be held liable for any damages
- arising from the use of this software.
-
- Permission is granted to anyone to use this software for any purpose,
- including commercial applications, and to alter it and redistribute it
- freely, subject to the following restrictions:
-
- 1. The origin of this software must not be misrepresented; you must not
- claim that you wrote the original software. If you use this software
- in a product, an acknowledgment in the product documentation would be
- appreciated but is not required.
- 2. Altered source versions must be plainly marked as such, and must not be
- misrepresented as being the original software.
- 3. This notice may not be removed or altered from any source distribution.
-
- Jean-loup Gailly
- Mark Adler
-
-* /
-
-mozzconf.h is distributed under the MPL 1.1/GPL 2.0/LGPL 2.1 tri-license.
-
-\endcode
-*/
-
-
diff --git a/src/webengine/doc/src/qtwebengine-features.qdoc b/src/webengine/doc/src/qtwebengine-features.qdoc
index 62a09bb91..647f1030b 100644
--- a/src/webengine/doc/src/qtwebengine-features.qdoc
+++ b/src/webengine/doc/src/qtwebengine-features.qdoc
@@ -31,7 +31,7 @@
\brief Summarizes Qt WebEngine features.
- Qt WebEngine supports the following Chromium features:
+ Qt WebEngine supports the following features:
\list
\li \l{Audio and Video Codecs}
@@ -40,8 +40,11 @@
\li \l{Fullscreen}
\li \l{HTML5 DRM}
\li \l{HTML5 Geolocation}
+ \li \l{Native Dialogs}
\li \l{Pepper Plugin API}
\li \l{Print to PDF}
+ \li \l{Spellchecker}
+ \li \l{View Source}
\li \l{WebRTC}
\endlist
@@ -140,6 +143,40 @@
Support for this feature was added in Qt 5.5.0.
+ \section1 Native Dialogs
+
+ A web page might request dialogs for the following functions:
+
+ \list
+ \li Entering user credentials for HTTP and proxy authentication
+ \li Displaying JavaScript alerts, confirmation dialogs, and prompts
+ \li Picking colors
+ \li Selecting files
+ \li Displaying form validation messages
+ \endlist
+
+ Qt WebEngine provides standard dialogs for these functions. In widget-based
+ applications, the standard dialogs are based on QDialog, whereas in Qt Quick
+ applications, they can be based either on Qt Quick Controls 1 or Qt Quick
+ Controls 2 (since Qt 5.8). The latter are used only on \c eglfs platforms.
+
+ To explicitly force either dialogs based on Qt Quick Controls 1 or Qt Quick
+ Controls 2, set the \c QTWEBENGINE_DIALOG_SET environment variable to either
+ \c{QtQuickControls1} or \c{QtQuickControls2}.
+
+ Qt WebEngine Widgets dialogs can be customized by reimplementing the
+ QWebEnginePage::chooseFiles(), QWebEnginePage::javaScriptAlert(),
+ QWebEnginePage::javaScriptConfirm(), and QWebEnginePage::javaScriptPrompt()
+ functions.
+
+ Since Qt 5.8, Qt Quick dialogs can be customized by connecting to the
+ WebEngineView::authenticationDialogRequested(),
+ WebEngineView::javaScriptDialogRequested(),
+ WebEngineView::colorDialogRequested(),
+ WebEngineView::fileDialogRequested(), and
+ WebEngineView::formValidationMessageRequested() signals. For an example,
+ see \l{WebEngine Qt Quick Custom Dialogs Example}.
+
\section1 Pepper Plugin API
Qt WebEngine supports loading Pepper Plugin API (PPAPI) plugins if
@@ -223,6 +260,76 @@
Support for this feature was added in Qt 5.7.0.
+ \section1 Spellchecker
+
+ Qt WebEngine supports integrating spellchecking support into HTML forms to
+ enable users to submit spellchecked messages. When the user clicks on
+ an underlined misspelled word, the default context menu displays up to four
+ suggestions. Selecting one will replace the misspelled word.
+
+ To be able to check the spelling, the spellchecker needs dictionaries. It
+ supports dictionaries from the \l{Hunspell project}, but they have to be
+ compiled into a special binary format. A Hunspell dictionary consists of two
+ files:
+
+ \list
+
+ \li A \c .dic file that is a dictionary containing words for the
+ language
+ \li An \c .aff file that defines the meaning of special flags in the
+ dictionary
+ \endlist
+
+ These two files can be converted into the \c bdic format by using the
+ \c qwebengine_convert_dict tool that is shipped together with Qt.
+ When the Qt WebEngine spellchecker initializes, it will try to load the
+ \c bdict dictionaries and to check them for consistency. First, it searches
+ \e qtwebengine_dictionaries directories relative to the executable,
+ then it will look in \c QT_INSTALL_PREFIX/qtwebengines_dictionaries.
+
+ Spellchecking is disabled by default and can be enabled per profile by
+ using the QWebEngineProfile::setSpellCheckEnabled() method in widget-based
+ applications and the \l {QQuickWebEngineProfile::spellCheckEnabled}
+ {WebEngineProfile.spellCheckEnabled} property in Qt Quick applications.
+
+ The current language used for spellchecking is defined per profile, and can
+ be set using the QWebEngineProfile::setSpellCheckLanguages() method or the
+ \l {QQuickWebEngineProfile::spellCheckLanguages}
+ {WebEngineProfile.spellCheckLanguages} property.
+
+ This feature can be tested by building and running the
+ \l{WebEngine Widgets Spellchecker Example}{Spellchecker Example}.
+
+ Support for this feature was added in Qt 5.8.0.
+
+ \section1 View Source
+
+ Qt WebEngine supports viewing the HTML source of a web page.
+
+ This feature can be used from custom menus or assigned to custom events.
+ For more information, see WebEngineView::WebAction, and QWebEnginePage::WebAction.
+
+ This feature can be tested by opening a web page in \l{WebEngine Widgets
+ Simple Browser Example}{Simple Browser} or \l{WebEngine Quick Nano Browser}
+ {Nano Browser}, and then selecting \c{Page Source} in the context menu. The
+ \c{Page Source} context menu entry opens the source view in a new tab.
+
+ For opening the source view in the current tab, URLs with \l{view-source URI scheme}
+ are also supported. For example, you can type the following URL to the URL bar
+ to view the HTML source of the qt.io web page:
+ \code
+ view-source:https://www.qt.io/
+ \endcode
+
+ Auto-completion of incomplete URLs with \l{view-source URI scheme} makes the usage of
+ this feature more comfortable. For example, the following incomplete URL also loads
+ the source view of the qt.io web page:
+ \code
+ view-source:qt.io
+ \endcode
+
+ Support for this feature was added in Qt 5.8.0.
+
\section1 WebRTC
WebRTC provides browsers with Real-Time Communications (RTC) capabilities
diff --git a/src/webengine/doc/src/qtwebengine-index.qdoc b/src/webengine/doc/src/qtwebengine-index.qdoc
index c4be591ff..bd6cc9a32 100644
--- a/src/webengine/doc/src/qtwebengine-index.qdoc
+++ b/src/webengine/doc/src/qtwebengine-index.qdoc
@@ -28,7 +28,6 @@
/*!
\page qtwebengine-index.html
\title Qt WebEngine
- \ingroup modules
\brief Provides functionality for rendering regions of dynamic web content.
diff --git a/src/webengine/doc/src/qtwebengine-module.qdoc b/src/webengine/doc/src/qtwebengine-module.qdoc
new file mode 100644
index 000000000..97657f6a9
--- /dev/null
+++ b/src/webengine/doc/src/qtwebengine-module.qdoc
@@ -0,0 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** 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 Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \module QtWebEngine
+ \title Qt WebEngine C++ Classes
+ \brief Exposes C++ functionality to Qt Quick.
+ \ingroup modules
+
+ The Qt WebEngine module exposes C++ functionality to Qt Quick.
+
+ To include the definitions of the module's classes, use the
+ following directive:
+
+ \snippet qtwebengine_build_snippet.qdoc 1
+
+ To link against the module, add the following to your qmake project file:
+
+ \snippet qtwebengine_build_snippet.qdoc 0
+*/
diff --git a/src/webengine/doc/src/qtwebengine-overview.qdoc b/src/webengine/doc/src/qtwebengine-overview.qdoc
index 6c05b2e48..6995be2fa 100644
--- a/src/webengine/doc/src/qtwebengine-overview.qdoc
+++ b/src/webengine/doc/src/qtwebengine-overview.qdoc
@@ -181,7 +181,8 @@
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.
- \note Chromium extensions, such as \c @include, \c @match, and \c @exclude, are not supported.
+ The following \l Greasemonkey attributes are supported since Qt 5.8:
+ \c @exclude, \c @include, \c @name, \c @match, and \c @run-at.
\section1 Managing Certificates
@@ -196,9 +197,11 @@
\section1 Proxy Support
- If QNetworkProxy::applicationProxy is set, it will also be used for Qt WebEngine. Otherwise,
- Qt WebEngine automatically picks up the proxy configuration from \macos and Windows. On Linux,
- it acknowledges settings from KDE and Gnome.
+ Qt WebEngine uses the proxy settings from \l{Qt Network}. If
+ QNetworkProxy::applicationProxy is set, it will also be used for Qt WebEngine, and if
+ QNetworkProxy::usesSystemConfiguration() is enabled, the proxy settings are automatically
+ retrieved from the system. Settings from an installed QNetworkProxyFactory will be ignored
+ though.
If a proxy requires authentication, QWebEnginePage::proxyAuthenticationRequired is emitted.
For Qt Quick, a dialog is shown.
diff --git a/src/webengine/doc/src/qtwebengine-platform-notes.qdoc b/src/webengine/doc/src/qtwebengine-platform-notes.qdoc
index 765295d30..c5ebe0f06 100644
--- a/src/webengine/doc/src/qtwebengine-platform-notes.qdoc
+++ b/src/webengine/doc/src/qtwebengine-platform-notes.qdoc
@@ -105,7 +105,7 @@
\list
\li \macos 10.9 or later
- \li Xcode 6.1 or later
+ \li Xcode 5.1 or later
\li \macos 10.10 SDK or later
\endlist
@@ -114,7 +114,7 @@
\section1 Mac App Store Compatibility
- By default, Qt WebEngine uses private OS X API, which might cause an application to be
+ By default, Qt WebEngine uses private \macos API, which might cause an application to be
rejected when submitted to the Mac App Store. To configure Qt WebEngine not to use these API
calls, Qt WebEngine has to be recompiled:
@@ -125,10 +125,10 @@
However, this will cause some behavioral changes, such as:
\list
- \li The OS X Kill Ring functionality will no longer work (emacs-like copy pasting).
+ \li The \macos Kill Ring functionality will no longer work (emacs-like copy pasting).
\li Certain Chromium sandboxing cleanup is not done.
\li Text areas will be painted with a different style.
- \li Text fields might be painted with a different style on Mountain Lion (OS X 10.8).
+ \li Text fields might be painted with a different style on Mountain Lion (\macos 10.8).
\endlist
\section1 Default QSurfaceFormat OpenGL Profile Support
diff --git a/src/webengine/doc/src/qtwebengine-qmlmodule.qdoc b/src/webengine/doc/src/qtwebengine-qmlmodule.qdoc
index 8549e7664..c67851a2a 100644
--- a/src/webengine/doc/src/qtwebengine-qmlmodule.qdoc
+++ b/src/webengine/doc/src/qtwebengine-qmlmodule.qdoc
@@ -24,7 +24,7 @@
*/
/*!
- \qmlmodule QtWebEngine 1.3
+ \qmlmodule QtWebEngine 1.4
\title Qt WebEngine QML Types
\brief Provides QML types for rendering web content within a QML application
\ingroup qtwebengine-modules
@@ -34,7 +34,7 @@
your .qml file:
\badcode
- import QtWebEngine 1.3
+ import QtWebEngine 1.4
\endcode
To link against the module, add the following QT variable to your qmake .pro
diff --git a/src/webengine/doc/src/qwebengine-licensing.qdoc b/src/webengine/doc/src/qwebengine-licensing.qdoc
index c31bd9dac..a7642df5a 100644
--- a/src/webengine/doc/src/qwebengine-licensing.qdoc
+++ b/src/webengine/doc/src/qwebengine-licensing.qdoc
@@ -17,7 +17,7 @@ Third party licenses included in the sources are:
/*!
\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-chromium-global.html
+\page qtwebengine-3rdparty-chromium-global.html attribution
\ingroup qtwebengine-licensing
\title Chromium License
\brief BSD
diff --git a/src/webengine/doc/src/webengineview.qdoc b/src/webengine/doc/src/webengineview.qdoc
index b72e405a8..418da9f9d 100644
--- a/src/webengine/doc/src/webengineview.qdoc
+++ b/src/webengine/doc/src/webengineview.qdoc
@@ -82,7 +82,11 @@
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.
+ focus on press. This can be useful in a hybrid UI.
+
+ The \l {WebEngineSettings::focusOnNavigationEnabled} {focusOnNavigationEnabled} setting can be
+ used to stop the view from automatically receiving focus when a navigation operation occurs
+ (like loading or reloading a page or navigating through history).
The \l linkHovered() signal is emitted when a mouse pointer passes over a link and thus
corresponds to the \c{mouseover} DOM event.
@@ -481,7 +485,7 @@
a web engine view can be used to create a UI element that should not get focus. This can be
useful in a hybrid UI.
- \sa activeFocusOnPressChanged()
+ \sa activeFocusOnPressChanged, WebEngineSettings::focusOnNavigationEnabled
*/
/*!
@@ -802,6 +806,8 @@
Exit the fullscreen mode. (Added in Qt 5.6)
\value WebEngineView.SavePage
Save the current web page to disk. (Added in Qt 5.7)
+ \value WebEngineView.ViewSource
+ Show the source of the current page in a new tab. (Added in Qt 5.8)
\omitvalue WebActionCount
*/
@@ -1035,7 +1041,7 @@
ApplicationWindow {
id: window
WebEngineView {
- onFullScreenRequested: {
+ onFullScreenRequested: function(request) {
if (request.toggleOn)
window.showFullScreen()
else
@@ -1139,3 +1145,87 @@
Also if the audio is paused, this signal is emitted with an approximate \b{2 second
delay}, from the moment the audio is paused.
*/
+
+/*!
+ \qmlsignal WebEngineView::authenticationDialogRequested(AuthenticationDialogRequest request)
+ \since QtWebEngine 1.4
+
+ This signal is emitted when an authentication dialog is requested.
+
+ The request can be handled by using the methods of the AuthenticationDialogRequest
+ type.
+
+ \note Signal handlers need to call \c{request.accepted = true} to prevent a
+ default dialog from showing up. Make sure to call either
+ AuthenticationDialogRequest::dialogAccept() or AuthenticationDialogRequest::dialogReject()
+ afterwards.
+*/
+
+/*!
+ \qmlsignal WebEngineView::javaScriptDialogRequested(JavaScriptDialogRequest request)
+ \since QtWebEngine 1.4
+
+ This signal is emitted when a JavaScript dialog is requested.
+
+ The request can be handled by using the methods of the JavaScriptDialogRequest
+ type.
+
+ \note Signal handlers need to call \c{request.accepted = true} to prevent a
+ default dialog from showing up. Make sure to call either
+ JavaScriptDialogRequest::dialogAccept() or JavaScriptDialogRequest::dialogReject()
+ afterwards.
+*/
+
+/*!
+ \qmlsignal WebEngineView::colorDialogRequested(ColorDialogRequest request)
+ \since QtWebEngine 1.4
+
+ This signal is emitted when a color picker dialog is requested.
+
+ The request can be handled by using the methods of the ColorDialogRequest
+ type.
+
+ \note Signal handlers need to call \c{request.accepted = true} to prevent a
+ default dialog from showing up. Make sure to call either
+ ColorDialogRequest::dialogAccept() or ColorDialogRequest::dialogReject() afterwards.
+*/
+
+/*!
+ \qmlsignal WebEngineView::fileDialogRequested(FileDialogRequest request)
+ \since QtWebEngine 1.4
+
+ This signal is emitted when a file picker dialog is requested.
+
+ The request error can be handled by using the methods of the FileDialogRequest
+ type.
+
+ \note Signal handlers need to call \c{request.accepted = true} to prevent a
+ default dialog from showing up. Make sure to call either FileDialogRequest::dialogAccept()
+ or FileDialogRequest::dialogReject() afterwards.
+*/
+
+/*!
+ \qmlsignal WebEngineView::formValidationMessageRequested(FormValidationMessageRequest request)
+ \since QtWebEngine 1.4
+
+ This signal is emitted when a validation message is requested.
+
+ The request can be handled by using the methods of the FormValidationMessageRequest
+ type.
+
+ \note Signal handlers need to call \c{request.accepted = true} to prevent a
+ default dialog from showing up.
+*/
+
+/*!
+ \qmlsignal WebEngineView::contextMenuRequested(ContextMenuRequest request)
+ \since QtWebEngine 1.4
+
+ This signal is emitted when a context menu is requested.
+
+ The request can be handled by using the properties of the ContextMenuRequest
+ type.
+
+ \note Signal handlers need to call \c{request.accepted = true} to prevent a
+ default context menu from showing up.
+*/
diff --git a/src/webengine/plugin/dependencies.json b/src/webengine/plugin/dependencies.json
new file mode 100644
index 000000000..115ba72e7
--- /dev/null
+++ b/src/webengine/plugin/dependencies.json
@@ -0,0 +1,7 @@
+[
+ {
+ "name": "QtQuick",
+ "type": "module",
+ "version": "2.6"
+ }
+]
diff --git a/src/webengine/plugin/experimental/experimental.pro b/src/webengine/plugin/experimental/experimental.pro
deleted file mode 100644
index d1b59326a..000000000
--- a/src/webengine/plugin/experimental/experimental.pro
+++ /dev/null
@@ -1,13 +0,0 @@
-CXX_MODULE = qml
-TARGET = qtwebengineexperimentalplugin
-TARGETPATH = QtWebEngine/experimental
-IMPORT_VERSION = 1.0
-
-QT += webengine qml quick
-QT_PRIVATE += webengine-private
-
-INCLUDEPATH += $$QTWEBENGINE_ROOT/src/core $$QTWEBENGINE_ROOT/src/core/api $$QTWEBENGINE_ROOT/src/webengine $$QTWEBENGINE_ROOT/src/webengine/api
-
-SOURCES = plugin.cpp
-
-load(qml_plugin)
diff --git a/src/webengine/plugin/experimental/plugin.cpp b/src/webengine/plugin/experimental/plugin.cpp
deleted file mode 100644
index c45bcee43..000000000
--- a/src/webengine/plugin/experimental/plugin.cpp
+++ /dev/null
@@ -1,83 +0,0 @@
-/****************************************************************************
-**
-** 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 <QtQml/qqmlextensionplugin.h>
-
-#include "qquickwebengineview_p.h"
-#include "qquickwebengineview_p_p.h"
-#include "qquickwebenginecontextmenudata_p.h"
-
-QT_BEGIN_NAMESPACE
-
-class QQuickWebEngineViewExperimentalExtension : public QObject {
- Q_OBJECT
- Q_PROPERTY(QQuickWebEngineViewExperimental* experimental READ experimental CONSTANT FINAL)
-public:
- QQuickWebEngineViewExperimentalExtension(QObject *parent = 0) : QObject(parent) { }
- QQuickWebEngineViewExperimental* experimental() { return static_cast<QQuickWebEngineView*>(parent())->d_func()->experimental(); }
-};
-
-class QtWebEngineExperimentalPlugin : public QQmlExtensionPlugin
-{
- Q_OBJECT
- Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface/1.0")
-public:
- virtual void registerTypes(const char *uri)
- {
- qWarning("\nWARNING: This project is using the experimental QML API extensions for QtWebEngine and is therefore tied to a specific QtWebEngine release.\n"
- "WARNING: The experimental API will change from version to version, or even be removed. You have been warned!\n");
-
- Q_ASSERT(QLatin1String(uri) == QLatin1String("QtWebEngine.experimental"));
-
- qmlRegisterExtendedType<QQuickWebEngineView, QQuickWebEngineViewExperimentalExtension>(uri, 1, 0, "WebEngineView");
- qmlRegisterUncreatableType<QQuickWebEngineViewExperimental>(uri, 1, 0, "WebEngineViewExperimental",
- tr("Cannot create a separate instance of WebEngineViewExperimental"));
- qmlRegisterUncreatableType<QQuickWebEngineViewport>(uri, 1, 0, "WebEngineViewport",
- tr("Cannot create a separate instance of WebEngineViewport"));
- qmlRegisterUncreatableType<const QQuickWebEngineContextMenuData>(uri, 1, 0, "WebEngineContextMenuData",
- tr("Cannot create a separate instance of WebEngineContextMenuData"));
-
- // Use the latest revision of QQuickWebEngineView when importing QtWebEngine.experimental 1.0
- qmlRegisterRevision<QQuickWebEngineView, LATEST_WEBENGINEVIEW_REVISION>(uri, 1, 0);
- }
-};
-
-QT_END_NAMESPACE
-
-#include "plugin.moc"
diff --git a/src/webengine/plugin/experimental/qmldir b/src/webengine/plugin/experimental/qmldir
deleted file mode 100644
index 56ad22e70..000000000
--- a/src/webengine/plugin/experimental/qmldir
+++ /dev/null
@@ -1,3 +0,0 @@
-module QtWebEngine.experimental
-plugin qtwebengineexperimentalplugin
-typeinfo plugins.qmltypes
diff --git a/src/webengine/plugin/plugin.cpp b/src/webengine/plugin/plugin.cpp
index 4809c0708..0fd2087d4 100644
--- a/src/webengine/plugin/plugin.cpp
+++ b/src/webengine/plugin/plugin.cpp
@@ -41,6 +41,8 @@
#include <QtWebEngine/QQuickWebEngineProfile>
#include "qquickwebenginecertificateerror_p.h"
+#include "qquickwebenginecontextmenurequest_p.h"
+#include "qquickwebenginedialogrequests_p.h"
#include "qquickwebenginedownloaditem_p.h"
#include "qquickwebenginehistory_p.h"
#include "qquickwebenginefaviconprovider_p_p.h"
@@ -62,7 +64,7 @@ static QObject *webEngineSingletonProvider(QQmlEngine *, QJSEngine *)
class QtWebEnginePlugin : public QQmlExtensionPlugin
{
Q_OBJECT
- Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface/1.0")
+ Q_PLUGIN_METADATA(IID QQmlExtensionInterface_iid)
public:
virtual void initializeEngine(QQmlEngine *engine, const char *uri) Q_DECL_OVERRIDE
{
@@ -75,27 +77,32 @@ public:
Q_ASSERT(QLatin1String(uri) == QLatin1String("QtWebEngine"));
qmlRegisterType<QQuickWebEngineView>(uri, 1, 0, "WebEngineView");
- qmlRegisterUncreatableType<QQuickWebEngineLoadRequest>(uri, 1, 0, "WebEngineLoadRequest", tr("Cannot create separate instance of WebEngineLoadRequest"));
- qmlRegisterUncreatableType<QQuickWebEngineNavigationRequest>(uri, 1, 0, "WebEngineNavigationRequest", tr("Cannot create separate instance of WebEngineNavigationRequest"));
+ qmlRegisterUncreatableType<QQuickWebEngineLoadRequest>(uri, 1, 0, "WebEngineLoadRequest", msgUncreatableType("WebEngineLoadRequest"));
+ qmlRegisterUncreatableType<QQuickWebEngineNavigationRequest>(uri, 1, 0, "WebEngineNavigationRequest", msgUncreatableType("WebEngineNavigationRequest"));
qmlRegisterType<QQuickWebEngineView, 1>(uri, 1, 1, "WebEngineView");
qmlRegisterType<QQuickWebEngineView, 2>(uri, 1, 2, "WebEngineView");
qmlRegisterType<QQuickWebEngineView, 3>(uri, 1, 3, "WebEngineView");
+ qmlRegisterType<QQuickWebEngineView, 4>(uri, 1, 4, "WebEngineView");
qmlRegisterType<QQuickWebEngineProfile>(uri, 1, 1, "WebEngineProfile");
qmlRegisterType<QQuickWebEngineProfile, 1>(uri, 1, 2, "WebEngineProfile");
qmlRegisterType<QQuickWebEngineProfile, 2>(uri, 1, 3, "WebEngineProfile");
+ qmlRegisterType<QQuickWebEngineProfile, 3>(uri, 1, 4, "WebEngineProfile");
qmlRegisterType<QQuickWebEngineScript>(uri, 1, 1, "WebEngineScript");
- qmlRegisterUncreatableType<QQuickWebEngineCertificateError>(uri, 1, 1, "WebEngineCertificateError", tr("Cannot create separate instance of WebEngineCertificateError"));
+ qmlRegisterUncreatableType<QQuickWebEngineCertificateError>(uri, 1, 1, "WebEngineCertificateError", msgUncreatableType("WebEngineCertificateError"));
qmlRegisterUncreatableType<QQuickWebEngineDownloadItem>(uri, 1, 1, "WebEngineDownloadItem",
tr("Cannot create a separate instance of WebEngineDownloadItem"));
qmlRegisterUncreatableType<QQuickWebEngineDownloadItem, 1>(uri, 1, 2, "WebEngineDownloadItem",
tr("Cannot create a separate instance of WebEngineDownloadItem"));
qmlRegisterUncreatableType<QQuickWebEngineDownloadItem, 2>(uri, 1, 3, "WebEngineDownloadItem",
tr("Cannot create a separate instance of WebEngineDownloadItem"));
- qmlRegisterUncreatableType<QQuickWebEngineNewViewRequest>(uri, 1, 1, "WebEngineNewViewRequest", tr("Cannot create separate instance of WebEngineNewViewRequest"));
+ qmlRegisterUncreatableType<QQuickWebEngineDownloadItem, 3>(uri, 1, 4, "WebEngineDownloadItem",
+ tr("Cannot create a separate instance of WebEngineDownloadItem"));
+ qmlRegisterUncreatableType<QQuickWebEngineNewViewRequest>(uri, 1, 1, "WebEngineNewViewRequest", msgUncreatableType("WebEngineNewViewRequest"));
qmlRegisterUncreatableType<QQuickWebEngineSettings>(uri, 1, 1, "WebEngineSettings", tr("Cannot create a separate instance of WebEngineSettings"));
qmlRegisterUncreatableType<QQuickWebEngineSettings, 1>(uri, 1, 2, "WebEngineSettings", tr("Cannot create a separate instance of WebEngineSettings"));
qmlRegisterUncreatableType<QQuickWebEngineSettings, 2>(uri, 1, 3, "WebEngineSettings", tr("Cannot create a separate instance of WebEngineSettings"));
+ qmlRegisterUncreatableType<QQuickWebEngineSettings, 3>(uri, 1, 4, "WebEngineSettings", tr("Cannot create a separate instance of WebEngineSettings"));
qmlRegisterSingletonType<QQuickWebEngineSingleton>(uri, 1, 1, "WebEngine", webEngineSingletonProvider);
qmlRegisterUncreatableType<QQuickWebEngineHistory>(uri, 1, 1, "NavigationHistory",
tr("Cannot create a separate instance of NavigationHistory"));
@@ -104,9 +111,28 @@ public:
qmlRegisterUncreatableType<QQuickWebEngineFullScreenRequest>(uri, 1, 1, "FullScreenRequest",
tr("Cannot create a separate instance of FullScreenRequest"));
+ qmlRegisterUncreatableType<QQuickWebEngineContextMenuRequest>(uri, 1, 4, "ContextMenuRequest",
+ msgUncreatableType("ContextMenuRequest"));
+ qmlRegisterUncreatableType<QQuickWebEngineAuthenticationDialogRequest>(uri, 1, 4, "AuthenticationDialogRequest",
+ msgUncreatableType("AuthenticationDialogRequest"));
+ qmlRegisterUncreatableType<QQuickWebEngineJavaScriptDialogRequest>(uri, 1, 4, "JavaScriptDialogRequest",
+ msgUncreatableType("JavaScriptDialogRequest"));
+ qmlRegisterUncreatableType<QQuickWebEngineColorDialogRequest>(uri, 1, 4, "ColorDialogRequest",
+ msgUncreatableType("ColorDialogRequest"));
+ qmlRegisterUncreatableType<QQuickWebEngineFileDialogRequest>(uri, 1, 4, "FileDialogRequest",
+ msgUncreatableType("FileDialogRequest"));
+ qmlRegisterUncreatableType<QQuickWebEngineFormValidationMessageRequest>(uri, 1, 4, "FormValidationMessageRequest",
+ msgUncreatableType("FormValidationMessageRequest"));
+
// For now (1.x import), the latest revision matches the minor version of the import.
qmlRegisterRevision<QQuickWebEngineView, LATEST_WEBENGINEVIEW_REVISION>(uri, 1, LATEST_WEBENGINEVIEW_REVISION);
}
+
+private:
+ static QString msgUncreatableType(const char *className)
+ {
+ return tr("Cannot create separate instance of %1").arg(QLatin1String(className));
+ }
};
QT_END_NAMESPACE
diff --git a/src/webengine/plugin/plugin.pro b/src/webengine/plugin/plugin.pro
index 2fbadfc97..56eb7bd3c 100644
--- a/src/webengine/plugin/plugin.pro
+++ b/src/webengine/plugin/plugin.pro
@@ -1,7 +1,7 @@
CXX_MODULE = qml
TARGET = qtwebengineplugin
TARGETPATH = QtWebEngine
-IMPORT_VERSION = 1.3
+IMPORT_VERSION = 1.4
QT += webengine qml quick
QT_PRIVATE += webengine-private
diff --git a/src/webengine/plugin/plugins.qmltypes b/src/webengine/plugin/plugins.qmltypes
index 23ba77235..304bfd6b7 100644
--- a/src/webengine/plugin/plugins.qmltypes
+++ b/src/webengine/plugin/plugins.qmltypes
@@ -4,24 +4,35 @@ import QtQuick.tooling 1.2
// It is used for QML tooling purposes only.
//
// This file was auto-generated by:
-// 'qmlplugindump -nonrelocatable -defaultplatform QtWebEngine 1.3'
+// 'qmlplugindump -defaultplatform -dependencies dependencies.json -nonrelocatable QtWebEngine 1.4'
Module {
- dependencies: [
- "Qt.labs.folderlistmodel 2.1",
- "Qt.labs.settings 1.0",
- "QtGraphicalEffects 1.0",
- "QtQml.Models 2.2",
- "QtQuick 2.6",
- "QtQuick.Controls 1.5",
- "QtQuick.Controls.Styles 1.4",
- "QtQuick.Dialogs 1.2",
- "QtQuick.Extras 1.4",
- "QtQuick.Extras.Private.CppUtils 1.1",
- "QtQuick.Layouts 1.1",
- "QtQuick.PrivateWidgets 1.1",
- "QtQuick.Window 2.2"
- ]
+ dependencies: ["QtQuick 2.6"]
+ Component {
+ name: "QQuickWebEngineAuthenticationDialogRequest"
+ prototype: "QObject"
+ exports: ["QtWebEngine/AuthenticationDialogRequest 1.4"]
+ isCreatable: false
+ exportMetaObjectRevisions: [0]
+ Enum {
+ name: "AuthenticationType"
+ values: {
+ "AuthenticationTypeHTTP": 0,
+ "AuthenticationTypeProxy": 1
+ }
+ }
+ Property { name: "url"; type: "QUrl"; isReadonly: true }
+ Property { name: "realm"; type: "string"; isReadonly: true }
+ Property { name: "proxyHost"; type: "string"; isReadonly: true }
+ Property { name: "type"; type: "AuthenticationType"; isReadonly: true }
+ Property { name: "accepted"; type: "bool" }
+ Method {
+ name: "dialogAccept"
+ Parameter { name: "user"; type: "string" }
+ Parameter { name: "password"; type: "string" }
+ }
+ Method { name: "dialogReject" }
+ }
Component {
name: "QQuickWebEngineCertificateError"
prototype: "QObject"
@@ -43,7 +54,9 @@ Module {
"CertificateWeakSignatureAlgorithm": -208,
"CertificateNonUniqueName": -210,
"CertificateWeakKey": -211,
- "CertificateNameConstraintViolation": -212
+ "CertificateNameConstraintViolation": -212,
+ "CertificateValidityTooLong": -213,
+ "CertificateTransparencyRequired": -214
}
}
Property { name: "url"; type: "QUrl"; isReadonly: true }
@@ -55,15 +68,60 @@ Module {
Method { name: "rejectCertificate" }
}
Component {
+ name: "QQuickWebEngineColorDialogRequest"
+ prototype: "QObject"
+ exports: ["QtWebEngine/ColorDialogRequest 1.4"]
+ isCreatable: false
+ exportMetaObjectRevisions: [0]
+ Property { name: "color"; type: "QColor"; isReadonly: true }
+ Property { name: "accepted"; type: "bool" }
+ Method {
+ name: "dialogAccept"
+ Parameter { name: "color"; type: "QColor" }
+ }
+ Method { name: "dialogReject" }
+ }
+ Component {
+ name: "QQuickWebEngineContextMenuRequest"
+ prototype: "QObject"
+ exports: ["QtWebEngine/ContextMenuRequest 1.4"]
+ isCreatable: false
+ exportMetaObjectRevisions: [0]
+ Enum {
+ name: "MediaType"
+ values: {
+ "MediaTypeNone": 0,
+ "MediaTypeImage": 1,
+ "MediaTypeVideo": 2,
+ "MediaTypeAudio": 3,
+ "MediaTypeCanvas": 4,
+ "MediaTypeFile": 5,
+ "MediaTypePlugin": 6
+ }
+ }
+ Property { name: "x"; type: "int"; isReadonly: true }
+ Property { name: "y"; type: "int"; isReadonly: true }
+ Property { name: "selectedText"; type: "string"; isReadonly: true }
+ Property { name: "linkText"; type: "string"; isReadonly: true }
+ Property { name: "linkUrl"; type: "QUrl"; isReadonly: true }
+ Property { name: "mediaUrl"; type: "QUrl"; isReadonly: true }
+ Property { name: "mediaType"; type: "MediaType"; isReadonly: true }
+ Property { name: "isContentEditable"; type: "bool"; isReadonly: true }
+ Property { name: "misspelledWord"; type: "string"; isReadonly: true }
+ Property { name: "spellCheckerSuggestions"; type: "QStringList"; isReadonly: true }
+ Property { name: "accepted"; type: "bool" }
+ }
+ Component {
name: "QQuickWebEngineDownloadItem"
prototype: "QObject"
exports: [
"QtWebEngine/WebEngineDownloadItem 1.1",
"QtWebEngine/WebEngineDownloadItem 1.2",
- "QtWebEngine/WebEngineDownloadItem 1.3"
+ "QtWebEngine/WebEngineDownloadItem 1.3",
+ "QtWebEngine/WebEngineDownloadItem 1.4"
]
isCreatable: false
- exportMetaObjectRevisions: [0, 1, 2]
+ exportMetaObjectRevisions: [0, 1, 2, 3]
Enum {
name: "DownloadState"
values: {
@@ -83,6 +141,15 @@ Module {
"MimeHtmlSaveFormat": 2
}
}
+ Enum {
+ name: "DownloadType"
+ values: {
+ "Attachment": 0,
+ "DownloadAttribute": 1,
+ "UserRequested": 2,
+ "SavePage": 3
+ }
+ }
Property { name: "id"; type: "uint"; isReadonly: true }
Property { name: "state"; type: "DownloadState"; isReadonly: true }
Property { name: "savePageFormat"; revision: 2; type: "SavePageFormat" }
@@ -90,12 +157,59 @@ Module {
Property { name: "receivedBytes"; type: "qlonglong"; isReadonly: true }
Property { name: "mimeType"; revision: 1; type: "string"; isReadonly: true }
Property { name: "path"; type: "string" }
+ Property { name: "type"; revision: 3; type: "DownloadType"; isReadonly: true }
Signal { name: "savePageFormatChanged"; revision: 2 }
Signal { name: "mimeTypeChanged"; revision: 1 }
+ Signal { name: "typeChanged"; revision: 3 }
Method { name: "accept" }
Method { name: "cancel" }
}
Component {
+ name: "QQuickWebEngineFileDialogRequest"
+ prototype: "QObject"
+ exports: ["QtWebEngine/FileDialogRequest 1.4"]
+ isCreatable: false
+ exportMetaObjectRevisions: [0]
+ Enum {
+ name: "FileMode"
+ values: {
+ "FileModeOpen": 0,
+ "FileModeOpenMultiple": 1,
+ "FileModeUploadFolder": 2,
+ "FileModeSave": 3
+ }
+ }
+ Property { name: "defaultFileName"; type: "string"; isReadonly: true }
+ Property { name: "acceptedMimeTypes"; type: "QStringList"; isReadonly: true }
+ Property { name: "mode"; type: "FileMode"; isReadonly: true }
+ Property { name: "accepted"; type: "bool" }
+ Method {
+ name: "dialogAccept"
+ Parameter { name: "files"; type: "QStringList" }
+ }
+ Method { name: "dialogReject" }
+ }
+ Component {
+ name: "QQuickWebEngineFormValidationMessageRequest"
+ prototype: "QObject"
+ exports: ["QtWebEngine/FormValidationMessageRequest 1.4"]
+ isCreatable: false
+ exportMetaObjectRevisions: [0]
+ Enum {
+ name: "RequestType"
+ values: {
+ "RequestTypeShow": 0,
+ "RequestTypeHide": 1,
+ "RequestTypeMove": 2
+ }
+ }
+ Property { name: "anchor"; type: "QRect"; isReadonly: true }
+ Property { name: "text"; type: "string"; isReadonly: true }
+ Property { name: "subText"; type: "string"; isReadonly: true }
+ Property { name: "type"; type: "RequestType"; isReadonly: true }
+ Property { name: "accepted"; type: "bool" }
+ }
+ Component {
name: "QQuickWebEngineFullScreenRequest"
exports: ["QtWebEngine/FullScreenRequest 1.1"]
isCreatable: false
@@ -139,6 +253,34 @@ Module {
exportMetaObjectRevisions: [0]
}
Component {
+ name: "QQuickWebEngineJavaScriptDialogRequest"
+ prototype: "QObject"
+ exports: ["QtWebEngine/JavaScriptDialogRequest 1.4"]
+ isCreatable: false
+ exportMetaObjectRevisions: [0]
+ Enum {
+ name: "DialogType"
+ values: {
+ "DialogTypeAlert": 0,
+ "DialogTypeConfirm": 1,
+ "DialogTypePrompt": 2,
+ "DialogTypeBeforeUnload": 3
+ }
+ }
+ Property { name: "message"; type: "string"; isReadonly: true }
+ Property { name: "defaultText"; type: "string"; isReadonly: true }
+ Property { name: "title"; type: "string"; isReadonly: true }
+ Property { name: "type"; type: "DialogType"; isReadonly: true }
+ Property { name: "securityOrigin"; type: "QUrl"; isReadonly: true }
+ Property { name: "accepted"; type: "bool" }
+ Method {
+ name: "dialogAccept"
+ Parameter { name: "text"; type: "string" }
+ }
+ Method { name: "dialogAccept" }
+ Method { name: "dialogReject" }
+ }
+ Component {
name: "QQuickWebEngineLoadRequest"
prototype: "QObject"
exports: ["QtWebEngine/WebEngineLoadRequest 1.0"]
@@ -188,9 +330,10 @@ Module {
exports: [
"QtWebEngine/WebEngineProfile 1.1",
"QtWebEngine/WebEngineProfile 1.2",
- "QtWebEngine/WebEngineProfile 1.3"
+ "QtWebEngine/WebEngineProfile 1.3",
+ "QtWebEngine/WebEngineProfile 1.4"
]
- exportMetaObjectRevisions: [0, 1, 2]
+ exportMetaObjectRevisions: [0, 1, 2, 3]
Enum {
name: "HttpCacheType"
values: {
@@ -216,7 +359,11 @@ Module {
Property { name: "httpAcceptLanguage"; revision: 1; type: "string" }
Property { name: "persistentCookiesPolicy"; type: "PersistentCookiesPolicy" }
Property { name: "httpCacheMaximumSize"; type: "int" }
+ Property { name: "spellCheckLanguages"; revision: 3; type: "QStringList" }
+ Property { name: "spellCheckEnabled"; revision: 3; type: "bool" }
Signal { name: "httpAcceptLanguageChanged"; revision: 1 }
+ Signal { name: "spellCheckLanguagesChanged"; revision: 3 }
+ Signal { name: "spellCheckEnabledChanged"; revision: 3 }
Signal {
name: "downloadRequested"
Parameter { name: "download"; type: "QQuickWebEngineDownloadItem"; isPointer: true }
@@ -310,10 +457,11 @@ Module {
exports: [
"QtWebEngine/WebEngineSettings 1.1",
"QtWebEngine/WebEngineSettings 1.2",
- "QtWebEngine/WebEngineSettings 1.3"
+ "QtWebEngine/WebEngineSettings 1.3",
+ "QtWebEngine/WebEngineSettings 1.4"
]
isCreatable: false
- exportMetaObjectRevisions: [0, 1, 2]
+ exportMetaObjectRevisions: [0, 1, 2, 3]
Property { name: "autoLoadImages"; type: "bool" }
Property { name: "javascriptEnabled"; type: "bool" }
Property { name: "javascriptCanOpenWindows"; type: "bool" }
@@ -333,12 +481,18 @@ Module {
Property { name: "accelerated2dCanvasEnabled"; revision: 2; type: "bool" }
Property { name: "autoLoadIconsForPage"; revision: 2; type: "bool" }
Property { name: "touchIconsEnabled"; revision: 2; type: "bool" }
+ Property { name: "focusOnNavigationEnabled"; revision: 3; type: "bool" }
+ Property { name: "printElementBackgrounds"; revision: 3; type: "bool" }
+ Property { name: "allowRunningInsecureContent"; revision: 3; type: "bool" }
Signal { name: "fullScreenSupportEnabledChanged"; revision: 1 }
Signal { name: "screenCaptureEnabledChanged"; revision: 2 }
Signal { name: "webGLEnabledChanged"; revision: 2 }
Signal { name: "accelerated2dCanvasEnabledChanged"; revision: 2 }
Signal { name: "autoLoadIconsForPageChanged"; revision: 2 }
Signal { name: "touchIconsEnabledChanged"; revision: 2 }
+ Signal { name: "focusOnNavigationEnabledChanged"; revision: 3 }
+ Signal { name: "printElementBackgroundsChanged"; revision: 3 }
+ Signal { name: "allowRunningInsecureContentChanged"; revision: 3 }
}
Component {
name: "QQuickWebEngineSingleton"
@@ -364,9 +518,10 @@ Module {
"QtWebEngine/WebEngineView 1.0",
"QtWebEngine/WebEngineView 1.1",
"QtWebEngine/WebEngineView 1.2",
- "QtWebEngine/WebEngineView 1.3"
+ "QtWebEngine/WebEngineView 1.3",
+ "QtWebEngine/WebEngineView 1.4"
]
- exportMetaObjectRevisions: [0, 1, 2, 3]
+ exportMetaObjectRevisions: [0, 1, 2, 3, 4]
Enum {
name: "NavigationRequestAction"
values: {
@@ -459,7 +614,8 @@ Module {
"RequestClose": 28,
"Unselect": 29,
"SavePage": 30,
- "WebActionCount": 31
+ "ViewSource": 31,
+ "WebActionCount": 32
}
}
Enum {
@@ -750,6 +906,44 @@ Module {
revision: 3
Parameter { type: "uint" }
}
+ Signal {
+ name: "contextMenuRequested"
+ revision: 4
+ Parameter { name: "request"; type: "QQuickWebEngineContextMenuRequest"; isPointer: true }
+ }
+ Signal {
+ name: "authenticationDialogRequested"
+ revision: 4
+ Parameter {
+ name: "request"
+ type: "QQuickWebEngineAuthenticationDialogRequest"
+ isPointer: true
+ }
+ }
+ Signal {
+ name: "javaScriptDialogRequested"
+ revision: 4
+ Parameter { name: "request"; type: "QQuickWebEngineJavaScriptDialogRequest"; isPointer: true }
+ }
+ Signal {
+ name: "colorDialogRequested"
+ revision: 4
+ Parameter { name: "request"; type: "QQuickWebEngineColorDialogRequest"; isPointer: true }
+ }
+ Signal {
+ name: "fileDialogRequested"
+ revision: 4
+ Parameter { name: "request"; type: "QQuickWebEngineFileDialogRequest"; isPointer: true }
+ }
+ Signal {
+ name: "formValidationMessageRequested"
+ revision: 4
+ Parameter {
+ name: "request"
+ type: "QQuickWebEngineFormValidationMessageRequest"
+ isPointer: true
+ }
+ }
Method {
name: "runJavaScript"
Parameter { type: "string" }
@@ -863,5 +1057,10 @@ Module {
revision: 3
Parameter { name: "callback"; type: "QJSValue" }
}
+ Method {
+ name: "replaceMisspelledWord"
+ revision: 4
+ Parameter { name: "replacement"; type: "string" }
+ }
}
}
diff --git a/src/webengine/plugin/testsupport/plugin.cpp b/src/webengine/plugin/testsupport/plugin.cpp
index e1252361e..9352e3666 100644
--- a/src/webengine/plugin/testsupport/plugin.cpp
+++ b/src/webengine/plugin/testsupport/plugin.cpp
@@ -46,7 +46,7 @@ QT_BEGIN_NAMESPACE
class QtWebEngineTestSupportPlugin : public QQmlExtensionPlugin
{
Q_OBJECT
- Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface/1.0")
+ Q_PLUGIN_METADATA(IID QQmlExtensionInterface_iid)
public:
virtual void registerTypes(const char *uri)
{
diff --git a/src/webengine/render_widget_host_view_qt_delegate_quick.cpp b/src/webengine/render_widget_host_view_qt_delegate_quick.cpp
index 48217f4a2..f79b0ca22 100644
--- a/src/webengine/render_widget_host_view_qt_delegate_quick.cpp
+++ b/src/webengine/render_widget_host_view_qt_delegate_quick.cpp
@@ -50,6 +50,11 @@
#include <private/qquickwindow_p.h>
#include <private/qsgcontext_p.h>
+#if (QT_VERSION < QT_VERSION_CHECK(5, 8, 0))
+#include <QSGSimpleRectNode>
+#include <QSGSimpleTextureNode>
+#endif
+
namespace QtWebEngineCore {
RenderWidgetHostViewQtDelegateQuick::RenderWidgetHostViewQtDelegateQuick(RenderWidgetHostViewQtDelegateClient *client, bool isPopup)
@@ -177,10 +182,33 @@ QSGLayer *RenderWidgetHostViewQtDelegateQuick::createLayer()
return renderContext->sceneGraphContext()->createLayer(renderContext);
}
-QSGImageNode *RenderWidgetHostViewQtDelegateQuick::createImageNode()
+QSGInternalImageNode *RenderWidgetHostViewQtDelegateQuick::createImageNode()
{
QSGRenderContext *renderContext = QQuickWindowPrivate::get(QQuickItem::window())->context;
+#if (QT_VERSION >= QT_VERSION_CHECK(5, 8, 0))
+ return renderContext->sceneGraphContext()->createInternalImageNode();
+#else
return renderContext->sceneGraphContext()->createImageNode();
+#endif
+}
+
+QSGTextureNode *RenderWidgetHostViewQtDelegateQuick::createTextureNode()
+{
+#if (QT_VERSION >= QT_VERSION_CHECK(5, 8, 0))
+ return QQuickItem::window()->createImageNode();
+#else
+ return new QSGSimpleTextureNode();
+#endif
+}
+
+QSGRectangleNode *RenderWidgetHostViewQtDelegateQuick::createRectangleNode()
+{
+#if (QT_VERSION >= QT_VERSION_CHECK(5, 8, 0))
+ return QQuickItem::window()->createRectangleNode();
+#else
+ QSGRenderContext *renderContext = QQuickWindowPrivate::get(QQuickItem::window())->context;
+ return renderContext->sceneGraphContext()->createRectangleNode();
+#endif
}
void RenderWidgetHostViewQtDelegateQuick::update()
diff --git a/src/webengine/render_widget_host_view_qt_delegate_quick.h b/src/webengine/render_widget_host_view_qt_delegate_quick.h
index 8d6a5d907..385a98a3c 100644
--- a/src/webengine/render_widget_host_view_qt_delegate_quick.h
+++ b/src/webengine/render_widget_host_view_qt_delegate_quick.h
@@ -66,13 +66,14 @@ public:
virtual QWindow* window() const Q_DECL_OVERRIDE;
virtual QSGTexture *createTextureFromImage(const QImage &) Q_DECL_OVERRIDE;
virtual QSGLayer *createLayer() Q_DECL_OVERRIDE;
- virtual QSGImageNode *createImageNode() Q_DECL_OVERRIDE;
+ virtual QSGInternalImageNode *createImageNode() Q_DECL_OVERRIDE;
+ virtual QSGTextureNode *createTextureNode() Q_DECL_OVERRIDE;
+ virtual QSGRectangleNode *createRectangleNode() Q_DECL_OVERRIDE;
virtual void update() Q_DECL_OVERRIDE;
virtual void updateCursor(const QCursor &) Q_DECL_OVERRIDE;
virtual void resize(int width, int height) Q_DECL_OVERRIDE;
virtual void move(const QPoint&) Q_DECL_OVERRIDE { }
virtual void inputMethodStateChanged(bool editorVisible) Q_DECL_OVERRIDE;
- virtual void setTooltip(const QString&) Q_DECL_OVERRIDE { }
// The QtQuick view doesn't have a backbuffer of its own and doesn't need this
virtual void setClearColor(const QColor &) Q_DECL_OVERRIDE { }
diff --git a/src/webengine/render_widget_host_view_qt_delegate_quickwindow.cpp b/src/webengine/render_widget_host_view_qt_delegate_quickwindow.cpp
index 64839c9fa..7b7d32d67 100644
--- a/src/webengine/render_widget_host_view_qt_delegate_quickwindow.cpp
+++ b/src/webengine/render_widget_host_view_qt_delegate_quickwindow.cpp
@@ -111,11 +111,21 @@ QSGLayer *RenderWidgetHostViewQtDelegateQuickWindow::createLayer()
return m_realDelegate->createLayer();
}
-QSGImageNode *RenderWidgetHostViewQtDelegateQuickWindow::createImageNode()
+QSGInternalImageNode *RenderWidgetHostViewQtDelegateQuickWindow::createImageNode()
{
return m_realDelegate->createImageNode();
}
+QSGTextureNode *RenderWidgetHostViewQtDelegateQuickWindow::createTextureNode()
+{
+ return m_realDelegate->createTextureNode();
+}
+
+QSGRectangleNode *RenderWidgetHostViewQtDelegateQuickWindow::createRectangleNode()
+{
+ return m_realDelegate->createRectangleNode();
+}
+
void RenderWidgetHostViewQtDelegateQuickWindow::update()
{
QQuickWindow::update();
@@ -138,9 +148,4 @@ void RenderWidgetHostViewQtDelegateQuickWindow::move(const QPoint &screenPos)
QQuickWindow::setPosition(screenPos);
}
-void RenderWidgetHostViewQtDelegateQuickWindow::setTooltip(const QString &tooltip)
-{
- Q_UNUSED(tooltip);
-}
-
} // namespace QtWebEngineCore
diff --git a/src/webengine/render_widget_host_view_qt_delegate_quickwindow.h b/src/webengine/render_widget_host_view_qt_delegate_quickwindow.h
index 699b4ce9e..d0a5e480c 100644
--- a/src/webengine/render_widget_host_view_qt_delegate_quickwindow.h
+++ b/src/webengine/render_widget_host_view_qt_delegate_quickwindow.h
@@ -69,13 +69,14 @@ public:
virtual QWindow* window() const Q_DECL_OVERRIDE;
virtual QSGTexture *createTextureFromImage(const QImage &) Q_DECL_OVERRIDE;
virtual QSGLayer *createLayer() Q_DECL_OVERRIDE;
- virtual QSGImageNode *createImageNode() Q_DECL_OVERRIDE;
+ virtual QSGInternalImageNode *createImageNode() Q_DECL_OVERRIDE;
+ virtual QSGTextureNode *createTextureNode() Q_DECL_OVERRIDE;
+ virtual QSGRectangleNode *createRectangleNode() Q_DECL_OVERRIDE;
virtual void update() Q_DECL_OVERRIDE;
virtual void updateCursor(const QCursor &) Q_DECL_OVERRIDE;
virtual void resize(int width, int height) Q_DECL_OVERRIDE;
virtual void move(const QPoint &screenPos) Q_DECL_OVERRIDE;
virtual void inputMethodStateChanged(bool) Q_DECL_OVERRIDE {}
- virtual void setTooltip(const QString &tooltip) Q_DECL_OVERRIDE;
virtual void setClearColor(const QColor &) Q_DECL_OVERRIDE { }
private:
diff --git a/src/webengine/ui/AuthenticationDialog.qml b/src/webengine/ui/AuthenticationDialog.qml
index 6a703b7df..a7eedd14d 100644
--- a/src/webengine/ui/AuthenticationDialog.qml
+++ b/src/webengine/ui/AuthenticationDialog.qml
@@ -44,8 +44,8 @@ import QtQuick.Layouts 1.0
import QtQuick.Window 2.2
Window {
- signal accepted(string user, string password);
- signal rejected;
+ signal accepted(string user, string password)
+ signal rejected
property alias text: message.text
title: qsTr("Authentication Required")
@@ -75,7 +75,7 @@ Window {
anchors.margins: 4
property int doubleMargins: anchors.margins * 2
Text {
- id: message;
+ id: message
color: palette.windowText
}
GridLayout {
@@ -88,7 +88,10 @@ Window {
id: userField
focus: true
Layout.fillWidth: true
- onAccepted: acceptDialog()
+ onAccepted: {
+ if (userField.text && passwordField.text)
+ acceptDialog();
+ }
}
Label {
text: qsTr("Password:")
@@ -98,7 +101,10 @@ Window {
id: passwordField
Layout.fillWidth: true
echoMode: TextInput.Password
- onAccepted: acceptDialog()
+ onAccepted: {
+ if (userField.text && passwordField.text)
+ acceptDialog();
+ }
}
}
Item {
diff --git a/src/webengine/ui/ColorDialog.qml b/src/webengine/ui/ColorDialog.qml
index 04af954b9..b74fd2cd7 100644
--- a/src/webengine/ui/ColorDialog.qml
+++ b/src/webengine/ui/ColorDialog.qml
@@ -45,6 +45,6 @@ ColorDialog {
signal selectedColor(var color)
onAccepted: {
- selectedColor(colorDialog.currentColor)
+ selectedColor(colorDialog.currentColor);
}
}
diff --git a/src/webengine/ui/FilePicker.qml b/src/webengine/ui/FilePicker.qml
index 07c8a3638..e6af977ba 100644
--- a/src/webengine/ui/FilePicker.qml
+++ b/src/webengine/ui/FilePicker.qml
@@ -41,7 +41,7 @@ import QtQuick.Dialogs 1.1
FileDialog {
- signal filesSelected(var fileList);
+ signal filesSelected(var fileList)
onAccepted: {
filesSelected(fileUrls);
diff --git a/src/webengine/ui/Menu.qml b/src/webengine/ui/Menu.qml
index 8e07b771c..36efa7680 100644
--- a/src/webengine/ui/Menu.qml
+++ b/src/webengine/ui/Menu.qml
@@ -45,7 +45,7 @@ Controls.Menu {
signal done()
// Use private API for now
- onAboutToHide: doneTimer.start();
+ onAboutToHide: doneTimer.start()
// WORKAROUND On Mac the Menu may be destroyed before the MenuItem
// is actually triggered (see qtbase commit 08cc9b9991ae9ab51)
diff --git a/src/webengine/ui/MessageBubble.qml b/src/webengine/ui/MessageBubble.qml
index c43e46474..056aac1fe 100644
--- a/src/webengine/ui/MessageBubble.qml
+++ b/src/webengine/ui/MessageBubble.qml
@@ -46,8 +46,8 @@ Item {
height: 1
property int maxWidth: 0
- property string mainText: "";
- property string subText: "";
+ property string mainText: ""
+ property string subText: ""
property int border: 1
@@ -111,40 +111,40 @@ Item {
property int messageBoxBottom: height - border
onPaint: {
- var ctx = getContext("2d")
+ var ctx = getContext("2d");
- ctx.lineWidth = bubble.border
- ctx.strokeStyle = "#555"
- ctx.fillStyle = "#ffffe1"
+ ctx.lineWidth = bubble.border;
+ ctx.strokeStyle = "#555";
+ ctx.fillStyle = "#ffffe1";
- ctx.beginPath()
+ ctx.beginPath();
- ctx.moveTo(messageBoxLeft + cornerRadius, messageBoxTop)
+ ctx.moveTo(messageBoxLeft + cornerRadius, messageBoxTop);
// Arrow
- ctx.lineTo(messageBoxLeft + bubble.arrowOffset, messageBoxTop)
- ctx.lineTo(messageBoxLeft + bubble.arrowOffset, messageBoxTop - bubble.arrowHeight)
- ctx.lineTo(messageBoxLeft + bubble.arrowOffset + bubble.arrowWidth, messageBoxTop)
+ ctx.lineTo(messageBoxLeft + bubble.arrowOffset, messageBoxTop);
+ ctx.lineTo(messageBoxLeft + bubble.arrowOffset, messageBoxTop - bubble.arrowHeight);
+ ctx.lineTo(messageBoxLeft + bubble.arrowOffset + bubble.arrowWidth, messageBoxTop);
// Message Box
- ctx.lineTo(messageBoxRight - cornerRadius, messageBoxTop)
- ctx.quadraticCurveTo(messageBoxRight, messageBoxTop, messageBoxRight, messageBoxTop + cornerRadius)
- ctx.lineTo(messageBoxRight, messageBoxBottom - cornerRadius)
- ctx.quadraticCurveTo(messageBoxRight, messageBoxBottom, messageBoxRight - cornerRadius, messageBoxBottom)
- ctx.lineTo(messageBoxLeft + cornerRadius, messageBoxBottom)
- ctx.quadraticCurveTo(messageBoxLeft, messageBoxBottom, messageBoxLeft, messageBoxBottom - cornerRadius)
- ctx.lineTo(messageBoxLeft, messageBoxTop + cornerRadius)
- ctx.quadraticCurveTo(messageBoxLeft, messageBoxTop, messageBoxLeft + cornerRadius, messageBoxTop)
-
- ctx.closePath()
-
- ctx.fill()
- ctx.stroke()
+ ctx.lineTo(messageBoxRight - cornerRadius, messageBoxTop);
+ ctx.quadraticCurveTo(messageBoxRight, messageBoxTop, messageBoxRight, messageBoxTop + cornerRadius);
+ ctx.lineTo(messageBoxRight, messageBoxBottom - cornerRadius);
+ ctx.quadraticCurveTo(messageBoxRight, messageBoxBottom, messageBoxRight - cornerRadius, messageBoxBottom);
+ ctx.lineTo(messageBoxLeft + cornerRadius, messageBoxBottom);
+ ctx.quadraticCurveTo(messageBoxLeft, messageBoxBottom, messageBoxLeft, messageBoxBottom - cornerRadius);
+ ctx.lineTo(messageBoxLeft, messageBoxTop + cornerRadius);
+ ctx.quadraticCurveTo(messageBoxLeft, messageBoxTop, messageBoxLeft + cornerRadius, messageBoxTop);
+
+ ctx.closePath();
+
+ ctx.fill();
+ ctx.stroke();
}
onPainted: {
- bubble.width = bubbleCanvas.width
- bubble.height = bubbleCanvas.height
+ bubble.width = bubbleCanvas.width;
+ bubble.height = bubbleCanvas.height;
}
}
}
diff --git a/src/webengine/ui/PromptDialog.qml b/src/webengine/ui/PromptDialog.qml
index 657bf7631..c4dcd6b98 100644
--- a/src/webengine/ui/PromptDialog.qml
+++ b/src/webengine/ui/PromptDialog.qml
@@ -43,45 +43,49 @@ import QtQuick.Layouts 1.0
import QtQuick 2.5
ApplicationWindow {
- signal input(string text);
- signal accepted;
- signal rejected;
- property alias text: message.text;
- property alias prompt: field.text;
+ signal input(string text)
+ signal accepted
+ signal rejected
+ property alias text: message.text
+ property alias prompt: field.text
width: 350
height: 100
flags: Qt.Dialog
+ onClosing: {
+ rejected();
+ }
+
function open() {
show();
}
ColumnLayout {
- anchors.fill: parent;
- anchors.margins: 4;
+ anchors.fill: parent
+ anchors.margins: 4
Text {
- id: message;
- Layout.fillWidth: true;
+ id: message
+ Layout.fillWidth: true
}
TextField {
- id:field;
- Layout.fillWidth: true;
+ id:field
+ Layout.fillWidth: true
}
RowLayout {
Layout.alignment: Qt.AlignRight
- spacing: 8;
+ spacing: 8
Button {
- text: "OK"
+ text: qsTr("OK")
onClicked: {
- input(field.text)
+ input(field.text);
accepted();
close();
destroy();
}
}
Button {
- text: "Cancel"
+ text: qsTr("Cancel")
onClicked: {
rejected();
close();
diff --git a/src/webengine/ui/ToolTip.qml b/src/webengine/ui/ToolTip.qml
new file mode 100644
index 000000000..96033e8f1
--- /dev/null
+++ b/src/webengine/ui/ToolTip.qml
@@ -0,0 +1,91 @@
+/****************************************************************************
+**
+** 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$
+**
+****************************************************************************/
+
+import QtQuick 2.5
+
+Item {
+ id: toolTipContainer
+ z: 9999
+ width: content.width
+ height: content.height
+ visible: false
+
+ property alias text: toolTip.text
+ property int delayTimerInterval: 1000
+ property int hideTimerInterval: 1500
+
+ Timer {
+ id: delayTimer
+ interval: delayTimerInterval
+ onTriggered: {
+ toolTipContainer.visible = true
+ hideTimer.start()
+ }
+ }
+
+ Timer {
+ id: hideTimer
+ interval: hideTimerInterval
+ onTriggered: toolTipContainer.visible = false
+ }
+
+ Rectangle {
+ id: content
+ color: "#f8eabf"
+ border.color: "black"
+ anchors.centerIn: parent
+ width: toolTip.contentWidth + 10
+ height: toolTip.contentHeight + 10
+ radius: 3
+
+ Text {
+ id: toolTip
+ anchors {fill: parent; margins: 5}
+ wrapMode: Text.WrapAnywhere
+ }
+ }
+
+ function open() {
+ delayTimer.start();
+ }
+
+ function hide() {
+ hideTimer.start();
+ }
+}
diff --git a/src/webengine/ui/qmldir b/src/webengine/ui/qmldir
index 69ebe1bad..e23b972be 100644
--- a/src/webengine/ui/qmldir
+++ b/src/webengine/ui/qmldir
@@ -1,4 +1,4 @@
-module QtWebEngine.UIDelegates
+module QtWebEngine.Controls1Delegates
AlertDialog 1.0 AlertDialog.qml
ConfirmDialog 1.0 ConfirmDialog.qml
FilePicker 1.0 FilePicker.qml
diff --git a/src/webengine/ui/ui.pro b/src/webengine/ui/ui.pro
index 249d7dcfd..bce03cc0c 100644
--- a/src/webengine/ui/ui.pro
+++ b/src/webengine/ui/ui.pro
@@ -1,4 +1,4 @@
-TARGETPATH = QtWebEngine/UIDelegates
+TARGETPATH = QtWebEngine/Controls1Delegates
QML_FILES += \
# Authentication Dialog
@@ -14,6 +14,7 @@ QML_FILES += \
MenuItem.qml \
MenuSeparator.qml \
# Message Bubble
- MessageBubble.qml
+ MessageBubble.qml \
+ ToolTip.qml
load(qml_module)
diff --git a/src/webengine/ui2/AlertDialog.qml b/src/webengine/ui2/AlertDialog.qml
new file mode 100644
index 000000000..4f63c5b70
--- /dev/null
+++ b/src/webengine/ui2/AlertDialog.qml
@@ -0,0 +1,98 @@
+/****************************************************************************
+**
+** 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$
+**
+****************************************************************************/
+
+import QtQuick 2.5
+import QtQuick.Controls 2.0 as Controls
+import QtQuick.Dialogs 1.2
+import QtQuick.Layouts 1.0
+
+Dialog {
+ property alias text: message.text
+ property bool handled: false
+ signal accepted()
+ signal rejected()
+ title: qsTr("Alert Dialog")
+ modality: Qt.NonModal
+
+ //handle the case where users simply closes the dialog
+ onVisibilityChanged: {
+ if (visible == false && handled == false) {
+ handled = true;
+ rejected();
+ } else {
+ handled = false;
+ }
+ }
+
+ function acceptDialog() {
+ accepted();
+ handled = true;
+ close();
+ }
+
+ contentItem: ColumnLayout {
+ id: rootLayout
+ anchors.fill: parent
+ anchors.margins: 4
+ property int minimumWidth: rootLayout.implicitWidth + rootLayout.doubleMargins
+ property int minimumHeight: rootLayout.implicitHeight + rootLayout.doubleMargins
+ property int doubleMargins: anchors.margins * 2
+ SystemPalette { id: palette; colorGroup: SystemPalette.Active }
+ RowLayout {
+ Layout.alignment: Qt.AlignRight
+ spacing: 8
+ Image {
+ source: "information.png"
+ }
+ Text {
+ id: message
+ Layout.fillWidth: true
+ color: palette.windowText
+ }
+ }
+ Item {
+ Layout.fillHeight: true
+ }
+ Controls.Button {
+ Layout.alignment: Qt.AlignHCenter
+ text: qsTr("OK")
+ onClicked: acceptDialog()
+ }
+ }
+}
diff --git a/src/webengine/ui2/AuthenticationDialog.qml b/src/webengine/ui2/AuthenticationDialog.qml
new file mode 100644
index 000000000..52fcce3f1
--- /dev/null
+++ b/src/webengine/ui2/AuthenticationDialog.qml
@@ -0,0 +1,135 @@
+/****************************************************************************
+**
+** 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$
+**
+****************************************************************************/
+
+import QtQuick 2.5
+import QtQuick.Controls 2.0 as Controls
+import QtQuick.Dialogs 1.2
+import QtQuick.Layouts 1.0
+
+Dialog {
+ property alias text: message.text
+ property bool handled: false
+ signal accepted(string user, string password)
+ signal rejected()
+ title: qsTr("Authentication Required")
+ modality: Qt.NonModal
+
+ //handle the case where users simply closes the dialog
+ onVisibilityChanged: {
+ if (visible == false && handled == false) {
+ handled = true;
+ rejected();
+ } else {
+ handled = false;
+ }
+ }
+
+ function acceptDialog() {
+ accepted(userField.text, passwordField.text);
+ handled = true;
+ close();
+ }
+
+ function rejectDialog() {
+ rejected();
+ handled = true;
+ close();
+ }
+
+ contentItem: ColumnLayout {
+ id: rootLayout
+ anchors.fill: parent
+ anchors.margins: 4
+ property int minimumWidth: rootLayout.implicitWidth + rootLayout.doubleMargins
+ property int minimumHeight: rootLayout.implicitHeight + rootLayout.doubleMargins
+
+ property int doubleMargins: anchors.margins * 2
+
+ SystemPalette { id: palette; colorGroup: SystemPalette.Active }
+ Text {
+ id: message
+ color: palette.windowText
+ }
+ GridLayout {
+ columns: 2
+ Controls.Label {
+ text: qsTr("Username:")
+ color: palette.windowText
+ }
+ Controls.TextField {
+ id: userField
+ focus: true
+ Layout.fillWidth: true
+ onAccepted: {
+ if (userField.text && passwordField.text)
+ acceptDialog();
+ }
+ }
+ Controls.Label {
+ text: qsTr("Password:")
+ color: palette.windowText
+ }
+ Controls.TextField {
+ id: passwordField
+ Layout.fillWidth: true
+ echoMode: TextInput.Password
+ onAccepted: {
+ if (userField.text && passwordField.text)
+ acceptDialog();
+ }
+ }
+ }
+ Item {
+ Layout.fillHeight: true
+ }
+ RowLayout {
+ Layout.alignment: Qt.AlignRight
+ spacing: 8
+ Controls.Button {
+ id: cancelButton
+ text: qsTr("Cancel")
+ onClicked: rejectDialog()
+ }
+ Controls.Button {
+ text: qsTr("Log In")
+ onClicked: acceptDialog()
+ }
+ }
+ }
+}
diff --git a/src/webengine/ui2/ConfirmDialog.qml b/src/webengine/ui2/ConfirmDialog.qml
new file mode 100644
index 000000000..0649d3654
--- /dev/null
+++ b/src/webengine/ui2/ConfirmDialog.qml
@@ -0,0 +1,111 @@
+/****************************************************************************
+**
+** 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$
+**
+****************************************************************************/
+
+import QtQuick 2.5
+import QtQuick.Controls 2.0 as Controls
+import QtQuick.Dialogs 1.2
+import QtQuick.Layouts 1.0
+
+Dialog {
+ property alias text: message.text
+ property bool handled: false
+ signal accepted()
+ signal rejected()
+ title: qsTr("Alert Dialog")
+ modality: Qt.NonModal
+
+ //handle the case where users simply closes the dialog
+ onVisibilityChanged: {
+ if (visible == false && handled == false) {
+ handled = true;
+ rejected();
+ } else {
+ handled = false;
+ }
+ }
+
+ function acceptDialog() {
+ accepted();
+ handled = true;
+ close();
+ }
+
+ function rejectDialog() {
+ rejected();
+ handled = true;
+ close();
+ }
+
+ contentItem: ColumnLayout {
+ id: rootLayout
+ anchors.fill: parent
+ anchors.margins: 4
+ property int minimumWidth: rootLayout.implicitWidth + rootLayout.doubleMargins
+ property int minimumHeight: rootLayout.implicitHeight + rootLayout.doubleMargins
+ property int doubleMargins: anchors.margins * 2
+ SystemPalette { id: palette; colorGroup: SystemPalette.Active }
+ RowLayout {
+ Layout.alignment: Qt.AlignRight
+ spacing: 8
+ Image {
+ source: "question.png"
+ }
+ Text {
+ id: message
+ Layout.fillWidth: true
+ color: palette.windowText
+ }
+ }
+ Item {
+ Layout.fillHeight: true
+ }
+ RowLayout {
+ Layout.alignment: Qt.AlignRight
+ spacing: 8
+ Controls.Button {
+ text: qsTr("OK")
+ onClicked: acceptDialog()
+ }
+ Controls.Button {
+ text: qsTr("Cancel")
+ onClicked: rejectDialog()
+ }
+ }
+ }
+}
diff --git a/src/webengine/ui2/Menu.qml b/src/webengine/ui2/Menu.qml
new file mode 100644
index 000000000..0e7b869f5
--- /dev/null
+++ b/src/webengine/ui2/Menu.qml
@@ -0,0 +1,57 @@
+/****************************************************************************
+**
+** 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$
+**
+****************************************************************************/
+
+import QtQuick 2.5
+import QtQuick.Controls 2.0 as Controls
+
+Controls.Menu {
+ id: menu
+ signal done()
+
+ // Use private API for now
+ onAboutToHide: doneTimer.start()
+
+ // WORKAROUND On Mac the Menu may be destroyed before the MenuItem
+ // is actually triggered (see qtbase commit 08cc9b9991ae9ab51)
+ Timer {
+ id: doneTimer
+ interval: 100
+ onTriggered: menu.done()
+ }
+}
diff --git a/src/webengine/ui2/MenuItem.qml b/src/webengine/ui2/MenuItem.qml
new file mode 100644
index 000000000..9bf8aac5e
--- /dev/null
+++ b/src/webengine/ui2/MenuItem.qml
@@ -0,0 +1,44 @@
+/****************************************************************************
+**
+** 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$
+**
+****************************************************************************/
+
+import QtQuick 2.5
+import QtQuick.Controls 2.0 as Controls
+
+Controls.MenuItem { }
+
diff --git a/src/webengine/ui2/MenuSeparator.qml b/src/webengine/ui2/MenuSeparator.qml
new file mode 100644
index 000000000..0c664084a
--- /dev/null
+++ b/src/webengine/ui2/MenuSeparator.qml
@@ -0,0 +1,42 @@
+/****************************************************************************
+**
+** 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$
+**
+****************************************************************************/
+
+import QtQuick 2.5
+
+Item { id: dummy }
diff --git a/src/webengine/ui2/PromptDialog.qml b/src/webengine/ui2/PromptDialog.qml
new file mode 100644
index 000000000..880213e36
--- /dev/null
+++ b/src/webengine/ui2/PromptDialog.qml
@@ -0,0 +1,114 @@
+/****************************************************************************
+**
+** 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$
+**
+****************************************************************************/
+
+import QtQuick 2.5
+import QtQuick.Controls 2.0 as Controls
+import QtQuick.Layouts 1.0
+import QtQuick.Dialogs 1.2
+
+Dialog {
+ property alias text: message.text
+ property alias prompt: field.text
+ property bool handled: false
+ signal input(string text)
+ signal accepted()
+ signal rejected()
+ title: qsTr("Prompt Dialog")
+ modality: Qt.NonModal
+
+ //handle the case where users simply closes the dialog
+ onVisibilityChanged: {
+ if (visible == false && handled == false) {
+ handled = true;
+ rejected();
+ } else {
+ handled = false;
+ }
+ }
+
+ function acceptDialog() {
+ input(field.text);
+ accepted();
+ handled = true;
+ close();
+ }
+
+ function rejectDialog() {
+ rejected();
+ handled = true;
+ close();
+ }
+
+ contentItem: ColumnLayout {
+ id: rootLayout
+ anchors.fill: parent
+ anchors.margins: 4
+ property int minimumWidth: rootLayout.implicitWidth + rootLayout.doubleMargins
+ property int minimumHeight: rootLayout.implicitHeight + rootLayout.doubleMargins
+ property int doubleMargins: anchors.margins * 2
+ SystemPalette { id: palette; colorGroup: SystemPalette.Active }
+ Text {
+ id: message
+ Layout.fillWidth: true
+ color: palette.windowText
+ }
+ Controls.TextField {
+ id:field
+ focus: true
+ Layout.fillWidth: true
+ onAccepted: acceptDialog()
+ }
+ Item {
+ Layout.fillHeight: true
+ }
+ RowLayout {
+ Layout.alignment: Qt.AlignRight
+ spacing: 8
+ Controls.Button {
+ text: qsTr("OK")
+ onClicked: acceptDialog()
+ }
+ Controls.Button {
+ text: qsTr("Cancel")
+ onClicked: rejectDialog()
+ }
+ }
+ }
+
+}
diff --git a/src/webengine/ui2/ToolTip.qml b/src/webengine/ui2/ToolTip.qml
new file mode 100644
index 000000000..91645a0f4
--- /dev/null
+++ b/src/webengine/ui2/ToolTip.qml
@@ -0,0 +1,45 @@
+/****************************************************************************
+**
+** 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$
+**
+****************************************************************************/
+
+import QtQuick.Controls 2.0
+
+ToolTip {
+ delay: 1000
+ timeout: 1500
+}
diff --git a/src/webengine/ui2/information.png b/src/webengine/ui2/information.png
new file mode 100644
index 000000000..0a2eb87d1
--- /dev/null
+++ b/src/webengine/ui2/information.png
Binary files differ
diff --git a/src/webengine/ui2/qmldir b/src/webengine/ui2/qmldir
new file mode 100644
index 000000000..8ab0d3671
--- /dev/null
+++ b/src/webengine/ui2/qmldir
@@ -0,0 +1,2 @@
+# Internal module
+module QtWebEngine/Controls2Delegates
diff --git a/src/webengine/ui2/question.png b/src/webengine/ui2/question.png
new file mode 100644
index 000000000..2dd92fd79
--- /dev/null
+++ b/src/webengine/ui2/question.png
Binary files differ
diff --git a/src/webengine/ui2/ui2.pro b/src/webengine/ui2/ui2.pro
new file mode 100644
index 000000000..4628d40b5
--- /dev/null
+++ b/src/webengine/ui2/ui2.pro
@@ -0,0 +1,18 @@
+TARGETPATH = QtWebEngine/Controls2Delegates
+
+QML_FILES += \
+ # Authentication Dialog
+ AuthenticationDialog.qml \
+ # JS Dialogs
+ AlertDialog.qml \
+ ConfirmDialog.qml \
+ PromptDialog.qml \
+ # Menus. Based on Qt Quick Controls
+ Menu.qml \
+ MenuItem.qml \
+ MenuSeparator.qml \
+ ToolTip.qml \
+ information.png \
+ question.png
+
+load(qml_module)
diff --git a/src/webengine/ui_delegates_manager.cpp b/src/webengine/ui_delegates_manager.cpp
index 6ff12b53f..a37484023 100644
--- a/src/webengine/ui_delegates_manager.cpp
+++ b/src/webengine/ui_delegates_manager.cpp
@@ -50,6 +50,10 @@
#include <QQmlContext>
#include <QQmlEngine>
#include <QQmlProperty>
+#include <QCursor>
+#include <QList>
+#include <QScreen>
+#include <QGuiApplication>
// Uncomment for QML debugging
//#define UI_DELEGATES_DEBUG
@@ -77,20 +81,29 @@ static QString fileNameForComponent(UIDelegatesManager::ComponentType type)
return QString();
}
-static QString getUIDelegatesImportDir(QQmlEngine *engine) {
- static QString importDir;
- static bool initialized = false;
- if (initialized)
- return importDir;
- Q_FOREACH (const QString &path, engine->importPathList()) {
- QFileInfo fi(path % QLatin1String("/QtWebEngine/UIDelegates/"));
- if (fi.exists()) {
- importDir = fi.absolutePath();
- break;
- }
- }
- initialized = true;
- return importDir;
+static QPoint calculateToolTipPosition(QPoint &position, QSize &toolTip) {
+ QRect screen;
+ QList<QScreen *> screens = QGuiApplication::screens();
+ Q_FOREACH (const QScreen *src, screens)
+ if (src->availableGeometry().contains(position))
+ screen = src->availableGeometry();
+
+ position += QPoint(2, 16);
+
+ if (position.x() + toolTip.width() > screen.x() + screen.width())
+ position.rx() -= 4 + toolTip.width();
+ if (position.y() + toolTip.height() > screen.y() + screen.height())
+ position.ry() -= 24 + toolTip.height();
+ if (position.y() < screen.y())
+ position.setY(screen.y());
+ if (position.x() + toolTip.width() > screen.x() + screen.width())
+ position.setX(screen.x() + screen.width() - toolTip.width());
+ if (position.x() < screen.x())
+ position.setX(screen.x());
+ if (position.y() + toolTip.height() > screen.y() + screen.height())
+ position.setY(screen.y() + screen.height() - toolTip.height());
+
+ return position;
}
const char *defaultPropertyName(QObject *obj)
@@ -116,20 +129,37 @@ MenuItemHandler::MenuItemHandler(QObject *parent)
UIDelegatesManager::UIDelegatesManager(QQuickWebEngineView *view)
: m_view(view)
, m_messageBubbleItem(0)
+ , m_toolTip(nullptr)
FOR_EACH_COMPONENT_TYPE(COMPONENT_MEMBER_INIT, NO_SEPARATOR)
{
}
+UIDelegatesManager::~UIDelegatesManager()
+{
+}
+
#define COMPONENT_MEMBER_CASE_STATEMENT(TYPE, COMPONENT) \
case TYPE: \
component = &COMPONENT##Component; \
break;
+bool UIDelegatesManager::initializeImportDirs(QStringList &dirs, QQmlEngine *engine) {
+ foreach (const QString &path, engine->importPathList()) {
+ QFileInfo fi(path % QLatin1String("/QtWebEngine/Controls1Delegates/"));
+ if (fi.exists()) {
+ dirs << fi.absolutePath();
+ return true;
+ }
+ }
+ return false;
+}
+
bool UIDelegatesManager::ensureComponentLoaded(ComponentType type)
{
QQmlEngine* engine = qmlEngine(m_view);
- if (getUIDelegatesImportDir(engine).isNull())
+ if (m_importDirs.isEmpty() && !initializeImportDirs(m_importDirs, engine))
return false;
+
QQmlComponent **component;
switch (type) {
FOR_EACH_COMPONENT_TYPE(COMPONENT_MEMBER_CASE_STATEMENT, NO_SEPARATOR)
@@ -146,20 +176,25 @@ bool UIDelegatesManager::ensureComponentLoaded(ComponentType type)
#endif
if (!engine)
return false;
- QFileInfo fi(getUIDelegatesImportDir(engine) % QLatin1Char('/') % fileName);
- if (!fi.exists())
- return false;
- // FIXME: handle async loading
- *component = (new QQmlComponent(engine, QUrl::fromLocalFile(fi.absoluteFilePath()), QQmlComponent::PreferSynchronous, m_view));
-
- if ((*component)->status() != QQmlComponent::Ready) {
- Q_FOREACH (const QQmlError& err, (*component)->errors())
- qWarning("QtWebEngine: component error: %s\n", qPrintable(err.toString()));
- delete *component;
- *component = 0;
- return false;
+
+ foreach (const QString &importDir, m_importDirs) {
+ QFileInfo fi(importDir % QLatin1Char('/') % fileName);
+ if (!fi.exists())
+ continue;
+ // FIXME: handle async loading
+ *component = (new QQmlComponent(engine, QUrl::fromLocalFile(fi.absoluteFilePath()),
+ QQmlComponent::PreferSynchronous, m_view));
+
+ if ((*component)->status() != QQmlComponent::Ready) {
+ foreach (const QQmlError &err, (*component)->errors())
+ qWarning("QtWebEngine: component error: %s\n", qPrintable(err.toString()));
+ delete *component;
+ *component = nullptr;
+ return false;
+ }
+ return true;
}
- return true;
+ return false;
}
#define CHECK_QML_SIGNAL_PROPERTY(prop, location) \
@@ -211,11 +246,11 @@ QObject *UIDelegatesManager::addMenu(QObject *parentMenu, const QString &title,
{
Q_ASSERT(parentMenu);
if (!ensureComponentLoaded(Menu))
- return 0;
+ return nullptr;
QQmlContext *context = qmlContext(m_view);
QObject *menu = menuComponent->beginCreate(context);
// set visual parent for non-Window-based menus
- if (QQuickItem* item = qobject_cast<QQuickItem*>(menu))
+ if (QQuickItem *item = qobject_cast<QQuickItem*>(menu))
item->setParentItem(m_view);
if (!title.isEmpty())
@@ -291,7 +326,7 @@ void UIDelegatesManager::showDialog(QSharedPointer<JavaScriptDialogController> d
QQmlContext *context = qmlContext(m_view);
QObject *dialog = dialogComponent->beginCreate(context);
// set visual parent for non-Window-based dialogs
- if (QQuickItem* item = qobject_cast<QQuickItem*>(dialog))
+ if (QQuickItem *item = qobject_cast<QQuickItem*>(dialog))
item->setParentItem(m_view);
dialog->setParent(m_view);
QQmlProperty textProp(dialog, QStringLiteral("text"));
@@ -317,8 +352,6 @@ void UIDelegatesManager::showDialog(QSharedPointer<JavaScriptDialogController> d
CHECK_QML_SIGNAL_PROPERTY(inputSignal, dialogComponent->url());
static int setTextIndex = dialogController->metaObject()->indexOfSlot("textProvided(QString)");
QObject::connect(dialog, inputSignal.method(), dialogController.data(), dialogController->metaObject()->method(setTextIndex));
- QQmlProperty closingSignal(dialog, QStringLiteral("onClosing"));
- QObject::connect(dialog, closingSignal.method(), dialogController.data(), dialogController->metaObject()->method(rejectIndex));
}
dialogComponent->completeCreate();
@@ -339,7 +372,7 @@ void UIDelegatesManager::showColorDialog(QSharedPointer<ColorChooserController>
QQmlContext *context = qmlContext(m_view);
QObject *colorDialog = colorDialogComponent->beginCreate(context);
- if (QQuickItem* item = qobject_cast<QQuickItem*>(colorDialog))
+ if (QQuickItem *item = qobject_cast<QQuickItem*>(colorDialog))
item->setParentItem(m_view);
colorDialog->setParent(m_view);
@@ -379,7 +412,7 @@ void UIDelegatesManager::showDialog(QSharedPointer<AuthenticationDialogControlle
QQmlContext *context = qmlContext(m_view);
QObject *authenticationDialog = authenticationDialogComponent->beginCreate(context);
// set visual parent for non-Window-based dialogs
- if (QQuickItem* item = qobject_cast<QQuickItem*>(authenticationDialog))
+ if (QQuickItem *item = qobject_cast<QQuickItem*>(authenticationDialog))
item->setParentItem(m_view);
authenticationDialog->setParent(m_view);
@@ -412,7 +445,7 @@ void UIDelegatesManager::showDialog(QSharedPointer<AuthenticationDialogControlle
QMetaObject::invokeMethod(authenticationDialog, "open");
}
-void UIDelegatesManager::showFilePicker(FilePickerController *controller)
+void UIDelegatesManager::showFilePicker(QSharedPointer<FilePickerController> controller)
{
if (!ensureComponentLoaded(FilePicker))
@@ -420,7 +453,7 @@ void UIDelegatesManager::showFilePicker(FilePickerController *controller)
QQmlContext *context = qmlContext(m_view);
QObject *filePicker = filePickerComponent->beginCreate(context);
- if (QQuickItem* item = qobject_cast<QQuickItem*>(filePicker))
+ if (QQuickItem *item = qobject_cast<QQuickItem*>(filePicker))
item->setParentItem(m_view);
filePicker->setParent(m_view);
filePickerComponent->completeCreate();
@@ -442,16 +475,14 @@ void UIDelegatesManager::showFilePicker(FilePickerController *controller)
Q_UNREACHABLE();
}
- controller->setParent(filePicker);
-
QQmlProperty filesPickedSignal(filePicker, QStringLiteral("onFilesSelected"));
CHECK_QML_SIGNAL_PROPERTY(filesPickedSignal, filePickerComponent->url());
QQmlProperty rejectSignal(filePicker, QStringLiteral("onRejected"));
CHECK_QML_SIGNAL_PROPERTY(rejectSignal, filePickerComponent->url());
static int acceptedIndex = controller->metaObject()->indexOfSlot("accepted(QVariant)");
- QObject::connect(filePicker, filesPickedSignal.method(), controller, controller->metaObject()->method(acceptedIndex));
+ QObject::connect(filePicker, filesPickedSignal.method(), controller.data(), controller->metaObject()->method(acceptedIndex));
static int rejectedIndex = controller->metaObject()->indexOfSlot("rejected()");
- QObject::connect(filePicker, rejectSignal.method(), controller, controller->metaObject()->method(rejectedIndex));
+ QObject::connect(filePicker, rejectSignal.method(), controller.data(), controller->metaObject()->method(rejectedIndex));
// delete when done.
static int deleteLaterIndex = filePicker->metaObject()->indexOfSlot("deleteLater()");
@@ -461,6 +492,11 @@ void UIDelegatesManager::showFilePicker(FilePickerController *controller)
QMetaObject::invokeMethod(filePicker, "open");
}
+void UIDelegatesManager::showMenu(QObject *menu)
+{
+ QMetaObject::invokeMethod(menu, "popup");
+}
+
void UIDelegatesManager::showMessageBubble(const QRect &anchor, const QString &mainText, const QString &subText)
{
if (!ensureComponentLoaded(MessageBubble))
@@ -487,10 +523,125 @@ void UIDelegatesManager::hideMessageBubble()
void UIDelegatesManager::moveMessageBubble(const QRect &anchor)
{
- Q_ASSERT(!m_messageBubbleItem.isNull());
+ if (m_messageBubbleItem.isNull())
+ return;
QQmlProperty(m_messageBubbleItem.data(), QStringLiteral("x")).write(anchor.x());
QQmlProperty(m_messageBubbleItem.data(), QStringLiteral("y")).write(anchor.y() + anchor.size().height());
}
+void UIDelegatesManager::showToolTip(const QString &text)
+{
+ if (!ensureComponentLoaded(ToolTip))
+ return;
+
+ if (text.isEmpty()) {
+ m_toolTip.reset();
+ return;
+ }
+
+ if (!m_toolTip.isNull())
+ return;
+
+ QQmlContext *context = qmlContext(m_view);
+ m_toolTip.reset(toolTipComponent->beginCreate(context));
+ if (QQuickItem *item = qobject_cast<QQuickItem *>(m_toolTip.data()))
+ item->setParentItem(m_view);
+ m_toolTip->setParent(m_view);
+ toolTipComponent->completeCreate();
+
+ QQmlProperty(m_toolTip.data(), QStringLiteral("text")).write(text);
+
+ int height = QQmlProperty(m_toolTip.data(), QStringLiteral("height")).read().toInt();
+ int width = QQmlProperty(m_toolTip.data(), QStringLiteral("width")).read().toInt();
+ QSize toolTipSize(width, height);
+ QPoint position = m_view->cursor().pos();
+ position = m_view->mapFromGlobal(calculateToolTipPosition(position, toolTipSize)).toPoint();
+
+ QQmlProperty(m_toolTip.data(), QStringLiteral("x")).write(position.x());
+ QQmlProperty(m_toolTip.data(), QStringLiteral("y")).write(position.y());
+
+ QMetaObject::invokeMethod(m_toolTip.data(), "open");
+}
+
+UI2DelegatesManager::UI2DelegatesManager(QQuickWebEngineView *view) : UIDelegatesManager(view)
+{
+
+}
+
+bool UI2DelegatesManager::initializeImportDirs(QStringList &dirs, QQmlEngine *engine)
+{
+ foreach (const QString &path, engine->importPathList()) {
+ QFileInfo fi1(path % QLatin1String("/QtWebEngine/Controls1Delegates/"));
+ QFileInfo fi2(path % QLatin1String("/QtWebEngine/Controls2Delegates/"));
+ if (fi1.exists() && fi2.exists()) {
+ dirs << fi2.absolutePath() << fi1.absolutePath();
+ return true;
+ }
+ }
+ return false;
+}
+
+QObject *UI2DelegatesManager::addMenu(QObject *parentMenu, const QString &title, const QPoint &pos)
+{
+ Q_ASSERT(parentMenu);
+ if (!ensureComponentLoaded(Menu))
+ return nullptr;
+ QQmlContext *context = qmlContext(m_view);
+ QObject *menu = menuComponent->beginCreate(context);
+
+ // set visual parent for non-Window-based menus
+ if (QQuickItem *item = qobject_cast<QQuickItem*>(menu))
+ item->setParentItem(m_view);
+
+ if (!title.isEmpty())
+ menu->setProperty("title", title);
+ if (!pos.isNull()) {
+ menu->setProperty("x", pos.x());
+ menu->setProperty("y", pos.y());
+ }
+
+ menu->setParent(parentMenu);
+ QQmlProperty doneSignal(menu, QStringLiteral("onDone"));
+ CHECK_QML_SIGNAL_PROPERTY(doneSignal, menuComponent->url())
+ static int deleteLaterIndex = menu->metaObject()->indexOfSlot("deleteLater()");
+ QObject::connect(menu, doneSignal.method(), menu, menu->metaObject()->method(deleteLaterIndex));
+ menuComponent->completeCreate();
+ return menu;
+}
+
+void UI2DelegatesManager::addMenuItem(MenuItemHandler *menuItemHandler, const QString &text,
+ const QString &/*iconName*/, bool enabled,
+ bool checkable, bool checked)
+{
+ Q_ASSERT(menuItemHandler);
+ if (!ensureComponentLoaded(MenuItem))
+ return;
+
+ QObject *it = menuItemComponent->beginCreate(qmlContext(m_view));
+
+ it->setProperty("text", text);
+ it->setProperty("enabled", enabled);
+ it->setProperty("checked", checked);
+ it->setProperty("checkable", checkable);
+
+ QQmlProperty signal(it, QStringLiteral("onTriggered"));
+ CHECK_QML_SIGNAL_PROPERTY(signal, menuItemComponent->url());
+ QObject::connect(it, signal.method(), menuItemHandler,
+ QMetaMethod::fromSignal(&MenuItemHandler::triggered));
+ menuItemComponent->completeCreate();
+
+ QObject *menu = menuItemHandler->parent();
+ it->setParent(menu);
+
+ QQmlListReference entries(menu, defaultPropertyName(menu), qmlEngine(m_view));
+ if (entries.isValid())
+ entries.append(it);
+}
+
+void UI2DelegatesManager::showMenu(QObject *menu)
+{
+ QMetaObject::invokeMethod(menu, "open");
+}
+
} // namespace QtWebEngineCore
diff --git a/src/webengine/ui_delegates_manager.h b/src/webengine/ui_delegates_manager.h
index b63aa91f1..54ecf0986 100644
--- a/src/webengine/ui_delegates_manager.h
+++ b/src/webengine/ui_delegates_manager.h
@@ -59,7 +59,8 @@
F(PromptDialog, promptDialog) SEPARATOR \
F(FilePicker, filePicker) SEPARATOR \
F(MessageBubble, messageBubble) SEPARATOR \
- F(AuthenticationDialog, authenticationDialog) SEPARATOR
+ F(AuthenticationDialog, authenticationDialog) SEPARATOR \
+ F(ToolTip, toolTip) SEPARATOR \
#define COMMA_SEPARATOR ,
#define SEMICOLON_SEPARATOR ;
@@ -73,6 +74,7 @@ class QQmlContext;
class QQmlComponent;
class QQuickItem;
class QQuickWebEngineView;
+class QQmlEngine;
QT_END_NAMESPACE
namespace QtWebEngineCore {
@@ -102,25 +104,35 @@ public:
};
UIDelegatesManager(QQuickWebEngineView *);
+ virtual ~UIDelegatesManager();
- void addMenuItem(MenuItemHandler *menuItemHandler, const QString &text, const QString &iconName = QString(),
- bool enabled = true, bool checkable = false, bool checked = true);
+ virtual bool initializeImportDirs(QStringList &dirs, QQmlEngine *engine);
+ virtual void addMenuItem(MenuItemHandler *menuItemHandler, const QString &text,
+ const QString &iconName = QString(),
+ bool enabled = true,
+ bool checkable = false, bool checked = true);
void addMenuSeparator(QObject *menu);
- QObject *addMenu(QObject *parentMenu, const QString &title, const QPoint &pos = QPoint());
+ virtual QObject *addMenu(QObject *parentMenu, const QString &title,
+ const QPoint &pos = QPoint());
QQmlContext *creationContextForComponent(QQmlComponent *);
void showColorDialog(QSharedPointer<ColorChooserController>);
void showDialog(QSharedPointer<JavaScriptDialogController>);
void showDialog(QSharedPointer<AuthenticationDialogController>);
- void showFilePicker(FilePickerController *controller);
- void showMessageBubble(const QRect &anchor, const QString &mainText, const QString &subText);
+ void showFilePicker(QSharedPointer<FilePickerController>);
+ virtual void showMenu(QObject *menu);
+ void showMessageBubble(const QRect &anchor, const QString &mainText,
+ const QString &subText);
void hideMessageBubble();
void moveMessageBubble(const QRect &anchor);
+ void showToolTip(const QString &text);
-private:
+protected:
bool ensureComponentLoaded(ComponentType);
QQuickWebEngineView *m_view;
QScopedPointer<QQuickItem> m_messageBubbleItem;
+ QScopedPointer<QObject> m_toolTip;
+ QStringList m_importDirs;
FOR_EACH_COMPONENT_TYPE(MEMBER_DECLARATION, SEMICOLON_SEPARATOR)
@@ -128,6 +140,24 @@ private:
};
+// delegate manager for qtquickcontrols2 with fallback to qtquickcontrols1
+
+class UI2DelegatesManager : public UIDelegatesManager
+{
+public:
+ UI2DelegatesManager(QQuickWebEngineView *);
+ bool initializeImportDirs(QStringList &dirs, QQmlEngine *engine) override;
+ QObject *addMenu(QObject *parentMenu, const QString &title,
+ const QPoint &pos = QPoint()) override;
+ void addMenuItem(MenuItemHandler *menuItemHandler, const QString &text,
+ const QString &iconName = QString(),
+ bool enabled = true,
+ bool checkable = false, bool checked = false) override;
+ void showMenu(QObject *menu) override;
+ Q_DISABLE_COPY(UI2DelegatesManager)
+
+};
+
} // namespace QtWebEngineCore
#endif // UI_DELEGATES_MANAGER_H
diff --git a/src/webengine/webengine.pro b/src/webengine/webengine.pro
index 236881958..6b2285c85 100644
--- a/src/webengine/webengine.pro
+++ b/src/webengine/webengine.pro
@@ -12,7 +12,8 @@ INCLUDEPATH += $$PWD api ../core ../core/api
SOURCES = \
api/qquickwebenginecertificateerror.cpp \
- api/qquickwebenginecontextmenudata.cpp \
+ api/qquickwebenginecontextmenurequest.cpp \
+ api/qquickwebenginedialogrequests.cpp \
api/qquickwebenginedownloaditem.cpp \
api/qquickwebenginehistory.cpp \
api/qquickwebenginefaviconprovider.cpp \
@@ -33,7 +34,8 @@ HEADERS = \
api/qtwebengineglobal.h \
api/qtwebengineglobal_p.h \
api/qquickwebenginecertificateerror_p.h \
- api/qquickwebenginecontextmenudata_p.h \
+ api/qquickwebenginecontextmenurequest_p.h \
+ api/qquickwebenginedialogrequests_p.h \
api/qquickwebenginedownloaditem_p.h \
api/qquickwebenginedownloaditem_p_p.h \
api/qquickwebenginehistory_p.h \
@@ -63,4 +65,22 @@ isQMLTestSupportApiEnabled() {
DEFINES += ENABLE_SPELLCHECK
}
+!build_pass {
+ chromium_attributions.commands = \
+ cd $$shell_quote($$shell_path($$PWD/../3rdparty)) && \
+ python chromium/tools/licenses.py \
+ --file-template ../../tools/about_credits.tmpl \
+ --entry-template ../../tools/about_credits_entry.tmpl credits \
+ > $$shell_quote($$shell_path($$OUT_PWD/chromium_attributions.qdoc))
+ chromium_attributions.CONFIG += phony
+
+ QMAKE_EXTRA_TARGETS += chromium_attributions
+
+ prepare_docs {
+ prepare_docs.depends += chromium_attributions
+ } else {
+ html_docs.depends += chromium_attributions
+ }
+}
+
load(qt_module)
diff --git a/src/webenginewidgets/api/qwebenginecertificateerror.cpp b/src/webenginewidgets/api/qwebenginecertificateerror.cpp
index 289bb7ec0..a0641c9dd 100644
--- a/src/webenginewidgets/api/qwebenginecertificateerror.cpp
+++ b/src/webenginewidgets/api/qwebenginecertificateerror.cpp
@@ -104,6 +104,8 @@ QWebEngineCertificateError::~QWebEngineCertificateError()
\value CertificateWeakKey The certificate contains a weak key.
\value CertificateNameConstraintViolation The certificate claimed DNS names that are in violation of name constraints.
\value CertificateValidityTooLong The certificate has a validity period that is too long. (Added in Qt 5.7)
+ \value CertificateTransparencyRequired Certificate Transparency was required for this connection, but the server
+ did not provide CT information that complied with the policy. (Added in Qt 5.8)
*/
/*!
diff --git a/src/webenginewidgets/api/qwebenginecertificateerror.h b/src/webenginewidgets/api/qwebenginecertificateerror.h
index 7cb6341bc..82ac281be 100644
--- a/src/webenginewidgets/api/qwebenginecertificateerror.h
+++ b/src/webenginewidgets/api/qwebenginecertificateerror.h
@@ -70,6 +70,7 @@ public:
CertificateWeakKey = -211,
CertificateNameConstraintViolation = -212,
CertificateValidityTooLong = -213,
+ CertificateTransparencyRequired = -214,
};
Error error() const;
diff --git a/src/webenginewidgets/api/qwebenginecontextmenudata.cpp b/src/webenginewidgets/api/qwebenginecontextmenudata.cpp
index 4d72071e5..5d68ed0ec 100644
--- a/src/webenginewidgets/api/qwebenginecontextmenudata.cpp
+++ b/src/webenginewidgets/api/qwebenginecontextmenudata.cpp
@@ -135,7 +135,7 @@ void QWebEngineContextMenuData::reset()
*/
QPoint QWebEngineContextMenuData::position() const
{
- return d ? d->pos : QPoint();
+ return d ? d->position() : QPoint();
}
/*!
@@ -143,7 +143,7 @@ QPoint QWebEngineContextMenuData::position() const
*/
QString QWebEngineContextMenuData::linkText() const
{
- return d ? d->linkText : QString();
+ return d ? d->linkText() : QString();
}
/*!
@@ -151,7 +151,7 @@ QString QWebEngineContextMenuData::linkText() const
*/
QUrl QWebEngineContextMenuData::linkUrl() const
{
- return d ? d->linkUrl : QUrl();
+ return d ? d->linkUrl() : QUrl();
}
/*!
@@ -159,7 +159,7 @@ QUrl QWebEngineContextMenuData::linkUrl() const
*/
QString QWebEngineContextMenuData::selectedText() const
{
- return d ? d->selectedText : QString();
+ return d ? d->selectedText() : QString();
}
/*!
@@ -167,7 +167,7 @@ QString QWebEngineContextMenuData::selectedText() const
*/
QUrl QWebEngineContextMenuData::mediaUrl() const
{
- return d ? d->mediaUrl : QUrl();
+ return d ? d->mediaUrl() : QUrl();
}
/*!
@@ -175,7 +175,7 @@ QUrl QWebEngineContextMenuData::mediaUrl() const
*/
QWebEngineContextMenuData::MediaType QWebEngineContextMenuData::mediaType() const
{
- return d ? static_cast<QWebEngineContextMenuData::MediaType>(d->mediaType) : MediaTypeNone;
+ return d ? static_cast<QWebEngineContextMenuData::MediaType>(d->mediaType()) : MediaTypeNone;
}
/*!
@@ -183,7 +183,34 @@ QWebEngineContextMenuData::MediaType QWebEngineContextMenuData::mediaType() cons
*/
bool QWebEngineContextMenuData::isContentEditable() const
{
- return d ? d->isEditable : false;
+ return d ? d->isEditable() : false;
+}
+
+/*!
+ If the context is a word considered misspelled by the spell-checker, returns the misspelled word.
+
+ For possible replacements of the word, see spellCheckerSuggestions().
+
+ \since 5.8
+*/
+QString QWebEngineContextMenuData::misspelledWord() const
+{
+ if (d)
+ return d->misspelledWord();
+ return QString();
+}
+
+/*!
+ If the context is a word considered misspelled by the spell-checker, returns a list of suggested replacements
+ for misspelledWord().
+
+ \since 5.8
+*/
+QStringList QWebEngineContextMenuData::spellCheckerSuggestions() const
+{
+ if (d)
+ return d->spellCheckerSuggestions();
+ return QStringList();
}
/*!
diff --git a/src/webenginewidgets/api/qwebenginecontextmenudata.h b/src/webenginewidgets/api/qwebenginecontextmenudata.h
index 8e85fee16..97cfe9f65 100644
--- a/src/webenginewidgets/api/qwebenginecontextmenudata.h
+++ b/src/webenginewidgets/api/qwebenginecontextmenudata.h
@@ -76,6 +76,8 @@ public:
QUrl mediaUrl() const;
MediaType mediaType() const;
bool isContentEditable() const;
+ QString misspelledWord() const;
+ QStringList spellCheckerSuggestions() const;
private:
void reset();
diff --git a/src/webenginewidgets/api/qwebenginedownloaditem.cpp b/src/webenginewidgets/api/qwebenginedownloaditem.cpp
index bfb0dd0e8..b777a0898 100644
--- a/src/webenginewidgets/api/qwebenginedownloaditem.cpp
+++ b/src/webenginewidgets/api/qwebenginedownloaditem.cpp
@@ -80,6 +80,7 @@ QWebEngineDownloadItemPrivate::QWebEngineDownloadItemPrivate(QWebEngineProfilePr
, downloadId(-1)
, downloadState(QWebEngineDownloadItem::DownloadCancelled)
, savePageFormat(QWebEngineDownloadItem::MimeHtmlSaveFormat)
+ , type(QWebEngineDownloadItem::Attachment)
, downloadUrl(url)
, totalBytes(-1)
, receivedBytes(0)
@@ -218,6 +219,25 @@ quint32 QWebEngineDownloadItem::id() const
*/
/*!
+ \enum QWebEngineDownloadItem::DownloadType
+ \since 5.8
+
+ Describes the requested download's type.
+
+ \value Attachment The web server's response includes a
+ \c Content-Disposition header with the \c attachment directive. If \c Content-Disposition
+ is present in the reply, the web server is indicating that the client should prompt the
+ user to save the content regardless of the content type.
+ See \l {RFC 2616 section 19.5.1} for details.
+ \value DownloadAttribute The user clicked a link with the \c download
+ attribute. See \l {HTML download attribute} for details.
+ \value UserRequested The user initiated the download, for example by
+ selecting a web action.
+ \value SavePage Saving of the current page was requested (for example by
+ the \l{QWebEnginePage::WebAction}{QWebEnginePage::SavePage} web action).
+*/
+
+/*!
Returns the download item's current state.
\sa QWebEngineDownloadItem::DownloadState
@@ -342,6 +362,18 @@ void QWebEngineDownloadItem::setSavePageFormat(QWebEngineDownloadItem::SavePageF
d->savePageFormat = format;
}
+/*!
+ Returns the requested download's type.
+ \since 5.8
+
+ */
+
+QWebEngineDownloadItem::DownloadType QWebEngineDownloadItem::type() const
+{
+ Q_D(const QWebEngineDownloadItem);
+ return d->type;
+}
+
QWebEngineDownloadItem::QWebEngineDownloadItem(QWebEngineDownloadItemPrivate *p, QObject *parent)
: QObject(parent)
, d_ptr(p)
diff --git a/src/webenginewidgets/api/qwebenginedownloaditem.h b/src/webenginewidgets/api/qwebenginedownloaditem.h
index 80b5c06c5..4b58748ad 100644
--- a/src/webenginewidgets/api/qwebenginedownloaditem.h
+++ b/src/webenginewidgets/api/qwebenginedownloaditem.h
@@ -72,6 +72,14 @@ public:
};
Q_ENUM(SavePageFormat)
+ enum DownloadType {
+ Attachment = 0,
+ DownloadAttribute,
+ UserRequested,
+ SavePage
+ };
+ Q_ENUM(DownloadType)
+
quint32 id() const;
DownloadState state() const;
qint64 totalBytes() const;
@@ -83,6 +91,7 @@ public:
bool isFinished() const;
SavePageFormat savePageFormat() const;
void setSavePageFormat(SavePageFormat format);
+ DownloadType type() const;
public Q_SLOTS:
void accept();
diff --git a/src/webenginewidgets/api/qwebenginedownloaditem_p.h b/src/webenginewidgets/api/qwebenginedownloaditem_p.h
index ddb3b443a..9ddb45444 100644
--- a/src/webenginewidgets/api/qwebenginedownloaditem_p.h
+++ b/src/webenginewidgets/api/qwebenginedownloaditem_p.h
@@ -72,6 +72,7 @@ public:
quint32 downloadId;
QWebEngineDownloadItem::DownloadState downloadState;
QWebEngineDownloadItem::SavePageFormat savePageFormat;
+ QWebEngineDownloadItem::DownloadType type;
QString downloadPath;
const QUrl downloadUrl;
QString mimeType;
diff --git a/src/webenginewidgets/api/qwebenginepage.cpp b/src/webenginewidgets/api/qwebenginepage.cpp
index df4031712..ca160c362 100644
--- a/src/webenginewidgets/api/qwebenginepage.cpp
+++ b/src/webenginewidgets/api/qwebenginepage.cpp
@@ -90,6 +90,8 @@ QT_BEGIN_NAMESPACE
using namespace QtWebEngineCore;
+static const int MaxTooltipLength = 1024;
+
static QWebEnginePage::WebWindowType toWindowType(WebContentsAdapterClient::WindowOpenDisposition disposition)
{
switch (disposition) {
@@ -381,6 +383,13 @@ void QWebEnginePagePrivate::didPrintPage(quint64 requestId, const QByteArray &re
m_callbacks.invoke(requestId, result);
}
+#ifndef QT_NO_PRINTER
+void QWebEnginePagePrivate::didPrintPageOnPrinter(quint64 requestId, bool result)
+{
+ m_callbacks.invoke(requestId, result);
+}
+#endif
+
void QWebEnginePagePrivate::passOnFocus(bool reverse)
{
if (view)
@@ -480,6 +489,9 @@ void QWebEnginePagePrivate::updateAction(QWebEnginePage::WebAction action) const
case QWebEnginePage::ReloadAndBypassCache:
enabled = !isLoading;
break;
+ case QWebEnginePage::ViewSource:
+ enabled = adapter->canViewSource();
+ break;
default:
break;
}
@@ -495,6 +507,7 @@ void QWebEnginePagePrivate::updateNavigationActions()
updateAction(QWebEnginePage::Stop);
updateAction(QWebEnginePage::Reload);
updateAction(QWebEnginePage::ReloadAndBypassCache);
+ updateAction(QWebEnginePage::ViewSource);
}
#ifndef QT_NO_ACTION
@@ -779,6 +792,29 @@ void QWebEnginePage::setBackgroundColor(const QColor &color)
}
/*!
+ * Save the currently loaded web page to disk.
+ *
+ * The web page is saved to \a filePath in the specified \a{format}.
+ *
+ * This is a short cut for the following actions:
+ * \list
+ * \li Trigger the Save web action.
+ * \li Accept the next download item and set the specified file path and save format.
+ * \endlist
+ *
+ * This function issues an asynchronous download request for the web page and returns immediately.
+ *
+ * \sa QWebEngineDownloadItem::SavePageFormat
+ * \since 5.8
+ */
+void QWebEnginePage::save(const QString &filePath,
+ QWebEngineDownloadItem::SavePageFormat format) const
+{
+ Q_D(const QWebEnginePage);
+ d->adapter->save(filePath, format);
+}
+
+/*!
\property QWebEnginePage::audioMuted
\brief whether the current page audio is muted.
\since 5.7
@@ -963,6 +999,9 @@ QAction *QWebEnginePage::action(WebAction action) const
case SavePage:
text = tr("Save &Page");
break;
+ case ViewSource:
+ text = tr("&View Page Source");
+ break;
case NoWebAction:
case WebActionCount:
Q_UNREACHABLE();
@@ -1027,122 +1066,122 @@ void QWebEnginePage::triggerAction(WebAction action, bool)
d->adapter->unselect();
break;
case OpenLinkInThisWindow:
- if (menuData.linkUrl.isValid())
- setUrl(menuData.linkUrl);
+ if (menuData.linkUrl().isValid())
+ setUrl(menuData.linkUrl());
break;
case OpenLinkInNewWindow:
- if (menuData.linkUrl.isValid()) {
+ if (menuData.linkUrl().isValid()) {
QWebEnginePage *newPage = createWindow(WebBrowserWindow);
if (newPage)
- newPage->setUrl(menuData.linkUrl);
+ newPage->setUrl(menuData.linkUrl());
}
break;
case OpenLinkInNewTab:
- if (menuData.linkUrl.isValid()) {
+ if (menuData.linkUrl().isValid()) {
QWebEnginePage *newPage = createWindow(WebBrowserTab);
if (newPage)
- newPage->setUrl(menuData.linkUrl);
+ newPage->setUrl(menuData.linkUrl());
}
break;
case OpenLinkInNewBackgroundTab:
- if (menuData.linkUrl.isValid()) {
+ if (menuData.linkUrl().isValid()) {
QWebEnginePage *newPage = createWindow(WebBrowserBackgroundTab);
if (newPage)
- newPage->setUrl(menuData.linkUrl);
+ newPage->setUrl(menuData.linkUrl());
}
break;
case CopyLinkToClipboard:
- if (menuData.linkUrl.isValid()) {
- QString urlString = menuData.linkUrl.toString(QUrl::FullyEncoded);
- QString title = menuData.linkText.toHtmlEscaped();
+ if (menuData.linkUrl().isValid()) {
+ QString urlString = menuData.linkUrl().toString(QUrl::FullyEncoded);
+ QString title = menuData.linkText().toHtmlEscaped();
QMimeData *data = new QMimeData();
data->setText(urlString);
QString html = QStringLiteral("<a href=\"") + urlString + QStringLiteral("\">") + title + QStringLiteral("</a>");
data->setHtml(html);
- data->setUrls(QList<QUrl>() << menuData.linkUrl);
+ data->setUrls(QList<QUrl>() << menuData.linkUrl());
qApp->clipboard()->setMimeData(data);
}
break;
case DownloadLinkToDisk:
- if (menuData.linkUrl.isValid())
- d->adapter->download(menuData.linkUrl, menuData.suggestedFileName);
+ if (menuData.linkUrl().isValid())
+ d->adapter->download(menuData.linkUrl(), menuData.suggestedFileName());
break;
case CopyImageToClipboard:
- if (menuData.hasImageContent &&
- (menuData.mediaType == WebEngineContextMenuData::MediaTypeImage ||
- menuData.mediaType == WebEngineContextMenuData::MediaTypeCanvas))
+ if (menuData.hasImageContent() &&
+ (menuData.mediaType() == WebEngineContextMenuData::MediaTypeImage ||
+ menuData.mediaType() == WebEngineContextMenuData::MediaTypeCanvas))
{
- d->adapter->copyImageAt(menuData.pos);
+ d->adapter->copyImageAt(menuData.position());
}
break;
case CopyImageUrlToClipboard:
- if (menuData.mediaUrl.isValid() && menuData.mediaType == WebEngineContextMenuData::MediaTypeImage) {
- QString urlString = menuData.mediaUrl.toString(QUrl::FullyEncoded);
- QString title = menuData.linkText;
+ if (menuData.mediaUrl().isValid() && menuData.mediaType() == WebEngineContextMenuData::MediaTypeImage) {
+ QString urlString = menuData.mediaUrl().toString(QUrl::FullyEncoded);
+ QString title = menuData.linkText();
if (!title.isEmpty())
title = QStringLiteral(" alt=\"%1\"").arg(title.toHtmlEscaped());
QMimeData *data = new QMimeData();
data->setText(urlString);
QString html = QStringLiteral("<img src=\"") + urlString + QStringLiteral("\"") + title + QStringLiteral("></img>");
data->setHtml(html);
- data->setUrls(QList<QUrl>() << menuData.mediaUrl);
+ data->setUrls(QList<QUrl>() << menuData.mediaUrl());
qApp->clipboard()->setMimeData(data);
}
break;
case DownloadImageToDisk:
case DownloadMediaToDisk:
- if (menuData.mediaUrl.isValid())
- d->adapter->download(menuData.mediaUrl, menuData.suggestedFileName);
+ if (menuData.mediaUrl().isValid())
+ d->adapter->download(menuData.mediaUrl(), menuData.suggestedFileName());
break;
case CopyMediaUrlToClipboard:
- if (menuData.mediaUrl.isValid() &&
- (menuData.mediaType == WebEngineContextMenuData::MediaTypeAudio ||
- menuData.mediaType == WebEngineContextMenuData::MediaTypeVideo))
+ if (menuData.mediaUrl().isValid() &&
+ (menuData.mediaType() == WebEngineContextMenuData::MediaTypeAudio ||
+ menuData.mediaType() == WebEngineContextMenuData::MediaTypeVideo))
{
- QString urlString = menuData.mediaUrl.toString(QUrl::FullyEncoded);
+ QString urlString = menuData.mediaUrl().toString(QUrl::FullyEncoded);
QMimeData *data = new QMimeData();
data->setText(urlString);
- if (menuData.mediaType == WebEngineContextMenuData::MediaTypeAudio)
+ if (menuData.mediaType() == WebEngineContextMenuData::MediaTypeAudio)
data->setHtml(QStringLiteral("<audio src=\"") + urlString + QStringLiteral("\"></audio>"));
else
data->setHtml(QStringLiteral("<video src=\"") + urlString + QStringLiteral("\"></video>"));
- data->setUrls(QList<QUrl>() << menuData.mediaUrl);
+ data->setUrls(QList<QUrl>() << menuData.mediaUrl());
qApp->clipboard()->setMimeData(data);
}
break;
case ToggleMediaControls:
- if (menuData.mediaUrl.isValid() && menuData.mediaFlags & WebEngineContextMenuData::MediaCanToggleControls) {
- bool enable = !(menuData.mediaFlags & WebEngineContextMenuData::MediaControls);
- d->adapter->executeMediaPlayerActionAt(menuData.pos, WebContentsAdapter::MediaPlayerControls, enable);
+ if (menuData.mediaUrl().isValid() && menuData.mediaFlags() & WebEngineContextMenuData::MediaCanToggleControls) {
+ bool enable = !(menuData.mediaFlags() & WebEngineContextMenuData::MediaControls);
+ d->adapter->executeMediaPlayerActionAt(menuData.position(), WebContentsAdapter::MediaPlayerControls, enable);
}
break;
case ToggleMediaLoop:
- if (menuData.mediaUrl.isValid() &&
- (menuData.mediaType == WebEngineContextMenuData::MediaTypeAudio ||
- menuData.mediaType == WebEngineContextMenuData::MediaTypeVideo))
+ if (menuData.mediaUrl().isValid() &&
+ (menuData.mediaType() == WebEngineContextMenuData::MediaTypeAudio ||
+ menuData.mediaType() == WebEngineContextMenuData::MediaTypeVideo))
{
- bool enable = !(menuData.mediaFlags & WebEngineContextMenuData::MediaLoop);
- d->adapter->executeMediaPlayerActionAt(menuData.pos, WebContentsAdapter::MediaPlayerLoop, enable);
+ bool enable = !(menuData.mediaFlags() & WebEngineContextMenuData::MediaLoop);
+ d->adapter->executeMediaPlayerActionAt(menuData.position(), WebContentsAdapter::MediaPlayerLoop, enable);
}
break;
case ToggleMediaPlayPause:
- if (menuData.mediaUrl.isValid() &&
- (menuData.mediaType == WebEngineContextMenuData::MediaTypeAudio ||
- menuData.mediaType == WebEngineContextMenuData::MediaTypeVideo))
+ if (menuData.mediaUrl().isValid() &&
+ (menuData.mediaType() == WebEngineContextMenuData::MediaTypeAudio ||
+ menuData.mediaType() == WebEngineContextMenuData::MediaTypeVideo))
{
- bool enable = (menuData.mediaFlags & WebEngineContextMenuData::MediaPaused);
- d->adapter->executeMediaPlayerActionAt(menuData.pos, WebContentsAdapter::MediaPlayerPlay, enable);
+ bool enable = (menuData.mediaFlags() & WebEngineContextMenuData::MediaPaused);
+ d->adapter->executeMediaPlayerActionAt(menuData.position(), WebContentsAdapter::MediaPlayerPlay, enable);
}
break;
case ToggleMediaMute:
- if (menuData.mediaUrl.isValid() && menuData.mediaFlags & WebEngineContextMenuData::MediaHasAudio) {
+ if (menuData.mediaUrl().isValid() && menuData.mediaFlags() & WebEngineContextMenuData::MediaHasAudio) {
// Make sure to negate the value, so that toggling actually works.
- bool enable = !(menuData.mediaFlags & WebEngineContextMenuData::MediaMuted);
- d->adapter->executeMediaPlayerActionAt(menuData.pos, WebContentsAdapter::MediaPlayerMute, enable);
+ bool enable = !(menuData.mediaFlags() & WebEngineContextMenuData::MediaMuted);
+ d->adapter->executeMediaPlayerActionAt(menuData.position(), WebContentsAdapter::MediaPlayerMute, enable);
}
break;
case InspectElement:
- d->adapter->inspectElementAt(menuData.pos);
+ d->adapter->inspectElementAt(menuData.position());
break;
case ExitFullScreen:
d->adapter->exitFullScreen();
@@ -1153,6 +1192,17 @@ void QWebEnginePage::triggerAction(WebAction action, bool)
case SavePage:
d->adapter->save();
break;
+ case ViewSource:
+ // This is a workaround to make the ViewSource action working in a context menu.
+ // The WebContentsAdapter::viewSource() method deletes a
+ // RenderWidgetHostViewQtDelegateWidget instance which passes the control to the event
+ // loop. If the QMenu::aboutToHide() signal is connected to the QObject::deleteLater()
+ // slot the QMenu is deleted by the event handler while the ViewSource action is still not
+ // completed. This may lead to a crash. To avoid this the WebContentsAdapter::viewSource()
+ // method is called indirectly via the QTimer::singleShot() function which schedules the
+ // the viewSource() call after the QMenu's destruction.
+ QTimer::singleShot(0, this, [d](){ d->adapter->viewSource(); });
+ break;
case NoWebAction:
break;
case WebActionCount:
@@ -1161,6 +1211,22 @@ void QWebEnginePage::triggerAction(WebAction action, bool)
}
}
+/*!
+ * \since 5.8
+ * Replace the current misspelled word with \a replacement.
+ *
+ * The current misspelled word can be found in QWebEngineContextMenuData::misspelledWord(),
+ * and suggested replacements in QWebEngineContextMenuData::spellCheckerSuggestions().
+ *
+ * \sa contextMenuData(),
+ */
+
+void QWebEnginePage::replaceMisspelledWord(const QString &replacement)
+{
+ Q_D(QWebEnginePage);
+ d->adapter->replaceMisspelling(replacement);
+}
+
void QWebEnginePage::findText(const QString &subString, FindFlags options, const QWebEngineCallback<bool> &resultCallback)
{
Q_D(QWebEnginePage);
@@ -1197,7 +1263,7 @@ bool QWebEnginePagePrivate::contextMenuRequested(const WebEngineContextMenuData
return false;
contextData.reset();
- QContextMenuEvent event(QContextMenuEvent::Mouse, data.pos, view->mapToGlobal(data.pos));
+ QContextMenuEvent event(QContextMenuEvent::Mouse, data.position(), view->mapToGlobal(data.position()));
switch (view->contextMenuPolicy()) {
case Qt::PreventContextMenu:
return false;
@@ -1207,7 +1273,7 @@ bool QWebEnginePagePrivate::contextMenuRequested(const WebEngineContextMenuData
break;
case Qt::CustomContextMenu:
contextData = data;
- Q_EMIT view->customContextMenuRequested(data.pos);
+ Q_EMIT view->customContextMenuRequested(data.position());
break;
case Qt::ActionsContextMenu:
if (view->actions().count()) {
@@ -1342,6 +1408,16 @@ bool QWebEnginePagePrivate::isEnabled() const
return true;
}
+void QWebEnginePagePrivate::setToolTip(const QString &toolTipText)
+{
+ if (view) {
+ QString wrappedTip;
+ if (!toolTipText.isEmpty())
+ wrappedTip = QLatin1String("<p>") % toolTipText.toHtmlEscaped().left(MaxTooltipLength) % QLatin1String("</p>");
+ view->setToolTip(wrappedTip);
+ }
+}
+
QMenu *QWebEnginePage::createStandardContextMenu()
{
Q_D(QWebEnginePage);
@@ -1352,13 +1428,25 @@ QMenu *QWebEnginePage::createStandardContextMenu()
QAction *action = 0;
const WebEngineContextMenuData &contextMenuData = *d->contextData.d;
- if (!contextMenuData.linkText.isEmpty() && contextMenuData.linkUrl.isValid()) {
+ if (contextMenuData.isEditable() && !contextMenuData.spellCheckerSuggestions().isEmpty()) {
+ QPointer<QWebEnginePage> thisRef(this);
+ for (int i=0; i < contextMenuData.spellCheckerSuggestions().count() && i < 4; i++) {
+ QAction *action = new QAction(menu);
+ QString replacement = contextMenuData.spellCheckerSuggestions().at(i);
+ QObject::connect(action, &QAction::triggered, [thisRef, replacement] { if (thisRef) thisRef->replaceMisspelledWord(replacement); });
+ action->setText(replacement);
+ menu->addAction(action);
+ }
+ menu->addSeparator();
+ }
+
+ if (!contextMenuData.linkText().isEmpty() && contextMenuData.linkUrl().isValid()) {
action = QWebEnginePage::action(OpenLinkInThisWindow);
action->setText(tr("Follow Link"));
menu->addAction(action);
menu->addAction(QWebEnginePage::action(DownloadLinkToDisk));
}
- if (contextMenuData.selectedText.isEmpty()) {
+ if (contextMenuData.selectedText().isEmpty()) {
action = new QAction(QIcon::fromTheme(QStringLiteral("go-previous")), tr("&Back"), menu);
connect(action, &QAction::triggered, d->view, &QWebEngineView::back);
action->setEnabled(d->adapter->canGoBack());
@@ -1372,16 +1460,18 @@ QMenu *QWebEnginePage::createStandardContextMenu()
action = new QAction(QIcon::fromTheme(QStringLiteral("view-refresh")), tr("&Reload"), menu);
connect(action, &QAction::triggered, d->view, &QWebEngineView::reload);
menu->addAction(action);
+
+ menu->addAction(QWebEnginePage::action(ViewSource));
} else {
menu->addAction(QWebEnginePage::action(Copy));
menu->addAction(QWebEnginePage::action(Unselect));
}
- if (!contextMenuData.linkText.isEmpty() && contextMenuData.linkUrl.isValid()) {
+ if (!contextMenuData.linkText().isEmpty() && contextMenuData.linkUrl().isValid()) {
menu->addAction(QWebEnginePage::action(CopyLinkToClipboard));
}
- if (contextMenuData.mediaUrl.isValid()) {
- switch (contextMenuData.mediaType) {
+ if (contextMenuData.mediaUrl().isValid()) {
+ switch (contextMenuData.mediaType()) {
case WebEngineContextMenuData::MediaTypeImage:
menu->addAction(QWebEnginePage::action(DownloadImageToDisk));
menu->addAction(QWebEnginePage::action(CopyImageUrlToClipboard));
@@ -1396,15 +1486,15 @@ QMenu *QWebEnginePage::createStandardContextMenu()
menu->addAction(QWebEnginePage::action(CopyMediaUrlToClipboard));
menu->addAction(QWebEnginePage::action(ToggleMediaPlayPause));
menu->addAction(QWebEnginePage::action(ToggleMediaLoop));
- if (contextMenuData.mediaFlags & WebEngineContextMenuData::MediaHasAudio)
+ if (contextMenuData.mediaFlags() & WebEngineContextMenuData::MediaHasAudio)
menu->addAction(QWebEnginePage::action(ToggleMediaMute));
- if (contextMenuData.mediaFlags & WebEngineContextMenuData::MediaCanToggleControls)
+ if (contextMenuData.mediaFlags() & WebEngineContextMenuData::MediaCanToggleControls)
menu->addAction(QWebEnginePage::action(ToggleMediaControls));
break;
default:
break;
}
- } else if (contextMenuData.mediaType == WebEngineContextMenuData::MediaTypeCanvas) {
+ } else if (contextMenuData.mediaType() == WebEngineContextMenuData::MediaTypeCanvas) {
menu->addAction(QWebEnginePage::action(CopyImageToClipboard));
}
@@ -1462,7 +1552,7 @@ static inline QWebEnginePage::FileSelectionMode toPublic(FilePickerController::F
return static_cast<QWebEnginePage::FileSelectionMode>(mode);
}
-void QWebEnginePagePrivate::runFileChooser(FilePickerController *controller)
+void QWebEnginePagePrivate::runFileChooser(QSharedPointer<FilePickerController> controller)
{
Q_Q(QWebEnginePage);
@@ -1472,8 +1562,6 @@ void QWebEnginePagePrivate::runFileChooser(FilePickerController *controller)
controller->accepted(selectedFileNames);
else
controller->rejected();
-
- delete controller;
}
WebEngineSettings *QWebEnginePagePrivate::webEngineSettings() const
@@ -1770,6 +1858,28 @@ void QWebEnginePage::printToPdf(const QWebEngineCallback<const QByteArray&> &res
d->m_callbacks.registerCallback(requestId, resultCallback);
}
+#ifndef QT_NO_PRINTER
+/*!
+ \fn void QWebEnginePage::print(QPrinter *printer, FunctorOrLambda resultCallback)
+ Renders the current content of the page into a temporary PDF document, then prints it using \a printer.
+
+ The settings for creating and printing the PDF document will be retrieved from the \a printer
+ object.
+ It is the users responsibility to ensure the \a printer remains valid until \a resultCallback
+ has been called.
+
+ The \a resultCallback must take a boolean as parameter. If printing was successful, this
+ boolean will have the value \c true, otherwise, its value will be \c false.
+ \since 5.8
+*/
+void QWebEnginePage::print(QPrinter *printer, const QWebEngineCallback<bool> &resultCallback)
+{
+ Q_D(QWebEnginePage);
+ quint64 requestId = d->adapter->printOnPrinterCallbackResult(printer);
+ d->m_callbacks.registerCallback(requestId, resultCallback);
+}
+#endif // QT_NO_PRINTER
+
/*!
\since 5.7
diff --git a/src/webenginewidgets/api/qwebenginepage.h b/src/webenginewidgets/api/qwebenginepage.h
index 2ac8e0f3e..e85f9b30e 100644
--- a/src/webenginewidgets/api/qwebenginepage.h
+++ b/src/webenginewidgets/api/qwebenginepage.h
@@ -42,6 +42,7 @@
#include <QtWebEngineWidgets/qtwebenginewidgetsglobal.h>
#include <QtWebEngineWidgets/qwebenginecertificateerror.h>
+#include <QtWebEngineWidgets/qwebenginedownloaditem.h>
#include <QtWebEngineCore/qwebenginecallback.h>
#include <QtCore/qobject.h>
@@ -53,6 +54,9 @@
QT_BEGIN_NAMESPACE
class QMenu;
+#ifndef QT_NO_PRINTER
+class QPrinter;
+#endif
class QWebChannel;
class QWebEngineContextMenuData;
class QWebEngineFullScreenRequest;
@@ -123,6 +127,7 @@ public:
Unselect,
SavePage,
OpenLinkInNewBackgroundTab,
+ ViewSource,
WebActionCount
};
@@ -206,6 +211,8 @@ public:
#endif
virtual void triggerAction(WebAction action, bool checked = false);
+ void replaceMisspelledWord(const QString &replacement);
+
virtual bool event(QEvent*);
#ifdef Q_QDOC
void findText(const QString &subString, FindFlags options = FindFlags());
@@ -261,6 +268,9 @@ public:
QColor backgroundColor() const;
void setBackgroundColor(const QColor &color);
+ void save(const QString &filePath, QWebEngineDownloadItem::SavePageFormat format
+ = QWebEngineDownloadItem::MimeHtmlSaveFormat) const;
+
bool isAudioMuted() const;
void setAudioMuted(bool muted);
bool recentlyAudible() const;
@@ -272,6 +282,14 @@ public:
void printToPdf(const QWebEngineCallback<const QByteArray&> &resultCallback, const QPageLayout &layout = QPageLayout(QPageSize(QPageSize::A4), QPageLayout::Portrait, QMarginsF()));
#endif
+#ifndef QT_NO_PRINTER
+#ifdef Q_QDOC
+ void print(QPrinter *printer, FunctorOrLambda resultCallback);
+#else
+ void print(QPrinter *printer, const QWebEngineCallback<bool> &resultCallback);
+#endif // QDOC
+#endif // QT_NO_PRINTER
+
const QWebEngineContextMenuData &contextMenuData() const;
Q_SIGNALS:
diff --git a/src/webenginewidgets/api/qwebenginepage_p.h b/src/webenginewidgets/api/qwebenginepage_p.h
index 96640a63a..8d78429d8 100644
--- a/src/webenginewidgets/api/qwebenginepage_p.h
+++ b/src/webenginewidgets/api/qwebenginepage_p.h
@@ -112,13 +112,16 @@ public:
virtual void requestFullScreenMode(const QUrl &origin, bool fullscreen) Q_DECL_OVERRIDE;
virtual bool isFullScreenMode() const Q_DECL_OVERRIDE;
virtual void javascriptDialog(QSharedPointer<QtWebEngineCore::JavaScriptDialogController>) Q_DECL_OVERRIDE;
- virtual void runFileChooser(QtWebEngineCore::FilePickerController *controller) Q_DECL_OVERRIDE;
+ virtual void runFileChooser(QSharedPointer<QtWebEngineCore::FilePickerController>) Q_DECL_OVERRIDE;
virtual void showColorDialog(QSharedPointer<QtWebEngineCore::ColorChooserController>) Q_DECL_OVERRIDE;
virtual void didRunJavaScript(quint64 requestId, const QVariant& result) Q_DECL_OVERRIDE;
virtual void didFetchDocumentMarkup(quint64 requestId, const QString& result) Q_DECL_OVERRIDE;
virtual void didFetchDocumentInnerText(quint64 requestId, const QString& result) Q_DECL_OVERRIDE;
virtual void didFindText(quint64 requestId, int matchCount) Q_DECL_OVERRIDE;
virtual void didPrintPage(quint64 requestId, const QByteArray &result) Q_DECL_OVERRIDE;
+#ifndef QT_NO_PRINTER
+ virtual void didPrintPageOnPrinter(quint64 requestId, bool result) Q_DECL_OVERRIDE;
+#endif
virtual void passOnFocus(bool reverse) Q_DECL_OVERRIDE;
virtual void javaScriptConsoleMessage(JavaScriptConsoleMessageLevel level, const QString& message, int lineNumber, const QString& sourceID) Q_DECL_OVERRIDE;
virtual void authenticationRequired(QSharedPointer<QtWebEngineCore::AuthenticationDialogController>) Q_DECL_OVERRIDE;
@@ -141,6 +144,7 @@ public:
void startDragging(const content::DropData &dropData, Qt::DropActions allowedActions,
const QPixmap &pixmap, const QPoint &offset) Q_DECL_OVERRIDE;
virtual bool isEnabled() const Q_DECL_OVERRIDE;
+ virtual void setToolTip(const QString &toolTipText) Q_DECL_OVERRIDE;
const QObject *holdingQObject() const Q_DECL_OVERRIDE;
virtual QSharedPointer<QtWebEngineCore::BrowserContextAdapter> browserContextAdapter() Q_DECL_OVERRIDE;
@@ -173,6 +177,7 @@ public:
QWebChannel *webChannel;
unsigned int webChannelWorldId;
QUrl iconUrl;
+ bool m_navigationActionTriggered;
mutable QtWebEngineCore::CallbackDirectory m_callbacks;
mutable QAction *actions[QWebEnginePage::WebActionCount];
diff --git a/src/webenginewidgets/api/qwebengineprofile.cpp b/src/webenginewidgets/api/qwebengineprofile.cpp
index 664323034..886a7207e 100644
--- a/src/webenginewidgets/api/qwebengineprofile.cpp
+++ b/src/webenginewidgets/api/qwebengineprofile.cpp
@@ -96,6 +96,11 @@ using QtWebEngineCore::BrowserContextAdapter;
A QWebEngineUrlSchemeHandler can be registered for a profile by installUrlSchemeHandler()
to add support for custom URL schemes. Requests for the scheme are then issued to
QWebEngineUrlSchemeHandler::requestStarted() as QWebEngineUrlRequestJob objects.
+
+ Spellchecking HTML form fields can be enabled per profile by using the setSpellCheckEnabled()
+ method and the current languages used for spellchecking can be set by using the
+ setSpellCheckLanguages() method.
+
*/
/*!
@@ -180,10 +185,12 @@ void QWebEngineProfilePrivate::downloadRequested(DownloadItemInfo &info)
Q_ASSERT(!m_ongoingDownloads.contains(info.id));
QWebEngineDownloadItemPrivate *itemPrivate = new QWebEngineDownloadItemPrivate(this, info.url);
itemPrivate->downloadId = info.id;
- itemPrivate->downloadState = QWebEngineDownloadItem::DownloadRequested;
+ itemPrivate->downloadState = info.accepted ? QWebEngineDownloadItem::DownloadInProgress
+ : QWebEngineDownloadItem::DownloadRequested;
itemPrivate->downloadPath = info.path;
itemPrivate->mimeType = info.mimeType;
itemPrivate->savePageFormat = static_cast<QWebEngineDownloadItem::SavePageFormat>(info.savePageFormat);
+ itemPrivate->type = static_cast<QWebEngineDownloadItem::DownloadType>(info.downloadType);
QWebEngineDownloadItem *download = new QWebEngineDownloadItem(itemPrivate, q);
@@ -556,6 +563,87 @@ QWebEngineProfile *QWebEngineProfile::defaultProfile()
}
/*!
+ \since 5.8
+
+ Sets the current list of \a languages for the spell checker.
+ Each language should match the name of the \c .bdic dictionary.
+ For example, the language \c en-US will load the \c en-US.bdic
+ dictionary file.
+
+ Qt WebEngine checks for the \c qtwebengine_dictionaries subdirectory
+ first in the local directory and if it is not found, in the Qt
+ installation directory.
+
+ On macOS, depending on how Qt WebEngine is configured at build time, there are two possibilities
+ how spellchecking data is found:
+
+ \list
+ \li Hunspell dictionaries (default) - .bdic dictionaries are used, just like on other
+ platforms
+ \li Native dictionaries - the macOS spellchecking APIs are used (which means the results
+ will depend on the installed OS dictionaries)
+ \endlist
+
+ Thus, in the macOS Hunspell case, Qt WebEngine will look in the \e qtwebengine_dictionaries
+ subdirectory located inside the application bundle \c Resources directory, and also in the
+ \c Resources directory located inside the Qt framework bundle.
+
+ To summarize, in case of Hunspell usage, the following paths are considered:
+
+ \list
+ \li QCoreApplication::applicationDirPath()/qtwebengine_dictionaries
+ or QCoreApplication::applicationDirPath()/../Contents/Resources/qtwebengine_dictionaries
+ (on macOS)
+ \li [QLibraryInfo::DataPath]/qtwebengine_dictionaries
+ or path/to/QtWebEngineCore.framework/Resources/qtwebengine_dictionaries (Qt framework
+ bundle on macOS)
+ \endlist
+
+ For more information about how to compile \c .bdic dictionaries, see the
+ \l{WebEngine Widgets Spellchecker Example}{Spellchecker Example}.
+
+*/
+void QWebEngineProfile::setSpellCheckLanguages(const QStringList &languages)
+{
+ Q_D(QWebEngineProfile);
+ d->browserContext()->setSpellCheckLanguages(languages);
+}
+
+/*!
+ \since 5.8
+
+ Returns the list of languages used by the spell checker.
+*/
+QStringList QWebEngineProfile::spellCheckLanguages() const
+{
+ const Q_D(QWebEngineProfile);
+ return d->browserContext()->spellCheckLanguages();
+}
+
+/*!
+ \since 5.8
+
+ Enables spell checker if \a enable is \c true, otherwise disables it.
+ \sa isSpellCheckEnabled()
+ */
+void QWebEngineProfile::setSpellCheckEnabled(bool enable)
+{
+ Q_D(QWebEngineProfile);
+ d->browserContext()->setSpellCheckEnabled(enable);
+}
+/*!
+ \since 5.8
+
+ Returns \c true if the spell checker is enabled; otherwise returns \c false.
+ \sa setSpellCheckEnabled()
+ */
+bool QWebEngineProfile::isSpellCheckEnabled() const
+{
+ const Q_D(QWebEngineProfile);
+ return d->browserContext()->isSpellCheckEnabled();
+}
+
+/*!
Returns the default settings for all pages in this profile.
*/
QWebEngineSettings *QWebEngineProfile::settings() const
diff --git a/src/webenginewidgets/api/qwebengineprofile.h b/src/webenginewidgets/api/qwebengineprofile.h
index d981fa5bb..1ce4bfe17 100644
--- a/src/webenginewidgets/api/qwebengineprofile.h
+++ b/src/webenginewidgets/api/qwebengineprofile.h
@@ -121,6 +121,11 @@ public:
void clearHttpCache();
+ void setSpellCheckLanguages(const QStringList &languages);
+ QStringList spellCheckLanguages() const;
+ void setSpellCheckEnabled(bool enabled);
+ bool isSpellCheckEnabled() const;
+
static QWebEngineProfile *defaultProfile();
Q_SIGNALS:
diff --git a/src/webenginewidgets/api/qwebenginescript.cpp b/src/webenginewidgets/api/qwebenginescript.cpp
index 73dd5075e..04a9d979a 100644
--- a/src/webenginewidgets/api/qwebenginescript.cpp
+++ b/src/webenginewidgets/api/qwebenginescript.cpp
@@ -61,7 +61,8 @@ using QtWebEngineCore::UserScript;
not accessible from a different one. ScriptWorldId provides some predefined IDs for this
purpose.
- \note Chromium extensions, such as \c @include, \c @match, and \c @exclude, are not supported.
+ The following \l Greasemonkey attributes are supported since Qt 5.8:
+ \c @exclude, \c @include, \c @name, \c @match, and \c @run-at.
Use QWebEnginePage::scripts() and QWebEngineProfile::scripts() to access
the collection of scripts associated with a single page or a
diff --git a/src/webenginewidgets/api/qwebenginescriptcollection.cpp b/src/webenginewidgets/api/qwebenginescriptcollection.cpp
index 4b77b4699..8d393924f 100644
--- a/src/webenginewidgets/api/qwebenginescriptcollection.cpp
+++ b/src/webenginewidgets/api/qwebenginescriptcollection.cpp
@@ -40,7 +40,7 @@
#include "qwebenginescriptcollection.h"
#include "qwebenginescriptcollection_p.h"
-#include "user_resource_controller_host.h"
+#include "renderer_host/user_resource_controller_host.h"
using QtWebEngineCore::UserScript;
diff --git a/src/webenginewidgets/api/qwebenginesettings.cpp b/src/webenginewidgets/api/qwebenginesettings.cpp
index dfca16287..50002e3e6 100644
--- a/src/webenginewidgets/api/qwebenginesettings.cpp
+++ b/src/webenginewidgets/api/qwebenginesettings.cpp
@@ -89,6 +89,13 @@ static WebEngineSettings::Attribute toWebEngineAttribute(QWebEngineSettings::Web
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;
+
default:
return WebEngineSettings::UnsupportedInCoreSettings;
}
diff --git a/src/webenginewidgets/api/qwebenginesettings.h b/src/webenginewidgets/api/qwebenginesettings.h
index 8eda50ee2..e3fb83ff5 100644
--- a/src/webenginewidgets/api/qwebenginesettings.h
+++ b/src/webenginewidgets/api/qwebenginesettings.h
@@ -85,7 +85,10 @@ public:
WebGLEnabled,
Accelerated2dCanvasEnabled,
AutoLoadIconsForPage,
- TouchIconsEnabled
+ TouchIconsEnabled,
+ FocusOnNavigationEnabled,
+ PrintElementBackgrounds,
+ AllowRunningInsecureContent
};
enum FontSize {
diff --git a/src/webenginewidgets/doc/snippets/qtwebengine_build_snippet.qdoc b/src/webenginewidgets/doc/snippets/qtwebenginewidgets_build_snippet.qdoc
index dcdd82e04..dcdd82e04 100644
--- a/src/webenginewidgets/doc/snippets/qtwebengine_build_snippet.qdoc
+++ b/src/webenginewidgets/doc/snippets/qtwebenginewidgets_build_snippet.qdoc
diff --git a/src/webenginewidgets/doc/src/qtwebenginewidgets-index.qdoc b/src/webenginewidgets/doc/src/qtwebenginewidgets-index.qdoc
index 59d7bc5d1..abfd17ce3 100644
--- a/src/webenginewidgets/doc/src/qtwebenginewidgets-index.qdoc
+++ b/src/webenginewidgets/doc/src/qtwebenginewidgets-index.qdoc
@@ -28,7 +28,6 @@
/*!
\page qtwebenginewidgets-index.html
\title Qt WebEngine Widgets
- \ingroup modules
\brief Provides a web browser engine as well as C++ classes to render web content and interact
with it.
diff --git a/src/webenginewidgets/doc/src/qtwebenginewidgets-module.qdoc b/src/webenginewidgets/doc/src/qtwebenginewidgets-module.qdoc
index d0f2fd930..959f96b10 100644
--- a/src/webenginewidgets/doc/src/qtwebenginewidgets-module.qdoc
+++ b/src/webenginewidgets/doc/src/qtwebenginewidgets-module.qdoc
@@ -40,9 +40,9 @@
To include the definitions of the module's classes, use the
following directive:
- \snippet qtwebengine_build_snippet.qdoc 1
+ \snippet qtwebenginewidgets_build_snippet.qdoc 1
To link against the module, add the following to your qmake project file:
- \snippet qtwebengine_build_snippet.qdoc 0
+ \snippet qtwebenginewidgets_build_snippet.qdoc 0
*/
diff --git a/src/webenginewidgets/doc/src/qwebenginepage_lgpl.qdoc b/src/webenginewidgets/doc/src/qwebenginepage_lgpl.qdoc
index 539e809d4..58abc9fa1 100644
--- a/src/webenginewidgets/doc/src/qwebenginepage_lgpl.qdoc
+++ b/src/webenginewidgets/doc/src/qwebenginepage_lgpl.qdoc
@@ -87,6 +87,10 @@
QWebEngineScript::ScriptWorldId provides some predefined IDs for this purpose. Using the
\c runJavaScript() version without the world ID is the same as running the script in the
\c MainWorld.
+
+ The \l {QWebEngineSettings::FocusOnNavigationEnabled} {FocusOnNavigationEnabled} setting can be
+ used to stop the view associated with the page from automatically receiving focus when a
+ navigation operation occurs (like loading or reloading a page or navigating through history).
*/
/*!
@@ -152,6 +156,7 @@
\value Unselect Clear the current selection. (Added in Qt 5.7)
\value SavePage Save the current page to disk. MHTML is the default format that is used to store
the web page on disk. (Added in Qt 5.7)
+ \value ViewSource Show the source of the current page in a new tab. (Added in Qt 5.8)
\omitvalue WebActionCount
diff --git a/src/webenginewidgets/doc/src/qwebenginesettings_lgpl.qdoc b/src/webenginewidgets/doc/src/qwebenginesettings_lgpl.qdoc
index 07c4965d0..07afd6501 100644
--- a/src/webenginewidgets/doc/src/qwebenginesettings_lgpl.qdoc
+++ b/src/webenginewidgets/doc/src/qwebenginesettings_lgpl.qdoc
@@ -147,6 +147,19 @@
\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).
+ Enabled 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)
*/
/*!
diff --git a/src/webenginewidgets/doc/src/qwebengineview_lgpl.qdoc b/src/webenginewidgets/doc/src/qwebengineview_lgpl.qdoc
index 5a4c1b52b..5b96459af 100644
--- a/src/webenginewidgets/doc/src/qwebengineview_lgpl.qdoc
+++ b/src/webenginewidgets/doc/src/qwebengineview_lgpl.qdoc
@@ -65,16 +65,13 @@
The zoomFactor() property enables zooming the contents of the web page by a
scale factor.
- If you require a custom context menu, you can implement it by reimplementing
- \l{QWidget::}{contextMenuEvent()} and populating your QMenu with the actions
- obtained from pageAction(). Additional functionality, such as reloading the view,
- copying selected text to the clipboard, or pasting into the view, is
- encapsulated within the QAction objects returned by pageAction(). These
- actions can be programmatically triggered using triggerPageAction().
- Alternatively, the actions can be added to a toolbar or a menu directly.
- The web view maintains the state of the returned actions but allows
- modification of action properties such as \l{QAction::}{text} or
- \l{QAction::}{icon}.
+ The widget features a context menu that is tailored to the element at
+ hand, and includes actions useful in a browser. For a custom context menu,
+ or for embedding actions in a menu or toolbar, the individual actions are available
+ via \l pageAction(). The web view maintains the state of the returned actions,
+ but allows modification of action properties such as \l{QAction::}{text} or
+ \l{QAction::}{icon}. The action semantics can also be triggered directly through
+ triggerPageAction().
If you want to provide support for web sites that allow the user to open
new windows, such as pop-up windows, you can subclass QWebEngineView and
diff --git a/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp b/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp
index 23a203eab..eb3a3931a 100644
--- a/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp
+++ b/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp
@@ -49,21 +49,52 @@
#include <QSGAbstractRenderer>
#include <QSGNode>
#include <QWindow>
-#include <private/qsgcontext_p.h>
-#include <private/qsgengine_p.h>
+#include <private/qquickwindow_p.h>
+
+#if (QT_VERSION < QT_VERSION_CHECK(5, 8, 0))
+#include <QSGSimpleRectNode>
+#include <QSGSimpleTextureNode>
+#endif
#include <private/qwidget_p.h>
namespace QtWebEngineCore {
-static const int MaxTooltipLength = 1024;
+class RenderWidgetHostViewQuickItem : public QQuickItem {
+public:
+ RenderWidgetHostViewQuickItem(RenderWidgetHostViewQtDelegateClient *client) : m_client(client)
+ {
+ setFlag(ItemHasContents, true);
+ }
+protected:
+ void focusInEvent(QFocusEvent *event) override
+ {
+ m_client->forwardEvent(event);
+ }
+ void focusOutEvent(QFocusEvent *event) override
+ {
+ m_client->forwardEvent(event);
+ }
+ void keyPressEvent(QKeyEvent *event) override
+ {
+ m_client->forwardEvent(event);
+ }
+ void keyReleaseEvent(QKeyEvent *event) override
+ {
+ m_client->forwardEvent(event);
+ }
+ QSGNode *updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *) override
+ {
+ return m_client->updatePaintNode(oldNode);
+ }
+private:
+ RenderWidgetHostViewQtDelegateClient *m_client;
+};
RenderWidgetHostViewQtDelegateWidget::RenderWidgetHostViewQtDelegateWidget(RenderWidgetHostViewQtDelegateClient *client, QWidget *parent)
- : QOpenGLWidget(parent)
+ : QQuickWidget(parent)
, m_client(client)
- , m_rootNode(new QSGRootNode)
- , m_sgEngine(new QSGEngine)
+ , m_rootItem(new RenderWidgetHostViewQuickItem(client))
, m_isPopup(false)
- , m_clearColor(Qt::white)
{
setFocusPolicy(Qt::StrongFocus);
@@ -73,6 +104,7 @@ RenderWidgetHostViewQtDelegateWidget::RenderWidgetHostViewQtDelegateWidget(Rende
format.setDepthBufferSize(24);
format.setStencilBufferSize(8);
+#ifndef QT_NO_OPENGL
QOpenGLContext *globalSharedContext = QOpenGLContext::globalShareContext();
if (globalSharedContext) {
QSurfaceFormat sharedFormat = globalSharedContext->format();
@@ -91,7 +123,7 @@ RenderWidgetHostViewQtDelegateWidget::RenderWidgetHostViewQtDelegateWidget(Rende
}
#endif
- // Make sure the OpenGL profile of the QOpenGLWidget matches the shared context profile.
+ // Make sure the OpenGL profile of the QQuickWidget matches the shared context profile.
if (sharedFormat.profile() == QSurfaceFormat::CoreProfile) {
format.setMajorVersion(sharedFormat.majorVersion());
format.setMinorVersion(sharedFormat.minorVersion());
@@ -101,7 +133,7 @@ RenderWidgetHostViewQtDelegateWidget::RenderWidgetHostViewQtDelegateWidget(Rende
setFormat(format);
#endif
-
+#endif
setMouseTracking(true);
setAttribute(Qt::WA_AcceptTouchEvents);
setAttribute(Qt::WA_OpaquePaintEvent);
@@ -110,6 +142,8 @@ RenderWidgetHostViewQtDelegateWidget::RenderWidgetHostViewQtDelegateWidget(Rende
void RenderWidgetHostViewQtDelegateWidget::initAsChild(WebContentsAdapterClient* container)
{
+ setContent(QUrl(), nullptr, m_rootItem.data());
+
QWebEnginePagePrivate *pagePrivate = static_cast<QWebEnginePagePrivate *>(container);
if (pagePrivate->view) {
pagePrivate->view->layout()->addWidget(this);
@@ -122,6 +156,8 @@ void RenderWidgetHostViewQtDelegateWidget::initAsChild(WebContentsAdapterClient*
void RenderWidgetHostViewQtDelegateWidget::initAsPopup(const QRect& screenRect)
{
m_isPopup = true;
+ setContent(QUrl(), nullptr, m_rootItem.data());
+
// The keyboard events are supposed to go to the parent RenderHostView
// so the WebUI popups should never have focus. Besides, if the parent view
// loses focus, WebKit will cause its associated popups (including this one)
@@ -147,12 +183,12 @@ QRectF RenderWidgetHostViewQtDelegateWidget::contentsRect() const
void RenderWidgetHostViewQtDelegateWidget::setKeyboardFocus()
{
- setFocus();
+ m_rootItem->forceActiveFocus();
}
bool RenderWidgetHostViewQtDelegateWidget::hasKeyboardFocus()
{
- return hasFocus();
+ return m_rootItem->hasActiveFocus();
}
void RenderWidgetHostViewQtDelegateWidget::lockMouse()
@@ -170,65 +206,85 @@ void RenderWidgetHostViewQtDelegateWidget::show()
// Check if we're attached to a QWebEngineView, we don't
// want to show anything else than popups as top-level.
if (parent() || m_isPopup) {
- QOpenGLWidget::show();
+ QQuickWidget::show();
}
}
void RenderWidgetHostViewQtDelegateWidget::hide()
{
- QOpenGLWidget::hide();
+ QQuickWidget::hide();
}
bool RenderWidgetHostViewQtDelegateWidget::isVisible() const
{
- return QOpenGLWidget::isVisible();
+ return QQuickWidget::isVisible();
}
QWindow* RenderWidgetHostViewQtDelegateWidget::window() const
{
- const QWidget* root = QOpenGLWidget::window();
+ const QWidget* root = QQuickWidget::window();
return root ? root->windowHandle() : 0;
}
QSGTexture *RenderWidgetHostViewQtDelegateWidget::createTextureFromImage(const QImage &image)
{
- return m_sgEngine->createTextureFromImage(image, QSGEngine::TextureCanUseAtlas);
+ return quickWindow()->createTextureFromImage(image, QQuickWindow::TextureCanUseAtlas);
}
QSGLayer *RenderWidgetHostViewQtDelegateWidget::createLayer()
{
- QSGEnginePrivate *enginePrivate = QSGEnginePrivate::get(m_sgEngine.data());
- return enginePrivate->sgContext->createLayer(enginePrivate->sgRenderContext.data());
+ QSGRenderContext *renderContext = QQuickWindowPrivate::get(quickWindow())->context;
+ return renderContext->sceneGraphContext()->createLayer(renderContext);
}
-QSGImageNode *RenderWidgetHostViewQtDelegateWidget::createImageNode()
+QSGInternalImageNode *RenderWidgetHostViewQtDelegateWidget::createImageNode()
{
- return QSGEnginePrivate::get(m_sgEngine.data())->sgContext->createImageNode();
+ QSGRenderContext *renderContext = QQuickWindowPrivate::get(quickWindow())->context;
+#if (QT_VERSION >= QT_VERSION_CHECK(5, 8, 0))
+ return renderContext->sceneGraphContext()->createInternalImageNode();
+#else
+ return renderContext->sceneGraphContext()->createImageNode();
+#endif
}
-void RenderWidgetHostViewQtDelegateWidget::update()
+QSGTextureNode *RenderWidgetHostViewQtDelegateWidget::createTextureNode()
+{
+#if (QT_VERSION >= QT_VERSION_CHECK(5, 8, 0))
+ return quickWindow()->createImageNode();
+#else
+ return new QSGSimpleTextureNode();
+#endif
+}
+
+QSGRectangleNode *RenderWidgetHostViewQtDelegateWidget::createRectangleNode()
{
-#if (QT_VERSION < QT_VERSION_CHECK(5, 4, 0))
- updateGL();
+#if (QT_VERSION >= QT_VERSION_CHECK(5, 8, 0))
+ return quickWindow()->createRectangleNode();
#else
- QOpenGLWidget::update();
+ QSGRenderContext *renderContext = QQuickWindowPrivate::get(quickWindow())->context;
+ return renderContext->sceneGraphContext()->createRectangleNode();
#endif
}
+void RenderWidgetHostViewQtDelegateWidget::update()
+{
+ m_rootItem->update();
+}
+
void RenderWidgetHostViewQtDelegateWidget::updateCursor(const QCursor &cursor)
{
- QOpenGLWidget::setCursor(cursor);
+ QQuickWidget::setCursor(cursor);
}
void RenderWidgetHostViewQtDelegateWidget::resize(int width, int height)
{
- QOpenGLWidget::resize(width, height);
+ QQuickWidget::resize(width, height);
}
void RenderWidgetHostViewQtDelegateWidget::move(const QPoint &screenPos)
{
Q_ASSERT(m_isPopup);
- QOpenGLWidget::move(screenPos);
+ QQuickWidget::move(screenPos);
}
void RenderWidgetHostViewQtDelegateWidget::inputMethodStateChanged(bool editorVisible)
@@ -236,23 +292,15 @@ void RenderWidgetHostViewQtDelegateWidget::inputMethodStateChanged(bool editorVi
if (qApp->inputMethod()->isVisible() == editorVisible)
return;
- QOpenGLWidget::setAttribute(Qt::WA_InputMethodEnabled, editorVisible);
+ QQuickWidget::setAttribute(Qt::WA_InputMethodEnabled, editorVisible);
qApp->inputMethod()->update(Qt::ImQueryInput | Qt::ImEnabled | Qt::ImHints);
qApp->inputMethod()->setVisible(editorVisible);
}
-void RenderWidgetHostViewQtDelegateWidget::setTooltip(const QString &tooltip)
-{
- QString wrappedTip;
- if (!tooltip.isEmpty())
- wrappedTip = QLatin1String("<p>") % tooltip.toHtmlEscaped().left(MaxTooltipLength) % QLatin1String("</p>");
- setToolTip(wrappedTip);
-}
-
void RenderWidgetHostViewQtDelegateWidget::setClearColor(const QColor &color)
{
- m_clearColor = color;
- // QOpenGLWidget is usually blended by punching holes into widgets
+ QQuickWidget::setClearColor(color);
+ // QQuickWidget is usually blended by punching holes into widgets
// above it to simulate the visual stacking order. If we want it to be
// transparent we have to throw away the proper stacking order and always
// blend the complete normal widgets backing store under it.
@@ -269,7 +317,7 @@ QVariant RenderWidgetHostViewQtDelegateWidget::inputMethodQuery(Qt::InputMethodQ
void RenderWidgetHostViewQtDelegateWidget::resizeEvent(QResizeEvent *resizeEvent)
{
- QOpenGLWidget::resizeEvent(resizeEvent);
+ QQuickWidget::resizeEvent(resizeEvent);
const QPoint globalPos = mapToGlobal(pos());
if (globalPos != m_lastGlobalPos) {
@@ -282,7 +330,7 @@ void RenderWidgetHostViewQtDelegateWidget::resizeEvent(QResizeEvent *resizeEvent
void RenderWidgetHostViewQtDelegateWidget::showEvent(QShowEvent *event)
{
- QOpenGLWidget::showEvent(event);
+ QQuickWidget::showEvent(event);
// We don't have a way to catch a top-level window change with QWidget
// but a widget will most likely be shown again if it changes, so do
// the reconnection at this point.
@@ -299,7 +347,7 @@ void RenderWidgetHostViewQtDelegateWidget::showEvent(QShowEvent *event)
void RenderWidgetHostViewQtDelegateWidget::hideEvent(QHideEvent *event)
{
- QOpenGLWidget::hideEvent(event);
+ QQuickWidget::hideEvent(event);
m_client->notifyHidden();
}
@@ -334,11 +382,25 @@ bool RenderWidgetHostViewQtDelegateWidget::event(QEvent *event)
}
}
- if (event->type() == QEvent::ShortcutOverride) {
+ switch (event->type()) {
+ case QEvent::FocusIn:
+ case QEvent::FocusOut:
+ // We forward focus events later, once they have made it to the m_rootItem.
+ return QQuickWidget::event(event);
+ case QEvent::ShortcutOverride:
if (editorActionForKeyEvent(static_cast<QKeyEvent*>(event)) != QWebEnginePage::NoWebAction) {
event->accept();
return true;
}
+ break;
+ case QEvent::DragEnter:
+ case QEvent::DragLeave:
+ case QEvent::DragMove:
+ case QEvent::Drop:
+ // Let the parent handle these events.
+ return false;
+ default:
+ break;
}
QEvent::Type type = event->type();
@@ -360,45 +422,10 @@ bool RenderWidgetHostViewQtDelegateWidget::event(QEvent *event)
handled = m_client->forwardEvent(event);
if (!handled)
- return QOpenGLWidget::event(event);
+ return QQuickWidget::event(event);
return true;
}
-void RenderWidgetHostViewQtDelegateWidget::initializeGL()
-{
- m_sgEngine->initialize(QOpenGLContext::currentContext());
- m_sgRenderer.reset(m_sgEngine->createRenderer());
- m_sgRenderer->setRootNode(m_rootNode.data());
- m_sgRenderer->setClearColor(m_clearColor);
-
- // When RenderWidgetHostViewQt::GetScreenInfo is called for the first time, the associated
- // QWindow is NULL, and the screen device pixel ratio can not be queried.
- // Re-initialize the screen information after the QWindow handle is available,
- // so Chromium receives the correct device pixel ratio.
- m_client->windowChanged();
-}
-
-void RenderWidgetHostViewQtDelegateWidget::paintGL()
-{
-#if (QT_VERSION < QT_VERSION_CHECK(5, 3, 1))
- // A workaround for a missing check in 5.3.0 when updating an unparented delegate.
- if (!QOpenGLContext::currentContext())
- return;
-#endif
- QSGNode *paintNode = m_client->updatePaintNode(m_rootNode->firstChild());
- if (paintNode != m_rootNode->firstChild()) {
- delete m_rootNode->firstChild();
- m_rootNode->appendChildNode(paintNode);
- }
-
- QSize deviceSize = size() * devicePixelRatio();
- m_sgRenderer->setDeviceRect(deviceSize);
- m_sgRenderer->setViewportRect(deviceSize);
- m_sgRenderer->setProjectionMatrixToRect(QRectF(QPointF(), size()));
-
- m_sgRenderer->renderScene(defaultFramebufferObject());
-}
-
void RenderWidgetHostViewQtDelegateWidget::onWindowPosChanged()
{
m_lastGlobalPos = mapToGlobal(pos());
diff --git a/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.h b/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.h
index 7307bcd55..77907ec5a 100644
--- a/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.h
+++ b/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.h
@@ -43,19 +43,12 @@
#include "render_widget_host_view_qt_delegate.h"
#include "web_contents_adapter_client.h"
-#include <QSGAbstractRenderer>
-#include <QSGEngine>
-#include <QSGNode>
-
-#if (QT_VERSION < QT_VERSION_CHECK(5, 4, 0))
-#include <QtWidgets/private/qopenglwidget_p.h>
-#else
-#include <QtWidgets/QOpenGLWidget>
-#endif
+#include <QQuickItem>
+#include <QQuickWidget>
namespace QtWebEngineCore {
-class RenderWidgetHostViewQtDelegateWidget : public QOpenGLWidget, public RenderWidgetHostViewQtDelegate {
+class RenderWidgetHostViewQtDelegateWidget : public QQuickWidget, public RenderWidgetHostViewQtDelegate {
Q_OBJECT
public:
RenderWidgetHostViewQtDelegateWidget(RenderWidgetHostViewQtDelegateClient *client, QWidget *parent = 0);
@@ -74,13 +67,14 @@ public:
virtual QWindow* window() const Q_DECL_OVERRIDE;
virtual QSGTexture *createTextureFromImage(const QImage &) Q_DECL_OVERRIDE;
virtual QSGLayer *createLayer() Q_DECL_OVERRIDE;
- virtual QSGImageNode *createImageNode() Q_DECL_OVERRIDE;
+ virtual QSGInternalImageNode *createImageNode() Q_DECL_OVERRIDE;
+ virtual QSGTextureNode *createTextureNode() Q_DECL_OVERRIDE;
+ virtual QSGRectangleNode *createRectangleNode() Q_DECL_OVERRIDE;
virtual void update() Q_DECL_OVERRIDE;
virtual void updateCursor(const QCursor &) Q_DECL_OVERRIDE;
virtual void resize(int width, int height) Q_DECL_OVERRIDE;
virtual void move(const QPoint &screenPos) Q_DECL_OVERRIDE;
virtual void inputMethodStateChanged(bool editorVisible) Q_DECL_OVERRIDE;
- virtual void setTooltip(const QString &tooltip) Q_DECL_OVERRIDE;
virtual void setClearColor(const QColor &color) Q_DECL_OVERRIDE;
protected:
@@ -88,8 +82,6 @@ protected:
void resizeEvent(QResizeEvent *resizeEvent) Q_DECL_OVERRIDE;
void showEvent(QShowEvent *) Q_DECL_OVERRIDE;
void hideEvent(QHideEvent *) Q_DECL_OVERRIDE;
- void initializeGL() Q_DECL_OVERRIDE;
- void paintGL() Q_DECL_OVERRIDE;
QVariant inputMethodQuery(Qt::InputMethodQuery query) const Q_DECL_OVERRIDE;
@@ -98,10 +90,7 @@ private slots:
private:
RenderWidgetHostViewQtDelegateClient *m_client;
- // Put the root node first to make sure it gets destroyed after the SG renderer.
- QScopedPointer<QSGRootNode> m_rootNode;
- QScopedPointer<QSGEngine> m_sgEngine;
- QScopedPointer<QSGAbstractRenderer> m_sgRenderer;
+ QScopedPointer<QQuickItem> m_rootItem;
bool m_isPopup;
QColor m_clearColor;
QPoint m_lastGlobalPos;
diff --git a/src/webenginewidgets/webenginewidgets.pro b/src/webenginewidgets/webenginewidgets.pro
index 279ec79f8..abd487e5f 100644
--- a/src/webenginewidgets/webenginewidgets.pro
+++ b/src/webenginewidgets/webenginewidgets.pro
@@ -4,7 +4,7 @@ TARGET = QtWebEngineWidgets
DEFINES += QT_BUILD_WEBENGINEWIDGETS_LIB
QT += webenginecore widgets network quick
-QT_PRIVATE += quick-private gui-private core-private widgets-private
+QT_PRIVATE += quick-private gui-private core-private widgets-private quickwidgets
INCLUDEPATH += $$PWD api ../core ../core/api ../webengine/api