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

Side by Side Diff: Source/core/events/GestureEvent.cpp

Issue 211373002: Oilpan: move DOMWindow object to the oilpan heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: setNativeInfoForInnerGlobalObject() -> setNativeInfoForHiddenWrapper() 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 unified diff | Download patch
« no previous file with comments | « Source/core/events/GestureEvent.h ('k') | Source/core/events/MouseEvent.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * * Redistributions of source code must retain the above copyright 7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright 9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 12 matching lines...) Expand all
23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 */ 24 */
25 25
26 #include "config.h" 26 #include "config.h"
27 #include "core/dom/Element.h" 27 #include "core/dom/Element.h"
28 #include "core/events/GestureEvent.h" 28 #include "core/events/GestureEvent.h"
29 #include "wtf/text/AtomicString.h" 29 #include "wtf/text/AtomicString.h"
30 30
31 namespace WebCore { 31 namespace WebCore {
32 32
33 PassRefPtr<GestureEvent> GestureEvent::create(PassRefPtr<AbstractView> view, con st PlatformGestureEvent& event) 33 PassRefPtr<GestureEvent> GestureEvent::create(PassRefPtrWillBeRawPtr<AbstractVie w> view, const PlatformGestureEvent& event)
34 { 34 {
35 AtomicString eventType; 35 AtomicString eventType;
36 float deltaX = 0; 36 float deltaX = 0;
37 float deltaY = 0; 37 float deltaY = 0;
38 switch (event.type()) { 38 switch (event.type()) {
39 case PlatformEvent::GestureScrollBegin: 39 case PlatformEvent::GestureScrollBegin:
40 eventType = EventTypeNames::gesturescrollstart; break; 40 eventType = EventTypeNames::gesturescrollstart; break;
41 case PlatformEvent::GestureScrollEnd: 41 case PlatformEvent::GestureScrollEnd:
42 eventType = EventTypeNames::gesturescrollend; break; 42 eventType = EventTypeNames::gesturescrollend; break;
43 case PlatformEvent::GestureScrollUpdate: 43 case PlatformEvent::GestureScrollUpdate:
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 { 80 {
81 return true; 81 return true;
82 } 82 }
83 83
84 GestureEvent::GestureEvent() 84 GestureEvent::GestureEvent()
85 : m_deltaX(0) 85 : m_deltaX(0)
86 , m_deltaY(0) 86 , m_deltaY(0)
87 { 87 {
88 } 88 }
89 89
90 GestureEvent::GestureEvent(const AtomicString& type, PassRefPtr<AbstractView> vi ew, int screenX, int screenY, int clientX, int clientY, bool ctrlKey, bool altKe y, bool shiftKey, bool metaKey, float deltaX, float deltaY) 90 GestureEvent::GestureEvent(const AtomicString& type, PassRefPtrWillBeRawPtr<Abst ractView> view, int screenX, int screenY, int clientX, int clientY, bool ctrlKey , bool altKey, bool shiftKey, bool metaKey, float deltaX, float deltaY)
91 : MouseRelatedEvent(type, true, true, view, 0, IntPoint(screenX, screenY), I ntPoint(clientX, clientY), IntPoint(0, 0), ctrlKey, altKey, shiftKey, metaKey) 91 : MouseRelatedEvent(type, true, true, view, 0, IntPoint(screenX, screenY), I ntPoint(clientX, clientY), IntPoint(0, 0), ctrlKey, altKey, shiftKey, metaKey)
92 , m_deltaX(deltaX) 92 , m_deltaX(deltaX)
93 , m_deltaY(deltaY) 93 , m_deltaY(deltaY)
94 { 94 {
95 } 95 }
96 96
97 void GestureEvent::trace(Visitor* visitor) 97 void GestureEvent::trace(Visitor* visitor)
98 { 98 {
99 MouseRelatedEvent::trace(visitor); 99 MouseRelatedEvent::trace(visitor);
100 } 100 }
101 101
102 GestureEventDispatchMediator::GestureEventDispatchMediator(PassRefPtr<GestureEve nt> gestureEvent) 102 GestureEventDispatchMediator::GestureEventDispatchMediator(PassRefPtr<GestureEve nt> gestureEvent)
103 : EventDispatchMediator(gestureEvent) 103 : EventDispatchMediator(gestureEvent)
104 { 104 {
105 } 105 }
106 106
107 GestureEvent* GestureEventDispatchMediator::event() const 107 GestureEvent* GestureEventDispatchMediator::event() const
108 { 108 {
109 return toGestureEvent(EventDispatchMediator::event()); 109 return toGestureEvent(EventDispatchMediator::event());
110 } 110 }
111 111
112 bool GestureEventDispatchMediator::dispatchEvent(EventDispatcher* dispatcher) co nst 112 bool GestureEventDispatchMediator::dispatchEvent(EventDispatcher* dispatcher) co nst
113 { 113 {
114 dispatcher->dispatch(); 114 dispatcher->dispatch();
115 ASSERT(!event()->defaultPrevented()); 115 ASSERT(!event()->defaultPrevented());
116 return event()->defaultHandled() || event()->defaultPrevented(); 116 return event()->defaultHandled() || event()->defaultPrevented();
117 } 117 }
118 118
119 } // namespace WebCore 119 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/events/GestureEvent.h ('k') | Source/core/events/MouseEvent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698