Title: [246384] trunk/Source/WebCore
- Revision
- 246384
- Author
- [email protected]
- Date
- 2019-06-12 15:46:14 -0700 (Wed, 12 Jun 2019)
Log Message
Web Inspector: artificial context menus don't work when Web Inspector is zoomed
https://bugs.webkit.org/show_bug.cgi?id=198801
Reviewed by Joseph Pecoraro.
* inspector/InspectorFrontendHost.cpp:
(WebCore::InspectorFrontendHost::dispatchEventAsContextMenuEvent):
Use the `absoluteLocation` of the `MouseEvent`, which takes into account zoom and scale.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (246383 => 246384)
--- trunk/Source/WebCore/ChangeLog 2019-06-12 22:38:37 UTC (rev 246383)
+++ trunk/Source/WebCore/ChangeLog 2019-06-12 22:46:14 UTC (rev 246384)
@@ -1,3 +1,14 @@
+2019-06-12 Devin Rousso <[email protected]>
+
+ Web Inspector: artificial context menus don't work when Web Inspector is zoomed
+ https://bugs.webkit.org/show_bug.cgi?id=198801
+
+ Reviewed by Joseph Pecoraro.
+
+ * inspector/InspectorFrontendHost.cpp:
+ (WebCore::InspectorFrontendHost::dispatchEventAsContextMenuEvent):
+ Use the `absoluteLocation` of the `MouseEvent`, which takes into account zoom and scale.
+
2019-06-12 Sam Weinig <[email protected]>
Remove dead code in user agent construction
Modified: trunk/Source/WebCore/inspector/InspectorFrontendHost.cpp (246383 => 246384)
--- trunk/Source/WebCore/inspector/InspectorFrontendHost.cpp 2019-06-12 22:38:37 UTC (rev 246383)
+++ trunk/Source/WebCore/inspector/InspectorFrontendHost.cpp 2019-06-12 22:46:14 UTC (rev 246384)
@@ -426,10 +426,8 @@
return;
auto& mouseEvent = downcast<MouseEvent>(event);
- IntPoint mousePoint { mouseEvent.clientX(), mouseEvent.clientY() };
auto& frame = *downcast<Node>(mouseEvent.target())->document().frame();
-
- m_frontendPage->contextMenuController().showContextMenuAt(frame, mousePoint);
+ m_frontendPage->contextMenuController().showContextMenuAt(frame, roundedIntPoint(mouseEvent.absoluteLocation()));
#else
UNUSED_PARAM(event);
#endif
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes