Changeset 62984 in webkit
- Timestamp:
- Jul 9, 2010 1:16:03 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r62982 r62984 1 2010-07-08 Tony Gentilcore <tonyg@chromium.org> 2 3 Reviewed by Nate Chapin. 4 5 Implement unloadEventEnd, loadEventStart, and loadEventEnd for Web Timing 6 https://bugs.webkit.org/show_bug.cgi?id=41332 7 8 Expectations are set to FAIL because disabled by default. Passes with --web-timing. 9 10 * fast/dom/script-tests/webtiming.js: Added. 11 (sleepFiftyMilliseconds): 12 (shouldBeGreaterThanOrEqual): 13 (checkTimingBeforeLoad): 14 (checkWebTimingOnLoad): 15 (checkWebTimingAfterLoad): 16 * fast/dom/webtiming-expected.txt: Added. 17 * fast/dom/webtiming.html: Added. 18 1 19 2010-07-09 Aaron Boodman <aa@chromium.org> 2 20 -
trunk/WebCore/ChangeLog
r62978 r62984 1 2010-07-08 Tony Gentilcore <tonyg@chromium.org> 2 3 Reviewed by Nate Chapin. 4 5 Implement unloadEventEnd, loadEventStart, and loadEventEnd for Web Timing 6 https://bugs.webkit.org/show_bug.cgi?id=41332 7 8 Test: fast/dom/webtiming.html 9 10 * loader/FrameLoader.cpp: 11 (WebCore::FrameLoader::stopLoading): 12 (WebCore::FrameLoader::loadWithDocumentLoader): 13 * loader/FrameLoader.h: 14 (WebCore::FrameLoader::frameLoadTimeline): 15 * loader/FrameLoaderTypes.h: 16 (WebCore::FrameLoadTimeline::FrameLoadTimeline): 17 * page/DOMWindow.cpp: 18 (WebCore::DOMWindow::dispatchLoadEvent): 19 * page/Timing.cpp: 20 (WebCore::Timing::navigationStart): 21 (WebCore::Timing::unloadEventEnd): 22 (WebCore::Timing::loadEventStart): 23 (WebCore::Timing::loadEventEnd): 24 * page/Timing.h: 25 * page/Timing.idl: 26 1 27 2010-07-09 Dumitru Daniliuc <dumi@chromium.org> 2 28 -
trunk/WebCore/loader/FrameLoader.cpp
r62551 r62984 450 450 if (!m_frame->document()->inPageCache()) 451 451 m_frame->domWindow()->dispatchEvent(Event::create(eventNames().unloadEvent, false, false), m_frame->domWindow()->document()); 452 m_frameLoadTimeline.unloadEventEnd = currentTime(); 452 453 } 453 454 m_pageDismissalEventBeingDispatched = false; … … 1499 1500 if (m_pageDismissalEventBeingDispatched) 1500 1501 return; 1502 1503 m_frameLoadTimeline = FrameLoadTimeline(); 1501 1504 1502 1505 policyChecker()->setLoadType(type); -
trunk/WebCore/loader/FrameLoader.h
r61801 r62984 194 194 195 195 FrameLoadType loadType() const; 196 FrameLoadTimeline* frameLoadTimeline() { return &m_frameLoadTimeline; } 197 196 198 CachePolicy subresourceCachePolicy() const; 197 199 … … 445 447 FrameState m_state; 446 448 FrameLoadType m_loadType; 449 FrameLoadTimeline m_frameLoadTimeline; 447 450 448 451 // Document loaders for the three phases of frame loading. Note that while -
trunk/WebCore/loader/FrameLoaderTypes.h
r59596 r62984 59 59 FrameLoadTypeReloadFromOrigin, 60 60 FrameLoadTypeBackWMLDeckNotAccessible 61 }; 62 63 struct FrameLoadTimeline { 64 FrameLoadTimeline() 65 : unloadEventEnd(0) 66 , loadEventStart(0) 67 , loadEventEnd(0) 68 { 69 } 70 71 double unloadEventEnd; 72 double loadEventStart; 73 double loadEventEnd; 61 74 }; 62 75 -
trunk/WebCore/page/DOMWindow.cpp
r62424 r62984 79 79 #include "WebKitPoint.h" 80 80 #include <algorithm> 81 #include <wtf/CurrentTime.h> 82 #include <wtf/MathExtras.h> 81 83 #include <wtf/text/CString.h> 82 #include <wtf/MathExtras.h>83 84 84 85 using std::min; … … 1429 1430 void DOMWindow::dispatchLoadEvent() 1430 1431 { 1432 if (m_frame) 1433 m_frame->loader()->frameLoadTimeline()->loadEventStart = currentTime(); 1431 1434 dispatchEvent(Event::create(eventNames().loadEvent, false, false), document()); 1435 if (m_frame) 1436 m_frame->loader()->frameLoadTimeline()->loadEventEnd = currentTime(); 1432 1437 1433 1438 // For load events, send a separate load event to the enclosing frame only. -
trunk/WebCore/page/Timing.cpp
r62357 r62984 53 53 } 54 54 55 unsigned long Timing::navigationStart() const55 unsigned long long Timing::navigationStart() const 56 56 { 57 57 if (!m_frame) … … 61 61 } 62 62 63 unsigned long long Timing::unloadEventEnd() const 64 { 65 if (!m_frame) 66 return 0; 67 68 return static_cast<unsigned long long>(m_frame->loader()->frameLoadTimeline()->unloadEventEnd * 1000); 69 } 70 71 unsigned long long Timing::loadEventStart() const 72 { 73 if (!m_frame) 74 return 0; 75 76 return static_cast<unsigned long long>(m_frame->loader()->frameLoadTimeline()->loadEventStart * 1000); 77 } 78 79 unsigned long long Timing::loadEventEnd() const 80 { 81 if (!m_frame) 82 return 0; 83 84 return static_cast<unsigned long long>(m_frame->loader()->frameLoadTimeline()->loadEventEnd * 1000); 85 } 86 63 87 } // namespace WebCore 64 88 -
trunk/WebCore/page/Timing.h
r62357 r62984 48 48 void disconnectFrame(); 49 49 50 unsigned long navigationStart() const; 50 unsigned long long navigationStart() const; 51 unsigned long long unloadEventEnd() const; 52 unsigned long long loadEventStart() const; 53 unsigned long long loadEventEnd() const; 51 54 52 55 private: -
trunk/WebCore/page/Timing.idl
r62357 r62984 33 33 // See: http://dev.w3.org/2006/webapi/WebTiming/ 34 34 interface [Conditional=WEB_TIMING, OmitConstructor] Timing { 35 readonly attribute unsigned long navigationStart;36 35 // FIXME: Implement remainder of interface. 36 readonly attribute unsigned long long navigationStart; 37 // readonly attribute unsigned long long fetchStart; 38 readonly attribute unsigned long long unloadEventEnd; 39 // readonly attribute unsigned long long redirectStart; 40 // readonly attribute unsigned long long redirectEnd; 41 // readonly attribute unsigned long long domainLookupStart; 42 // readonly attribute unsigned long long domainLookupEnd; 43 // readonly attribute unsigned long long connectStart; 44 // readonly attribute unsigned long long connectEnd; 45 // readonly attribute unsigned long long requestStart; 46 // readonly attribute unsigned long long requestEnd; 47 // readonly attribute unsigned long long responseStart; 48 // readonly attribute unsigned long long responseEnd; 49 readonly attribute unsigned long long loadEventStart; 50 readonly attribute unsigned long long loadEventEnd; 37 51 }; 38 52
Note: See TracChangeset
for help on using the changeset viewer.