Revert of Implement timers by posting delayed tasks (patchset #21 id:400001 of https...
[chromium-blink-merge.git] / third_party / WebKit / Source / core / events / PointerEvent.cpp
blob3cfe5e0c6645a3ab36520117c1dcba83b753d19e
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
3 // found in the LICENSE file.
5 #include "config.h"
6 #include "core/events/PointerEvent.h"
8 namespace blink {
10 PointerEvent::PointerEvent()
11 : m_pointerId(0)
12 , m_width(0)
13 , m_height(0)
14 , m_pressure(0)
15 , m_tiltX(0)
16 , m_tiltY(0)
17 , m_isPrimary(false)
21 PointerEvent::PointerEvent(const AtomicString& type, const PointerEventInit& initializer)
22 : MouseEvent(type, initializer)
23 , m_pointerId(0)
24 , m_width(0)
25 , m_height(0)
26 , m_pressure(0)
27 , m_tiltX(0)
28 , m_tiltY(0)
29 , m_isPrimary(false)
31 if (initializer.hasPointerId())
32 m_pointerId = initializer.pointerId();
33 if (initializer.hasWidth())
34 m_width = initializer.width();
35 if (initializer.hasHeight())
36 m_height = initializer.height();
37 if (initializer.hasPressure())
38 m_pressure = initializer.pressure();
39 if (initializer.hasTiltX())
40 m_tiltX = initializer.tiltX();
41 if (initializer.hasTiltY())
42 m_tiltY = initializer.tiltY();
43 if (initializer.hasPointerType())
44 m_pointerType = initializer.pointerType();
45 if (initializer.hasIsPrimary())
46 m_isPrimary = initializer.isPrimary();
49 bool PointerEvent::isPointerEvent() const
51 return true;
54 DEFINE_TRACE(PointerEvent)
56 MouseEvent::trace(visitor);
59 } // namespace blink