DeviceOrientation.absolute should return false when it was not initialized.
authorRyuan Choi <ryuan.choi@samsung.com>
Fri, 31 May 2013 01:51:36 +0000 (10:51 +0900)
committerRyuan Choi <ryuan.choi@samsung.com>
Fri, 31 May 2013 01:54:50 +0000 (10:54 +0900)
[Title] DeviceOrientation.absolute should return false when it was not initialized.
[Issue#] TWEB-1103
[Problem] spec mentioned that it should return false, but code is wrong.
[Cause]
[Solution] Fixed.

Change-Id: I9a6720c38ef8c463875578a1f406cca3cb7a0ea3

Source/WebCore/bindings/js/JSDeviceOrientationEventCustom.cpp

index 25976e4..c815407 100644 (file)
@@ -64,7 +64,7 @@ JSValue JSDeviceOrientationEvent::absolute(ExecState*) const
 {
     DeviceOrientationEvent* imp = static_cast<DeviceOrientationEvent*>(impl());
     if (!imp->orientation()->canProvideAbsolute())
-        return jsNull();
+        return jsBoolean(false);
     return jsBoolean(imp->orientation()->absolute());
 }