[WK2] Navigation events not triggered by a mouse event claim to be triggered by the...
authormrobinson@webkit.org <mrobinson@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 25 Jan 2012 20:37:13 +0000 (20:37 +0000)
committermrobinson@webkit.org <mrobinson@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 25 Jan 2012 20:37:13 +0000 (20:37 +0000)
commita4d5efeee8280a503a2427a3aeeac1430b8ebf08
treec9ce423bc50fa39a026946b45e6bf0dbebde3f61
parente93d5f55c2050c3c6244ec42478de19a1b27132d
[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
Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/InjectedBundle/InjectedBundleNavigationAction.cpp
Tools/ChangeLog
Tools/TestWebKitAPI/Tests/WebKit2/PageLoadBasic.cpp