From ab0a50979b9eb4dfa3320eff7e187e41efedf7a9 Mon Sep 17 00:00:00 2001 From: Jocelyn Turcotte Date: Fri, 8 Aug 2014 14:30:41 +0200 Subject: Update Chromium to beta version 37.0.2062.68 Change-Id: I188e3b5aff1bec75566014291b654eb19f5bc8ca Reviewed-by: Andras Becsi --- .../WebKit/Source/core/events/GestureEvent.cpp | 38 ++++++---------------- 1 file changed, 10 insertions(+), 28 deletions(-) (limited to 'chromium/third_party/WebKit/Source/core/events/GestureEvent.cpp') diff --git a/chromium/third_party/WebKit/Source/core/events/GestureEvent.cpp b/chromium/third_party/WebKit/Source/core/events/GestureEvent.cpp index 13d5f6f2a01..1fb72214e80 100644 --- a/chromium/third_party/WebKit/Source/core/events/GestureEvent.cpp +++ b/chromium/third_party/WebKit/Source/core/events/GestureEvent.cpp @@ -30,12 +30,7 @@ namespace WebCore { -PassRefPtr GestureEvent::create() -{ - return adoptRef(new GestureEvent); -} - -PassRefPtr GestureEvent::create(PassRefPtr view, const PlatformGestureEvent& event) +PassRefPtrWillBeRawPtr GestureEvent::create(PassRefPtrWillBeRawPtr view, const PlatformGestureEvent& event) { AtomicString eventType; float deltaX = 0; @@ -68,27 +63,9 @@ PassRefPtr GestureEvent::create(PassRefPtr view, con case PlatformEvent::GesturePinchUpdate: case PlatformEvent::GestureTapDownCancel: default: - return 0; + return nullptr; } - return adoptRef(new GestureEvent(eventType, view, event.globalPosition().x(), event.globalPosition().y(), event.position().x(), event.position().y(), event.ctrlKey(), event.altKey(), event.shiftKey(), event.metaKey(), deltaX, deltaY)); -} - -void GestureEvent::initGestureEvent(const AtomicString& type, PassRefPtr view, int screenX, int screenY, int clientX, int clientY, bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, float deltaX, float deltaY) -{ - if (dispatched()) - return; - - initUIEvent(type, true, true, view, 0); - m_screenLocation = IntPoint(screenX, screenY); - m_ctrlKey = ctrlKey; - m_altKey = altKey; - m_shiftKey = shiftKey; - m_metaKey = metaKey; - - m_deltaX = deltaX; - m_deltaY = deltaY; - - initCoordinates(IntPoint(clientX, clientY)); + return adoptRefWillBeNoop(new GestureEvent(eventType, view, event.globalPosition().x(), event.globalPosition().y(), event.position().x(), event.position().y(), event.ctrlKey(), event.altKey(), event.shiftKey(), event.metaKey(), deltaX, deltaY)); } const AtomicString& GestureEvent::interfaceName() const @@ -110,14 +87,19 @@ GestureEvent::GestureEvent() { } -GestureEvent::GestureEvent(const AtomicString& type, PassRefPtr view, int screenX, int screenY, int clientX, int clientY, bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, float deltaX, float deltaY) +GestureEvent::GestureEvent(const AtomicString& type, PassRefPtrWillBeRawPtr view, int screenX, int screenY, int clientX, int clientY, bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, float deltaX, float deltaY) : MouseRelatedEvent(type, true, true, view, 0, IntPoint(screenX, screenY), IntPoint(clientX, clientY), IntPoint(0, 0), ctrlKey, altKey, shiftKey, metaKey) , m_deltaX(deltaX) , m_deltaY(deltaY) { } -GestureEventDispatchMediator::GestureEventDispatchMediator(PassRefPtr gestureEvent) +void GestureEvent::trace(Visitor* visitor) +{ + MouseRelatedEvent::trace(visitor); +} + +GestureEventDispatchMediator::GestureEventDispatchMediator(PassRefPtrWillBeRawPtr gestureEvent) : EventDispatchMediator(gestureEvent) { } -- cgit v1.2.3