summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2015-09-24 17:28:43 +0200
committerAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2015-09-24 17:28:43 +0200
commitd8a590676b6c7d72406bd2f9b8185f38282fdfa7 (patch)
treec081ff601ae4a56ecda95f52ca17e4bcfe402a1f /src
parent0c6147d9b5ffbe18bfe1e8deb9cc128c9a0fad27 (diff)
parente643f766fa23ee73f7095d7ba20a385cef0f25a0 (diff)
Merge remote-tracking branch 'origin/5.5' into 5.6
Diffstat (limited to 'src')
-rw-r--r--src/core/browser_context_adapter.cpp7
-rw-r--r--src/core/gyp_configure_host.pro2
-rw-r--r--src/core/gyp_configure_target.pro2
-rw-r--r--src/core/qtwebengine.gypi3
-rw-r--r--src/core/web_contents_adapter.cpp2
-rw-r--r--src/core/web_contents_delegate_qt.cpp5
-rw-r--r--src/core/web_contents_delegate_qt.h1
-rw-r--r--src/webenginewidgets/api/qwebenginedownloaditem.h2
8 files changed, 21 insertions, 3 deletions
diff --git a/src/core/browser_context_adapter.cpp b/src/core/browser_context_adapter.cpp
index 48d05ae1d..660c6ffb2 100644
--- a/src/core/browser_context_adapter.cpp
+++ b/src/core/browser_context_adapter.cpp
@@ -36,6 +36,7 @@
#include "browser_context_adapter.h"
+#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"
@@ -255,6 +256,12 @@ void BrowserContextAdapter::setHttpUserAgent(const QString &userAgent)
if (m_httpUserAgent == userAgent)
return;
m_httpUserAgent = userAgent;
+
+ std::vector<content::WebContentsImpl *> list = content::WebContentsImpl::GetAllWebContents();
+ Q_FOREACH (content::WebContentsImpl *web_contents, list)
+ if (web_contents->GetBrowserContext() == m_browserContext.data())
+ web_contents->SetUserAgentOverride(userAgent.toStdString());
+
if (m_browserContext->url_request_getter_.get())
m_browserContext->url_request_getter_->updateUserAgent();
}
diff --git a/src/core/gyp_configure_host.pro b/src/core/gyp_configure_host.pro
index 3eb67389f..eb94cb802 100644
--- a/src/core/gyp_configure_host.pro
+++ b/src/core/gyp_configure_host.pro
@@ -10,7 +10,7 @@ GYPI_CONTENTS = "{" \
" ['CXX.host', '$$which($$QMAKE_CXX)']," \
" ['LD.host', '$$which($$QMAKE_LINK)'],"
-GYPI_FILE = $$absolute_path('qmake_extras.gypi')
+GYPI_FILE = $$OUT_PWD/qmake_extras.gypi
!build_pass {
write_file($$GYPI_FILE, GYPI_CONTENTS)
}
diff --git a/src/core/gyp_configure_target.pro b/src/core/gyp_configure_target.pro
index 4d5204407..2a5996636 100644
--- a/src/core/gyp_configure_target.pro
+++ b/src/core/gyp_configure_target.pro
@@ -26,7 +26,7 @@ GYPI_CONTENTS += " ]," \
GYPI_CONTENTS += "}"
-GYPI_FILE = $$absolute_path('qmake_extras.gypi')
+GYPI_FILE = $$OUT_PWD/qmake_extras.gypi
!exists($$GYPI_FILE): error("-- $$GYPI_FILE not found --")
diff --git a/src/core/qtwebengine.gypi b/src/core/qtwebengine.gypi
index 7a6b26ab7..a420918a0 100644
--- a/src/core/qtwebengine.gypi
+++ b/src/core/qtwebengine.gypi
@@ -114,5 +114,8 @@
'<(chromium_src_dir)/build/linux/system.gyp:fontconfig',
],
}],
+ ['OS=="mac"', {
+ 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-ObjC']},
+ }],
],
}
diff --git a/src/core/web_contents_adapter.cpp b/src/core/web_contents_adapter.cpp
index 58fd23969..2b2512fc3 100644
--- a/src/core/web_contents_adapter.cpp
+++ b/src/core/web_contents_adapter.cpp
@@ -316,6 +316,8 @@ WebContentsAdapterPrivate::WebContentsAdapterPrivate()
WebContentsAdapterPrivate::~WebContentsAdapterPrivate()
{
+ // Destroy the WebContents first
+ webContents.reset();
}
QExplicitlySharedDataPointer<WebContentsAdapter> WebContentsAdapter::createFromSerializedNavigationHistory(QDataStream &input, WebContentsAdapterClient *adapterClient)
diff --git a/src/core/web_contents_delegate_qt.cpp b/src/core/web_contents_delegate_qt.cpp
index e644d691f..eb9c42edc 100644
--- a/src/core/web_contents_delegate_qt.cpp
+++ b/src/core/web_contents_delegate_qt.cpp
@@ -144,6 +144,11 @@ void WebContentsDelegateQt::HandleKeyboardEvent(content::WebContents *, const co
m_viewClient->unhandledKeyEvent(reinterpret_cast<QKeyEvent *>(event.os_event));
}
+void WebContentsDelegateQt::RenderFrameDeleted(content::RenderFrameHost *render_frame_host)
+{
+ m_loadingErrorFrameList.removeOne(render_frame_host->GetRoutingID());
+}
+
void WebContentsDelegateQt::DidStartProvisionalLoadForFrame(content::RenderFrameHost* render_frame_host, const GURL& validated_url, bool is_error_page, bool is_iframe_srcdoc)
{
if (is_error_page) {
diff --git a/src/core/web_contents_delegate_qt.h b/src/core/web_contents_delegate_qt.h
index 1728c447d..3fda96113 100644
--- a/src/core/web_contents_delegate_qt.h
+++ b/src/core/web_contents_delegate_qt.h
@@ -93,6 +93,7 @@ public:
virtual void MoveValidationMessage(content::WebContents *web_contents, const gfx::Rect &anchor_in_root_view) Q_DECL_OVERRIDE;
// WebContentsObserver overrides
+ virtual void RenderFrameDeleted(content::RenderFrameHost *render_frame_host) Q_DECL_OVERRIDE;
virtual void DidStartProvisionalLoadForFrame(content::RenderFrameHost *render_frame_host, const GURL &validated_url, bool is_error_page, bool is_iframe_srcdoc) Q_DECL_OVERRIDE;
virtual void DidCommitProvisionalLoadForFrame(content::RenderFrameHost *render_frame_host, const GURL &url, ui::PageTransition transition_type) Q_DECL_OVERRIDE;
virtual void DidFailProvisionalLoad(content::RenderFrameHost *render_frame_host, const GURL &validated_url,
diff --git a/src/webenginewidgets/api/qwebenginedownloaditem.h b/src/webenginewidgets/api/qwebenginedownloaditem.h
index 1428ad4c3..05e0f8765 100644
--- a/src/webenginewidgets/api/qwebenginedownloaditem.h
+++ b/src/webenginewidgets/api/qwebenginedownloaditem.h
@@ -76,7 +76,7 @@ public Q_SLOTS:
Q_SIGNALS:
void finished();
- void stateChanged(DownloadState state);
+ void stateChanged(QWebEngineDownloadItem::DownloadState state);
void downloadProgress(qint64 bytesReceived, qint64 bytesTotal);
private: