From d42caf438cf240c0ad1f803320f9063d6108a0aa Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Fri, 7 Apr 2017 11:43:07 +0200 Subject: Simple adaptations for Chromium 58 Change-Id: I7c2c85973b03fdbd2eafb5339f33a3758d53e924 Reviewed-by: Peter Varga --- src/core/browser_accessibility_qt.cpp | 8 +++--- src/core/chromium_gpu_helper.cpp | 4 +-- src/core/config/windows.pri | 7 ++--- src/core/gl_surface_qt.cpp | 12 ++++++++- src/core/gl_surface_qt.h | 2 ++ src/core/javascript_dialog_manager_qt.cpp | 9 ++++--- src/core/javascript_dialog_manager_qt.h | 11 ++++---- src/core/network_delegate_qt.cpp | 5 ---- src/core/network_delegate_qt.h | 1 - src/core/permission_manager_qt.cpp | 8 ------ src/core/permission_manager_qt.h | 5 ---- src/core/print_view_manager_qt.cpp | 1 + src/core/qtwebengine.gni | 2 ++ src/core/qtwebengine_resources.gni | 2 +- src/core/render_widget_host_view_qt.cpp | 38 ++++----------------------- src/core/render_widget_host_view_qt.h | 6 ----- src/core/renderer/render_view_observer_qt.cpp | 4 +-- src/core/url_request_context_getter_qt.cpp | 3 +-- src/core/web_contents_adapter.cpp | 10 +++---- src/core/web_contents_adapter_client.h | 2 +- src/core/web_contents_delegate_qt.cpp | 2 +- src/core/web_engine_context.cpp | 4 +-- src/core/web_event_factory.cpp | 4 +-- 23 files changed, 56 insertions(+), 94 deletions(-) (limited to 'src/core') diff --git a/src/core/browser_accessibility_qt.cpp b/src/core/browser_accessibility_qt.cpp index ac4649d3d..333aaa519 100644 --- a/src/core/browser_accessibility_qt.cpp +++ b/src/core/browser_accessibility_qt.cpp @@ -491,7 +491,7 @@ QStringList BrowserAccessibilityQt::keyBindingsForAction(const QString &actionNa void BrowserAccessibilityQt::addSelection(int startOffset, int endOffset) { - manager()->SetTextSelection(*this, startOffset, endOffset); + manager()->SetSelection(AXPlatformRange(CreatePositionAt(startOffset), CreatePositionAt(endOffset))); } QString BrowserAccessibilityQt::attributes(int offset, int *startOffset, int *endOffset) const @@ -549,19 +549,19 @@ QString BrowserAccessibilityQt::text(int startOffset, int endOffset) const void BrowserAccessibilityQt::removeSelection(int selectionIndex) { - manager()->SetTextSelection(*this, 0, 0); + manager()->SetSelection(AXPlatformRange(CreatePositionAt(0), CreatePositionAt(0))); } void BrowserAccessibilityQt::setCursorPosition(int position) { - manager()->SetTextSelection(*this, position, position); + manager()->SetSelection(AXPlatformRange(CreatePositionAt(position), CreatePositionAt(position))); } void BrowserAccessibilityQt::setSelection(int selectionIndex, int startOffset, int endOffset) { if (selectionIndex != 0) return; - manager()->SetTextSelection(*this, startOffset, endOffset); + manager()->SetSelection(AXPlatformRange(CreatePositionAt(startOffset), CreatePositionAt(endOffset))); } int BrowserAccessibilityQt::characterCount() const diff --git a/src/core/chromium_gpu_helper.cpp b/src/core/chromium_gpu_helper.cpp index 1b415b9ec..cea3aacaf 100644 --- a/src/core/chromium_gpu_helper.cpp +++ b/src/core/chromium_gpu_helper.cpp @@ -65,13 +65,13 @@ base::MessageLoop *gpu_message_loop() gpu::SyncPointManager *sync_point_manager() { - gpu::GpuChannelManager *gpuChannelManager = content::GpuChildThread::instance()->ChannelManager(); + gpu::GpuChannelManager *gpuChannelManager = content::GpuChildThread::instance()->gpu_channel_manager(); return gpuChannelManager->sync_point_manager(); } gpu::gles2::MailboxManager *mailbox_manager() { - gpu::GpuChannelManager *gpuChannelManager = content::GpuChildThread::instance()->ChannelManager(); + gpu::GpuChannelManager *gpuChannelManager = content::GpuChildThread::instance()->gpu_channel_manager(); return gpuChannelManager->mailbox_manager(); } diff --git a/src/core/config/windows.pri b/src/core/config/windows.pri index 53a19b872..49c725475 100644 --- a/src/core/config/windows.pri +++ b/src/core/config/windows.pri @@ -7,15 +7,12 @@ gn_args += \ enable_session_service=false \ ninja_use_custom_environment_files=false \ is_multi_dll_chrome=false \ + use_incremental_linking=false \ win_linker_timing=true isDeveloperBuild() { gn_args += \ - is_win_fastlink=true \ - use_incremental_linking=true -} else { - gn_args += \ - use_incremental_linking=false + is_win_fastlink=true } defineTest(usingMSVC32BitCrossCompiler) { diff --git a/src/core/gl_surface_qt.cpp b/src/core/gl_surface_qt.cpp index 4eefc0008..a09196220 100644 --- a/src/core/gl_surface_qt.cpp +++ b/src/core/gl_surface_qt.cpp @@ -260,6 +260,7 @@ bool GLSurfaceQtGLX::Initialize(GLSurfaceFormat format) }; m_surfaceBuffer = glXCreatePbuffer(display, static_cast(g_config), pbuffer_attributes); + m_format = format; if (!m_surfaceBuffer) { Destroy(); @@ -329,6 +330,7 @@ bool GLSurfaceQtWGL::InitializeOneOff() bool GLSurfaceQtWGL::Initialize(GLSurfaceFormat format) { m_surfaceBuffer = new PbufferGLSurfaceWGL(m_size); + m_format = format; return m_surfaceBuffer->Initialize(format); } @@ -463,6 +465,7 @@ bool GLSurfaceQtEGL::Initialize(GLSurfaceFormat format) { Q_UNUSED(format); Q_ASSERT(!m_surfaceBuffer); + m_format = format; EGLDisplay display = g_display; if (!display) { @@ -517,6 +520,12 @@ gfx::Size GLSurfaceQt::GetSize() } +GLSurfaceFormat GLSurfaceQt::GetFormat() +{ + return m_format; +} + + bool GLSurfaceQtEGL::Resize(const gfx::Size& size, float scale_factor, bool has_alpha) { if (size == m_size) @@ -562,8 +571,9 @@ GLSurfacelessQtEGL::GLSurfacelessQtEGL(const gfx::Size& size) { } -bool GLSurfacelessQtEGL::Initialize(GLSurfaceFormat /*format*/) +bool GLSurfacelessQtEGL::Initialize(GLSurfaceFormat format) { + m_format = format; return true; } diff --git a/src/core/gl_surface_qt.h b/src/core/gl_surface_qt.h index 08b501846..c26cb7ed0 100644 --- a/src/core/gl_surface_qt.h +++ b/src/core/gl_surface_qt.h @@ -59,12 +59,14 @@ public: bool IsOffscreen() override; gfx::SwapResult SwapBuffers() override; gfx::Size GetSize() override; + GLSurfaceFormat GetFormat() override; protected: GLSurfaceQt(); virtual ~GLSurfaceQt(); gfx::Size m_size; + GLSurfaceFormat m_format; private: DISALLOW_COPY_AND_ASSIGN(GLSurfaceQt); diff --git a/src/core/javascript_dialog_manager_qt.cpp b/src/core/javascript_dialog_manager_qt.cpp index 5fac12dd3..a1a8604a4 100644 --- a/src/core/javascript_dialog_manager_qt.cpp +++ b/src/core/javascript_dialog_manager_qt.cpp @@ -48,14 +48,17 @@ namespace QtWebEngineCore { -Q_STATIC_ASSERT_X(static_cast(content::JAVASCRIPT_MESSAGE_TYPE_PROMPT) == static_cast(WebContentsAdapterClient::PromptDialog), "These enums should be in sync."); +ASSERT_ENUMS_MATCH(content::JAVASCRIPT_DIALOG_TYPE_ALERT, WebContentsAdapterClient::AlertDialog) +ASSERT_ENUMS_MATCH(content::JAVASCRIPT_DIALOG_TYPE_CONFIRM, WebContentsAdapterClient::ConfirmDialog) +ASSERT_ENUMS_MATCH(content::JAVASCRIPT_DIALOG_TYPE_PROMPT, WebContentsAdapterClient::PromptDialog) + JavaScriptDialogManagerQt *JavaScriptDialogManagerQt::GetInstance() { return base::Singleton::get(); } -void JavaScriptDialogManagerQt::RunJavaScriptDialog(content::WebContents *webContents, const GURL &originUrl, content::JavaScriptMessageType javascriptMessageType, const base::string16 &messageText, const base::string16 &defaultPromptText, const content::JavaScriptDialogManager::DialogClosedCallback &callback, bool *didSuppressMessage) +void JavaScriptDialogManagerQt::RunJavaScriptDialog(content::WebContents *webContents, const GURL &originUrl, content::JavaScriptDialogType dialog_type, const base::string16 &messageText, const base::string16 &defaultPromptText, const content::JavaScriptDialogManager::DialogClosedCallback &callback, bool *didSuppressMessage) { WebContentsAdapterClient *client = WebContentsViewQt::from(static_cast(webContents)->GetView())->client(); if (!client) { @@ -64,7 +67,7 @@ void JavaScriptDialogManagerQt::RunJavaScriptDialog(content::WebContents *webCon return; } - WebContentsAdapterClient::JavascriptDialogType dialogType = static_cast(javascriptMessageType); + WebContentsAdapterClient::JavascriptDialogType dialogType = static_cast(dialog_type); runDialogForContents(webContents, dialogType, toQt(messageText).toHtmlEscaped(), toQt(defaultPromptText).toHtmlEscaped(), toQt(originUrl.GetOrigin()), callback); } diff --git a/src/core/javascript_dialog_manager_qt.h b/src/core/javascript_dialog_manager_qt.h index ad2a54cac..291f027a9 100644 --- a/src/core/javascript_dialog_manager_qt.h +++ b/src/core/javascript_dialog_manager_qt.h @@ -40,7 +40,6 @@ #define JAVASCRIPT_DIALOG_MANAGER_QT_H #include "content/public/browser/javascript_dialog_manager.h" -#include "content/public/common/javascript_message_type.h" #include "web_contents_adapter_client.h" @@ -60,13 +59,15 @@ public: // For use with the Singleton helper class from chromium static JavaScriptDialogManagerQt *GetInstance(); - void RunJavaScriptDialog(content::WebContents *, const GURL &, content::JavaScriptMessageType javascriptMessageType, + void RunJavaScriptDialog(content::WebContents *, const GURL &, content::JavaScriptDialogType dialog_type, const base::string16 &messageText, const base::string16 &defaultPromptText, - const content::JavaScriptDialogManager::DialogClosedCallback &callback, bool *didSuppressMessage) override; + const content::JavaScriptDialogManager::DialogClosedCallback &callback, + bool *didSuppressMessage) override; - void RunBeforeUnloadDialog(content::WebContents *, bool isReload, const content::JavaScriptDialogManager::DialogClosedCallback &callback) override; + void RunBeforeUnloadDialog(content::WebContents *, bool isReload, + const content::JavaScriptDialogManager::DialogClosedCallback &callback) override; bool HandleJavaScriptDialog(content::WebContents *, bool accept, const base::string16 *promptOverride) override; - void CancelDialogs(content::WebContents *contents, bool /*suppress_callbacks*/, bool /*reset_state*/) override + void CancelDialogs(content::WebContents *contents, bool /*reset_state*/) override { takeDialogForContents(contents); } diff --git a/src/core/network_delegate_qt.cpp b/src/core/network_delegate_qt.cpp index 9b4c415c9..5878095e6 100644 --- a/src/core/network_delegate_qt.cpp +++ b/src/core/network_delegate_qt.cpp @@ -311,11 +311,6 @@ bool NetworkDelegateQt::OnAreExperimentalCookieFeaturesEnabled() const return false; } -bool NetworkDelegateQt::OnAreStrictSecureCookiesEnabled() const -{ - return false; -} - bool NetworkDelegateQt::OnCancelURLRequestWithPolicyViolatingReferrerHeader(const net::URLRequest&, const GURL&, const GURL&) const { return false; diff --git a/src/core/network_delegate_qt.h b/src/core/network_delegate_qt.h index 4ded56a9d..da5b36d19 100644 --- a/src/core/network_delegate_qt.h +++ b/src/core/network_delegate_qt.h @@ -92,7 +92,6 @@ public: virtual bool OnCanAccessFile(const net::URLRequest& request, const base::FilePath& path) const override; virtual bool OnCanEnablePrivacyMode(const GURL&, const GURL&) const override; virtual bool OnAreExperimentalCookieFeaturesEnabled() const override; - virtual bool OnAreStrictSecureCookiesEnabled() const override; virtual bool OnCancelURLRequestWithPolicyViolatingReferrerHeader(const net::URLRequest&, const GURL&, const GURL&) const override; }; diff --git a/src/core/permission_manager_qt.cpp b/src/core/permission_manager_qt.cpp index 970a608a3..4c941406c 100644 --- a/src/core/permission_manager_qt.cpp +++ b/src/core/permission_manager_qt.cpp @@ -202,14 +202,6 @@ void PermissionManagerQt::ResetPermission( m_permissions.remove(key); } -void PermissionManagerQt::RegisterPermissionUsage( - content::PermissionType /*permission*/, - const GURL& /*requesting_origin*/, - const GURL& /*embedding_origin*/) -{ - // We do not currently track which permissions are used. -} - int PermissionManagerQt::SubscribePermissionStatusChange( content::PermissionType permission, const GURL& requesting_origin, diff --git a/src/core/permission_manager_qt.h b/src/core/permission_manager_qt.h index 1cbb41b5e..e98174762 100644 --- a/src/core/permission_manager_qt.h +++ b/src/core/permission_manager_qt.h @@ -87,11 +87,6 @@ public: const base::Callback&)>& callback) override; - void RegisterPermissionUsage( - content::PermissionType permission, - const GURL& requesting_origin, - const GURL& embedding_origin) override; - int SubscribePermissionStatusChange( content::PermissionType permission, const GURL& requesting_origin, diff --git a/src/core/print_view_manager_qt.cpp b/src/core/print_view_manager_qt.cpp index 8a43cc419..6493bb7d5 100644 --- a/src/core/print_view_manager_qt.cpp +++ b/src/core/print_view_manager_qt.cpp @@ -138,6 +138,7 @@ static base::DictionaryValue *createPrintSettings() printSettings->SetBoolean(printing::kSettingShouldPrintSelectionOnly, false); printSettings->SetBoolean(printing::kSettingShouldPrintBackgrounds, true); printSettings->SetBoolean(printing::kSettingHeaderFooterEnabled, false); + printSettings->SetBoolean(printing::kSettingRasterizePdf, false); printSettings->SetInteger(printing::kSettingScaleFactor, 100); printSettings->SetString(printing::kSettingDeviceName, ""); printSettings->SetInteger(printing::kPreviewUIID, 12345678); diff --git a/src/core/qtwebengine.gni b/src/core/qtwebengine.gni index 9afd6af3b..de1fa1836 100644 --- a/src/core/qtwebengine.gni +++ b/src/core/qtwebengine.gni @@ -11,6 +11,7 @@ include_dirs = [ deps = [ "//base", + "//chrome/common:features", "//components/error_page/common", "//components/keyed_service/content", "//components/visitedlink/browser", @@ -22,6 +23,7 @@ deps = [ "//content/public/common", "//content/public/renderer", "//net:net_browser_services", + "//net:net_with_v8", "//skia", "//third_party/WebKit/public:blink", "//ui/accessibility", diff --git a/src/core/qtwebengine_resources.gni b/src/core/qtwebengine_resources.gni index a7ffb40f3..acf5f1590 100644 --- a/src/core/qtwebengine_resources.gni +++ b/src/core/qtwebengine_resources.gni @@ -70,7 +70,7 @@ repack("qtwebengine_repack_resources_200") { repack("qtwebengine_repack_resources_devtools") { sources = [ - "$root_gen_dir/blink/devtools_resources.pak", + "$root_gen_dir/content/browser/devtools/devtools_resources.pak", ] output = "$root_out_dir/qtwebengine_devtools_resources.pak" deps = [ diff --git a/src/core/render_widget_host_view_qt.cpp b/src/core/render_widget_host_view_qt.cpp index 3f6edc4a0..3d51d4108 100644 --- a/src/core/render_widget_host_view_qt.cpp +++ b/src/core/render_widget_host_view_qt.cpp @@ -639,39 +639,11 @@ void RenderWidgetHostViewQt::SetTooltipText(const base::string16 &tooltip_text) m_adapterClient->setToolTip(toQt(tooltip_text)); } -void RenderWidgetHostViewQt::CopyFromCompositingSurface(const gfx::Rect& src_subrect, const gfx::Size& dst_size, const content::ReadbackRequestCallback& callback, const SkColorType color_type) -{ - NOTIMPLEMENTED(); - Q_UNUSED(src_subrect); - Q_UNUSED(dst_size); - Q_UNUSED(color_type); - callback.Run(SkBitmap(), content::READBACK_FAILED); -} - -void RenderWidgetHostViewQt::CopyFromCompositingSurfaceToVideoFrame(const gfx::Rect& src_subrect, const scoped_refptr& target, const base::Callback& callback) -{ - NOTIMPLEMENTED(); - callback.Run(gfx::Rect(), false); -} - -bool RenderWidgetHostViewQt::CanCopyToVideoFrame() const -{ - return false; -} - bool RenderWidgetHostViewQt::HasAcceleratedSurface(const gfx::Size&) { return false; } -void RenderWidgetHostViewQt::LockCompositingSurface() -{ -} - -void RenderWidgetHostViewQt::UnlockCompositingSurface() -{ -} - void RenderWidgetHostViewQt::OnSwapCompositorFrame(uint32_t output_surface_id, cc::CompositorFrame frame) { bool scrollOffsetChanged = (m_lastScrollOffset != frame.metadata.root_scroll_offset); @@ -825,7 +797,7 @@ void RenderWidgetHostViewQt::selectionChanged() if (!selection) return; - if (!selection->range.IsValid()) + if (!selection->range().IsValid()) return; // Avoid duplicate empty selectionChanged() signals @@ -839,11 +811,11 @@ void RenderWidgetHostViewQt::selectionChanged() int newCursorPositionWithinSelection = 0; if (text_input_manager_->GetSelectionRegion()->anchor.type() == gfx::SelectionBound::RIGHT) { - newAnchorPositionWithinSelection = selection->range.GetMax() - selection->offset; - newCursorPositionWithinSelection = selection->range.GetMin() - selection->offset; + newAnchorPositionWithinSelection = selection->range().GetMax() - selection->offset(); + newCursorPositionWithinSelection = selection->range().GetMin() - selection->offset(); } else { - newAnchorPositionWithinSelection = selection->range.GetMin() - selection->offset; - newCursorPositionWithinSelection = selection->range.GetMax() - selection->offset; + newAnchorPositionWithinSelection = selection->range().GetMin() - selection->offset(); + newCursorPositionWithinSelection = selection->range().GetMax() - selection->offset(); } if (m_anchorPositionWithinSelection == newAnchorPositionWithinSelection && m_cursorPositionWithinSelection == newCursorPositionWithinSelection) diff --git a/src/core/render_widget_host_view_qt.h b/src/core/render_widget_host_view_qt.h index 3b679923e..cb1a5980d 100644 --- a/src/core/render_widget_host_view_qt.h +++ b/src/core/render_widget_host_view_qt.h @@ -148,10 +148,6 @@ public: void RenderProcessGone(base::TerminationStatus, int) override; void Destroy() override; void SetTooltipText(const base::string16 &tooltip_text) override; - void CopyFromCompositingSurface(const gfx::Rect& src_subrect, const gfx::Size& dst_size, const content::ReadbackRequestCallback& callback, const SkColorType preferred_color_type) override; - void CopyFromCompositingSurfaceToVideoFrame(const gfx::Rect& src_subrect, const scoped_refptr& target, const base::Callback& callback) override; - - bool CanCopyToVideoFrame() const override; bool HasAcceleratedSurface(const gfx::Size&) override; void OnSwapCompositorFrame(uint32_t output_surface_id, cc::CompositorFrame frame) override; @@ -159,8 +155,6 @@ public: gfx::Rect GetBoundsInRootWindow() override; void ProcessAckedTouchEvent(const content::TouchEventWithLatencyInfo &touch, content::InputEventAckState ack_result) override; void ClearCompositorFrame() override; - void LockCompositingSurface() override; - void UnlockCompositingSurface() override; void SetNeedsBeginFrames(bool needs_begin_frames) override; // Overridden from ui::GestureProviderClient. diff --git a/src/core/renderer/render_view_observer_qt.cpp b/src/core/renderer/render_view_observer_qt.cpp index 97485afad..54aed8b59 100644 --- a/src/core/renderer/render_view_observer_qt.cpp +++ b/src/core/renderer/render_view_observer_qt.cpp @@ -65,7 +65,7 @@ void RenderViewObserverQt::onFetchDocumentMarkup(quint64 requestId) if (render_view()->GetWebView()->mainFrame()->isWebLocalFrame()) markup = blink::WebFrameContentDumper::dumpAsMarkup( static_cast(render_view()->GetWebView()->mainFrame())); - Send(new RenderViewObserverHostQt_DidFetchDocumentMarkup(routing_id(), requestId, markup)); + Send(new RenderViewObserverHostQt_DidFetchDocumentMarkup(routing_id(), requestId, markup.utf16())); } void RenderViewObserverQt::onFetchDocumentInnerText(quint64 requestId) @@ -75,7 +75,7 @@ void RenderViewObserverQt::onFetchDocumentInnerText(quint64 requestId) text = blink::WebFrameContentDumper::dumpWebViewAsText( render_view()->GetWebView(), std::numeric_limits::max()); - Send(new RenderViewObserverHostQt_DidFetchDocumentInnerText(routing_id(), requestId, text)); + Send(new RenderViewObserverHostQt_DidFetchDocumentInnerText(routing_id(), requestId, text.utf16())); } void RenderViewObserverQt::onSetBackgroundColor(quint32 color) diff --git a/src/core/url_request_context_getter_qt.cpp b/src/core/url_request_context_getter_qt.cpp index 8c76a9764..9fc8add01 100644 --- a/src/core/url_request_context_getter_qt.cpp +++ b/src/core/url_request_context_getter_qt.cpp @@ -295,8 +295,7 @@ void URLRequestContextGetterQt::generateCookieStore() m_storage->set_channel_id_service( base::WrapUnique(new net::ChannelIDService( - new net::DefaultChannelIDStore(channel_id_db.get()), - base::WorkerPool::GetTaskRunner(true)))); + new net::DefaultChannelIDStore(channel_id_db.get())))); // Unset it first to get a chance to destroy and flush the old cookie store before opening a new on possibly the same file. m_storage->set_cookie_store(0); diff --git a/src/core/web_contents_adapter.cpp b/src/core/web_contents_adapter.cpp index a9179609c..270096553 100644 --- a/src/core/web_contents_adapter.cpp +++ b/src/core/web_contents_adapter.cpp @@ -591,7 +591,7 @@ void WebContentsAdapter::setContent(const QByteArray &data, const QString &mimeT params.override_user_agent = content::NavigationController::UA_OVERRIDE_TRUE; d->webContents->GetController().LoadURLWithParams(params); focusIfNecessary(); - d->webContents->Unselect(); + d->webContents->CollapseSelection(); } void WebContentsAdapter::save(const QString &filePath, int savePageFormat) @@ -699,7 +699,7 @@ void WebContentsAdapter::requestClose() void WebContentsAdapter::unselect() { Q_D(const WebContentsAdapter); - d->webContents->Unselect(); + d->webContents->CollapseSelection(); } void WebContentsAdapter::navigateToIndex(int offset) @@ -899,7 +899,7 @@ void WebContentsAdapter::stopFinding() d->webContentsDelegate->setLastSearchedString(QString()); // Clear any previous selection, // but keep the renderer blue rectangle selection just like Chromium does. - d->webContents->Unselect(); + d->webContents->CollapseSelection(); d->webContents->StopFinding(content::STOP_FIND_ACTION_KEEP_SELECTION); } @@ -1176,7 +1176,7 @@ void WebContentsAdapter::startDragging(QObject *dragSource, const content::DropD d->currentDropData.reset(new content::DropData(dropData)); d->currentDropData->download_metadata.clear(); d->currentDropData->file_contents.clear(); - d->currentDropData->file_description_filename.clear(); + d->currentDropData->file_contents_content_disposition.clear(); d->currentDropAction = blink::WebDragOperationNone; QDrag *drag = new QDrag(dragSource); // will be deleted by Qt's DnD implementation @@ -1342,7 +1342,7 @@ void WebContentsAdapter::leaveDrag() { Q_D(WebContentsAdapter); content::RenderViewHost *rvh = d->webContents->GetRenderViewHost(); - rvh->GetWidget()->DragTargetDragLeave(); + rvh->GetWidget()->DragTargetDragLeave(d->lastDragClientPos, d->lastDragScreenPos); d->currentDropData.reset(); } diff --git a/src/core/web_contents_adapter_client.h b/src/core/web_contents_adapter_client.h index 9b454832e..ee7dbe1ce 100644 --- a/src/core/web_contents_adapter_client.h +++ b/src/core/web_contents_adapter_client.h @@ -274,7 +274,7 @@ public: IgnoreActionDisposition = 9, }; - // Must match the values in javascript_message_type.h. + // Must match the values in javascript_dialog_type.h. enum JavascriptDialogType { AlertDialog, ConfirmDialog, diff --git a/src/core/web_contents_delegate_qt.cpp b/src/core/web_contents_delegate_qt.cpp index a031c2506..782eed923 100644 --- a/src/core/web_contents_delegate_qt.cpp +++ b/src/core/web_contents_delegate_qt.cpp @@ -169,7 +169,7 @@ void WebContentsDelegateQt::AddNewContents(content::WebContents* source, content void WebContentsDelegateQt::CloseContents(content::WebContents *source) { m_viewClient->close(); - GetJavaScriptDialogManager(source)->CancelDialogs(source, /* whatever?: */false, false); + GetJavaScriptDialogManager(source)->CancelDialogs(source, /* whatever?: */false); } void WebContentsDelegateQt::LoadProgressChanged(content::WebContents* source, double progress) diff --git a/src/core/web_engine_context.cpp b/src/core/web_engine_context.cpp index 2d7a57046..004762d50 100644 --- a/src/core/web_engine_context.cpp +++ b/src/core/web_engine_context.cpp @@ -52,7 +52,7 @@ #include "chrome/browser/printing/print_job_manager.h" #endif // defined(ENABLE_BASIC_PRINTING) #include "content/browser/devtools/devtools_http_handler.h" -#include "content/browser/gpu/gpu_process_host.h" +#include "content/browser/gpu/gpu_main_thread_factory.h" #include "content/browser/renderer_host/render_process_host_impl.h" #include "content/browser/utility_process_host_impl.h" #include "content/gpu/in_process_gpu_thread.h" @@ -406,7 +406,7 @@ WebEngineContext::WebEngineContext() content::UtilityProcessHostImpl::RegisterUtilityMainThreadFactory(content::CreateInProcessUtilityThread); content::RenderProcessHostImpl::RegisterRendererMainThreadFactory(content::CreateInProcessRendererThread); - content::GpuProcessHost::RegisterGpuMainThreadFactory(content::CreateInProcessGpuThread); + content::RegisterGpuMainThreadFactory(content::CreateInProcessGpuThread); content::ContentMainParams contentMainParams(m_mainDelegate.get()); contentMainParams.setup_signal_handlers = false; diff --git a/src/core/web_event_factory.cpp b/src/core/web_event_factory.cpp index a70877c25..65f8431d7 100644 --- a/src/core/web_event_factory.cpp +++ b/src/core/web_event_factory.cpp @@ -903,11 +903,11 @@ static ui::DomKey getDomKeyFromQKeyEvent(QKeyEvent *ev) // Audio Keys case Qt::Key_BassDown: - return ui::DomKey::AUDIO_BASS_DOWN; + return ui::DomKey::AUDIO_BASS_BOOST_DOWN; case Qt::Key_BassBoost: return ui::DomKey::AUDIO_BASS_BOOST_TOGGLE; case Qt::Key_BassUp: - return ui::DomKey::AUDIO_BASS_UP; + return ui::DomKey::AUDIO_BASS_BOOST_UP; case Qt::Key_TrebleDown: return ui::DomKey::AUDIO_TREBLE_DOWN; case Qt::Key_TrebleUp: -- cgit v1.2.3