| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2010 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * * Redistributions of source code must retain the above copyright | 7 * * Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * * Redistributions in binary form must reproduce the above copyright | 9 * * Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 bool bubbles; | 122 bool bubbles; |
| 123 V8_CALL(bubbles, info[1], BooleanValue(context), return); | 123 V8_CALL(bubbles, info[1], BooleanValue(context), return); |
| 124 bool cancelable; | 124 bool cancelable; |
| 125 V8_CALL(cancelable, info[2], BooleanValue(context), return); | 125 V8_CALL(cancelable, info[2], BooleanValue(context), return); |
| 126 DeviceMotionData::Acceleration* acceleration = readAccelerationArgument(info
[3], isolate); | 126 DeviceMotionData::Acceleration* acceleration = readAccelerationArgument(info
[3], isolate); |
| 127 DeviceMotionData::Acceleration* accelerationIncludingGravity = readAccelerat
ionArgument(info[4], isolate); | 127 DeviceMotionData::Acceleration* accelerationIncludingGravity = readAccelerat
ionArgument(info[4], isolate); |
| 128 DeviceMotionData::RotationRate* rotationRate = readRotationRateArgument(info
[5], isolate); | 128 DeviceMotionData::RotationRate* rotationRate = readRotationRateArgument(info
[5], isolate); |
| 129 bool intervalProvided = !isUndefinedOrNull(info[6]); | 129 bool intervalProvided = !isUndefinedOrNull(info[6]); |
| 130 double interval = 0; | 130 double interval = 0; |
| 131 if (intervalProvided) { | 131 if (intervalProvided) { |
| 132 interval = toRestrictedDouble(info[6], exceptionState); | 132 interval = toRestrictedDouble(isolate, info[6], exceptionState); |
| 133 if (exceptionState.throwIfNeeded()) | 133 if (exceptionState.throwIfNeeded()) |
| 134 return; | 134 return; |
| 135 } | 135 } |
| 136 DeviceMotionData* deviceMotionData = DeviceMotionData::create(acceleration,
accelerationIncludingGravity, rotationRate, intervalProvided, interval); | 136 DeviceMotionData* deviceMotionData = DeviceMotionData::create(acceleration,
accelerationIncludingGravity, rotationRate, intervalProvided, interval); |
| 137 impl->initDeviceMotionEvent(type, bubbles, cancelable, deviceMotionData); | 137 impl->initDeviceMotionEvent(type, bubbles, cancelable, deviceMotionData); |
| 138 } | 138 } |
| 139 | 139 |
| 140 } // namespace blink | 140 } // namespace blink |
| OLD | NEW |