Chromium Code Reviews| Index: Source/modules/device_light/DeviceLightEvent.cpp |
| diff --git a/Source/modules/device_light/DeviceLightEvent.cpp b/Source/modules/device_light/DeviceLightEvent.cpp |
| index 994629388b6a488d7451ec8564dfd62928a045a4..1bb4eec038790a3c81400acd71e0f7c00fa99145 100644 |
| --- a/Source/modules/device_light/DeviceLightEvent.cpp |
| +++ b/Source/modules/device_light/DeviceLightEvent.cpp |
| @@ -24,8 +24,11 @@ DeviceLightEvent::DeviceLightEvent(const AtomicString& eventType, double value) |
| DeviceLightEvent::DeviceLightEvent(const AtomicString& eventType, const DeviceLightEventInit& initializer) |
| : Event(eventType, initializer) |
| - , m_value(initializer.value) |
| + , m_value(std::numeric_limits<double>::infinity()) |
|
timvolodine
2014/12/11 18:38:46
you could do:
m_value(initializer.hasValue() ? ini
bashi
2014/12/11 23:56:16
Done.
|
| { |
| + if (initializer.hasValue()) |
| + m_value = initializer.value(); |
| + setCanBubble(true); |
| } |
| const AtomicString& DeviceLightEvent::interfaceName() const |