Code clean up: Move Rotater function closer to Stage static methods.
authorjonlee@apple.com <jonlee@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 7 Feb 2016 00:45:43 +0000 (00:45 +0000)
committerjonlee@apple.com <jonlee@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 7 Feb 2016 00:45:43 +0000 (00:45 +0000)
The Rotater is used together with those methods; keep them close.

* Animometer/tests/resources/main.js:

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

PerformanceTests/Animometer/tests/resources/main.js
PerformanceTests/ChangeLog

index a544984..69e19ef 100644 (file)
@@ -1,37 +1,3 @@
-Rotater = Utilities.createClass(
-    function(rotateInterval)
-    {
-        this._timeDelta = 0;
-        this._rotateInterval = rotateInterval;
-        this._isSampling = false;
-    }, {
-
-    get interval()
-    {
-        return this._rotateInterval;
-    },
-
-    next: function(timeDelta)
-    {
-        this._timeDelta = (this._timeDelta + timeDelta) % this._rotateInterval;
-    },
-
-    degree: function()
-    {
-        return (360 * this._timeDelta) / this._rotateInterval;
-    },
-
-    rotateZ: function()
-    {
-        return "rotateZ(" + Math.floor(this.degree()) + "deg)";
-    },
-
-    rotate: function(center)
-    {
-        return "rotate(" + Math.floor(this.degree()) + ", " + center.x + "," + center.y + ")";
-    }
-});
-
 function BenchmarkState(testInterval)
 {
     this._currentTimeOffset = 0;
@@ -180,6 +146,40 @@ Utilities.extendObject(Stage, {
     }
 });
 
+Rotater = Utilities.createClass(
+    function(rotateInterval)
+    {
+        this._timeDelta = 0;
+        this._rotateInterval = rotateInterval;
+        this._isSampling = false;
+    }, {
+
+    get interval()
+    {
+        return this._rotateInterval;
+    },
+
+    next: function(timeDelta)
+    {
+        this._timeDelta = (this._timeDelta + timeDelta) % this._rotateInterval;
+    },
+
+    degree: function()
+    {
+        return (360 * this._timeDelta) / this._rotateInterval;
+    },
+
+    rotateZ: function()
+    {
+        return "rotateZ(" + Math.floor(this.degree()) + "deg)";
+    },
+
+    rotate: function(center)
+    {
+        return "rotate(" + Math.floor(this.degree()) + ", " + center.x + "," + center.y + ")";
+    }
+});
+
 Animator = Utilities.createClass(
     function()
     {
index 9444041..e8e7c39 100644 (file)
@@ -1,5 +1,12 @@
 2016-02-06  Jon Lee  <jonlee@apple.com>
 
+        Code clean up: Move Rotater function closer to Stage static methods.
+        The Rotater is used together with those methods; keep them close.
+
+        * Animometer/tests/resources/main.js:
+
+2016-02-06  Jon Lee  <jonlee@apple.com>
+
         Update the JS includes due to ResultsTable move.
 
         * Animometer/developer.html: