Index: Source/core/events/MouseEvent.cpp |
diff --git a/Source/core/events/MouseEvent.cpp b/Source/core/events/MouseEvent.cpp |
index 701c17374b34fc1330d3afc2344d31bdb1e6d97b..301be3174d3a27dba9234fdacd24d2aa355a0408 100644 |
--- a/Source/core/events/MouseEvent.cpp |
+++ b/Source/core/events/MouseEvent.cpp |
@@ -44,12 +44,12 @@ MouseEventInit::MouseEventInit() |
{ |
} |
-PassRefPtr<MouseEvent> MouseEvent::create(const AtomicString& type, const MouseEventInit& initializer) |
+PassRefPtrWillBeRawPtr<MouseEvent> MouseEvent::create(const AtomicString& type, const MouseEventInit& initializer) |
{ |
- return adoptRef(new MouseEvent(type, initializer)); |
+ return adoptRefWillBeRefCountedGarbageCollected(new MouseEvent(type, initializer)); |
} |
-PassRefPtr<MouseEvent> MouseEvent::create(const AtomicString& eventType, PassRefPtrWillBeRawPtr<AbstractView> view, const PlatformMouseEvent& event, int detail, PassRefPtr<Node> relatedTarget) |
+PassRefPtrWillBeRawPtr<MouseEvent> MouseEvent::create(const AtomicString& eventType, PassRefPtrWillBeRawPtr<AbstractView> view, const PlatformMouseEvent& event, int detail, PassRefPtr<Node> relatedTarget) |
{ |
ASSERT(event.type() == PlatformEvent::MouseMoved || event.button() != NoButton); |
@@ -57,20 +57,21 @@ PassRefPtr<MouseEvent> MouseEvent::create(const AtomicString& eventType, PassRef |
bool isCancelable = !isMouseEnterOrLeave; |
bool isBubbling = !isMouseEnterOrLeave; |
- return MouseEvent::create(eventType, isBubbling, isCancelable, view, |
+ return MouseEvent::create( |
+ eventType, isBubbling, isCancelable, view, |
detail, event.globalPosition().x(), event.globalPosition().y(), event.position().x(), event.position().y(), |
event.movementDelta().x(), event.movementDelta().y(), |
event.ctrlKey(), event.altKey(), event.shiftKey(), event.metaKey(), event.button(), |
relatedTarget, nullptr, false); |
} |
-PassRefPtr<MouseEvent> MouseEvent::create(const AtomicString& type, bool canBubble, bool cancelable, PassRefPtrWillBeRawPtr<AbstractView> view, |
+PassRefPtrWillBeRawPtr<MouseEvent> MouseEvent::create(const AtomicString& type, bool canBubble, bool cancelable, PassRefPtrWillBeRawPtr<AbstractView> view, |
int detail, int screenX, int screenY, int pageX, int pageY, |
int movementX, int movementY, |
bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, unsigned short button, |
PassRefPtr<EventTarget> relatedTarget, PassRefPtrWillBeRawPtr<Clipboard> clipboard, bool isSimulated) |
{ |
- return adoptRef(new MouseEvent(type, canBubble, cancelable, view, |
+ return adoptRefWillBeRefCountedGarbageCollected(new MouseEvent(type, canBubble, cancelable, view, |
detail, screenX, screenY, pageX, pageY, |
movementX, movementY, |
ctrlKey, altKey, shiftKey, metaKey, button, relatedTarget, clipboard, isSimulated)); |