Safari clears selection when its window gets activated via mouse down
[WebKit-https.git] / Source / WebKit2 / Shared / mac / WebEventFactory.mm
index ad4e0de0fa398a6a1ed0f150586110583032ae0a..2b3c5a383cb1f53df8a421926287ee7f0d3dfee3 100644 (file)
@@ -351,8 +351,9 @@ WebMouseEvent WebEventFactory::createWebMouseEvent(NSEvent *event, NSView *windo
     int clickCount                          = clickCountForEvent(event);
     WebEvent::Modifiers modifiers           = modifiersForEvent(event);
     double timestamp                        = eventTimeStampSince1970(event);
+    int eventNumber                         = [event eventNumber];
 
-    return WebMouseEvent(type, button, IntPoint(position), IntPoint(globalPosition), deltaX, deltaY, deltaZ, clickCount, modifiers, timestamp);
+    return WebMouseEvent(type, button, IntPoint(position), IntPoint(globalPosition), deltaX, deltaY, deltaZ, clickCount, modifiers, timestamp, eventNumber);
 }
 
 WebWheelEvent WebEventFactory::createWebWheelEvent(NSEvent *event, NSView *windowView)