summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2016-11-11 11:55:27 +0000
committerThe Qt Project <gerrit-noreply@qt-project.org>2016-11-11 15:37:35 +0000
commitc27374541e289962df6947967b97178bfa63e9f7 (patch)
tree2f4254eb30b9c5c3eef8ac9f770ddf26c6a5d992
parente70b59112104b72e794c20f7c715482809780d32 (diff)
parent39f7ce19dbce34dfa7e730d6fa743d88109c3369 (diff)
Merge "Merge remote-tracking branch 'origin/5.7' into 5.8" into refs/staging/5.8
-rw-r--r--src/core/content_browser_client_qt.cpp11
-rw-r--r--src/core/content_browser_client_qt.h3
-rw-r--r--src/core/content_client_qt.cpp3
-rw-r--r--src/core/gl_context_qt.cpp2
-rw-r--r--src/core/gl_surface_qt.cpp55
-rw-r--r--src/core/media_capture_devices_dispatcher.cpp1
-rw-r--r--src/core/print_view_manager_qt.cpp20
-rw-r--r--src/core/web_contents_adapter.cpp22
-rw-r--r--src/core/web_contents_delegate_qt.cpp13
-rw-r--r--src/core/web_engine_context.cpp19
-rw-r--r--src/webengine/doc/qtwebengine.qdocconf6
-rw-r--r--src/webengine/doc/src/qtwebengine-deploying.qdoc10
-rw-r--r--src/webengine/doc/src/qtwebengine-features.qdoc1
-rw-r--r--src/webengine/doc/src/qtwebengine-overview.qdoc2
-rw-r--r--src/webengine/doc/src/qtwebengine-platform-notes.qdoc22
-rw-r--r--src/webengine/plugin/plugin.cpp2
-rw-r--r--src/webenginewidgets/api/qwebenginepage.cpp5
-rw-r--r--src/webenginewidgets/api/qwebengineview.cpp12
-rw-r--r--src/webenginewidgets/api/qwebengineview_p.h1
-rw-r--r--src/webenginewidgets/doc/src/qwebenginesettings_lgpl.qdoc4
-rw-r--r--src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp7
-rw-r--r--src/webenginewidgets/webenginewidgets.pro2
-rw-r--r--sync.profile17
-rw-r--r--tools/qmake/mkspecs/features/functions.prf10
24 files changed, 151 insertions, 99 deletions
diff --git a/src/core/content_browser_client_qt.cpp b/src/core/content_browser_client_qt.cpp
index a57c3b00f..c3800e9ff 100644
--- a/src/core/content_browser_client_qt.cpp
+++ b/src/core/content_browser_client_qt.cpp
@@ -52,6 +52,7 @@
#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"
#include "content/public/browser/render_frame_host.h"
@@ -283,7 +284,8 @@ public:
m_handle = pni->nativeResourceForContext(QByteArrayLiteral("cglcontextobj"), qtContext);
else if (platform == QLatin1String("qnx"))
m_handle = pni->nativeResourceForContext(QByteArrayLiteral("eglcontext"), qtContext);
- else if (platform == QLatin1String("eglfs") || platform == QLatin1String("wayland"))
+ else if (platform == QLatin1String("eglfs") || platform == QLatin1String("wayland")
+ || platform == QLatin1String("wayland-egl"))
m_handle = pni->nativeResourceForContext(QByteArrayLiteral("eglcontext"), qtContext);
else if (platform == QLatin1String("windows")) {
if (gl::GetGLImplementation() == gl::kGLImplementationEGLGLES2)
@@ -479,6 +481,13 @@ void ContentBrowserClientQt::AllowCertificateError(content::WebContents *webCont
*result = content::CERTIFICATE_REQUEST_RESULT_TYPE_DENY;
}
+void ContentBrowserClientQt::SelectClientCertificate(content::WebContents * /*webContents*/,
+ net::SSLCertRequestInfo * /*certRequestInfo*/,
+ std::unique_ptr<content::ClientCertificateDelegate> delegate)
+{
+ delegate->ContinueWithCertificate(nullptr);
+}
+
std::string ContentBrowserClientQt::GetApplicationLocale()
{
return WebEngineLibraryInfo::getApplicationLocale();
diff --git a/src/core/content_browser_client_qt.h b/src/core/content_browser_client_qt.h
index acbf1a059..47b880643 100644
--- a/src/core/content_browser_client_qt.h
+++ b/src/core/content_browser_client_qt.h
@@ -100,6 +100,9 @@ public:
bool expired_previous_decision,
const base::Callback<void(bool)>& callback,
content::CertificateRequestResultType* result) Q_DECL_OVERRIDE;
+ virtual void SelectClientCertificate(content::WebContents* web_contents,
+ net::SSLCertRequestInfo* cert_request_info,
+ std::unique_ptr<content::ClientCertificateDelegate> delegate) Q_DECL_OVERRIDE;
content::DevToolsManagerDelegate *GetDevToolsManagerDelegate() Q_DECL_OVERRIDE;
virtual std::string GetApplicationLocale() Q_DECL_OVERRIDE;
diff --git a/src/core/content_client_qt.cpp b/src/core/content_client_qt.cpp
index 0dac5e48b..5d51f65aa 100644
--- a/src/core/content_client_qt.cpp
+++ b/src/core/content_client_qt.cpp
@@ -166,7 +166,8 @@ void AddPepperFlashFromSystem(std::vector<content::PepperPluginInfo>* plugins)
#endif
#if defined(Q_OS_LINUX)
pluginPaths << "/opt/google/chrome/PepperFlash/libpepflashplayer.so" // Google Chrome
- << "/usr/lib/pepperflashplugin-nonfree/libpepflashplayer.so" // Ubuntu
+ << "/usr/lib/pepperflashplugin-nonfree/libpepflashplayer.so" // Ubuntu, package pepperflashplugin-nonfree
+ << "/usr/lib/adobe-flashplugin/libpepflashplayer.so" // Ubuntu, package adobe-flashplugin
<< "/usr/lib/PepperFlash/libpepflashplayer.so" // Arch
<< "/usr/lib64/chromium/PepperFlash/libpepflashplayer.so"; // OpenSuSE
pluginPaths << ppapiPluginsPath() + QStringLiteral("/libpepflashplayer.so");
diff --git a/src/core/gl_context_qt.cpp b/src/core/gl_context_qt.cpp
index b1177a998..a1855b060 100644
--- a/src/core/gl_context_qt.cpp
+++ b/src/core/gl_context_qt.cpp
@@ -122,7 +122,7 @@ void* GLContextHelper::getXConfig()
void* GLContextHelper::getEGLDisplay()
{
- return resourceForContext(QByteArrayLiteral("egldisplay"));
+ return resourceForIntegration(QByteArrayLiteral("egldisplay"));
}
void* GLContextHelper::getXDisplay()
diff --git a/src/core/gl_surface_qt.cpp b/src/core/gl_surface_qt.cpp
index e88a26715..74bb32d1f 100644
--- a/src/core/gl_surface_qt.cpp
+++ b/src/core/gl_surface_qt.cpp
@@ -90,6 +90,9 @@ void* g_display;
const char* g_extensions = NULL;
bool g_egl_surfaceless_context_supported = false;
+
+bool g_initializedEGL = false;
+
} // namespace
@@ -573,11 +576,17 @@ bool InitializeGLOneOffPlatform()
return GLSurfaceQtEGL::InitializeOneOff();
if (GetGLImplementation() == kGLImplementationDesktopGL) {
-#if defined(USE_X11)
- return GLSurfaceQtGLX::InitializeOneOff();
-#elif defined(OS_WIN)
+#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;
@@ -586,40 +595,40 @@ bool InitializeGLOneOffPlatform()
scoped_refptr<GLSurface>
CreateOffscreenGLSurface(const gfx::Size& size)
{
+ scoped_refptr<GLSurface> surface;
switch (GetGLImplementation()) {
case kGLImplementationDesktopGLCoreProfile:
case kGLImplementationDesktopGL: {
-#if defined(USE_X11)
- scoped_refptr<GLSurface> surface = new GLSurfaceQtGLX(size);
- if (!surface->Initialize())
- return NULL;
- return surface;
-#elif defined(OS_WIN)
- scoped_refptr<GLSurface> surface = new GLSurfaceQtWGL(size);
- if (!surface->Initialize())
- return NULL;
- return surface;
-#else
- LOG(ERROR) << "Desktop GL is not supported on this platform.";
- Q_UNREACHABLE();
- return NULL;
+#if defined(OS_WIN)
+ surface = new GLSurfaceQtWGL(size);
+ if (surface->Initialize())
+ return surface;
+ break;
+#elif defined(USE_X11)
+ if (!g_initializedEGL) {
+ surface = new GLSurfaceQtGLX(size);
+ if (surface->Initialize())
+ return surface;
+ }
+ // no break
#endif
}
case kGLImplementationEGLGLES2: {
- scoped_refptr<GLSurface> surface;
if (g_egl_surfaceless_context_supported)
surface = new GLSurfacelessQtEGL(size);
else
surface = new GLSurfaceQtEGL(size);
- if (!surface->Initialize())
- return NULL;
- return surface;
+ if (surface->Initialize())
+ return surface;
+ break;
}
default:
- Q_UNREACHABLE();
- return NULL;
+ break;
}
+ LOG(ERROR) << "Requested OpenGL platform is not supported.";
+ Q_UNREACHABLE();
+ return NULL;
}
scoped_refptr<GLSurface>
diff --git a/src/core/media_capture_devices_dispatcher.cpp b/src/core/media_capture_devices_dispatcher.cpp
index 3e260587c..f06f0150f 100644
--- a/src/core/media_capture_devices_dispatcher.cpp
+++ b/src/core/media_capture_devices_dispatcher.cpp
@@ -173,7 +173,6 @@ void MediaCaptureDevicesDispatcher::handleMediaAccessPermissionResponse(content:
if (securityOriginsMatch && (microphoneRequested || webcamRequested)) {
switch (request.request_type) {
case content::MEDIA_OPEN_DEVICE_PEPPER_ONLY:
- Q_UNREACHABLE(); // only speculative as this is for Pepper
getDefaultDevices("", "", microphoneRequested, webcamRequested, &devices);
break;
case content::MEDIA_DEVICE_ACCESS:
diff --git a/src/core/print_view_manager_qt.cpp b/src/core/print_view_manager_qt.cpp
index 8f52cc24a..0231df8bd 100644
--- a/src/core/print_view_manager_qt.cpp
+++ b/src/core/print_view_manager_qt.cpp
@@ -136,14 +136,16 @@ static base::DictionaryValue *createPrintSettings()
return printSettings;
}
-static void applyQPageLayoutSettingsToDictionary(const QPageLayout &pageLayout, base::DictionaryValue &printSettings)
+static base::DictionaryValue *createPrintSettingsFromQPageLayout(const QPageLayout &pageLayout)
{
+ base::DictionaryValue *printSettings = createPrintSettings();
+
//Set page size attributes, chromium expects these in micrometers
QSizeF pageSizeInMilimeter = pageLayout.pageSize().size(QPageSize::Millimeter);
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));
+ printSettings->Set(printing::kSettingMediaSize, std::move(sizeDict));
// Apply page margins
QMargins pageMarginsInPoints = pageLayout.marginsPoints();
@@ -152,10 +154,13 @@ static void applyQPageLayoutSettingsToDictionary(const QPageLayout &pageLayout,
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);
- printSettings.SetBoolean(printing::kSettingLandscape, pageLayout.orientation() == QPageLayout::Landscape);
+ printSettings->Set(printing::kSettingMarginsCustom, std::move(marginsDict));
+ printSettings->SetInteger(printing::kSettingMarginsType, printing::CUSTOM_MARGINS);
+
+ printSettings->SetBoolean(printing::kSettingLandscape, pageLayout.orientation() == QPageLayout::Landscape);
+
+ return printSettings;
}
} // namespace
@@ -209,12 +214,11 @@ bool PrintViewManagerQt::PrintToPDFInternal(const QPageLayout &pageLayout, bool
{
if (!pageLayout.isValid())
return false;
- m_printSettings.reset(createPrintSettings());
- m_printSettings->SetInteger(printing::kSettingColor, printInColor ? printing::COLOR : printing::GRAYSCALE);
- applyQPageLayoutSettingsToDictionary(pageLayout, *m_printSettings);
+ 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/web_contents_adapter.cpp b/src/core/web_contents_adapter.cpp
index d582993b7..fadbd6d2e 100644
--- a/src/core/web_contents_adapter.cpp
+++ b/src/core/web_contents_adapter.cpp
@@ -1113,18 +1113,12 @@ void WebContentsAdapter::setWebChannel(QWebChannel *channel, uint worldId)
static QMimeData *mimeDataFromDropData(const content::DropData &dropData)
{
QMimeData *mimeData = new QMimeData();
- if (!dropData.text.is_null()) {
+ if (!dropData.text.is_null())
mimeData->setText(toQt(dropData.text.string()));
- return mimeData;
- }
- if (!dropData.html.is_null()) {
+ if (!dropData.html.is_null())
mimeData->setHtml(toQt(dropData.html.string()));
- return mimeData;
- }
- if (dropData.url.is_valid()) {
+ if (dropData.url.is_valid())
mimeData->setUrls(QList<QUrl>() << toQt(dropData.url));
- return mimeData;
- }
return mimeData;
}
@@ -1216,6 +1210,16 @@ Qt::DropAction WebContentsAdapter::updateDragPosition(QDragMoveEvent *e, const Q
rvh->DragTargetDragOver(toGfx(e->pos()), toGfx(screenPos), toWeb(e->possibleActions()),
blink::WebInputEvent::LeftButtonDown);
+ base::MessageLoop *currentMessageLoop = base::MessageLoop::current();
+ DCHECK(currentMessageLoop);
+ if (!currentMessageLoop->NestableTasksAllowed()) {
+ // We're already inside a MessageLoop::RunTask call, and scheduled tasks will not be
+ // executed. That means, updateDragAction will never be called, and the RunLoop below will
+ // remain blocked forever.
+ qWarning("WebContentsAdapter::updateDragPosition called from MessageLoop::RunTask.");
+ return Qt::IgnoreAction;
+ }
+
// Wait until we get notified via RenderViewHostDelegateView::UpdateDragCursor. This calls
// WebContentsAdapter::updateDragAction that will eventually quit the nested loop.
base::RunLoop loop;
diff --git a/src/core/web_contents_delegate_qt.cpp b/src/core/web_contents_delegate_qt.cpp
index 9d0965818..36acfe62e 100644
--- a/src/core/web_contents_delegate_qt.cpp
+++ b/src/core/web_contents_delegate_qt.cpp
@@ -74,6 +74,7 @@
#include "ui/events/latency_info.h"
#include <QDesktopServices>
+#include <QTimer>
namespace QtWebEngineCore {
@@ -107,13 +108,19 @@ content::WebContents *WebContentsDelegateQt::OpenURLFromTab(content::WebContents
Q_ASSERT(target);
content::NavigationController::LoadURLParams load_url_params(params.url);
+ load_url_params.source_site_instance = params.source_site_instance;
load_url_params.referrer = params.referrer;
load_url_params.frame_tree_node_id = params.frame_tree_node_id;
+ load_url_params.redirect_chain = params.redirect_chain;
load_url_params.transition_type = params.transition;
load_url_params.extra_headers = params.extra_headers;
load_url_params.should_replace_current_entry = params.should_replace_current_entry;
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_HTTP_POST;
+ load_url_params.post_data = params.post_data;
+ }
target->GetController().LoadURLWithParams(load_url_params);
return target;
@@ -320,7 +327,11 @@ void WebContentsDelegateQt::RunFileChooser(content::RenderFrameHost *frameHost,
m_filePickerController.reset(new FilePickerController(static_cast<FilePickerController::FileChooserMode>(params.mode),
web_contents(), toQt(params.default_file_name.value()), acceptedMimeTypes));
- m_viewClient->runFileChooser(m_filePickerController);
+
+ // Defer the call to not block base::MessageLoop::RunTask with modal dialogs.
+ QTimer::singleShot(0, [this] () {
+ m_viewClient->runFileChooser(m_filePickerController);
+ });
}
bool WebContentsDelegateQt::AddMessageToConsole(content::WebContents *source, int32_t level, const base::string16 &message, int32_t line_no, const base::string16 &source_id)
diff --git a/src/core/web_engine_context.cpp b/src/core/web_engine_context.cpp
index 7fe8fb612..491835e45 100644
--- a/src/core/web_engine_context.cpp
+++ b/src/core/web_engine_context.cpp
@@ -309,8 +309,10 @@ WebEngineContext::WebEngineContext()
if (useEmbeddedSwitches) {
// Inspired by the Android port's default switches
- parsedCommandLine->AppendSwitch(switches::kEnableOverlayScrollbar);
- parsedCommandLine->AppendSwitch(switches::kEnablePinch);
+ if (!parsedCommandLine->HasSwitch(switches::kDisableOverlayScrollbar))
+ parsedCommandLine->AppendSwitch(switches::kEnableOverlayScrollbar);
+ if (!parsedCommandLine->HasSwitch(switches::kDisablePinch))
+ parsedCommandLine->AppendSwitch(switches::kEnablePinch);
parsedCommandLine->AppendSwitch(switches::kEnableViewport);
parsedCommandLine->AppendSwitch(switches::kMainFrameResizesAreOrientationChanges);
parsedCommandLine->AppendSwitch(switches::kDisableAcceleratedVideoDecode);
@@ -325,7 +327,7 @@ WebEngineContext::WebEngineContext()
const char *glType = 0;
#ifndef QT_NO_OPENGL
if (!usingANGLE() && !usingSoftwareDynamicGL() && !usingQtQuick2DRenderer()) {
- if (qt_gl_global_share_context()) {
+ 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 = gl::kGLImplementationEGLName;
@@ -359,16 +361,7 @@ WebEngineContext::WebEngineContext()
glType = gl::kGLImplementationDesktopName;
}
} else {
- qWarning("WebEngineContext used before QtWebEngine::initialize()");
- // We have to assume the default OpenGL module type will be used.
- switch (QOpenGLContext::openGLModuleType()) {
- case QOpenGLContext::LibGL:
- glType = gl::kGLImplementationDesktopName;
- break;
- case QOpenGLContext::LibGLES:
- glType = gl::kGLImplementationEGLName;
- break;
- }
+ qWarning("WebEngineContext used before QtWebEngine::initialize() or OpenGL context creation failed.");
}
}
#endif
diff --git a/src/webengine/doc/qtwebengine.qdocconf b/src/webengine/doc/qtwebengine.qdocconf
index d9b1f1154..fe83b082f 100644
--- a/src/webengine/doc/qtwebengine.qdocconf
+++ b/src/webengine/doc/qtwebengine.qdocconf
@@ -18,9 +18,9 @@ qhp.QtWebEngine.customFilters.Qt.filterAttributes = qtwebengine $QT_VERSION
qhp.QtWebEngine.subprojects = classes qmltypes examples
-qhp.QtWebEngine.subprojects.classes.title = C++ Classes
-qhp.QtWebEngine.subprojects.classes.indexTitle = Qt WebEngine C++ Classes
-qhp.QtWebEngine.subprojects.classes.selectors = class doc:headerfile
+qhp.QtWebEngine.subprojects.classes.title = C++ Classes and Namespaces
+qhp.QtWebEngine.subprojects.classes.indexTitle = Qt WebEngine C++ Classes and Namespaces
+qhp.QtWebEngine.subprojects.classes.selectors = class group:qtwebengine-namespaces doc:headerfile
qhp.QtWebEngine.subprojects.classes.sortPages = true
qhp.QtWebEngine.subprojects.qmltypes.title = QML Types
diff --git a/src/webengine/doc/src/qtwebengine-deploying.qdoc b/src/webengine/doc/src/qtwebengine-deploying.qdoc
index b6b91f2e9..25b6d218c 100644
--- a/src/webengine/doc/src/qtwebengine-deploying.qdoc
+++ b/src/webengine/doc/src/qtwebengine-deploying.qdoc
@@ -30,7 +30,7 @@
\title Deploying Qt WebEngine Applications
The way to package and deploy applications varies between operating systems.
- For Windows and macOS, \l{The Windows Deployment Tool}{windeployqt} and
+ For Windows and \macos, \l{The Windows Deployment Tool}{windeployqt} and
\l{Deploying Applications on OS X}{macdeployqt} automate the steps to
generate a stand-alone application package.
@@ -47,7 +47,7 @@
limitations are:
\list
- \li Qt WebEngine currently supports only Windows, Linux, and macOS.
+ \li Qt WebEngine currently supports only Windows, Linux, and \macos.
\li On Windows, Qt WebEngine only supports Windows Vista or newer as
target platform. Due to use of newer API in Chromium, Windows XP is
@@ -102,7 +102,7 @@
For Qt installations, this is \c QTDIR/libexec (Linux) or \c QTDIR\bin
(Windows). The path can be changed by defining a \c qt.conf file, for
example. Alternatively, an executable path can be set as a value of the
- \c QTWEBENGINEPROCESS_PATH environment variable. On macOS, Qt WebEngine
+ \c QTWEBENGINEPROCESS_PATH environment variable. On \macos, Qt WebEngine
looks for the executable in \c .app/Helpers/QtWebEngineProcess.
\section2 Deploying Resources
@@ -128,7 +128,7 @@
\list
\li On Linux and Windows: the \c resources directory in the directory
specified by QLibraryInfo::location(QLibraryInfo::DataPath)
- \li On macOS: \c .app/Content/Resources
+ \li On \macos: \c .app/Content/Resources
\endlist
\section2 Translations
@@ -136,7 +136,7 @@
Locale data (such as \c en-US.pak) is searched form the following locations:
\list
- \li On macOS: \c .app/Content/Resources
+ \li On \macos: \c .app/Content/Resources
\li On Linux and Windows: \c qtwebengine_locales directory in the
directory specified by
QLibraryInfo::location(QLibraryInfo::TranslationsPath)
diff --git a/src/webengine/doc/src/qtwebengine-features.qdoc b/src/webengine/doc/src/qtwebengine-features.qdoc
index 8cdbd13a8..647f1030b 100644
--- a/src/webengine/doc/src/qtwebengine-features.qdoc
+++ b/src/webengine/doc/src/qtwebengine-features.qdoc
@@ -222,6 +222,7 @@
\li Linux
\code
/usr/lib/pepperflashplugin-nonfree/libpepflashplayer.so
+ /usr/lib/adobe-flashplugin/libpepflashplayer.so
/usr/lib/PepperFlash/libpepflashplayer.so
/usr/lib64/chromium/PepperFlash/libpepflashplayer.so
\endcode
diff --git a/src/webengine/doc/src/qtwebengine-overview.qdoc b/src/webengine/doc/src/qtwebengine-overview.qdoc
index 273d32861..6995be2fa 100644
--- a/src/webengine/doc/src/qtwebengine-overview.qdoc
+++ b/src/webengine/doc/src/qtwebengine-overview.qdoc
@@ -250,7 +250,7 @@
\section1 Platform Notes
- Qt WebEngine currently supports only Windows, Linux, and OS X. Due to Chromium build
+ Qt WebEngine currently supports only Windows, Linux, and \macos. Due to Chromium build
requirements it also often requires a newer compiler than the rest of Qt. See
\l{Qt WebEngine Platform Notes} for further details.
diff --git a/src/webengine/doc/src/qtwebengine-platform-notes.qdoc b/src/webengine/doc/src/qtwebengine-platform-notes.qdoc
index 119e64279..c5ebe0f06 100644
--- a/src/webengine/doc/src/qtwebengine-platform-notes.qdoc
+++ b/src/webengine/doc/src/qtwebengine-platform-notes.qdoc
@@ -41,7 +41,7 @@
\list
\li \l{Qt for Windows - Requirements}
\li \l{Qt for X11 Requirements}
- \li \l{Qt for OS X - Requirements}
+ \li \l{Qt for macOS - Requirements}
\endlist
In addition, the following tools are required for building the \l {Qt WebEngine} module:
@@ -50,7 +50,7 @@
\li \l {All Platforms}
\li \l {Windows}
\li \l {Linux}
- \li \l {OS X}
+ \li \l {macOS}
\endlist
The tests for skipping the Qt WebEngine build are located in the
@@ -99,22 +99,22 @@
Further, development packages for \c khr and \c libcap need to be installed.
- \section2 OS X
+ \section2 \macos
- On OS X, the following are required:
+ On \macos, the following are required:
\list
- \li OS X 10.9 or later
+ \li \macos 10.9 or later
\li Xcode 5.1 or later
- \li OS X 10.10 SDK or later
+ \li \macos 10.10 SDK or later
\endlist
- \note Qt WebEngine cannot be built for the 32-bit mode of OS X (using the
+ \note Qt WebEngine cannot be built for the 32-bit mode of \macos (using the
\c macx-clang-32 \c mkspec).
\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
@@ -137,7 +137,7 @@
before the application instance is declared, to make sure that all created OpenGL contexts use
the same OpenGL profile.
- On OS X, if the default QSurfaceFormat is set after the application instance, the application
+ On \macos, if the default QSurfaceFormat is set after the application instance, the application
will exit with qFatal(), and print a message that the default QSurfaceFormat should be set
before the application instance.
*/
diff --git a/src/webengine/plugin/plugin.cpp b/src/webengine/plugin/plugin.cpp
index 010215f78..0fd2087d4 100644
--- a/src/webengine/plugin/plugin.cpp
+++ b/src/webengine/plugin/plugin.cpp
@@ -66,7 +66,7 @@ class QtWebEnginePlugin : public QQmlExtensionPlugin
Q_OBJECT
Q_PLUGIN_METADATA(IID QQmlExtensionInterface_iid)
public:
- virtual void initializeEngine(QQmlEngine *engine, const char *uri)
+ virtual void initializeEngine(QQmlEngine *engine, const char *uri) Q_DECL_OVERRIDE
{
Q_UNUSED(uri);
engine->addImageProvider(QQuickWebEngineFaviconProvider::identifier(), new QQuickWebEngineFaviconProvider);
diff --git a/src/webenginewidgets/api/qwebenginepage.cpp b/src/webenginewidgets/api/qwebenginepage.cpp
index 1004b3e92..ca160c362 100644
--- a/src/webenginewidgets/api/qwebenginepage.cpp
+++ b/src/webenginewidgets/api/qwebenginepage.cpp
@@ -333,6 +333,11 @@ void QWebEnginePagePrivate::adoptNewWindowImpl(QWebEnginePage *newPage,
if (!initialGeometry.isEmpty())
emit newPage->geometryChangeRequested(initialGeometry);
+ // If the constructor of the QWebEnginePage descendant set a web channel,
+ // set it on the new adapter.
+ newWebContents->setWebChannel(newPage->d_func()->webChannel
+ , newPage->d_func()->webChannelWorldId);
+
// Page has finished the adoption process.
newPage->d_func()->m_isBeingAdopted = false;
}
diff --git a/src/webenginewidgets/api/qwebengineview.cpp b/src/webenginewidgets/api/qwebengineview.cpp
index 6171391e3..8b4053e73 100644
--- a/src/webenginewidgets/api/qwebengineview.cpp
+++ b/src/webenginewidgets/api/qwebengineview.cpp
@@ -107,6 +107,7 @@ static QAccessibleInterface *webAccessibleFactory(const QString &, QObject *obje
QWebEngineViewPrivate::QWebEngineViewPrivate()
: page(0)
, m_pendingContextMenuEvent(false)
+ , m_dragEntered(false)
{
#ifndef QT_NO_ACCESSIBILITY
QAccessible::installFactory(&webAccessibleFactory);
@@ -350,7 +351,10 @@ void QWebEngineView::dragEnterEvent(QDragEnterEvent *e)
{
Q_D(QWebEngineView);
e->accept();
+ if (d->m_dragEntered)
+ d->page->d_ptr->adapter->leaveDrag();
d->page->d_ptr->adapter->enterDrag(e, mapToGlobal(e->pos()));
+ d->m_dragEntered = true;
}
/*!
@@ -359,8 +363,11 @@ void QWebEngineView::dragEnterEvent(QDragEnterEvent *e)
void QWebEngineView::dragLeaveEvent(QDragLeaveEvent *e)
{
Q_D(QWebEngineView);
+ if (!d->m_dragEntered)
+ return;
e->accept();
d->page->d_ptr->adapter->leaveDrag();
+ d->m_dragEntered = false;
}
/*!
@@ -369,6 +376,8 @@ void QWebEngineView::dragLeaveEvent(QDragLeaveEvent *e)
void QWebEngineView::dragMoveEvent(QDragMoveEvent *e)
{
Q_D(QWebEngineView);
+ if (!d->m_dragEntered)
+ return;
QtWebEngineCore::WebContentsAdapter *adapter = d->page->d_ptr->adapter.data();
Qt::DropAction dropAction = adapter->updateDragPosition(e, mapToGlobal(e->pos()));
if (Qt::IgnoreAction == dropAction) {
@@ -385,8 +394,11 @@ void QWebEngineView::dragMoveEvent(QDragMoveEvent *e)
void QWebEngineView::dropEvent(QDropEvent *e)
{
Q_D(QWebEngineView);
+ if (!d->m_dragEntered)
+ return;
e->accept();
d->page->d_ptr->adapter->endDragging(e->pos(), mapToGlobal(e->pos()));
+ d->m_dragEntered = false;
}
#ifndef QT_NO_ACCESSIBILITY
diff --git a/src/webenginewidgets/api/qwebengineview_p.h b/src/webenginewidgets/api/qwebengineview_p.h
index b98c553f4..45b3e266e 100644
--- a/src/webenginewidgets/api/qwebengineview_p.h
+++ b/src/webenginewidgets/api/qwebengineview_p.h
@@ -71,6 +71,7 @@ public:
QWebEnginePage *page;
bool m_pendingContextMenuEvent;
+ bool m_dragEntered;
};
#ifndef QT_NO_ACCESSIBILITY
diff --git a/src/webenginewidgets/doc/src/qwebenginesettings_lgpl.qdoc b/src/webenginewidgets/doc/src/qwebenginesettings_lgpl.qdoc
index 69bac36c8..07afd6501 100644
--- a/src/webenginewidgets/doc/src/qwebenginesettings_lgpl.qdoc
+++ b/src/webenginewidgets/doc/src/qwebenginesettings_lgpl.qdoc
@@ -164,12 +164,12 @@
/*!
\fn void QWebEngineSettings::setFontSize(FontSize type, int size)
- Sets the font size for \a type to \a size.
+ Sets the font size for \a type to \a size in pixels.
*/
/*!
\fn int QWebEngineSettings::fontSize(FontSize type) const
- Returns the default font size for \a type.
+ Returns the default font size for \a type in pixels.
*/
/*!
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 b333c7b0e..eb3a3931a 100644
--- a/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp
+++ b/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp
@@ -55,6 +55,7 @@
#include <QSGSimpleRectNode>
#include <QSGSimpleTextureNode>
#endif
+#include <private/qwidget_p.h>
namespace QtWebEngineCore {
@@ -402,6 +403,12 @@ bool RenderWidgetHostViewQtDelegateWidget::event(QEvent *event)
break;
}
+ QEvent::Type type = event->type();
+ if (type == QEvent::FocusIn) {
+ QWidgetPrivate *d = QWidgetPrivate::get(this);
+ d->updateWidgetTransform(event);
+ }
+
if (event->type() == QEvent::MouseButtonDblClick) {
// QWidget keeps the Qt4 behavior where the DblClick event would replace the Press event.
// QtQuick is different by sending both the Press and DblClick events for the second press
diff --git a/src/webenginewidgets/webenginewidgets.pro b/src/webenginewidgets/webenginewidgets.pro
index f1bb86df4..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 quickwidgets
+QT_PRIVATE += quick-private gui-private core-private widgets-private quickwidgets
INCLUDEPATH += $$PWD api ../core ../core/api ../webengine/api
diff --git a/sync.profile b/sync.profile
index e713faee4..4cc549106 100644
--- a/sync.profile
+++ b/sync.profile
@@ -10,20 +10,3 @@
);
%classnames = (
);
-
-# Module dependencies.
-# Every module that is required to build this module should have one entry.
-# Each of the module version specifiers can take one of the following values:
-# - A specific Git revision.
-# - any git symbolic ref resolvable from the module's repository (e.g. "refs/heads/master" to track master branch)
-#
-%dependencies = (
- "qtbase" => "",
- "qtdeclarative" => "",
- "qtlocation" => "",
- "qttools" => "",
-# FIXME: take examples out into their own module to avoid a potential circular dependency later ?
- "qtquickcontrols" => "",
- "qtquickcontrols2" => "",
- "qtwebchannel" => "",
-);
diff --git a/tools/qmake/mkspecs/features/functions.prf b/tools/qmake/mkspecs/features/functions.prf
index 374152940..047f887d1 100644
--- a/tools/qmake/mkspecs/features/functions.prf
+++ b/tools/qmake/mkspecs/features/functions.prf
@@ -75,9 +75,19 @@ defineTest(isPlatformSupported) {
return(false)
}
!isPythonVersionSupported(): return(false)
+ !isArchSupported(): return(false)
return(true)
}
+defineTest(isArchSupported) {
+ contains(QT_ARCH, "i386")|contains(QT_ARCH, "x86_64"): return(true)
+ contains(QT_ARCH, "arm")|contains(QT_ARCH, "arm64"): return(true)
+ contains(QT_ARCH, "mips")|contains(QT_ARCH, "mips64"): return(true)
+
+ skipBuild("QtWebEngine can only be built for x86, x86-64, ARM, Aarch64, MIPSel, and MIPS64 architectures.")
+ return(false)
+}
+
defineTest(isPythonVersionSupported) {
python_error_msg = "Python version 2 (2.7.5 or later) is required to build Qt WebEngine."
python_version = $$system('python -c "import sys; print(sys.version_info[0:3])"')