Changeset 246384 in webkit


Ignore:
Timestamp:
Jun 12, 2019 3:46:14 PM (5 years ago)
Author:
Devin Rousso
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.

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r246375 r246384  
     12019-06-12  Devin Rousso  <drousso@apple.com>
     2
     3        Web Inspector: artificial context menus don't work when Web Inspector is zoomed
     4        https://bugs.webkit.org/show_bug.cgi?id=198801
     5
     6        Reviewed by Joseph Pecoraro.
     7
     8        * inspector/InspectorFrontendHost.cpp:
     9        (WebCore::InspectorFrontendHost::dispatchEventAsContextMenuEvent):
     10        Use the `absoluteLocation` of the `MouseEvent`, which takes into account zoom and scale.
     11
    1122019-06-12  Sam Weinig  <weinig@apple.com>
    213
  • trunk/Source/WebCore/inspector/InspectorFrontendHost.cpp

    r244180 r246384  
    427427
    428428    auto& mouseEvent = downcast<MouseEvent>(event);
    429     IntPoint mousePoint { mouseEvent.clientX(), mouseEvent.clientY() };
    430429    auto& frame = *downcast<Node>(mouseEvent.target())->document().frame();
    431 
    432     m_frontendPage->contextMenuController().showContextMenuAt(frame, mousePoint);
     430    m_frontendPage->contextMenuController().showContextMenuAt(frame, roundedIntPoint(mouseEvent.absoluteLocation()));
    433431#else
    434432    UNUSED_PARAM(event);
Note: See TracChangeset for help on using the changeset viewer.