summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2018-02-21 17:45:44 +0100
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2018-05-23 13:31:33 +0200
commitb80576f8b875ec03218c1dbb8f3600111c1574eb (patch)
treecb4adf9d613b4bbac5f5f50ecffec2a21121168d
parentf918d09d41a33806f51f6c95a935a53f8a3f6576 (diff)
downloadqtwebengine-chromium-b80576f8b875ec03218c1dbb8f3600111c1574eb.tar.gz
Remove NOTREACHED in ScreenWin::GetNativeWindowFromHWND
Since the introduction of 196ae04aa7c9b274880409fb38a050db99197900 Chromium uses its own ScreenWin implementation on Windows instead of the previous DesktopScreenQt. This means that a different implementation of Screen::GetDisplayNearestWindow is called, which in turn calls ScreenWin::GetHWNDFromNativeView(). This implementation is not complete though, and in Chrome itself it is overriden inside DesktopScreenWin::GetHWNDFromNativeView() in chromium/ui/views/widget/desktop_aura/desktop_screen_win.cc, but WebEngine don't use this file, and it can't be used because WebEngine doesn't use Aura views. The proper fix would be to implement logic similar to DesktopScreenWin inside Qt's own DesktopScreenQt, because currently the implementation of RenderWidgetHostViewQt::GetNativeView() always returns an empty pointer. As a band-aid fix to stop debug builds from crashing (because nothing really bad seems to happen), is to comment out the assertions. Task-number: QTBUG-66560 Change-Id: I6d3ece29cd889f5d62e2f21682f1462dde962888 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
-rw-r--r--chromium/ui/display/win/screen_win.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/chromium/ui/display/win/screen_win.cc b/chromium/ui/display/win/screen_win.cc
index 0063450bfc4..fd783dff876 100644
--- a/chromium/ui/display/win/screen_win.cc
+++ b/chromium/ui/display/win/screen_win.cc
@@ -390,12 +390,16 @@ void ScreenWin::SetHDREnabled(bool hdr_enabled) {
}
HWND ScreenWin::GetHWNDFromNativeView(gfx::NativeView window) const {
+#ifndef TOOLKIT_QT
NOTREACHED();
+#endif
return nullptr;
}
gfx::NativeWindow ScreenWin::GetNativeWindowFromHWND(HWND hwnd) const {
+#ifndef TOOLKIT_QT
NOTREACHED();
+#endif
return nullptr;
}