From ac7b0de55f7b6527fc3115cb204d68f190e2f076 Mon Sep 17 00:00:00 2001 From: Ryuan Choi Date: Fri, 31 May 2013 10:51:36 +0900 Subject: [PATCH] DeviceOrientation.absolute should return false when it was not initialized. [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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/WebCore/bindings/js/JSDeviceOrientationEventCustom.cpp b/Source/WebCore/bindings/js/JSDeviceOrientationEventCustom.cpp index 25976e4..c815407 100644 --- a/Source/WebCore/bindings/js/JSDeviceOrientationEventCustom.cpp +++ b/Source/WebCore/bindings/js/JSDeviceOrientationEventCustom.cpp @@ -64,7 +64,7 @@ JSValue JSDeviceOrientationEvent::absolute(ExecState*) const { DeviceOrientationEvent* imp = static_cast(impl()); if (!imp->orientation()->canProvideAbsolute()) - return jsNull(); + return jsBoolean(false); return jsBoolean(imp->orientation()->absolute()); } -- 2.7.4