Changeset 115503 in webkit
- Timestamp:
- Apr 27, 2012 3:34:46 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 6 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r115502 r115503 1 2012-04-27 Nat Duca <nduca@chromium.org> 2 3 Implement high-resolution time via window.performance.now() 4 https://bugs.webkit.org/show_bug.cgi?id=66684 5 6 This implements the high resolution time spec from 7 http://www.w3.org/TR/hr-time/, giving javascript access to 8 sub-millisecond timestamps that increase over time instead of being 9 subject to skewing, for example when the host machine's clock changes. 10 11 Reviewed by Tony Gentilcore. 12 13 * fast/dom/Window/window-properties-performance-expected.txt: 14 * fast/performance/performance-now-timestamps-expected.txt: Added. 15 * fast/performance/performance-now-timestamps.html: Added. 16 * fast/performance/script-tests/TEMPLATE.html: Added. 17 * fast/performance/script-tests/performance-now-timestamps.js: Added. 18 (busyWait): 19 * platform/qt/fast/dom/Window/window-properties-performance-expected.txt: 20 1 21 2012-04-27 Tony Chang <tony@chromium.org> 2 22 -
trunk/LayoutTests/fast/dom/Window/window-properties-performance-expected.txt
r77514 r115503 35 35 window.performance.timing.unloadEventEnd [number] 36 36 window.performance.timing.unloadEventStart [number] 37 window.performance.webkitNow [function] 37 38 window.performance.timing [printed above as window.performance.timing] 38 39 window.performance.navigation [printed above as window.performance.navigation] -
trunk/LayoutTests/platform/qt/fast/dom/Window/window-properties-performance-expected.txt
r77505 r115503 35 35 window.performance.timing.unloadEventEnd [number] 36 36 window.performance.timing.unloadEventStart [number] 37 window.performance.webkitNow [function] 37 38 window.performance.timing [printed above as window.performance.timing] 38 39 window.performance.navigation [printed above as window.performance.navigation] -
trunk/Source/WebCore/ChangeLog
r115498 r115503 1 2012-04-27 Nat Duca <nduca@chromium.org> 2 3 Implement high-resolution time via window.performance.webkitNow() 4 https://bugs.webkit.org/show_bug.cgi?id=66684 5 6 This implements the high resolution time spec from 7 http://www.w3.org/TR/hr-time/, giving javascript access to 8 sub-millisecond timestamps that increase over time instead of being 9 subject to skewing, for example when the host machine's clock changes. 10 11 Reviewed by Tony Gentilcore. 12 13 Test: fast/performance/performance-now-timestamps.html 14 15 * page/Performance.cpp: 16 (WebCore::Performance::now): 17 (WebCore): 18 * page/Performance.h: 19 (Performance): 20 * page/Performance.idl: 21 1 22 2012-04-27 Filip Pizlo <fpizlo@apple.com> 2 23 -
trunk/Source/WebCore/loader/DocumentLoadTiming.cpp
r109300 r115503 97 97 } 98 98 99 double DocumentLoadTiming::convertMonotonicTimeToZeroBasedDocumentTime(double monotonicTime) const 100 { 101 if (!monotonicTime) 102 return 0.0; 103 return monotonicTime - m_referenceMonotonicTime; 104 } 105 99 106 } // namespace WebCore -
trunk/Source/WebCore/loader/DocumentLoadTiming.h
r109300 r115503 41 41 void setNavigationStart(double); 42 42 void addRedirect(const KURL& redirectingUrl, const KURL& redirectedUrl); 43 double convertMonotonicTimeToDocumentTime(double monotonicTime) const; 43 double convertMonotonicTimeToDocumentTime(double) const; 44 45 // FIXME: Once convertMonotonicTimeToDocumentTime is zero-based, then this 46 // function and convertMonotonicTimeToDocumentTime can be merged. See 47 // https://bugs.webkit.org/show_bug.cgi?id=84912 for more details. 48 double convertMonotonicTimeToZeroBasedDocumentTime(double) const; 44 49 45 50 void markUnloadEventStart() { m_unloadEventStart = monotonicallyIncreasingTime(); } -
trunk/Source/WebCore/page/Performance.cpp
r115274 r115503 32 32 #include "Performance.h" 33 33 34 #include "Document.h" 35 #include "DocumentLoader.h" 34 36 #include "MemoryInfo.h" 35 37 #include "PerformanceNavigation.h" 36 38 #include "PerformanceTiming.h" 39 #include <wtf/CurrentTime.h> 37 40 38 41 #if ENABLE(WEB_TIMING) … … 90 93 #endif // ENABLE(PERFORMANCE_TIMELINE) 91 94 95 double Performance::webkitNow() const 96 { 97 return 1000.0 * m_frame->document()->loader()->timing()->convertMonotonicTimeToZeroBasedDocumentTime(monotonicallyIncreasingTime()); 98 } 99 92 100 } // namespace WebCore 93 101 -
trunk/Source/WebCore/page/Performance.h
r115274 r115503 53 53 PerformanceNavigation* navigation() const; 54 54 PerformanceTiming* timing() const; 55 double webkitNow() const; 55 56 56 57 #if ENABLE(PERFORMANCE_TIMELINE) -
trunk/Source/WebCore/page/Performance.idl
r115274 r115503 45 45 PerformanceEntryList webkitGetEntriesByName(in DOMString name, in [Optional=DefaultIsNullString] DOMString entryType); 46 46 #endif 47 // See http://www.w3.org/TR/hr-time/ for details. 48 double webkitNow(); 47 49 }; 48 50
Note: See TracChangeset
for help on using the changeset viewer.