diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/core/common/qt_messages.h | 6 | ||||
-rw-r--r-- | src/core/core_module.pro | 4 | ||||
-rw-r--r-- | src/core/render_widget_host_view_qt.cpp | 18 | ||||
-rw-r--r-- | src/webengine/doc/src/qtwebengine-qmlmodule.qdoc | 4 |
4 files changed, 15 insertions, 17 deletions
diff --git a/src/core/common/qt_messages.h b/src/core/common/qt_messages.h index b99204b74..43f07c9a6 100644 --- a/src/core/common/qt_messages.h +++ b/src/core/common/qt_messages.h @@ -36,6 +36,9 @@ IPC_MESSAGE_ROUTED1(RenderViewObserverQt_FetchDocumentMarkup, IPC_MESSAGE_ROUTED1(RenderViewObserverQt_FetchDocumentInnerText, uint64_t /* requestId */) +IPC_MESSAGE_ROUTED1(RenderViewObserverQt_SetBackgroundColor, + uint32_t /* color */) + // User scripts messages IPC_MESSAGE_ROUTED1(RenderFrameObserverHelper_AddScript, UserScriptData /* script */) @@ -65,9 +68,6 @@ IPC_MESSAGE_ROUTED2(RenderViewObserverHostQt_DidFetchDocumentInnerText, uint64_t /* requestId */, base::string16 /* innerText */) -IPC_MESSAGE_ROUTED1(RenderViewObserverQt_SetBackgroundColor, - uint32_t /* color */) - IPC_MESSAGE_ROUTED0(RenderViewObserverHostQt_DidFirstVisuallyNonEmptyLayout) //----------------------------------------------------------------------------- diff --git a/src/core/core_module.pro b/src/core/core_module.pro index 4b9268e1a..d7e2ab8da 100644 --- a/src/core/core_module.pro +++ b/src/core/core_module.pro @@ -107,7 +107,7 @@ resources.files = $$REPACK_DIR/qtwebengine_resources.pak \ icu.files = $$OUT_PWD/$$getConfigDir()/icudtl.dat -!debug_and_release|!build_all|CONFIG(release, debug|release) { +!qtConfig(debug_and_release)|!qtConfig(build_all)|CONFIG(release, debug|release) { qtConfig(framework) { locales.version = Versions locales.path = Resources/qtwebengine_locales @@ -146,7 +146,7 @@ icu.files = $$OUT_PWD/$$getConfigDir()/icudtl.dat } } -!build_pass:debug_and_release { +!build_pass:qtConfig(debug_and_release) { # Special GNU make target that ensures linking isn't done for both debug and release builds # at the same time. notParallel.target = .NOTPARALLEL 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. diff --git a/src/webengine/doc/src/qtwebengine-qmlmodule.qdoc b/src/webengine/doc/src/qtwebengine-qmlmodule.qdoc index 44e6c7e27..4fd7e3a3b 100644 --- a/src/webengine/doc/src/qtwebengine-qmlmodule.qdoc +++ b/src/webengine/doc/src/qtwebengine-qmlmodule.qdoc @@ -35,9 +35,9 @@ The QML types can be imported into your application using the following import statements in your .qml file: - \badcode + \qml import QtWebEngine 1.10 - \endcode + \endqml To link against the module, add the following QT variable to your qmake .pro file: |