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

Unified Diff: third_party/WebKit/Source/modules/device_orientation/DeviceOrientationEvent.cpp

Issue 1737443002: Make DeviceOrientationEvent.prototype.absolute non-nullable (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address feedback Created 4 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/device_orientation/DeviceOrientationEvent.cpp
diff --git a/third_party/WebKit/Source/modules/device_orientation/DeviceOrientationEvent.cpp b/third_party/WebKit/Source/modules/device_orientation/DeviceOrientationEvent.cpp
index c18d385e77de9344f31a033c9edbafe0bf42147b..4bd0770de86b8f3b40d325dbf10319153f4567ce 100644
--- a/third_party/WebKit/Source/modules/device_orientation/DeviceOrientationEvent.cpp
+++ b/third_party/WebKit/Source/modules/device_orientation/DeviceOrientationEvent.cpp
@@ -44,7 +44,7 @@ DeviceOrientationEvent::DeviceOrientationEvent(const AtomicString& eventType, De
{
}
-void DeviceOrientationEvent::initDeviceOrientationEvent(const AtomicString& type, bool bubbles, bool cancelable, const Nullable<double>& alpha, const Nullable<double>& beta, const Nullable<double>& gamma, const Nullable<bool>& absolute)
+void DeviceOrientationEvent::initDeviceOrientationEvent(const AtomicString& type, bool bubbles, bool cancelable, const Nullable<double>& alpha, const Nullable<double>& beta, const Nullable<double>& gamma, bool absolute)
{
if (dispatched())
return;
@@ -80,13 +80,9 @@ double DeviceOrientationEvent::gamma(bool& isNull) const
return 0;
}
-bool DeviceOrientationEvent::absolute(bool& isNull) const
+bool DeviceOrientationEvent::absolute() const
{
- if (m_orientation->canProvideAbsolute())
- return m_orientation->absolute();
-
- isNull = true;
- return 0;
+ return m_orientation->absolute();
}
const AtomicString& DeviceOrientationEvent::interfaceName() const

Powered by Google App Engine
This is Rietveld 408576698