From c8d11a21c648e87f3560042e1c022f031a6e6519 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Thu, 21 Mar 2019 11:19:09 +0100 Subject: Fixup focus implementation Follow the other implementation and pass TakeFocus to WebContents Delegate, and hook to our UI from there. Also fixes use of Blur instead of LostFocus, which means we now render unfocused more correctly. Change-Id: I34a1882489bc68b9ff36ed5139af0ee8a3a95b79 Reviewed-by: Alexandru Croitor --- src/core/render_widget_host_view_qt.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/core/render_widget_host_view_qt.cpp') diff --git a/src/core/render_widget_host_view_qt.cpp b/src/core/render_widget_host_view_qt.cpp index 40ed75973..c6db88658 100644 --- a/src/core/render_widget_host_view_qt.cpp +++ b/src/core/render_widget_host_view_qt.cpp @@ -1124,7 +1124,7 @@ void RenderWidgetHostViewQt::closePopup() // (hiding the widget and automatic memory cleanup via // RenderWidget::CloseWidgetSoon() -> RenderWidgetHostImpl::ShutdownAndDestroyWidget(true). host()->SetActive(false); - host()->Blur(); + host()->LostFocus(); } void RenderWidgetHostViewQt::ProcessAckedTouchEvent(const content::TouchEventWithLatencyInfo &touch, content::InputEventAckState ack_result) { @@ -1644,7 +1644,7 @@ void RenderWidgetHostViewQt::handleFocusEvent(QFocusEvent *ev) ev->accept(); } else if (ev->lostFocus()) { host()->SetActive(false); - host()->Blur(); + host()->LostFocus(); ev->accept(); } } -- cgit v1.2.3 From 1fe5566c5d494a9a6cea8282c7387b36ef0e4c0b Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Thu, 21 Mar 2019 16:13:33 +0100 Subject: Fix regression in setting background colors MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This logic was incorrectly stripped out in adaptations for Chromium 68, but is still needed. Fixes: QTBUG-74519 Change-Id: Iefe7aba352bd43148898c1abeea34f4afe354d72 Reviewed-by: Jüri Valdmann --- src/core/render_widget_host_view_qt.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/core/render_widget_host_view_qt.cpp') diff --git a/src/core/render_widget_host_view_qt.cpp b/src/core/render_widget_host_view_qt.cpp index c6db88658..a5aba92bc 100644 --- a/src/core/render_widget_host_view_qt.cpp +++ b/src/core/render_widget_host_view_qt.cpp @@ -41,6 +41,7 @@ #include "browser_accessibility_manager_qt.h" #include "chromium_overrides.h" +#include "common/qt_messages.h" #include "compositor.h" #include "qtwebenginecoreglobal_p.h" #include "render_widget_host_view_qt_delegate.h" @@ -455,6 +456,7 @@ void RenderWidgetHostViewQt::UpdateBackgroundColor() auto color = GetBackgroundColor(); if (color) { m_delegate->setClearColor(toQt(*color)); + host()->Send(new RenderViewObserverQt_SetBackgroundColor(host()->GetRoutingID(), *color)); } } -- cgit v1.2.3