Unreviewed build fix with ENABLE_DEVICE_ORIENTATION after r157215
authorryuan.choi@samsung.com <ryuan.choi@samsung.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 11 Oct 2013 00:01:36 +0000 (00:01 +0000)
committerryuan.choi@samsung.com <ryuan.choi@samsung.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 11 Oct 2013 00:01:36 +0000 (00:01 +0000)
Now, impl() return reference instead of a pointer.

* bindings/js/JSDeviceMotionEventCustom.cpp:
(WebCore::JSDeviceMotionEvent::acceleration):
(WebCore::JSDeviceMotionEvent::accelerationIncludingGravity):
(WebCore::JSDeviceMotionEvent::rotationRate):
(WebCore::JSDeviceMotionEvent::interval):
(WebCore::JSDeviceMotionEvent::initDeviceMotionEvent):
* bindings/js/JSDeviceOrientationEventCustom.cpp:
(WebCore::JSDeviceOrientationEvent::alpha):
(WebCore::JSDeviceOrientationEvent::beta):
(WebCore::JSDeviceOrientationEvent::gamma):
(WebCore::JSDeviceOrientationEvent::absolute):
(WebCore::JSDeviceOrientationEvent::initDeviceOrientationEvent):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@157274 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/bindings/js/JSDeviceMotionEventCustom.cpp
Source/WebCore/bindings/js/JSDeviceOrientationEventCustom.cpp

index f35758d..24e90d4 100644 (file)
@@ -1,3 +1,22 @@
+2013-10-10  Ryuan Choi  <ryuan.choi@samsung.com>
+
+        Unreviewed build fix with ENABLE_DEVICE_ORIENTATION after r157215
+
+        Now, impl() return reference instead of a pointer.
+
+        * bindings/js/JSDeviceMotionEventCustom.cpp:
+        (WebCore::JSDeviceMotionEvent::acceleration):
+        (WebCore::JSDeviceMotionEvent::accelerationIncludingGravity):
+        (WebCore::JSDeviceMotionEvent::rotationRate):
+        (WebCore::JSDeviceMotionEvent::interval):
+        (WebCore::JSDeviceMotionEvent::initDeviceMotionEvent):
+        * bindings/js/JSDeviceOrientationEventCustom.cpp:
+        (WebCore::JSDeviceOrientationEvent::alpha):
+        (WebCore::JSDeviceOrientationEvent::beta):
+        (WebCore::JSDeviceOrientationEvent::gamma):
+        (WebCore::JSDeviceOrientationEvent::absolute):
+        (WebCore::JSDeviceOrientationEvent::initDeviceOrientationEvent):
+
 2013-10-10  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
 
         [MediaStream API] update MediaStream object to match spec
index 09f3572..b4d5c4f 100644 (file)
@@ -133,34 +133,34 @@ static JSObject* createRotationRateObject(const DeviceMotionData::RotationRate*
 
 JSValue JSDeviceMotionEvent::acceleration(ExecState* exec) const
 {
-    DeviceMotionEvent* imp = impl();
-    if (!imp->deviceMotionData()->acceleration())
+    DeviceMotionEvent& imp = impl();
+    if (!imp.deviceMotionData()->acceleration())
         return jsNull();
-    return createAccelerationObject(imp->deviceMotionData()->acceleration(), exec);
+    return createAccelerationObject(imp.deviceMotionData()->acceleration(), exec);
 }
 
 JSValue JSDeviceMotionEvent::accelerationIncludingGravity(ExecState* exec) const
 {
-    DeviceMotionEvent* imp = impl();
-    if (!imp->deviceMotionData()->accelerationIncludingGravity())
+    DeviceMotionEvent& imp = impl();
+    if (!imp.deviceMotionData()->accelerationIncludingGravity())
         return jsNull();
-    return createAccelerationObject(imp->deviceMotionData()->accelerationIncludingGravity(), exec);
+    return createAccelerationObject(imp.deviceMotionData()->accelerationIncludingGravity(), exec);
 }
 
 JSValue JSDeviceMotionEvent::rotationRate(ExecState* exec) const
 {
-    DeviceMotionEvent* imp = impl();
-    if (!imp->deviceMotionData()->rotationRate())
+    DeviceMotionEvent& imp = impl();
+    if (!imp.deviceMotionData()->rotationRate())
         return jsNull();
-    return createRotationRateObject(imp->deviceMotionData()->rotationRate(), exec);
+    return createRotationRateObject(imp.deviceMotionData()->rotationRate(), exec);
 }
 
 JSValue JSDeviceMotionEvent::interval(ExecState*) const
 {
-    DeviceMotionEvent* imp = impl();
-    if (!imp->deviceMotionData()->canProvideInterval())
+    DeviceMotionEvent& imp = impl();
+    if (!imp.deviceMotionData()->canProvideInterval())
         return jsNull();
-    return jsNumber(imp->deviceMotionData()->interval());
+    return jsNumber(imp.deviceMotionData()->interval());
 }
 
 JSValue JSDeviceMotionEvent::initDeviceMotionEvent(ExecState* exec)
@@ -186,8 +186,7 @@ JSValue JSDeviceMotionEvent::initDeviceMotionEvent(ExecState* exec)
     bool intervalProvided = !exec->argument(6).isUndefinedOrNull();
     double interval = exec->argument(6).toNumber(exec);
     RefPtr<DeviceMotionData> deviceMotionData = DeviceMotionData::create(acceleration, accelerationIncludingGravity, rotationRate, intervalProvided, interval);
-    DeviceMotionEvent* imp = impl();
-    imp->initDeviceMotionEvent(type, bubbles, cancelable, deviceMotionData.get());
+    impl().initDeviceMotionEvent(type, bubbles, cancelable, deviceMotionData.get());
     return jsUndefined();
 }
 
