Safari clears selection when its window gets activated via mouse down
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 27 Mar 2015 22:56:15 +0000 (22:56 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 27 Mar 2015 22:56:15 +0000 (22:56 +0000)
commit42c56e7cd25f82e0368805a5bd5ba22f13640c51
tree3f9513f25b2a005f1c2d0446fa4cf7d79f794753
parent8504ce1826fa17cb8fb43be98e7bfcb4686fa330
Safari clears selection when its window gets activated via mouse down
https://bugs.webkit.org/show_bug.cgi?id=143157

Reviewed by Anders Carlsson.

The bug was caused by PlatformMouseEvent created in WebKit2 not having its event number
even though we were correctly calling setActivationEventNumber in WebPage::acceptsFirstMouse.

Fixed the bug by storing [NSEvent eventNumber] in WebMouseEvent on Mac in WebKit2 as done in WebKit1.

* Shared/WebEvent.h:
(WebKit::WebMouseEvent::eventNumber):
* Shared/WebEventConversion.cpp:
(WebKit::WebKit2PlatformMouseEvent::WebKit2PlatformMouseEvent):
* Shared/WebMouseEvent.cpp:
(WebKit::WebMouseEvent::WebMouseEvent):
(WebKit::WebMouseEvent::encode):
(WebKit::WebMouseEvent::decode):
* Shared/mac/WebEventFactory.mm:
(WebKit::WebEventFactory::createWebMouseEvent):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@182087 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit2/ChangeLog
Source/WebKit2/Shared/WebEvent.h
Source/WebKit2/Shared/WebEventConversion.cpp
Source/WebKit2/Shared/WebMouseEvent.cpp
Source/WebKit2/Shared/mac/WebEventFactory.mm