summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2018-05-28 17:07:35 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2018-05-29 11:17:27 +0200
commit391a6322511bb189b7d7cc094e34a34ae6495820 (patch)
tree8eaedb5d053575e7f2eddd0a6cb0f0e6ae0d6cab
parentaf313cb881610fedb04c9d486597462e6b3c8e12 (diff)
parent1b1411c589cb7ed29916762bcfedbbb68e657d2f (diff)
Merge remote-tracking branch 'origin/5.11' into dev
-rw-r--r--.gitmodules2
-rw-r--r--configure.json2
-rw-r--r--examples/webenginewidgets/cookiebrowser/mainwindow.cpp2
m---------src/3rdparty0
-rw-r--r--src/core/web_contents_adapter.cpp9
-rw-r--r--src/core/web_contents_delegate_qt.cpp11
-rw-r--r--src/core/web_contents_delegate_qt.h1
-rw-r--r--src/core/yuv_video_node.cpp7
-rw-r--r--src/webengine/doc/src/qtwebengine-features.qdoc19
-rw-r--r--src/webenginewidgets/api/qwebenginepage.cpp5
10 files changed, 34 insertions, 24 deletions
diff --git a/.gitmodules b/.gitmodules
index 599c0a0d6..be62b2203 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1,5 +1,5 @@
[submodule "src/3rdparty"]
path = src/3rdparty
url = ../qtwebengine-chromium.git
- ignore = all
+ ignore = dirty
initrepo = true
diff --git a/configure.json b/configure.json
index 723730fb7..f0d6391b9 100644
--- a/configure.json
+++ b/configure.json
@@ -432,7 +432,7 @@
},
"webengine-v8-snapshot": {
"label" : "Use v8 snapshot",
- "purpuse": "Enables the v8 snapshot, for fast v8 context creation",
+ "purpose": "Enables the v8 snapshot, for fast v8 context creation",
"output": [ "privateFeature" ]
},
"webengine-v8-snapshot-support": {
diff --git a/examples/webenginewidgets/cookiebrowser/mainwindow.cpp b/examples/webenginewidgets/cookiebrowser/mainwindow.cpp
index 235f99056..970381d4d 100644
--- a/examples/webenginewidgets/cookiebrowser/mainwindow.cpp
+++ b/examples/webenginewidgets/cookiebrowser/mainwindow.cpp
@@ -197,5 +197,5 @@ void MainWindow::handleNewClicked()
void MainWindow::handleUrlClicked()
{
- m_webview->load(QUrl(m_urlLineEdit->text()));
+ m_webview->load(QUrl::fromUserInput(m_urlLineEdit->text()));
}
diff --git a/src/3rdparty b/src/3rdparty
-Subproject de120c712b755a45687b4f3a7fd01bb7d334669
+Subproject 96f354df27c2f3c7c1b221b676c7a1af6b3da37
diff --git a/src/core/web_contents_adapter.cpp b/src/core/web_contents_adapter.cpp
index 1c5eb2535..9a544cb0a 100644
--- a/src/core/web_contents_adapter.cpp
+++ b/src/core/web_contents_adapter.cpp
@@ -989,6 +989,15 @@ void WebContentsAdapter::updateWebPreferences(const content::WebPreferences & we
{
CHECK_INITIALIZED();
m_webContents->GetRenderViewHost()->UpdateWebkitPreferences(webPreferences);
+
+ // In case of updating preferences during navigation, there might be a pending RVH what will
+ // be active on successful navigation.
+ content::RenderFrameHost *pendingRFH = (static_cast<content::WebContentsImpl*>(m_webContents.get()))->GetPendingMainFrame();
+ if (pendingRFH) {
+ content::RenderViewHost *pendingRVH = pendingRFH->GetRenderViewHost();
+ Q_ASSERT(pendingRVH);
+ pendingRVH->UpdateWebkitPreferences(webPreferences);
+ }
}
void WebContentsAdapter::download(const QUrl &url, const QString &suggestedFileName,
diff --git a/src/core/web_contents_delegate_qt.cpp b/src/core/web_contents_delegate_qt.cpp
index a8c390c41..8a3757838 100644
--- a/src/core/web_contents_delegate_qt.cpp
+++ b/src/core/web_contents_delegate_qt.cpp
@@ -526,17 +526,6 @@ void WebContentsDelegateQt::ActivateContents(content::WebContents* contents)
contents->Focus();
}
-void WebContentsDelegateQt::RenderViewHostChanged(content::RenderViewHost *old_host, content::RenderViewHost *new_host)
-{
- Q_ASSERT(new_host);
-
- // The old RVH can be nullptr if it was shut down.
- if (!old_host)
- return;
-
- new_host->UpdateWebkitPreferences(old_host->GetWebkitPreferences());
-}
-
void WebContentsDelegateQt::RequestToLockMouse(content::WebContents *web_contents, bool user_gesture, bool last_unlocked_by_target)
{
Q_UNUSED(user_gesture);
diff --git a/src/core/web_contents_delegate_qt.h b/src/core/web_contents_delegate_qt.h
index 43badf60e..2ef87ccd8 100644
--- a/src/core/web_contents_delegate_qt.h
+++ b/src/core/web_contents_delegate_qt.h
@@ -139,7 +139,6 @@ public:
void WasShown() override;
void DidFirstVisuallyNonEmptyPaint() override;
void ActivateContents(content::WebContents* contents) override;
- void RenderViewHostChanged(content::RenderViewHost *old_host, content::RenderViewHost *new_host) override;
void didFailLoad(const QUrl &url, int errorCode, const QString &errorDescription);
void overrideWebPreferences(content::WebContents *, content::WebPreferences*);
diff --git a/src/core/yuv_video_node.cpp b/src/core/yuv_video_node.cpp
index ebde2e005..4a436d952 100644
--- a/src/core/yuv_video_node.cpp
+++ b/src/core/yuv_video_node.cpp
@@ -56,7 +56,7 @@ namespace QtWebEngineCore {
class YUVVideoMaterialShader : public QSGMaterialShader
{
public:
- YUVVideoMaterialShader(const gfx::ColorSpace &colorSpace) : m_colorSpace(colorSpace)
+ YUVVideoMaterialShader(const gfx::ColorSpace &colorSpace)
{
static const char *shaderHead =
"varying mediump vec2 v_yaTexCoord;\n"
@@ -80,9 +80,11 @@ public:
" mediump vec3 rgb = DoColorConversion(yuv);\n"
" gl_FragColor = vec4(rgb, 1.0) * alpha;\n"
"}";
+ // Invalid or unspecified color spaces should be treated as REC709.
+ gfx::ColorSpace src = colorSpace.IsValid() ? colorSpace : gfx::ColorSpace::CreateREC709();
gfx::ColorSpace dst = gfx::ColorSpace::CreateSRGB();
std::unique_ptr<gfx::ColorTransform> transform =
- gfx::ColorTransform::NewColorTransform(m_colorSpace, dst, gfx::ColorTransform::Intent::INTENT_PERCEPTUAL);
+ gfx::ColorTransform::NewColorTransform(src, dst, gfx::ColorTransform::Intent::INTENT_PERCEPTUAL);
QByteArray header(shaderHead);
if (QOpenGLContext::currentContext()->isOpenGLES())
@@ -143,7 +145,6 @@ protected:
m_id_opacity = program()->uniformLocation("alpha");
}
- gfx::ColorSpace m_colorSpace;
int m_id_matrix;
int m_id_yaTexScale;
int m_id_uvTexScale;
diff --git a/src/webengine/doc/src/qtwebengine-features.qdoc b/src/webengine/doc/src/qtwebengine-features.qdoc
index 96b5072ee..d900e551b 100644
--- a/src/webengine/doc/src/qtwebengine-features.qdoc
+++ b/src/webengine/doc/src/qtwebengine-features.qdoc
@@ -56,12 +56,29 @@
Qt WebEngine supports the MPEG-4 Part 14 (MP4) file format only if the
required proprietary audio and video codecs, such as H.264 and MPEG layer-3
(MP3), have been enabled. Proprietary codecs can be enabled by passing the
- following option when configuring Qt:
+ following option to the \c configure tool when configuring Qt:
\code
-webengine-proprietary-codecs
\endcode
+ For example, the following option could be passed when configuring Qt for
+ building it at the top level:
+
+ \code
+ configure -webengine-proprietary-codecs
+ \endcode
+
+ For more information, see \l{Qt Configure Options}.
+
+ When using qmake to build just the Qt WebEngine module, the following
+ command can be used (in this example, the Qt WebEngine source code is
+ located in \c {C:\qt\qtwebengine}):
+
+ \code
+ qmake C:\qt\qtwebengine -- -webengine-proprietary-codecs
+ \endcode
+
\warning When distributing proprietary codec libraries, you must acquire
licenses for them.
diff --git a/src/webenginewidgets/api/qwebenginepage.cpp b/src/webenginewidgets/api/qwebenginepage.cpp
index 99fbf523f..8badd4f7a 100644
--- a/src/webenginewidgets/api/qwebenginepage.cpp
+++ b/src/webenginewidgets/api/qwebenginepage.cpp
@@ -617,11 +617,6 @@ void QWebEnginePagePrivate::updateAction(QWebEnginePage::WebAction action) const
if (!a)
return;
- if (!adapter->isInitialized()) {
- a->setEnabled(false);
- return;
- }
-
bool enabled = true;
switch (action) {