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

Side by Side Diff: Source/core/dom/WheelEvent.cpp

Issue 23381002: WheelEvent created using document.createEvent() is not properly initialized (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « LayoutTests/fast/events/wheelevent-document-createevent-expected.txt ('k') | no next file » | 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) 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, 2010 Apple Inc. All rights reserved. 5 * Copyright (C) 2003, 2005, 2006, 2008, 2010 Apple Inc. All rights reserved.
6 * Copyright (C) 2013 Samsung Electronics. All rights reserved. 6 * Copyright (C) 2013 Samsung Electronics. All rights reserved.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 23 matching lines...) Expand all
34 : deltaX(0) 34 : deltaX(0)
35 , deltaY(0) 35 , deltaY(0)
36 , deltaZ(0) 36 , deltaZ(0)
37 , wheelDeltaX(0) 37 , wheelDeltaX(0)
38 , wheelDeltaY(0) 38 , wheelDeltaY(0)
39 , deltaMode(WheelEvent::DOM_DELTA_PIXEL) 39 , deltaMode(WheelEvent::DOM_DELTA_PIXEL)
40 { 40 {
41 } 41 }
42 42
43 WheelEvent::WheelEvent() 43 WheelEvent::WheelEvent()
44 : m_deltaMode(DOM_DELTA_PIXEL) 44 : m_deltaX(0)
45 , m_deltaY(0)
46 , m_deltaZ(0)
47 , m_deltaMode(DOM_DELTA_PIXEL)
45 , m_directionInvertedFromDevice(false) 48 , m_directionInvertedFromDevice(false)
46 { 49 {
47 ScriptWrappable::init(this); 50 ScriptWrappable::init(this);
48 } 51 }
49 52
50 WheelEvent::WheelEvent(const AtomicString& type, const WheelEventInit& initializ er) 53 WheelEvent::WheelEvent(const AtomicString& type, const WheelEventInit& initializ er)
51 : MouseEvent(type, initializer) 54 : MouseEvent(type, initializer)
52 , m_deltaX(initializer.deltaX ? initializer.deltaX : initializer.wheelDeltaX ) 55 , m_deltaX(initializer.deltaX ? initializer.deltaX : initializer.wheelDeltaX )
53 , m_deltaY(initializer.deltaY ? initializer.deltaY : initializer.wheelDeltaY ) 56 , m_deltaY(initializer.deltaY ? initializer.deltaY : initializer.wheelDeltaY )
54 , m_deltaZ(initializer.deltaZ) 57 , m_deltaZ(initializer.deltaZ)
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 return static_cast<WheelEvent*>(EventDispatchMediator::event()); 145 return static_cast<WheelEvent*>(EventDispatchMediator::event());
143 } 146 }
144 147
145 bool WheelEventDispatchMediator::dispatchEvent(EventDispatcher* dispatcher) cons t 148 bool WheelEventDispatchMediator::dispatchEvent(EventDispatcher* dispatcher) cons t
146 { 149 {
147 ASSERT(event()); 150 ASSERT(event());
148 return EventDispatchMediator::dispatchEvent(dispatcher) && !event()->default Handled(); 151 return EventDispatchMediator::dispatchEvent(dispatcher) && !event()->default Handled();
149 } 152 }
150 153
151 } // namespace WebCore 154 } // namespace WebCore
OLDNEW
« no previous file with comments | « LayoutTests/fast/events/wheelevent-document-createevent-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698