Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(75)

Unified Diff: Source/core/events/MouseEvent.cpp

Issue 182763002: Add [WillBeGarbageCollected] to Event.idl (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/events/MouseEvent.h ('k') | Source/core/events/MutationEvent.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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));
« no previous file with comments | « Source/core/events/MouseEvent.h ('k') | Source/core/events/MutationEvent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698