unprefix window.performance.webkitNow()
authorsimonjam@chromium.org <simonjam@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 11 Oct 2012 23:08:13 +0000 (23:08 +0000)
committersimonjam@chromium.org <simonjam@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 11 Oct 2012 23:08:13 +0000 (23:08 +0000)
https://bugs.webkit.org/show_bug.cgi?id=88278

Reviewed by Tony Gentilcore.

PerformanceTests:

* resources/runner.js: Bind to proper object to avoid invalid invocation errors.

Source/WebCore:

Test: fast/dom/Window/window-properties-performance.html
      fast/performance/performance-now-timestamps.html

* page/Performance.cpp:
(WebCore::Performance::now):
* page/Performance.h:
(Performance):
* page/Performance.idl:

LayoutTests:

* fast/dom/Window/window-properties-performance-expected.txt:
* fast/performance/performance-now-timestamps-expected.txt:
* fast/performance/script-tests/performance-now-timestamps.js:
* platform/chromium/TestExpectations: Remove skipped expectation.
* platform/efl/TestExpectations:
* platform/efl/fast/dom/Window/window-properties-performance-expected.txt:
* platform/gtk/TestExpectations:
* platform/qt/TestExpectations:
* platform/qt/fast/dom/Window/window-properties-performance-expected.txt:
* resources/magnitude-perf.js:
(Magnitude._runIteration):

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

17 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/dom/Window/window-properties-performance-expected.txt
LayoutTests/fast/performance/performance-now-timestamps-expected.txt
LayoutTests/fast/performance/script-tests/performance-now-timestamps.js
LayoutTests/platform/chromium/TestExpectations
LayoutTests/platform/efl/TestExpectations
LayoutTests/platform/efl/fast/dom/Window/window-properties-performance-expected.txt
LayoutTests/platform/gtk/TestExpectations
LayoutTests/platform/qt/TestExpectations
LayoutTests/platform/qt/fast/dom/Window/window-properties-performance-expected.txt
LayoutTests/resources/magnitude-perf.js
PerformanceTests/ChangeLog
PerformanceTests/resources/runner.js
Source/WebCore/ChangeLog
Source/WebCore/page/Performance.cpp
Source/WebCore/page/Performance.h
Source/WebCore/page/Performance.idl

index c70883c..31399dd 100644 (file)
@@ -1,3 +1,22 @@
+2012-10-11  James Simonsen  <simonjam@chromium.org>
+
+        unprefix window.performance.webkitNow()
+        https://bugs.webkit.org/show_bug.cgi?id=88278
+
+        Reviewed by Tony Gentilcore.
+
+        * fast/dom/Window/window-properties-performance-expected.txt:
+        * fast/performance/performance-now-timestamps-expected.txt:
+        * fast/performance/script-tests/performance-now-timestamps.js:
+        * platform/chromium/TestExpectations: Remove skipped expectation.
+        * platform/efl/TestExpectations:
+        * platform/efl/fast/dom/Window/window-properties-performance-expected.txt:
+        * platform/gtk/TestExpectations:
+        * platform/qt/TestExpectations:
+        * platform/qt/fast/dom/Window/window-properties-performance-expected.txt:
+        * resources/magnitude-perf.js:
+        (Magnitude._runIteration):
+
 2012-10-11  Huang Dongsung  <luxtella@company100.net>
 
         [CSS Shaders] Make custom filters use a premultiplied buffer.
index aea0aad..93d82ba 100644 (file)
@@ -12,6 +12,7 @@ window.performance.navigation.TYPE_RELOAD [number]
 window.performance.navigation.TYPE_RESERVED [number]
 window.performance.navigation.redirectCount [number]
 window.performance.navigation.type [number]
+window.performance.now [function]
 window.performance.timing [object PerformanceTiming]
 window.performance.timing.connectEnd [number]
 window.performance.timing.connectStart [number]
@@ -34,7 +35,6 @@ window.performance.timing.responseStart [number]
 window.performance.timing.secureConnectionStart [number]
 window.performance.timing.unloadEventEnd [number]
 window.performance.timing.unloadEventStart [number]
-window.performance.webkitNow [function]
 window.performance.timing [printed above as window.performance.timing]
 window.performance.navigation [printed above as window.performance.navigation]
 window.performance [string]
index ea1f305..4eb49a5 100644 (file)
@@ -1,4 +1,4 @@
-Tests the timestamps from performance.webkitNow increase and are in milliseconds
+Tests the timestamps from performance.now increase and are in milliseconds
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
index d04b561..78ea2d9 100644 (file)
@@ -1,11 +1,11 @@
-description("Tests the timestamps from performance.webkitNow increase and are in milliseconds");
+description("Tests the timestamps from performance.now increase and are in milliseconds");
 
 function busyWait(millis) {
     var start = Date.now();
     while (Date.now() - start < millis) {}
 }
 
