diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-03-26 22:17:18 +0100 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-03-26 22:17:18 +0100 |
commit | 3ec12c0b43f885f85427743c03fe099ffed56fc0 (patch) | |
tree | 0cb3f75b99836b479d99a8ccc8fd8dcc369b8dea /src/core/render_widget_host_view_qt.cpp | |
parent | 1d5c00fde1d2263dd74f2bdc8590783057ec853e (diff) | |
parent | 8947dc6902bfd2a8acd31b8c894407bf6a12695b (diff) |
Merge branch '5.14' into 5.15
Conflicts:
src/3rdparty
tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp
Change-Id: Idbc9d3b06c0052a721c974fbcbfa3164faaead14
Diffstat (limited to 'src/core/render_widget_host_view_qt.cpp')
-rw-r--r-- | src/core/render_widget_host_view_qt.cpp | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/src/core/render_widget_host_view_qt.cpp b/src/core/render_widget_host_view_qt.cpp index 26ddc807f..c1b1791cf 100644 --- a/src/core/render_widget_host_view_qt.cpp +++ b/src/core/render_widget_host_view_qt.cpp @@ -48,6 +48,7 @@ #include "touch_selection_controller_client_qt.h" #include "touch_selection_menu_controller.h" #include "type_conversion.h" +#include "web_contents_adapter.h" #include "web_contents_adapter_client.h" #include "web_event_factory.h" @@ -497,23 +498,20 @@ gfx::Rect RenderWidgetHostViewQt::GetViewBounds() void RenderWidgetHostViewQt::UpdateBackgroundColor() { + DCHECK(GetBackgroundColor()); + SkColor color = *GetBackgroundColor(); + + m_delegate->setClearColor(toQt(color)); + if (m_enableViz) { - DCHECK(GetBackgroundColor()); - SkColor color = *GetBackgroundColor(); bool opaque = SkColorGetA(color) == SK_AlphaOPAQUE; m_rootLayer->SetFillsBoundsOpaquely(opaque); m_rootLayer->SetColor(color); m_uiCompositor->SetBackgroundColor(color); - m_delegate->setClearColor(toQt(color)); - host()->Send(new RenderViewObserverQt_SetBackgroundColor(host()->GetRoutingID(), color)); - return; } - auto color = GetBackgroundColor(); - if (color) { - m_delegate->setClearColor(toQt(*color)); - host()->Send(new RenderViewObserverQt_SetBackgroundColor(host()->GetRoutingID(), *color)); - } + content::RenderViewHost *rvh = content::RenderViewHost::From(host()); + host()->Send(new RenderViewObserverQt_SetBackgroundColor(rvh->GetRoutingID(), color)); } // Return value indicates whether the mouse is locked successfully or not. |