summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2017-05-29 10:32:39 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2017-05-29 08:33:31 +0000
commit95ca17c45aea718cade487640edc63e08bc23820 (patch)
tree53d6cc2102d18ed4b143cb69b378cbbeba7faee4 /src
parentfdbc265de10fe173b0c38e0be4c6e3eed1dc65b7 (diff)
parent73f7be5b2a95eab3dce11caede538eeb7beb71f2 (diff)
Merge remote-tracking branch 'origin/5.9.0' into 5.9
Diffstat (limited to 'src')
m---------src/3rdparty0
-rw-r--r--src/core/api/core_api.pro4
-rw-r--r--src/core/api/qtbug-60565.cpp121
-rw-r--r--src/core/browser_context_adapter.cpp2
-rw-r--r--src/core/config/mac_osx.pri2
-rw-r--r--src/core/delegated_frame_node.cpp9
-rw-r--r--src/core/render_widget_host_view_qt.cpp54
-rw-r--r--src/core/render_widget_host_view_qt.h4
-rw-r--r--src/core/web_contents_adapter.cpp2
-rw-r--r--src/core/web_engine_context.cpp10
-rw-r--r--src/tools/qwebengine_convert_dict/main.cpp16
-rw-r--r--src/webengine/api/qquickwebengineprofile.cpp2
-rw-r--r--src/webengine/doc/qtwebengine.qdocconf2
-rw-r--r--src/webengine/doc/src/qtwebengine-overview.qdoc4
-rw-r--r--src/webengine/doc/src/qtwebengine-platform-notes.qdoc39
-rw-r--r--src/webengine/ui_delegates_manager.cpp5
-rw-r--r--src/webenginewidgets/api/qwebenginedownloaditem.cpp13
-rw-r--r--src/webenginewidgets/api/qwebenginedownloaditem.h1
-rw-r--r--src/webenginewidgets/api/qwebengineprofile.cpp4
19 files changed, 256 insertions, 38 deletions
diff --git a/src/3rdparty b/src/3rdparty
-Subproject 898afbbf79637101bbd5e6ab12695ced6a759ae
+Subproject aa2fdd6be3d465280d2a0c3aacdc738bb4ffec0
diff --git a/src/core/api/core_api.pro b/src/core/api/core_api.pro
index cda01db40..22c165e2a 100644
--- a/src/core/api/core_api.pro
+++ b/src/core/api/core_api.pro
@@ -50,6 +50,10 @@ SOURCES = \
qwebengineurlrequestjob.cpp \
qwebengineurlschemehandler.cpp
+unix:!isEmpty(QMAKE_LFLAGS_VERSION_SCRIPT):!static {
+ SOURCES += qtbug-60565.cpp
+}
+
msvc {
# Create a list of object files that can be used as response file for the linker.
# This is done to simulate -whole-archive on MSVC.
diff --git a/src/core/api/qtbug-60565.cpp b/src/core/api/qtbug-60565.cpp
new file mode 100644
index 000000000..21b545cca
--- /dev/null
+++ b/src/core/api/qtbug-60565.cpp
@@ -0,0 +1,121 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 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 <new>
+#include <unistd.h>
+
+#if defined(__LP64__)
+# define SIZE_T_MANGLING "m"
+#else
+# define SIZE_T_MANGLING "j"
+#endif
+
+#define SHIM_ALIAS_SYMBOL(fn) __attribute__((weak, alias(#fn)))
+
+extern "C" {
+
+__asm__(".symver __ShimCppNew, _Znw" SIZE_T_MANGLING "@Qt_5");
+void* __ShimCppNew(size_t size)
+ SHIM_ALIAS_SYMBOL(ShimCppNew);
+
+__asm__(".symver __ShimCppDelete, _ZdlPv@Qt_5");
+void __ShimCppDelete(void* address)
+ SHIM_ALIAS_SYMBOL(ShimCppDelete);
+
+__asm__(".symver __ShimCppNewArray, _Zna" SIZE_T_MANGLING "@Qt_5");
+void* __ShimCppNewArray(size_t size)
+ SHIM_ALIAS_SYMBOL(ShimCppNewArray);
+
+__asm__(".symver __ShimCppDeleteArray, _ZdaPv@Qt_5");
+void __ShimCppDeleteArray(void* address)
+ SHIM_ALIAS_SYMBOL(ShimCppDeleteArray);
+
+__asm__(".symver __ShimCppNewNoThrow, _Znw" SIZE_T_MANGLING "RKSt9nothrow_t@Qt_5");
+void __ShimCppNewNoThrow(size_t size, const std::nothrow_t&) noexcept
+ SHIM_ALIAS_SYMBOL(ShimCppNew);
+
+__asm__(".symver __ShimCppNewArrayNoThrow, _Zna" SIZE_T_MANGLING "RKSt9nothrow_t@Qt_5");
+void __ShimCppNewArrayNoThrow(size_t size, const std::nothrow_t&) noexcept
+ SHIM_ALIAS_SYMBOL(ShimCppNewArray);
+
+__asm__(".symver __ShimCppDeleteNoThrow, _ZdlPvRKSt9nothrow_t@Qt_5");
+void __ShimCppDeleteNoThrow(void* address, const std::nothrow_t&) noexcept
+ SHIM_ALIAS_SYMBOL(ShimCppDelete);
+
+__asm__(".symver __ShimCppDeleteArrayNoThrow, _ZdaPvRKSt9nothrow_t@Qt_5");
+void __ShimCppDeleteArrayNoThrow(void* address, const std::nothrow_t&) noexcept
+ SHIM_ALIAS_SYMBOL(ShimCppDeleteArray);
+
+static void* __shimCppNew(size_t size);
+static void* __shimCppNewArray(size_t size);
+static void __shimCppDelete(void *address);
+static void __shimCppDeleteArray(void *address);
+
+static void* ShimCppNew(size_t size) {
+ return __shimCppNew(size);
+}
+
+static void* ShimCppNewArray(size_t size) {
+ return __shimCppNewArray(size);
+}
+
+static void ShimCppDelete(void* address) {
+ __shimCppDelete(address);
+}
+
+static void ShimCppDeleteArray(void* address) {
+ __shimCppDeleteArray(address);
+}
+} // extern "C"
+
+static void* __shimCppNew(size_t size) {
+ return operator new(size);
+}
+
+static void* __shimCppNewArray(size_t size) {
+ return operator new[](size);
+}
+
+static void __shimCppDelete(void* address) {
+ operator delete(address);
+}
+
+static void __shimCppDeleteArray(void* address) {
+ operator delete[](address);
+}
diff --git a/src/core/browser_context_adapter.cpp b/src/core/browser_context_adapter.cpp
index 1da186584..bec76ad81 100644
--- a/src/core/browser_context_adapter.cpp
+++ b/src/core/browser_context_adapter.cpp
@@ -162,6 +162,8 @@ QWebEngineUrlRequestInterceptor *BrowserContextAdapter::requestInterceptor()
void BrowserContextAdapter::setRequestInterceptor(QWebEngineUrlRequestInterceptor *interceptor)
{
+ if (m_requestInterceptor == interceptor)
+ return;
m_requestInterceptor = interceptor;
if (m_browserContext->url_request_getter_.get())
m_browserContext->url_request_getter_->updateRequestInterceptor();
diff --git a/src/core/config/mac_osx.pri b/src/core/config/mac_osx.pri
index cdd1ce7b6..ddb397565 100644
--- a/src/core/config/mac_osx.pri
+++ b/src/core/config/mac_osx.pri
@@ -38,5 +38,3 @@ use?(spellchecker) {
} else {
macos: gn_args += use_browser_spellchecker=false
}
-
-use?(appstore_compliant_code): gn_args += appstore_compliant_code=true
diff --git a/src/core/delegated_frame_node.cpp b/src/core/delegated_frame_node.cpp
index a4b2a4036..e49bc553f 100644
--- a/src/core/delegated_frame_node.cpp
+++ b/src/core/delegated_frame_node.cpp
@@ -209,6 +209,7 @@ protected:
QVector<QSGNode*> *m_sceneGraphNodes;
};
+#if (QT_VERSION >= QT_VERSION_CHECK(5, 8, 0))
class DelegatedNodeTreeUpdater : public DelegatedNodeTreeHandler
{
public:
@@ -303,6 +304,7 @@ public:
private:
QVector<QSGNode*>::iterator m_nodeIterator;
};
+#endif
class DelegatedNodeTreeCreator : public DelegatedNodeTreeHandler
{
@@ -872,8 +874,13 @@ void DelegatedFrameNode::commit(ChromiumCompositorData *chromiumCompositorData,
// We first compare if the render passes from the previous frame data are structurally
// equivalent to the render passes in the current frame data. If they are, we are going
// to reuse the old nodes. Otherwise, we will delete the old nodes and build a new tree.
+#if (QT_VERSION >= QT_VERSION_CHECK(5, 8, 0))
cc::DelegatedFrameData *previousFrameData = m_chromiumCompositorData->previousFrameData.get();
const bool buildNewTree = !areRenderPassStructuresEqual(frameData, previousFrameData) || m_sceneGraphNodes.empty();
+#else
+ // No updates possible with old scenegraph nodes
+ const bool buildNewTree = true;
+#endif
m_chromiumCompositorData->previousFrameData = nullptr;
SGObjects previousSGObjects;
@@ -887,11 +894,13 @@ void DelegatedFrameNode::commit(ChromiumCompositorData *chromiumCompositorData,
delete oldChain;
m_sceneGraphNodes.clear();
nodeHandler.reset(new DelegatedNodeTreeCreator(&m_sceneGraphNodes, apiDelegate));
+#if (QT_VERSION >= QT_VERSION_CHECK(5, 8, 0))
} else {
// Save the texture strong refs so they only go out of scope when the method returns and
// the new vector of texture strong refs has been filled.
qSwap(m_sgObjects.textureStrongRefs, textureStrongRefs);
nodeHandler.reset(new DelegatedNodeTreeUpdater(&m_sceneGraphNodes));
+#endif
}
// The RenderPasses list is actually a tree where a parent RenderPass is connected
// to its dependencies through a RenderPassId reference in one or more RenderPassQuads.
diff --git a/src/core/render_widget_host_view_qt.cpp b/src/core/render_widget_host_view_qt.cpp
index 6568398a8..cf22273e4 100644
--- a/src/core/render_widget_host_view_qt.cpp
+++ b/src/core/render_widget_host_view_qt.cpp
@@ -97,6 +97,7 @@ enum ImStateFlags {
TextInputStateUpdated = 1 << 0,
TextSelectionUpdated = 1 << 1,
TextSelectionBoundsUpdated = 1 << 2,
+ TextSelectionFlags = TextSelectionUpdated | TextSelectionBoundsUpdated,
AllFlags = TextInputStateUpdated | TextSelectionUpdated | TextSelectionBoundsUpdated
};
@@ -237,6 +238,19 @@ private:
float dpiScale;
};
+bool isAccessibilityEnabled() {
+ // On Linux accessibility is disabled by default due to performance issues,
+ // and can be re-enabled by setting the QTWEBENGINE_ENABLE_LINUX_ACCESSIBILITY environment
+ // variable. For details, see QTBUG-59922.
+#ifdef Q_OS_LINUX
+ static bool accessibility_enabled
+ = qEnvironmentVariableIsSet("QTWEBENGINE_ENABLE_LINUX_ACCESSIBILITY");
+#else
+ const bool accessibility_enabled = true;
+#endif
+ return accessibility_enabled;
+}
+
RenderWidgetHostViewQt::RenderWidgetHostViewQt(content::RenderWidgetHost* widget)
: m_host(content::RenderWidgetHostImpl::From(widget))
, m_gestureProvider(QtGestureProviderConfig(), this)
@@ -253,16 +267,18 @@ RenderWidgetHostViewQt::RenderWidgetHostViewQt(content::RenderWidgetHost* widget
, m_needsBeginFrames(false)
, m_addedFrameObserver(false)
, m_imState(0)
- , m_anchorPositionWithinSelection(0)
- , m_cursorPositionWithinSelection(0)
+ , m_anchorPositionWithinSelection(-1)
+ , m_cursorPositionWithinSelection(-1)
, m_cursorPosition(0)
, m_emptyPreviousSelection(true)
{
m_host->SetView(this);
#ifndef QT_NO_ACCESSIBILITY
- QAccessible::installActivationObserver(this);
- if (QAccessible::isActive())
- content::BrowserAccessibilityStateImpl::GetInstance()->EnableAccessibility();
+ if (isAccessibilityEnabled()) {
+ QAccessible::installActivationObserver(this);
+ if (QAccessible::isActive())
+ content::BrowserAccessibilityStateImpl::GetInstance()->EnableAccessibility();
+ }
#endif // QT_NO_ACCESSIBILITY
auto* task_runner = base::ThreadTaskRunnerHandle::Get().get();
m_beginFrameSource.reset(new cc::DelayBasedBeginFrameSource(
@@ -761,8 +777,10 @@ void RenderWidgetHostViewQt::OnSelectionBoundsChanged(content::TextInputManager
Q_UNUSED(updated_view);
m_imState |= ImStateFlags::TextSelectionBoundsUpdated;
- if (m_imState == ImStateFlags::AllFlags)
+ if (m_imState == ImStateFlags::AllFlags
+ || (m_imState == ImStateFlags::TextSelectionFlags && getTextInputType() == ui::TEXT_INPUT_TYPE_NONE)) {
selectionChanged();
+ }
}
void RenderWidgetHostViewQt::OnTextSelectionChanged(content::TextInputManager *text_input_manager, RenderWidgetHostViewBase *updated_view)
@@ -779,8 +797,10 @@ void RenderWidgetHostViewQt::OnTextSelectionChanged(content::TextInputManager *t
#endif // defined(USE_X11)
m_imState |= ImStateFlags::TextSelectionUpdated;
- if (m_imState == ImStateFlags::AllFlags)
+ if (m_imState == ImStateFlags::AllFlags
+ || (m_imState == ImStateFlags::TextSelectionFlags && getTextInputType() == ui::TEXT_INPUT_TYPE_NONE)) {
selectionChanged();
+ }
}
void RenderWidgetHostViewQt::selectionChanged()
@@ -788,6 +808,22 @@ void RenderWidgetHostViewQt::selectionChanged()
// Reset input manager state
m_imState = 0;
+ // Handle text selection out of an input field
+ if (getTextInputType() == ui::TEXT_INPUT_TYPE_NONE) {
+ if (GetSelectedText().empty() && m_emptyPreviousSelection)
+ return;
+
+ // Reset position values to emit selectionChanged signal when clearing text selection
+ // by clicking into an input field. These values are intended to be used by inputMethodQuery
+ // so they are not expected to be valid when selection is out of an input field.
+ m_anchorPositionWithinSelection = -1;
+ m_cursorPositionWithinSelection = -1;
+
+ m_emptyPreviousSelection = GetSelectedText().empty();
+ m_adapterClient->selectionChanged();
+ return;
+ }
+
const content::TextInputManager::TextSelection *selection = text_input_manager_->GetTextSelection();
if (!selection)
return;
@@ -802,8 +838,8 @@ void RenderWidgetHostViewQt::selectionChanged()
return;
}
- uint newAnchorPositionWithinSelection = 0;
- uint newCursorPositionWithinSelection = 0;
+ int newAnchorPositionWithinSelection = 0;
+ int newCursorPositionWithinSelection = 0;
if (text_input_manager_->GetSelectionRegion()->anchor.type() == gfx::SelectionBound::RIGHT) {
newAnchorPositionWithinSelection = selection->range.GetMax() - selection->offset;
diff --git a/src/core/render_widget_host_view_qt.h b/src/core/render_widget_host_view_qt.h
index 799930830..3b679923e 100644
--- a/src/core/render_widget_host_view_qt.h
+++ b/src/core/render_widget_host_view_qt.h
@@ -263,8 +263,8 @@ private:
gfx::SizeF m_lastContentsSize;
uint m_imState;
- uint m_anchorPositionWithinSelection;
- uint m_cursorPositionWithinSelection;
+ int m_anchorPositionWithinSelection;
+ int m_cursorPositionWithinSelection;
uint m_cursorPosition;
bool m_emptyPreviousSelection;
QString m_surroundingText;
diff --git a/src/core/web_contents_adapter.cpp b/src/core/web_contents_adapter.cpp
index d67d972c8..444429c75 100644
--- a/src/core/web_contents_adapter.cpp
+++ b/src/core/web_contents_adapter.cpp
@@ -1184,7 +1184,9 @@ void WebContentsAdapter::startDragging(QObject *dragSource, const content::DropD
bool dValid = true;
QMetaObject::Connection onDestroyed = QObject::connect(dragSource, &QObject::destroyed, [&dValid](){
dValid = false;
+#if (QT_VERSION >= QT_VERSION_CHECK(5, 7, 0))
QDrag::cancel();
+#endif
});
drag->setMimeData(mimeDataFromDropData(*d->currentDropData));
diff --git a/src/core/web_engine_context.cpp b/src/core/web_engine_context.cpp
index 60622b4ae..2748d2a0f 100644
--- a/src/core/web_engine_context.cpp
+++ b/src/core/web_engine_context.cpp
@@ -158,8 +158,10 @@ bool usingQtQuick2DRenderer()
}
}
+#if (QT_VERSION >= QT_VERSION_CHECK(5, 9, 0))
if (device.isEmpty())
device = QQuickWindow::sceneGraphBackend();
+#endif
if (device.isEmpty())
device = QString::fromLocal8Bit(qgetenv("QT_QUICK_BACKEND"));
if (device.isEmpty())
@@ -322,6 +324,14 @@ WebEngineContext::WebEngineContext()
// Enabled on OS X and Linux but currently not working. It worked in 5.7 on OS X.
parsedCommandLine->AppendSwitch(switches::kDisableGpuMemoryBufferVideoFrames);
+#if defined(Q_OS_MACOS)
+ // Accelerated decoding currently does not work on macOS due to issues with OpenGL Rectangle
+ // texture support. See QTBUG-60002.
+ parsedCommandLine->AppendSwitch(switches::kDisableAcceleratedVideoDecode);
+ // Same problem with Pepper using OpenGL images.
+ parsedCommandLine->AppendSwitch(switches::kDisablePepper3DImageChromium);
+#endif
+
if (useEmbeddedSwitches) {
// Inspired by the Android port's default switches
if (!parsedCommandLine->HasSwitch(switches::kDisableOverlayScrollbar))
diff --git a/src/tools/qwebengine_convert_dict/main.cpp b/src/tools/qwebengine_convert_dict/main.cpp
index 61e26c4a3..a86f868b3 100644
--- a/src/tools/qwebengine_convert_dict/main.cpp
+++ b/src/tools/qwebengine_convert_dict/main.cpp
@@ -107,6 +107,14 @@ inline bool VerifyWords(const convert_dict::DicReader::WordList& org_words,
return true;
}
+#if defined(OS_MACOSX) && defined(QT_MAC_FRAMEWORK_BUILD)
+QString frameworkIcuDataPath()
+{
+ return QLibraryInfo::location(QLibraryInfo::LibrariesPath) +
+ QStringLiteral("/QtWebEngineCore.framework/Resources/");
+}
+#endif
+
int main(int argc, char *argv[])
{
QTextStream out(stdout);
@@ -132,6 +140,14 @@ int main(int argc, char *argv[])
icuDataDir = icuPossibleEnvDataDir;
icuDataDirFound = true;
}
+#if defined(OS_MACOSX) && defined(QT_MAC_FRAMEWORK_BUILD)
+ // In a macOS Qt framework build, the resources are inside the QtWebEngineCore framework
+ // Resources directory, rather than in the Qt install location.
+ else if (QFileInfo::exists(frameworkIcuDataPath())) {
+ icuDataDir = frameworkIcuDataPath();
+ icuDataDirFound = true;
+ }
+#endif
// Try to find the ICU data directory in the installed Qt location.
else if (QFileInfo::exists(icuDataDir)) {
icuDataDirFound = true;
diff --git a/src/webengine/api/qquickwebengineprofile.cpp b/src/webengine/api/qquickwebengineprofile.cpp
index f22ec86a4..260d8958b 100644
--- a/src/webengine/api/qquickwebengineprofile.cpp
+++ b/src/webengine/api/qquickwebengineprofile.cpp
@@ -153,6 +153,8 @@ QQuickWebEngineProfilePrivate::QQuickWebEngineProfilePrivate(QSharedPointer<Brow
QQuickWebEngineProfilePrivate::~QQuickWebEngineProfilePrivate()
{
+ m_browserContextRef->setRequestInterceptor(nullptr);
+
m_browserContextRef->removeClient(this);
Q_FOREACH (QQuickWebEngineDownloadItem* download, m_ongoingDownloads) {
diff --git a/src/webengine/doc/qtwebengine.qdocconf b/src/webengine/doc/qtwebengine.qdocconf
index bc63addbe..ea9c6f21b 100644
--- a/src/webengine/doc/qtwebengine.qdocconf
+++ b/src/webengine/doc/qtwebengine.qdocconf
@@ -33,7 +33,7 @@ qhp.QtWebEngine.subprojects.examples.indexTitle = Qt WebEngine Examples
qhp.QtWebEngine.subprojects.examples.selectors = doc:example
qhp.QtWebEngine.subprojects.examples.sortPages = true
-manifestmeta.highlighted.names += "QtWebEngine/WebEngine Markdown Editor Example" \
+manifestmeta.highlighted.names += "QtWebEngine/WebEngine Widgets Simple Browser Example" \
"QtWebEngine/WebEngine Quick Nano Browser"
tagfile = ../../../doc/qtwebengine/qtwebengine.tags
diff --git a/src/webengine/doc/src/qtwebengine-overview.qdoc b/src/webengine/doc/src/qtwebengine-overview.qdoc
index ff35b45cf..e180b22c0 100644
--- a/src/webengine/doc/src/qtwebengine-overview.qdoc
+++ b/src/webengine/doc/src/qtwebengine-overview.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2017 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
@@ -89,7 +89,7 @@
\l{https://chromium.googlesource.com/chromium/src/+/master/docs/chromium_browser_vs_google_chrome.md}{overview}
that is part of the documentation in the \l {Chromium Project} upstream source tree.
- This version of Qt WebEngine is based on Chromium version 53.0.2785.148, with
+ This version of Qt WebEngine is based on Chromium version 56.0.2924.122, with
additional security fixes from newer versions.
\section2 Qt WebEngine Process
diff --git a/src/webengine/doc/src/qtwebengine-platform-notes.qdoc b/src/webengine/doc/src/qtwebengine-platform-notes.qdoc
index 06a4a53a9..2eeda6e8a 100644
--- a/src/webengine/doc/src/qtwebengine-platform-notes.qdoc
+++ b/src/webengine/doc/src/qtwebengine-platform-notes.qdoc
@@ -114,17 +114,18 @@
\section1 Mac App Store Compatibility
- 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 has to be reconfigured with the \c -appstore-compliant switch.
-
- However, this will cause some behavioral changes, such as:
+ Applications using Qt WebEngine are not compatible with the Mac App Store, because:
\list
- \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 (\macos 10.8).
+ \li The Chromium part of the code uses several private API methods, which are prohibited by
+ the App Store.
+ \li Applications submitted to the App Store must be code-signed with the App Sandbox feature
+ enabled. The App Sandbox feature interferes with Chromium's own sandbox
+ initialization, which results in Chromium not being properly initialized. This also
+ ties in with the private API usage. Furthermore, standalone Chromium itself is not
+ officially tested with the App Sandbox enabled, and even if work is done to bypass
+ the App Store's restrictions, that would not guarantee correct behavior of the library.
+
\endlist
\section1 macOS Airplay Support on MacBooks with Dual GPUs
@@ -161,4 +162,24 @@
set to 1 or alternatively the \c{--no-sandbox} command line argument can be passed to the user
application executable.
+ \section1 Accessibility and Performance
+
+ Qt WebEngine enables accessibility support for web pages when the following conditions
+ are met:
+
+ \list
+ \li Qt Core is configured and built with accessibility support enabled.
+ \li The QPA plugin is notified by the operating system that accessibility should be
+ activated. This happens for example when using a screen reader application on Windows
+ or VoiceOver on \macos.
+ \endlist
+
+ Due to some limitations, the Linux QPA plugin almost always reports that accessibility should
+ be activated. On big HTML pages, this can cause a significant slowdown in rendering speed.
+
+ Because of that, from Qt 5.9 onwards, Qt WebEngine accessibility support is disabled by default
+ on Linux.
+ It can be re-enabled by setting the \c QTWEBENGINE_ENABLE_LINUX_ACCESSIBILITY environment
+ variable to a non-empty value.
+
*/
diff --git a/src/webengine/ui_delegates_manager.cpp b/src/webengine/ui_delegates_manager.cpp
index 4a47a49eb..6cc496d5b 100644
--- a/src/webengine/ui_delegates_manager.cpp
+++ b/src/webengine/ui_delegates_manager.cpp
@@ -50,6 +50,7 @@
#include <QQmlContext>
#include <QQmlEngine>
#include <QQmlProperty>
+#include <QQuickWindow>
#include <QCursor>
#include <QList>
#include <QScreen>
@@ -559,7 +560,11 @@ void UIDelegatesManager::showToolTip(const QString &text)
int width = QQmlProperty(m_toolTip.data(), QStringLiteral("width")).read().toInt();
QSize toolTipSize(width, height);
QPoint position = m_view->cursor().pos();
+#if (QT_VERSION >= QT_VERSION_CHECK(5, 7, 0))
position = m_view->mapFromGlobal(calculateToolTipPosition(position, toolTipSize)).toPoint();
+#else
+ position = m_view->window()->mapFromGlobal(calculateToolTipPosition(position, toolTipSize));
+#endif
QQmlProperty(m_toolTip.data(), QStringLiteral("x")).write(position.x());
QQmlProperty(m_toolTip.data(), QStringLiteral("y")).write(position.y());
diff --git a/src/webenginewidgets/api/qwebenginedownloaditem.cpp b/src/webenginewidgets/api/qwebenginedownloaditem.cpp
index d578bf0e3..c1d9a3698 100644
--- a/src/webenginewidgets/api/qwebenginedownloaditem.cpp
+++ b/src/webenginewidgets/api/qwebenginedownloaditem.cpp
@@ -131,10 +131,8 @@ void QWebEngineDownloadItemPrivate::update(const BrowserContextAdapterClient::Do
Q_ASSERT(downloadState != QWebEngineDownloadItem::DownloadRequested);
- if (toDownloadInterruptReason(info.downloadInterruptReason) != interruptReason) {
+ if (toDownloadInterruptReason(info.downloadInterruptReason) != interruptReason)
interruptReason = toDownloadInterruptReason(info.downloadInterruptReason);
- Q_EMIT q->interruptReasonChanged();
- }
if (toDownloadState(info.state) != downloadState) {
downloadState = toDownloadState(info.state);
@@ -235,15 +233,6 @@ quint32 QWebEngineDownloadItem::id() const
*/
/*!
- \fn QWebEngineDownloadItem::interruptReasonChanged()
- \since 5.9
-
- This signal is emitted whenever the reason of the download's interruption changes.
-
- \sa interruptReason(), QWebEngineDownloadItem::DownloadInterruptReason
-*/
-
-/*!
\enum QWebEngineDownloadItem::DownloadState
This enum describes the state of the download:
diff --git a/src/webenginewidgets/api/qwebenginedownloaditem.h b/src/webenginewidgets/api/qwebenginedownloaditem.h
index 846194f40..a4b6c08aa 100644
--- a/src/webenginewidgets/api/qwebenginedownloaditem.h
+++ b/src/webenginewidgets/api/qwebenginedownloaditem.h
@@ -134,7 +134,6 @@ Q_SIGNALS:
void finished();
void stateChanged(QWebEngineDownloadItem::DownloadState state);
void downloadProgress(qint64 bytesReceived, qint64 bytesTotal);
- void interruptReasonChanged();
private:
Q_DISABLE_COPY(QWebEngineDownloadItem)
diff --git a/src/webenginewidgets/api/qwebengineprofile.cpp b/src/webenginewidgets/api/qwebengineprofile.cpp
index abed066d3..cd4fc8b02 100644
--- a/src/webenginewidgets/api/qwebengineprofile.cpp
+++ b/src/webenginewidgets/api/qwebengineprofile.cpp
@@ -156,6 +156,10 @@ QWebEngineProfilePrivate::QWebEngineProfilePrivate(QSharedPointer<BrowserContext
QWebEngineProfilePrivate::~QWebEngineProfilePrivate()
{
+ // In the case the user sets this profile as the parent of the interceptor
+ // it can be deleted before the browser-context still referencing it is.
+ m_browserContextRef->setRequestInterceptor(nullptr);
+
delete m_settings;
m_settings = 0;
m_browserContextRef->removeClient(this);