-var firstTimestamp = window.performance.webkitNow();
+var firstTimestamp = window.performance.now();
 shouldBeDefined("firstTimestamp");
 shouldBeGreaterThanOrEqual("firstTimestamp", "0");
 
@@ -17,7 +17,7 @@ shouldBeTrue("firstTimestamp < 5000");
 var waitTime = 10;
 busyWait(waitTime);
 
-var secondTimestamp = window.performance.webkitNow();
+var secondTimestamp = window.performance.now();
 shouldBeDefined("secondTimestamp");
 shouldBeGreaterThanOrEqual("secondTimestamp", "firstTimestamp + (waitTime / 2)");
 
@@ -25,4 +25,4 @@ shouldBeGreaterThanOrEqual("secondTimestamp", "firstTimestamp + (waitTime / 2)")
 // the range test broad to avoid issues on overloaded bots.
 var elapsed = secondTimestamp - firstTimestamp;
 shouldBeGreaterThanOrEqual("elapsed", "1");
-shouldBeTrue("elapsed < 100");
\ No newline at end of file
+shouldBeTrue("elapsed < 100");
index 2517bb2..0ecf5c2 100644 (file)
@@ -4020,7 +4020,4 @@ webkit.org/b/98811 [ Mac ] fast/transforms/transformed-focused-text-input.html [
 
 webkit.org/b/98948 [ Linux Debug ] http/tests/media/media-source/video-media-source-play.html [ PASS CRASH ]
 
-# Skipped until the prefix is removed.
-webkit.org/b/98953 http/tests/w3c/webperf/approved/HighResolutionTime [ Skip ]
-
 webkit.org/b/99089 transforms/3d/general/perspective-units.html [ Pass ImageOnlyFailure ]
index 99d8d65..dfedb36 100644 (file)
@@ -1426,9 +1426,6 @@ webkit.org/b/98729 fast/loader/data-url-encoding-html.html [ Failure ]
 webkit.org/b/98729 fast/loader/data-url-encoding-svg.html [ Failure ]
 webkit.org/b/98729 fast/spatial-navigation/snav-iframe-nested.html [ Failure ]
 
-# Skipped until the prefix is removed.
-webkit.org/b/98953 http/tests/w3c/webperf/approved/HighResolutionTime [ Skip ]
-
 # New inspector/profiler/memory-instrumentation-canvas.html fails on JSC platforms
 webkit.org/b/99001 inspector/profiler/memory-instrumentation-canvas.html
 
index 8afaaf8..76df220 100644 (file)
@@ -12,6 +12,7 @@ window.performance.navigation.TYPE_RELOAD [number]
 window.performance.navigation.TYPE_RESERVED [number]
 window.performance.navigation.redirectCount [number]
 window.performance.navigation.type [number]
+window.performance.now [function]
 window.performance.timing [object PerformanceTiming]
 window.performance.timing.connectEnd [number]
 window.performance.timing.connectStart [number]
@@ -34,7 +35,6 @@ window.performance.timing.responseStart [number]
 window.performance.timing.secureConnectionStart [number]
 window.performance.timing.unloadEventEnd [number]
 window.performance.timing.unloadEventStart [number]
-window.performance.webkitNow [function]
 window.performance.timing [printed above as window.performance.timing]
 window.performance.navigation [printed above as window.performance.navigation]
 window.performance [string]
index cd9c51f..2845668 100644 (file)
@@ -1360,9 +1360,6 @@ webkit.org/b/98729 fast/loader/data-url-encoding-svg.html [ Failure ]
 webkit.org/b/98729 fast/spatial-navigation/snav-iframe-nested.html [ Failure ]
 webkit.org/b/98729 svg/custom/object-data-href.html [ ImageOnlyFailure ]
 
-# Skipped until the prefix is removed.
-webkit.org/b/98953 http/tests/w3c/webperf/approved/HighResolutionTime [ Skip ]
-
 # New inspector/profiler/memory-instrumentation-canvas.html fails on JSC platforms
 webkit.org/b/99001 inspector/profiler/memory-instrumentation-canvas.html
 
index b31c958..9bbcfeb 100644 (file)
@@ -2444,8 +2444,5 @@ webkit.org/b/98525 plugins/netscape-dom-access.html
 webkit.org/b/98525 plugins/resize-from-plugin.html
 webkit.org/b/98640 plugins/refcount-leaks.html
 
-# Skipped until the prefix is removed.
-webkit.org/b/98953 http/tests/w3c/webperf/approved/HighResolutionTime [ Skip ]
-
 # New inspector/profiler/memory-instrumentation-canvas.html fails on JSC platforms
 webkit.org/b/99001 inspector/profiler/memory-instrumentation-canvas.html
index 8afaaf8..76df220 100644 (file)
@@ -12,6 +12,7 @@ window.performance.navigation.TYPE_RELOAD [number]
 window.performance.navigation.TYPE_RESERVED [number]
 window.performance.navigation.redirectCount [number]
 window.performance.navigation.type [number]
+window.performance.now [function]
 window.performance.timing [object PerformanceTiming]
 window.performance.timing.connectEnd [number]
 window.performance.timing.connectStart [number]
@@ -34,7 +35,6 @@ window.performance.timing.responseStart [number]
 window.performance.timing.secureConnectionStart [number]
 window.performance.timing.unloadEventEnd [number]
 window.performance.timing.unloadEventStart [number]
-window.performance.webkitNow [function]
 window.performance.timing [printed above as window.performance.timing]
 window.performance.navigation [printed above as window.performance.navigation]
 window.performance [string]
index 9f0c5a4..e7f6c7e 100644 (file)
@@ -201,7 +201,7 @@ Magnitude._runIteration = function(setup, test, magnitude)
     Magnitude._debug(debugStr);
 
     var iterations = 0;
-    var nowFunction = window.performance.now || Date.now;
+    var nowFunction = window.performance.now.bind(window.performance) || Date.now;
     var start = nowFunction();
     while (nowFunction() - start < Magnitude.millisecondsPerIteration) {
         test(magnitude);
index 58df093..d636f6c 100644 (file)
@@ -1,3 +1,12 @@
+2012-10-11  James Simonsen  <simonjam@chromium.org>
+
+        unprefix window.performance.webkitNow()
+        https://bugs.webkit.org/show_bug.cgi?id=88278
+
+        Reviewed by Tony Gentilcore.
+
+        * resources/runner.js: Bind to proper object to avoid invalid invocation errors.
+
 2012-10-08  Ryosuke Niwa  <rniwa@webkit.org>
 
         Skip Layout/subtree-detaching.html temporarily as it's very noisy and
index d95e9e8..7ced9f0 100755 (executable)
@@ -42,7 +42,7 @@ if (window.testRunner) {
         return (randomSeed & 0xfffffff) / 0x10000000;
     };
 
-    PerfTestRunner.now = window.performance && window.performance.webkitNow ? function () { return window.performance.webkitNow(); } : Date.now;
+    PerfTestRunner.now = window.performance && window.performance.now ? function () { return window.performance.now(); } : Date.now;
 
     PerfTestRunner.logInfo = function (text) {
         if (!window.testRunner)
index 6e2d06e..7d6a605 100644 (file)
@@ -1,3 +1,19 @@
+2012-10-11  James Simonsen  <simonjam@chromium.org>
+
+        unprefix window.performance.webkitNow()
+        https://bugs.webkit.org/show_bug.cgi?id=88278
+
+        Reviewed by Tony Gentilcore.
+
+        Test: fast/dom/Window/window-properties-performance.html
+              fast/performance/performance-now-timestamps.html
+
+        * page/Performance.cpp:
+        (WebCore::Performance::now):
+        * page/Performance.h:
+        (Performance):
+        * page/Performance.idl:
+
 2012-10-11  Roger Fong  <roger_fong@apple.com>
 
         [WebGL] [Mac] only the mapped symbol for the first element of a uniform/attribute array is stored.
index 23d7cfc..bff1b53 100644 (file)
@@ -165,7 +165,7 @@ EventTargetData* Performance::ensureEventTargetData()
     return &m_eventTargetData;
 }
 
-double Performance::webkitNow() const
+double Performance::now() const
 {
     return 1000.0 * m_frame->document()->loader()->timing()->monotonicTimeToZeroBasedDocumentTime(monotonicallyIncreasingTime());
 }
index 8ba8c5e..7c270ce 100644 (file)
@@ -61,7 +61,7 @@ public:
     PassRefPtr<MemoryInfo> memory() const;
     PerformanceNavigation* navigation() const;
     PerformanceTiming* timing() const;
-    double webkitNow() const;
+    double now() const;
 
 #if ENABLE(PERFORMANCE_TIMELINE)
     PassRefPtr<PerformanceEntryList> webkitGetEntries() const;
index fc9ffdf..2f9af19 100644 (file)
@@ -53,7 +53,7 @@ module window {
         attribute EventListener onwebkitresourcetimingbufferfull;
 #endif
         // See http://www.w3.org/TR/hr-time/ for details.
-        double webkitNow();
+        double now();
     };
 
 }