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

Side by Side Diff: third_party/WebKit/Source/core/events/PointerEvent.cpp

Issue 1852663002: Oilpan: Remove WillBe types (part 9) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/events/PointerEvent.h" 5 #include "core/events/PointerEvent.h"
6 6
7 #include "core/dom/Element.h" 7 #include "core/dom/Element.h"
8 #include "core/events/EventDispatcher.h" 8 #include "core/events/EventDispatcher.h"
9 9
10 namespace blink { 10 namespace blink {
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 bool PointerEvent::isMouseEvent() const 51 bool PointerEvent::isMouseEvent() const
52 { 52 {
53 return false; 53 return false;
54 } 54 }
55 55
56 bool PointerEvent::isPointerEvent() const 56 bool PointerEvent::isPointerEvent() const
57 { 57 {
58 return true; 58 return true;
59 } 59 }
60 60
61 PassRefPtrWillBeRawPtr<EventDispatchMediator> PointerEvent::createMediator() 61 RawPtr<EventDispatchMediator> PointerEvent::createMediator()
62 { 62 {
63 return PointerEventDispatchMediator::create(this); 63 return PointerEventDispatchMediator::create(this);
64 } 64 }
65 65
66 DEFINE_TRACE(PointerEvent) 66 DEFINE_TRACE(PointerEvent)
67 { 67 {
68 MouseEvent::trace(visitor); 68 MouseEvent::trace(visitor);
69 } 69 }
70 70
71 PassRefPtrWillBeRawPtr<PointerEventDispatchMediator> PointerEventDispatchMediato r::create(PassRefPtrWillBeRawPtr<PointerEvent> pointerEvent) 71 RawPtr<PointerEventDispatchMediator> PointerEventDispatchMediator::create(RawPtr <PointerEvent> pointerEvent)
72 { 72 {
73 return adoptRefWillBeNoop(new PointerEventDispatchMediator(pointerEvent)); 73 return new PointerEventDispatchMediator(pointerEvent);
74 } 74 }
75 75
76 PointerEventDispatchMediator::PointerEventDispatchMediator(PassRefPtrWillBeRawPt r<PointerEvent> pointerEvent) 76 PointerEventDispatchMediator::PointerEventDispatchMediator(RawPtr<PointerEvent> pointerEvent)
77 : EventDispatchMediator(pointerEvent) 77 : EventDispatchMediator(pointerEvent)
78 { 78 {
79 } 79 }
80 80
81 PointerEvent& PointerEventDispatchMediator::event() const 81 PointerEvent& PointerEventDispatchMediator::event() const
82 { 82 {
83 return toPointerEvent(EventDispatchMediator::event()); 83 return toPointerEvent(EventDispatchMediator::event());
84 } 84 }
85 85
86 DispatchEventResult PointerEventDispatchMediator::dispatchEvent(EventDispatcher& dispatcher) const 86 DispatchEventResult PointerEventDispatchMediator::dispatchEvent(EventDispatcher& dispatcher) const
87 { 87 {
88 if (isDisabledFormControl(&dispatcher.node())) 88 if (isDisabledFormControl(&dispatcher.node()))
89 return DispatchEventResult::CanceledBeforeDispatch; 89 return DispatchEventResult::CanceledBeforeDispatch;
90 90
91 if (event().type().isEmpty()) 91 if (event().type().isEmpty())
92 return DispatchEventResult::NotCanceled; // Shouldn't happen. 92 return DispatchEventResult::NotCanceled; // Shouldn't happen.
93 93
94 ASSERT(!event().target() || event().target() != event().relatedTarget()); 94 ASSERT(!event().target() || event().target() != event().relatedTarget());
95 95
96 EventTarget* relatedTarget = event().relatedTarget(); 96 EventTarget* relatedTarget = event().relatedTarget();
97 if (event().relatedTargetScoped()) 97 if (event().relatedTargetScoped())
98 event().eventPath().adjustForRelatedTarget(dispatcher.node(), relatedTar get); 98 event().eventPath().adjustForRelatedTarget(dispatcher.node(), relatedTar get);
99 99
100 return dispatcher.dispatch(); 100 return dispatcher.dispatch();
101 } 101 }
102 102
103 } // namespace blink 103 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/events/PointerEvent.h ('k') | third_party/WebKit/Source/core/events/PointerEventFactory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698