[WK2] Navigation events not triggered by a mouse event claim to be triggered by the left mouse button during policy decisions
https://bugs.webkit.org/show_bug.cgi?id=76344
Reviewed by Sam Weinig.
Source/WebKit2:
When creating InjectedBundleNavigationActions, initialize the mouse button to NoButton.
This ensures that when there is no mouse event associated with the action, when the event
hits the client-API layer, the button is still NoButton.
* WebProcess/InjectedBundle/InjectedBundleNavigationAction.cpp:
(WebKit::InjectedBundleNavigationAction::InjectedBundleNavigationAction): Initialize m_mouseButton
to WebMouseEvent::NoButton.
Tools:
Add a test verifying that the mouse button during policy decisions for
events not triggered by mouse events is NoButton.
* TestWebKitAPI/Tests/WebKit2/PageLoadBasic.cpp:
(TestWebKitAPI::decidePolicyForNavigationAction): Added test.
(TestWebKitAPI::decidePolicyForNewWindowAction): Added test.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@105916
268f45cc-cd09-0410-ab3c-
d52691b4dbfc