browser(webkit): revert #2755 (#2809)

Review URL: 7d35d22798

This reverts https://github.com/microsoft/playwright/pull/2755/files
Reason:
- it doesn't compile on Windows

References #2699
This commit is contained in:
Andrey Lushnikov 2020-07-01 22:40:33 -07:00 committed by GitHub
parent 19abc9bd9f
commit 43cdb3ba72
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 12 deletions

View file

@ -1 +1 @@
1297
1298

View file

@ -13742,19 +13742,10 @@ index 0000000000000000000000000000000000000000..135a60361fa8fbf907382625e7c8dd4e
+
+} // namespace WebKit
diff --git a/Source/WebKit/UIProcess/win/WebContextMenuProxyWin.cpp b/Source/WebKit/UIProcess/win/WebContextMenuProxyWin.cpp
index aa171f48bc40a96a86d951451b578f609c573fce..e948342089abdf57c80be77e25416743b63179a2 100644
index aa171f48bc40a96a86d951451b578f609c573fce..2a335dd6d0a8e2ce416acc940d66f177f6771f19 100644
--- a/Source/WebKit/UIProcess/win/WebContextMenuProxyWin.cpp
+++ b/Source/WebKit/UIProcess/win/WebContextMenuProxyWin.cpp
@@ -105,6 +105,8 @@ void WebContextMenuProxyWin::showContextMenuWithItems(Vector<Ref<WebContextMenuI
UINT flags = TPM_RIGHTBUTTON | TPM_TOPALIGN | TPM_VERPOSANIMATION | TPM_HORIZONTAL | TPM_LEFTALIGN | TPM_HORPOSANIMATION;
POINT pt { m_context.menuLocation().x(), m_context.menuLocation().y() };
HWND wnd = m_page.viewWidget();
+ if (!::IsWindowVisibile(wnd))
+ return;
::ClientToScreen(wnd, &pt);
::TrackPopupMenuEx(m_menu, flags, pt.x, pt.y, m_page.viewWidget(), nullptr);
}
@@ -122,5 +124,11 @@ WebContextMenuProxyWin::~WebContextMenuProxyWin()
@@ -122,5 +122,11 @@ WebContextMenuProxyWin::~WebContextMenuProxyWin()
::DestroyMenu(m_menu);
}