diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2017-10-25 15:45:22 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2017-10-27 11:27:53 +0200 |
commit | 30ec6d65845938c14f14f543309160d445da700d (patch) | |
tree | 0709daf648dac8cb63cddf3b1bf689dfde049908 /src/core/web_contents_delegate_qt.cpp | |
parent | 7013cd858c1f2c84ad0e178f68c6cbfb6aed2530 (diff) | |
parent | d96f8495b59878f50223a81a734ce0983539d8cf (diff) |
Merge remote-tracking branch 'origin/5.10' into dev
Change-Id: Ibc1c881a67bf088ba6fb044e2553c74c7e9e24ca
Diffstat (limited to 'src/core/web_contents_delegate_qt.cpp')
-rw-r--r-- | src/core/web_contents_delegate_qt.cpp | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/core/web_contents_delegate_qt.cpp b/src/core/web_contents_delegate_qt.cpp index c2d7f4136..111a6943a 100644 --- a/src/core/web_contents_delegate_qt.cpp +++ b/src/core/web_contents_delegate_qt.cpp @@ -119,6 +119,7 @@ content::WebContents *WebContentsDelegateQt::OpenURLFromTab(content::WebContents load_url_params.extra_headers = params.extra_headers; load_url_params.should_replace_current_entry = params.should_replace_current_entry; load_url_params.is_renderer_initiated = params.is_renderer_initiated; + load_url_params.started_from_context_menu = params.started_from_context_menu; load_url_params.override_user_agent = content::NavigationController::UA_OVERRIDE_TRUE; if (params.uses_post) { load_url_params.load_type = content::NavigationController::LOAD_TYPE_HTTP_POST; @@ -244,9 +245,12 @@ void WebContentsDelegateQt::DidFinishNavigation(content::NavigationHandle *navig return; if (navigation_handle->HasCommitted() && !navigation_handle->IsErrorPage()) { + BrowserContextAdapter *browserContextAdapter = m_viewClient->browserContextAdapter().data(); // VisistedLinksMaster asserts !IsOffTheRecord(). - if (navigation_handle->ShouldUpdateHistory() && m_viewClient->browserContextAdapter()->trackVisitedLinks()) - m_viewClient->browserContextAdapter()->visitedLinksManager()->addUrl(navigation_handle->GetURL()); + if (navigation_handle->ShouldUpdateHistory() && browserContextAdapter->trackVisitedLinks()) { + for (const GURL &url : navigation_handle->GetRedirectChain()) + browserContextAdapter->visitedLinksManager()->addUrl(url); + } // Make sure that we don't set the findNext WebFindOptions on a new frame. m_lastSearchedString = QString(); @@ -338,9 +342,12 @@ void WebContentsDelegateQt::DidUpdateFaviconURL(const std::vector<content::Favic m_faviconManager->update(faviconCandidates); } -void WebContentsDelegateQt::WebContentsCreated(content::WebContents* /*source_contents*/, int /*opener_render_process_id*/, int /*opener_render_frame_id*/, const std::string& /*frame_name*/, const GURL& target_url, content::WebContents* new_contents, const base::Optional<content::WebContents::CreateParams>& create_params) +void WebContentsDelegateQt::WebContentsCreated(content::WebContents */*source_contents*/, + int /*opener_render_process_id*/, int /*opener_render_frame_id*/, + const std::string &/*frame_name*/, + const GURL &target_url, content::WebContents */*new_contents*/) { - this->m_initialTargetUrl = toQt(target_url); + m_initialTargetUrl = toQt(target_url); } content::ColorChooser *WebContentsDelegateQt::OpenColorChooser(content::WebContents *source, SkColor color, const std::vector<content::ColorSuggestion> &suggestion) |