summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2019-07-19 12:08:56 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2019-07-23 14:06:37 +0200
commitb73e4ce6f7cfe35a85b9a41e1a5ab36783e5edb0 (patch)
tree24d8c74f02562bc4d7815f3cb5c95d17e96f1550 /src
parentb4a661eaa3506bd2a698e61e8228de029bd810ca (diff)
parentc18c51acf8d0eb9426ce998d6e09f20a4a481c40 (diff)
Merge "Merge remote-tracking branch 'origin/5.12' into 5.13"
Diffstat (limited to 'src')
-rw-r--r--src/core/config/common.pri4
-rw-r--r--src/core/config/linux.pri2
-rw-r--r--src/core/configure.json32
-rw-r--r--src/core/core_chromium.pri2
-rw-r--r--src/core/net/qrc_url_scheme_handler.cpp5
-rw-r--r--src/core/web_contents_adapter.cpp12
-rw-r--r--src/core/web_contents_delegate_qt.cpp2
-rw-r--r--src/core/web_contents_delegate_qt.h1
-rw-r--r--src/webengine/doc/src/qtwebengine-platform-notes.qdoc7
9 files changed, 58 insertions, 9 deletions
diff --git a/src/core/config/common.pri b/src/core/config/common.pri
index eabbf4ec0..fce89f576 100644
--- a/src/core/config/common.pri
+++ b/src/core/config/common.pri
@@ -126,3 +126,7 @@ qtConfig(webengine-kerberos) {
} else {
gn_args += use_kerberos=false
}
+
+ccache {
+ gn_args += cc_wrapper=\"ccache\"
+}
diff --git a/src/core/config/linux.pri b/src/core/config/linux.pri
index e45273cca..c536b2555 100644
--- a/src/core/config/linux.pri
+++ b/src/core/config/linux.pri
@@ -179,7 +179,7 @@ host_build {
}
!packagesExist(libpci): gn_args += use_libpci=false
- qtConfig(webengine-system-x11): hasX11Dependencies() {
+ qtConfig(webengine-ozone-x11) {
gn_args += ozone_platform_x11=true
packagesExist(xscrnsaver): gn_args += use_xscrnsaver=true
}
diff --git a/src/core/configure.json b/src/core/configure.json
index 98eee347f..66e39ddc2 100644
--- a/src/core/configure.json
+++ b/src/core/configure.json
@@ -11,6 +11,7 @@
"options": {
"webengine-alsa": "boolean",
"webengine-embedded-build": "boolean",
+ "webengine-full-debug-info": "boolean",
"webengine-icu": { "type": "enum", "name": "webengine-system-icu", "values": { "system": "yes", "qt": "no" } },
"webengine-ffmpeg": { "type": "enum", "name": "webengine-system-ffmpeg", "values": { "system": "yes", "qt": "no" } },
"webengine-opus": { "type": "enum", "name": "webengine-system-opus", "values": { "system": "yes", "qt": "no" } },
@@ -650,6 +651,17 @@
"condition": "config.unix && libs.webengine-x11",
"output": [ "privateFeature" ]
},
+ "webengine-ozone-x11" : {
+ "label": "Support qpa-xcb",
+ "condition": "config.unix
+ && features.webengine-system-x11
+ && features.webengine-system-libdrm
+ && features.webengine-system-xcomposite
+ && features.webengine-system-xcursor
+ && features.webengine-system-xi
+ && features.webengine-system-xtst",
+ "output": [ "privateFeature" ]
+ },
"webengine-sanitizer" : {
"label": "Sanitizer",
"autoDetect": "config.sanitizer && tests.webengine-sanitizer",
@@ -685,6 +697,16 @@
"section": "WebEngine",
"output": [ "privateFeature" ]
},
+ "webengine-full-debug-info": {
+ "label": "Full debug information",
+ "purpose": "Enables debug information for Blink and V8.",
+ "autoDetect": false,
+ "condition": "config.debug || features.debug_and_release || features.force_debug_info",
+ "output": [
+ { "type": "privateConfig", "name": "v8base_debug" },
+ { "type": "privateConfig", "name": "webcore_debug" }
+ ]
+ },
"webengine-noexecstack": {
"label": "linker supports -z noexecstack",
"condition": "config.unix && tests.webengine-noexecstack",
@@ -742,6 +764,7 @@
"webengine-widgets",
"webengine-qml",
"webengine-embedded-build",
+ "webengine-full-debug-info",
"webengine-pepper-plugins",
"webengine-printing-and-pdf",
"webengine-proprietary-codecs",
@@ -756,6 +779,11 @@
"webengine-extensions",
{
"type": "feature",
+ "args": "webengine-ozone-x11",
+ "condition": "config.unix"
+ },
+ {
+ "type": "feature",
"args": "webengine-v8-snapshot-support",
"condition": "config.unix && config.cross_compile && features.webengine-v8-snapshot"
},
@@ -826,8 +854,7 @@
"webengine-system-png",
"webengine-system-jpeg",
"webengine-system-harfbuzz",
- "webengine-system-freetype",
- "webengine-system-x11"
+ "webengine-system-freetype"
]
},
{
@@ -845,6 +872,7 @@
"section": "Required system libraries for qpa-xcb",
"condition": "config.unix && !config.macos",
"entries": [
+ "webengine-system-x11",
"webengine-system-libdrm",
"webengine-system-xcomposite",
"webengine-system-xcursor",
diff --git a/src/core/core_chromium.pri b/src/core/core_chromium.pri
index 5d55f35a2..8ff79c782 100644
--- a/src/core/core_chromium.pri
+++ b/src/core/core_chromium.pri
@@ -245,7 +245,7 @@ HEADERS = \
web_event_factory.h
-qtConfig(webengine-system-x11): hasX11Dependencies() {
+qtConfig(webengine-ozone-x11) {
HEADERS += ozone/gl_ozone_glx_qt.h \
ozone/gl_surface_glx_qt.h
SOURCES += ozone/gl_surface_glx_qt.cpp \
diff --git a/src/core/net/qrc_url_scheme_handler.cpp b/src/core/net/qrc_url_scheme_handler.cpp
index 74a77a7ec..73bf24f1d 100644
--- a/src/core/net/qrc_url_scheme_handler.cpp
+++ b/src/core/net/qrc_url_scheme_handler.cpp
@@ -59,6 +59,11 @@ void QrcUrlSchemeHandler::requestStarted(QWebEngineUrlRequestJob *job)
QUrl requestUrl = job->requestUrl();
QString requestPath = requestUrl.path();
QScopedPointer<QFile> file(new QFile(':' + requestPath, job));
+ if (!file->exists() || file->size() == 0) {
+ qWarning("QResource '%s' not found or is empty", qUtf8Printable(requestPath));
+ job->fail(QWebEngineUrlRequestJob::UrlNotFound);
+ return;
+ }
QFileInfo fileInfo(*file);
QMimeDatabase mimeDatabase;
QMimeType mimeType = mimeDatabase.mimeTypeForFile(fileInfo);
diff --git a/src/core/web_contents_adapter.cpp b/src/core/web_contents_adapter.cpp
index 0ec5af0fe..ca2479965 100644
--- a/src/core/web_contents_adapter.cpp
+++ b/src/core/web_contents_adapter.cpp
@@ -671,19 +671,23 @@ void WebContentsAdapter::load(const QWebEngineHttpRequest &request)
}
}
- auto navigate = [](WebContentsAdapter *adapter, const content::NavigationController::LoadURLParams &params) {
+ auto navigate = [](QWeakPointer<WebContentsAdapter> weakAdapter, const content::NavigationController::LoadURLParams &params) {
+ WebContentsAdapter *adapter = weakAdapter.data();
+ if (!adapter)
+ return;
adapter->webContents()->GetController().LoadURLWithParams(params);
// Follow chrome::Navigate and invalidate the URL immediately.
adapter->m_webContentsDelegate->NavigationStateChanged(adapter->webContents(), content::INVALIDATE_TYPE_URL);
adapter->focusIfNecessary();
};
+ QWeakPointer<WebContentsAdapter> weakThis(sharedFromThis());
if (resizeNeeded) {
// Schedule navigation on the event loop.
base::PostTaskWithTraits(FROM_HERE, {content::BrowserThread::UI},
- base::BindOnce(navigate, this, std::move(params)));
+ base::BindOnce(navigate, std::move(weakThis), std::move(params)));
} else {
- navigate(this, params);
+ navigate(std::move(weakThis), params);
}
}
@@ -1005,6 +1009,7 @@ quint64 WebContentsAdapter::findText(const QString &subString, bool caseSensitiv
// waiting for it forever.
// Assume that any unfinished find has been unsuccessful when a new one is started
// to cover that case.
+ m_webContentsDelegate->setLastReceivedFindReply(m_lastFindRequestId);
m_adapterClient->didFindText(m_lastFindRequestId, 0);
}
@@ -1025,6 +1030,7 @@ quint64 WebContentsAdapter::findText(const QString &subString, bool caseSensitiv
void WebContentsAdapter::stopFinding()
{
CHECK_INITIALIZED();
+ m_webContentsDelegate->setLastReceivedFindReply(m_lastFindRequestId);
m_webContentsDelegate->setLastSearchedString(QString());
m_webContents->StopFinding(content::STOP_FIND_ACTION_KEEP_SELECTION);
}
diff --git a/src/core/web_contents_delegate_qt.cpp b/src/core/web_contents_delegate_qt.cpp
index f260a17b9..7719e78d7 100644
--- a/src/core/web_contents_delegate_qt.cpp
+++ b/src/core/web_contents_delegate_qt.cpp
@@ -523,7 +523,7 @@ void WebContentsDelegateQt::FindReply(content::WebContents *source, int request_
Q_UNUSED(source)
Q_UNUSED(selection_rect)
Q_UNUSED(active_match_ordinal)
- if (final_update) {
+ if (final_update && request_id > m_lastReceivedFindReply) {
m_lastReceivedFindReply = request_id;
m_viewClient->didFindText(request_id, number_of_matches);
}
diff --git a/src/core/web_contents_delegate_qt.h b/src/core/web_contents_delegate_qt.h
index f6ba71256..9a3afebed 100644
--- a/src/core/web_contents_delegate_qt.h
+++ b/src/core/web_contents_delegate_qt.h
@@ -114,6 +114,7 @@ public:
QString lastSearchedString() const { return m_lastSearchedString; }
void setLastSearchedString(const QString &s) { m_lastSearchedString = s; }
int lastReceivedFindReply() const { return m_lastReceivedFindReply; }
+ void setLastReceivedFindReply(int id) { m_lastReceivedFindReply = id; }
QUrl url() const { return m_url; }
QString title() const { return m_title; }
diff --git a/src/webengine/doc/src/qtwebengine-platform-notes.qdoc b/src/webengine/doc/src/qtwebengine-platform-notes.qdoc
index fefb47795..5b7d750ff 100644
--- a/src/webengine/doc/src/qtwebengine-platform-notes.qdoc
+++ b/src/webengine/doc/src/qtwebengine-platform-notes.qdoc
@@ -69,7 +69,12 @@
\section2 Windows
- On Windows, Visual Studio 2017 and Windows 10 SDK are required.
+ On Windows, the following additional tools are required:
+
+ \list
+ \li Visual Studio 2017 version 15.8 or later
+ \li Windows 10 SDK
+ \endlist
\QWE can only be built on 64-bit Windows, with a x64-bit toolchain.
For building \QWE for x86 applications, you need to configure