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

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

Issue 1174683004: Populates sourceDevice attribute into MouseEvent (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Create a new init function Created 5 years, 6 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 /* 1 /*
2 * Copyright (C) 2001 Peter Kelly (pmk@post.com) 2 * Copyright (C) 2001 Peter Kelly (pmk@post.com)
3 * Copyright (C) 2001 Tobias Anton (anton@stud.fbi.fh-darmstadt.de) 3 * Copyright (C) 2001 Tobias Anton (anton@stud.fbi.fh-darmstadt.de)
4 * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) 4 * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com)
5 * Copyright (C) 2003, 2005, 2006, 2008 Apple Inc. All rights reserved. 5 * Copyright (C) 2003, 2005, 2006, 2008 Apple Inc. All rights reserved.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 , m_view(initializer.view()) 46 , m_view(initializer.view())
47 , m_detail(initializer.detail()) 47 , m_detail(initializer.detail())
48 , m_sourceDevice(initializer.sourceDevice()) 48 , m_sourceDevice(initializer.sourceDevice())
49 { 49 {
50 } 50 }
51 51
52 UIEvent::~UIEvent() 52 UIEvent::~UIEvent()
53 { 53 {
54 } 54 }
55 55
56 void UIEvent::initUIEvent(const AtomicString& typeArg, bool canBubbleArg, bool c ancelableArg, PassRefPtrWillBeRawPtr<AbstractView> viewArg, int detailArg) 56 void UIEvent::initUIEvent(const AtomicString& typeArg, bool canBubbleArg, bool c ancelableArg, PassRefPtrWillBeRawPtr<AbstractView> viewArg, int detailArg, Input Device* sourceDevice)
57 { 57 {
58 if (dispatched()) 58 if (dispatched())
59 return; 59 return;
60 60
61 initEvent(typeArg, canBubbleArg, cancelableArg); 61 initEvent(typeArg, canBubbleArg, cancelableArg);
62 62
63 m_view = viewArg; 63 m_view = viewArg;
64 m_detail = detailArg; 64 m_detail = detailArg;
65 m_sourceDevice = nullptr; 65 m_sourceDevice = sourceDevice;
66 }
67
68 void UIEvent::initUIEvent(const AtomicString& typeArg, bool canBubbleArg, bool c ancelableArg, PassRefPtrWillBeRawPtr<AbstractView> viewArg, int detailArg)
69 {
70 initUIEvent(typeArg, canBubbleArg, cancelableArg, viewArg, detailArg, nullpt r);
66 } 71 }
67 72
68 bool UIEvent::isUIEvent() const 73 bool UIEvent::isUIEvent() const
69 { 74 {
70 return true; 75 return true;
71 } 76 }
72 77
73 const AtomicString& UIEvent::interfaceName() const 78 const AtomicString& UIEvent::interfaceName() const
74 { 79 {
75 return EventNames::UIEvent; 80 return EventNames::UIEvent;
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 } 116 }
112 117
113 DEFINE_TRACE(UIEvent) 118 DEFINE_TRACE(UIEvent)
114 { 119 {
115 visitor->trace(m_view); 120 visitor->trace(m_view);
116 visitor->trace(m_sourceDevice); 121 visitor->trace(m_sourceDevice);
117 Event::trace(visitor); 122 Event::trace(visitor);
118 } 123 }
119 124
120 } // namespace blink 125 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698