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

Side by Side Diff: third_party/WebKit/Source/modules/device_light/DeviceLightEvent.cpp

Issue 2216593002: Drop document.createEvent support for things still behind a flag (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@createEvent
Patch Set: fix LayoutTests Created 4 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "modules/device_light/DeviceLightEvent.h" 5 #include "modules/device_light/DeviceLightEvent.h"
6 6
7 namespace blink { 7 namespace blink {
8 8
9 DeviceLightEvent::~DeviceLightEvent() 9 DeviceLightEvent::~DeviceLightEvent()
10 { 10 {
11 } 11 }
12 12
13 DeviceLightEvent::DeviceLightEvent()
14 : m_value(std::numeric_limits<double>::infinity())
15 {
16 }
17
18 DeviceLightEvent::DeviceLightEvent(const AtomicString& eventType, double value) 13 DeviceLightEvent::DeviceLightEvent(const AtomicString& eventType, double value)
19 : Event(eventType, true, false) // The DeviceLightEvent bubbles but is not c ancelable. 14 : Event(eventType, true, false) // The DeviceLightEvent bubbles but is not c ancelable.
20 , m_value(value) 15 , m_value(value)
21 { 16 {
22 } 17 }
23 18
24 DeviceLightEvent::DeviceLightEvent(const AtomicString& eventType, const DeviceLi ghtEventInit& initializer) 19 DeviceLightEvent::DeviceLightEvent(const AtomicString& eventType, const DeviceLi ghtEventInit& initializer)
25 : Event(eventType, initializer) 20 : Event(eventType, initializer)
26 , m_value(initializer.hasValue() ? initializer.value() : std::numeric_limits <double>::infinity()) 21 , m_value(initializer.hasValue() ? initializer.value() : std::numeric_limits <double>::infinity())
27 { 22 {
28 setCanBubble(true); 23 setCanBubble(true);
29 } 24 }
30 25
31 const AtomicString& DeviceLightEvent::interfaceName() const 26 const AtomicString& DeviceLightEvent::interfaceName() const
32 { 27 {
33 return EventNames::DeviceLightEvent; 28 return EventNames::DeviceLightEvent;
34 } 29 }
35 30
36 } // namespace blink 31 } // namespace blink
37
38
39
40
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698