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

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

Issue 1227363006: Virtualize EventDispatchMediator creation and cleanup calling. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master_event_trusted_main
Patch Set: Rebase Created 5 years, 5 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/PointerEvent.h ('k') | Source/core/events/TouchEvent.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 // 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 "config.h" 5 #include "config.h"
6 #include "core/events/PointerEvent.h" 6 #include "core/events/PointerEvent.h"
7 7
8 #include "core/dom/Element.h" 8 #include "core/dom/Element.h"
9 #include "core/events/EventDispatcher.h" 9 #include "core/events/EventDispatcher.h"
10 10
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 bool PointerEvent::isMouseEvent() const 52 bool PointerEvent::isMouseEvent() const
53 { 53 {
54 return false; 54 return false;
55 } 55 }
56 56
57 bool PointerEvent::isPointerEvent() const 57 bool PointerEvent::isPointerEvent() const
58 { 58 {
59 return true; 59 return true;
60 } 60 }
61 61
62 PassRefPtrWillBeRawPtr<EventDispatchMediator> PointerEvent::createMediator()
63 {
64 return PointerEventDispatchMediator::create(this);
65 }
66
62 DEFINE_TRACE(PointerEvent) 67 DEFINE_TRACE(PointerEvent)
63 { 68 {
64 MouseEvent::trace(visitor); 69 MouseEvent::trace(visitor);
65 } 70 }
66 71
67 PassRefPtrWillBeRawPtr<PointerEventDispatchMediator> PointerEventDispatchMediato r::create(PassRefPtrWillBeRawPtr<PointerEvent> pointerEvent) 72 PassRefPtrWillBeRawPtr<PointerEventDispatchMediator> PointerEventDispatchMediato r::create(PassRefPtrWillBeRawPtr<PointerEvent> pointerEvent)
68 { 73 {
69 return adoptRefWillBeNoop(new PointerEventDispatchMediator(pointerEvent)); 74 return adoptRefWillBeNoop(new PointerEventDispatchMediator(pointerEvent));
70 } 75 }
71 76
(...skipping 18 matching lines...) Expand all
90 ASSERT(!event().target() || event().target() != event().relatedTarget()); 95 ASSERT(!event().target() || event().target() != event().relatedTarget());
91 96
92 EventTarget* relatedTarget = event().relatedTarget(); 97 EventTarget* relatedTarget = event().relatedTarget();
93 event().eventPath().adjustForRelatedTarget(dispatcher.node(), relatedTarget) ; 98 event().eventPath().adjustForRelatedTarget(dispatcher.node(), relatedTarget) ;
94 99
95 dispatcher.dispatch(); 100 dispatcher.dispatch();
96 return !event().defaultHandled() && !event().defaultPrevented(); 101 return !event().defaultHandled() && !event().defaultPrevented();
97 } 102 }
98 103
99 } // namespace blink 104 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/events/PointerEvent.h ('k') | Source/core/events/TouchEvent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698