[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

hans at chromium.org hans at chromium.org
Wed Dec 22 13:44:05 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit d3e9e0bab39996760d29296630449a7c08d6f040
Author: hans at chromium.org <hans at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Sep 24 15:58:58 2010 +0000

    2010-09-24  Hans Wennborg  <hans at chromium.org>
    
            Reviewed by Steve Block.
    
            Remove unnecessary casts in DeviceOrientation V8 bindings
            https://bugs.webkit.org/show_bug.cgi?id=46466
    
            Remove unnecessary casts of v8::Value::NumberValue() to double from
            the custom v8 bindings code for DeviceOrientation/Motion.
    
            No new tests: just cleanup, no new functionality.
    
            * bindings/v8/custom/V8DeviceMotionEventCustom.cpp:
            (WebCore::V8DeviceMotionEvent::initDeviceMotionEventCallback):
            * bindings/v8/custom/V8DeviceOrientationEventCustom.cpp:
            (WebCore::V8DeviceOrientationEvent::initDeviceOrientationEventCallback):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@68257 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 57da804..9c4ac94 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,20 @@
+2010-09-24  Hans Wennborg  <hans at chromium.org>
+
+        Reviewed by Steve Block.
+
+        Remove unnecessary casts in DeviceOrientation V8 bindings
+        https://bugs.webkit.org/show_bug.cgi?id=46466
+
+        Remove unnecessary casts of v8::Value::NumberValue() to double from
+        the custom v8 bindings code for DeviceOrientation/Motion.
+
+        No new tests: just cleanup, no new functionality.
+
+        * bindings/v8/custom/V8DeviceMotionEventCustom.cpp:
+        (WebCore::V8DeviceMotionEvent::initDeviceMotionEventCallback):
+        * bindings/v8/custom/V8DeviceOrientationEventCustom.cpp:
+        (WebCore::V8DeviceOrientationEvent::initDeviceOrientationEventCallback):
+
 2010-09-24  Ilya Tikhonovsky  <loislo at chromium.org>
 
         Reviewed by Pavel Feldman.
diff --git a/WebCore/bindings/v8/custom/V8DeviceMotionEventCustom.cpp b/WebCore/bindings/v8/custom/V8DeviceMotionEventCustom.cpp
index d615580..f7a03f9 100644
--- a/WebCore/bindings/v8/custom/V8DeviceMotionEventCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8DeviceMotionEventCustom.cpp
@@ -69,19 +69,19 @@ RefPtr<DeviceMotionData::Acceleration> readAccelerationArgument(v8::Local<v8::Va
     if (xValue.IsEmpty())
         return 0;
     bool canProvideX = !isUndefinedOrNull(xValue);
-    double x = static_cast<double>(xValue->NumberValue());
+    double x = xValue->NumberValue();
 
     v8::Local<v8::Value> yValue = object->Get(v8::String::New("y"));
     if (yValue.IsEmpty())
         return 0;
     bool canProvideY = !isUndefinedOrNull(yValue);
-    double y = static_cast<double>(yValue->NumberValue());
+    double y = yValue->NumberValue();
 
     v8::Local<v8::Value> zValue = object->Get(v8::String::New("z"));
     if (zValue.IsEmpty())
         return 0;
     bool canProvideZ = !isUndefinedOrNull(zValue);
-    double z = static_cast<double>(zValue->NumberValue());
+    double z = zValue->NumberValue();
 
     if (!canProvideX && !canProvideY && !canProvideZ)
         return 0;
@@ -101,19 +101,19 @@ RefPtr<DeviceMotionData::RotationRate> readRotationRateArgument(v8::Local<v8::Va
     if (alphaValue.IsEmpty())
         return 0;
     bool canProvideAlpha = !isUndefinedOrNull(alphaValue);
-    double alpha = static_cast<double>(alphaValue->NumberValue());
+    double alpha = alphaValue->NumberValue();
 
     v8::Local<v8::Value> betaValue = object->Get(v8::String::New("beta"));
     if (betaValue.IsEmpty())
         return 0;
     bool canProvideBeta = !isUndefinedOrNull(betaValue);
-    double beta = static_cast<double>(betaValue->NumberValue());
+    double beta = betaValue->NumberValue();
 
     v8::Local<v8::Value> gammaValue = object->Get(v8::String::New("gamma"));
     if (gammaValue.IsEmpty())
         return 0;
     bool canProvideGamma = !isUndefinedOrNull(gammaValue);
-    double gamma = static_cast<double>(gammaValue->NumberValue());
+    double gamma = gammaValue->NumberValue();
 
     if (!canProvideAlpha && !canProvideBeta && !canProvideGamma)
         return 0;
@@ -173,7 +173,7 @@ v8::Handle<v8::Value> V8DeviceMotionEvent::initDeviceMotionEventCallback(const v
     RefPtr<DeviceMotionData::Acceleration> accelerationIncludingGravity = readAccelerationArgument(args[4]);
     RefPtr<DeviceMotionData::RotationRate> rotationRate = readRotationRateArgument(args[5]);
     bool intervalProvided = !isUndefinedOrNull(args[6]);
-    double interval = static_cast<double>(args[6]->NumberValue());
+    double interval = args[6]->NumberValue();
     RefPtr<DeviceMotionData> deviceMotionData = DeviceMotionData::create(acceleration, accelerationIncludingGravity, rotationRate, intervalProvided, interval);
     imp->initDeviceMotionEvent(type, bubbles, cancelable, deviceMotionData.get());
     return v8::Handle<v8::Value>();
diff --git a/WebCore/bindings/v8/custom/V8DeviceOrientationEventCustom.cpp b/WebCore/bindings/v8/custom/V8DeviceOrientationEventCustom.cpp
index 72f759a..ce8eaf3 100644
--- a/WebCore/bindings/v8/custom/V8DeviceOrientationEventCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8DeviceOrientationEventCustom.cpp
@@ -76,11 +76,11 @@ v8::Handle<v8::Value> V8DeviceOrientationEvent::initDeviceOrientationEventCallba
     // If alpha, beta or gamma are null or undefined, mark them as not provided.
     // Otherwise, use the standard JavaScript conversion.
     bool alphaProvided = !isUndefinedOrNull(args[3]);
-    double alpha = static_cast<double>(args[3]->NumberValue());
+    double alpha = args[3]->NumberValue();
     bool betaProvided = !isUndefinedOrNull(args[4]);
-    double beta = static_cast<double>(args[4]->NumberValue());
+    double beta = args[4]->NumberValue();
     bool gammaProvided = !isUndefinedOrNull(args[5]);
-    double gamma = static_cast<double>(args[5]->NumberValue());
+    double gamma = args[5]->NumberValue();
     RefPtr<DeviceOrientation> orientation = DeviceOrientation::create(alphaProvided, alpha, betaProvided, beta, gammaProvided, gamma);
     imp->initDeviceOrientationEvent(type, bubbles, cancelable, orientation.get());
     return v8::Handle<v8::Value>();

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list