index a1678c3..65eccb3 100644 (file)
@@ -38,34 +38,34 @@ namespace WebCore {
 
 JSValue JSDeviceOrientationEvent::alpha(ExecState*) const
 {
-    DeviceOrientationEvent* imp = impl();
-    if (!imp->orientation()->canProvideAlpha())
+    DeviceOrientationEvent& imp = impl();
+    if (!imp.orientation()->canProvideAlpha())
         return jsNull();
-    return jsNumber(imp->orientation()->alpha());
+    return jsNumber(imp.orientation()->alpha());
 }
 
 JSValue JSDeviceOrientationEvent::beta(ExecState*) const
 {
-    DeviceOrientationEvent* imp = impl();
-    if (!imp->orientation()->canProvideBeta())
+    DeviceOrientationEvent& imp = impl();
+    if (!imp.orientation()->canProvideBeta())
         return jsNull();
-    return jsNumber(imp->orientation()->beta());
+    return jsNumber(imp.orientation()->beta());
 }
 
 JSValue JSDeviceOrientationEvent::gamma(ExecState*) const
 {
-    DeviceOrientationEvent* imp = impl();
-    if (!imp->orientation()->canProvideGamma())
+    DeviceOrientationEvent& imp = impl();
+    if (!imp.orientation()->canProvideGamma())
         return jsNull();
-    return jsNumber(imp->orientation()->gamma());
+    return jsNumber(imp.orientation()->gamma());
 }
 
 JSValue JSDeviceOrientationEvent::absolute(ExecState*) const
 {
-    DeviceOrientationEvent* imp = impl();
-    if (!imp->orientation()->canProvideAbsolute())
+    DeviceOrientationEvent& imp = impl();
+    if (!imp.orientation()->canProvideAbsolute())
         return jsNull();
-    return jsBoolean(imp->orientation()->absolute());
+    return jsBoolean(imp.orientation()->absolute());
 }
 
 JSValue JSDeviceOrientationEvent::initDeviceOrientationEvent(ExecState* exec)
@@ -84,8 +84,7 @@ JSValue JSDeviceOrientationEvent::initDeviceOrientationEvent(ExecState* exec)
     bool absoluteProvided = !exec->argument(6).isUndefinedOrNull();
     bool absolute = exec->argument(6).toBoolean(exec);
     RefPtr<DeviceOrientationData> orientation = DeviceOrientationData::create(alphaProvided, alpha, betaProvided, beta, gammaProvided, gamma, absoluteProvided, absolute);
-    DeviceOrientationEvent* imp = impl();
-    imp->initDeviceOrientationEvent(type, bubbles, cancelable, orientation.get());
+    impl().initDeviceOrientationEvent(type, bubbles, cancelable, orientation.get());
     return jsUndefined();
 }