diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-01-23 11:01:28 +0100 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-01-23 11:01:28 +0100 |
commit | 96ec21dc0b6560cb2b86b744393b69b655af655b (patch) | |
tree | e3d03ceb9c021c6e0d67aacc50691eb60ca932e3 /src/core | |
parent | c67337856dbaf66df813a176379a9f0a6fda2470 (diff) | |
parent | d7d40469b5bfad2cc1693ef663864d2b15d59687 (diff) |
Merge branch '5.14' into 5.15
Change-Id: I1230ec3a854c0798fa4f7960642e988b917f431e
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/browser_accessibility_qt.cpp | 2 | ||||
-rw-r--r-- | src/core/compositor/display_overrides.cpp | 5 | ||||
-rw-r--r-- | src/core/net/url_request_custom_job.cpp | 14 | ||||
-rw-r--r-- | src/core/net/url_request_custom_job.h | 1 | ||||
-rw-r--r-- | src/core/net/url_request_custom_job_proxy.cpp | 11 | ||||
-rw-r--r-- | src/core/net/url_request_custom_job_proxy.h | 1 | ||||
-rw-r--r-- | src/core/render_widget_host_view_qt.cpp | 2 | ||||
-rw-r--r-- | src/core/web_contents_delegate_qt.cpp | 4 |
8 files changed, 34 insertions, 6 deletions
diff --git a/src/core/browser_accessibility_qt.cpp b/src/core/browser_accessibility_qt.cpp index c760dcd45..db6f371d3 100644 --- a/src/core/browser_accessibility_qt.cpp +++ b/src/core/browser_accessibility_qt.cpp @@ -479,7 +479,7 @@ QAccessible::Role BrowserAccessibilityQt::role() const case ax::mojom::Role::kTabList: return QAccessible::PageTabList; case ax::mojom::Role::kTabPanel: - return QAccessible::PageTab; + return QAccessible::Pane; case ax::mojom::Role::kTerm: return QAccessible::StaticText; case ax::mojom::Role::kTextField: diff --git a/src/core/compositor/display_overrides.cpp b/src/core/compositor/display_overrides.cpp index 5d999ab92..494c7b4d4 100644 --- a/src/core/compositor/display_overrides.cpp +++ b/src/core/compositor/display_overrides.cpp @@ -42,12 +42,17 @@ #include "components/viz/service/display_embedder/output_surface_provider_impl.h" #include "gpu/ipc/in_process_command_buffer.h" +#include <qtgui-config.h> std::unique_ptr<viz::OutputSurface> viz::OutputSurfaceProviderImpl::CreateGLOutputSurface( scoped_refptr<VizProcessContextProvider> context_provider) { +#if QT_CONFIG(opengl) return std::make_unique<QtWebEngineCore::DisplayGLOutputSurface>(std::move(context_provider)); +#else + return nullptr; +#endif // QT_CONFIG(opengl) } std::unique_ptr<viz::OutputSurface> diff --git a/src/core/net/url_request_custom_job.cpp b/src/core/net/url_request_custom_job.cpp index fe287d0b7..9f4185d0c 100644 --- a/src/core/net/url_request_custom_job.cpp +++ b/src/core/net/url_request_custom_job.cpp @@ -70,6 +70,7 @@ URLRequestCustomJob::URLRequestCustomJob(URLRequest *request, { m_device = nullptr; m_error = 0; + m_firstBytePosition = 0; } URLRequestCustomJob::~URLRequestCustomJob() @@ -185,6 +186,19 @@ bool URLRequestCustomJob::IsRedirectResponse(GURL *location, int *http_status_co return false; } +void URLRequestCustomJob::SetExtraRequestHeaders(const HttpRequestHeaders &headers) +{ + std::string rangeHeader; + if (headers.GetHeader(HttpRequestHeaders::kRange, &rangeHeader)) { + std::vector<HttpByteRange> ranges; + if (HttpUtil::ParseRangeHeader(rangeHeader, &ranges)) { + // Chromium doesn't support multiple range requests in one single URL request. + if (ranges.size() == 1) + m_firstBytePosition = ranges[0].first_byte_position(); + } + } +} + int URLRequestCustomJob::ReadRawData(IOBuffer *buf, int bufSize) { DCHECK_CURRENTLY_ON(content::BrowserThread::IO); diff --git a/src/core/net/url_request_custom_job.h b/src/core/net/url_request_custom_job.h index 071a0a84f..350650f98 100644 --- a/src/core/net/url_request_custom_job.h +++ b/src/core/net/url_request_custom_job.h @@ -71,6 +71,7 @@ public: bool GetCharset(std::string *charset) override; void GetResponseInfo(net::HttpResponseInfo *info) override; bool IsRedirectResponse(GURL *location, int *http_status_code, bool *insecure_scheme_was_upgraded) override; + void SetExtraRequestHeaders(const net::HttpRequestHeaders &headers); protected: virtual ~URLRequestCustomJob(); diff --git a/src/core/net/url_request_custom_job_proxy.cpp b/src/core/net/url_request_custom_job_proxy.cpp index cd7e173ee..d2df64f2f 100644 --- a/src/core/net/url_request_custom_job_proxy.cpp +++ b/src/core/net/url_request_custom_job_proxy.cpp @@ -96,9 +96,14 @@ void URLRequestCustomJobProxy::reply(std::string mimeType, QIODevice *device) if (m_client->m_device && !m_client->m_device->isReadable()) m_client->m_device->open(QIODevice::ReadOnly); - qint64 size = m_client->m_device ? m_client->m_device->size() : -1; - if (size > 0) - m_client->notifyExpectedContentSize(size); + if (m_client->m_firstBytePosition > 0) + m_client->m_device->seek(m_client->m_firstBytePosition); + + qint64 deviceSize = m_client->m_device ? m_client->m_device->size() : -1; + qint64 remainingBytes = deviceSize - m_client->m_firstBytePosition; + if (remainingBytes > 0) + m_client->notifyExpectedContentSize(remainingBytes); + if (m_client->m_device && m_client->m_device->isReadable()) { m_started = true; m_client->notifyHeadersComplete(); diff --git a/src/core/net/url_request_custom_job_proxy.h b/src/core/net/url_request_custom_job_proxy.h index 7091c8319..db38083dd 100644 --- a/src/core/net/url_request_custom_job_proxy.h +++ b/src/core/net/url_request_custom_job_proxy.h @@ -67,6 +67,7 @@ public: std::string m_charset; GURL m_redirect; QIODevice *m_device; + int64_t m_firstBytePosition; int m_error; virtual void notifyExpectedContentSize(qint64 size) = 0; virtual void notifyHeadersComplete() = 0; diff --git a/src/core/render_widget_host_view_qt.cpp b/src/core/render_widget_host_view_qt.cpp index 901cbf0bd..e9be587cf 100644 --- a/src/core/render_widget_host_view_qt.cpp +++ b/src/core/render_widget_host_view_qt.cpp @@ -1089,7 +1089,7 @@ bool RenderWidgetHostViewQt::forwardEvent(QEvent *event) #endif }; - if (!inputMethodQuery(Qt::ImEnabled).toBool() && !acceptKeyOutOfInputField(keyEvent)) + if (!inputMethodQuery(Qt::ImEnabled).toBool() && !(inputMethodQuery(Qt::ImHints).toInt() & Qt::ImhHiddenText) && !acceptKeyOutOfInputField(keyEvent)) return false; Q_ASSERT(m_editCommand.empty()); diff --git a/src/core/web_contents_delegate_qt.cpp b/src/core/web_contents_delegate_qt.cpp index 38f139513..c1cf1f659 100644 --- a/src/core/web_contents_delegate_qt.cpp +++ b/src/core/web_contents_delegate_qt.cpp @@ -482,8 +482,10 @@ void WebContentsDelegateQt::DidFinishLoad(content::RenderFrameHost* render_frame return; } - if (render_frame_host->GetParent()) + if (render_frame_host->GetParent()) { + m_viewClient->updateNavigationActions(); return; + } if (!m_faviconManager->hasCandidate()) m_viewClient->iconChanged(QUrl()); |