[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
tonyg at chromium.org
tonyg at chromium.org
Wed Dec 22 11:09:16 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit d79693f7d6dbfc700439ed1621522d92409dca83
Author: tonyg at chromium.org <tonyg at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Jul 13 23:27:20 2010 +0000
2010-07-12 Tony Gentilcore <tonyg at chromium.org>
Reviewed by Darin Fisher.
Wire network times from ResourceLoadTiming to performance.timing
https://bugs.webkit.org/show_bug.cgi?id=41824
Expectations set to fail because --web-timing disabled by default.
* fast/dom/script-tests/webtiming.js:
(checkTimingBeforeLoad):
(checkWebTimingOnLoad):
(checkWebTimingAfterLoad):
* fast/dom/webtiming-expected.txt:
2010-07-12 Tony Gentilcore <tonyg at chromium.org>
Reviewed by Darin Fisher.
Wire network times from ResourceLoadTiming to performance.timing
https://bugs.webkit.org/show_bug.cgi?id=41824
* page/Timing.cpp:
(WebCore::Timing::domainLookupStart): http://dev.w3.org/2006/webapi/WebTiming/#nt-domain-lookupstart
(WebCore::Timing::domainLookupEnd): http://dev.w3.org/2006/webapi/WebTiming/#nt-domain-lookupend
(WebCore::Timing::connectStart): http://dev.w3.org/2006/webapi/WebTiming/#nt-connect-start
(WebCore::Timing::connectEnd): http://dev.w3.org/2006/webapi/WebTiming/#nt-connect-end
(WebCore::Timing::requestStart): http://dev.w3.org/2006/webapi/WebTiming/#nt-request-start
(WebCore::Timing::requestEnd): http://dev.w3.org/2006/webapi/WebTiming/#nt-request-end
(WebCore::Timing::responseStart): http://dev.w3.org/2006/webapi/WebTiming/#nt-response-start
(WebCore::Timing::resourceLoadTiming):
* page/Timing.h:
* page/Timing.idl:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@63259 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 112e847..f9ca2e0 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,18 @@
+2010-07-12 Tony Gentilcore <tonyg at chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Wire network times from ResourceLoadTiming to performance.timing
+ https://bugs.webkit.org/show_bug.cgi?id=41824
+
+ Expectations set to fail because --web-timing disabled by default.
+
+ * fast/dom/script-tests/webtiming.js:
+ (checkTimingBeforeLoad):
+ (checkWebTimingOnLoad):
+ (checkWebTimingAfterLoad):
+ * fast/dom/webtiming-expected.txt:
+
2010-07-04 Zhenyao Mo <zmo at google.com>
Reviewed by Darin Fisher.
diff --git a/LayoutTests/fast/dom/script-tests/webtiming.js b/LayoutTests/fast/dom/script-tests/webtiming.js
index 3a8c348..cd396ba 100644
--- a/LayoutTests/fast/dom/script-tests/webtiming.js
+++ b/LayoutTests/fast/dom/script-tests/webtiming.js
@@ -44,6 +44,17 @@ function checkTimingBeforeLoad()
shouldBeGreaterThanOrEqual("timing.fetchStart", "timing.navigationStart");
+ shouldBe("timing.domainLookupStart", "0");
+ shouldBe("timing.domainLookupEnd", "0");
+
+ shouldBe("timing.connectStart", "0");
+ shouldBe("timing.connectEnd", "0");
+
+ shouldBeGreaterThanOrEqual("timing.requestStart", "timing.navigationStart");
+ shouldBeGreaterThanOrEqual("timing.requestEnd", "timing.requestStart");
+
+ shouldBeGreaterThanOrEqual("timing.responseStart", "timing.requestEnd");
+
shouldBe("timing.loadEventStart", "0");
shouldBe("timing.loadEventEnd", "0");
@@ -58,7 +69,17 @@ function checkWebTimingOnLoad()
shouldBeGreaterThanOrEqual("timing.fetchStart", "timing.navigationStart");
- shouldBeGreaterThanOrEqual("timing.responseEnd", "timing.fetchStart");
+ shouldBe("timing.domainLookupStart", "0");
+ shouldBe("timing.domainLookupEnd", "0");
+
+ shouldBe("timing.connectStart", "0");
+ shouldBe("timing.connectEnd", "0");
+
+ shouldBeGreaterThanOrEqual("timing.requestStart", "timing.navigationStart");
+ shouldBeGreaterThanOrEqual("timing.requestEnd", "timing.requestStart");
+
+ shouldBeGreaterThanOrEqual("timing.responseStart", "timing.requestEnd");
+ shouldBeGreaterThanOrEqual("timing.responseEnd", "timing.responseStart");
shouldBeGreaterThanOrEqual("timing.loadEventStart", "timing.responseEnd");
shouldBe("timing.loadEventEnd", "0");
@@ -74,7 +95,17 @@ function checkWebTimingAfterLoad()
shouldBeGreaterThanOrEqual("timing.fetchStart", "timing.navigationStart");
- shouldBeGreaterThanOrEqual("timing.responseEnd", "timing.fetchStart");
+ shouldBe("timing.domainLookupStart", "0");
+ shouldBe("timing.domainLookupEnd", "0");
+
+ shouldBe("timing.connectStart", "0");
+ shouldBe("timing.connectEnd", "0");
+
+ shouldBeGreaterThanOrEqual("timing.requestStart", "timing.navigationStart");
+ shouldBeGreaterThanOrEqual("timing.requestEnd", "timing.requestStart");
+
+ shouldBeGreaterThanOrEqual("timing.responseStart", "timing.requestEnd");
+ shouldBeGreaterThanOrEqual("timing.responseEnd", "timing.responseStart");
shouldBeGreaterThanOrEqual("timing.loadEventStart", "timing.responseEnd");
shouldBeGreaterThanOrEqual("timing.loadEventEnd", "timing.loadEventStart + 50");
diff --git a/LayoutTests/fast/dom/webtiming-expected.txt b/LayoutTests/fast/dom/webtiming-expected.txt
index 9563dba..17ec659 100644
--- a/LayoutTests/fast/dom/webtiming-expected.txt
+++ b/LayoutTests/fast/dom/webtiming-expected.txt
@@ -6,18 +6,39 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
FAIL timing.navigationStart should be >= oneHourAgoUTC. Was undefined (of type undefined).
FAIL timing.unloadEventEnd should be >= timing.navigationStart. Was undefined (of type undefined).
FAIL timing.fetchStart should be >= timing.navigationStart. Was undefined (of type undefined).
+FAIL timing.domainLookupStart should be 0 (of type number). Was undefined (of type undefined).
+FAIL timing.domainLookupEnd should be 0 (of type number). Was undefined (of type undefined).
+FAIL timing.connectStart should be 0 (of type number). Was undefined (of type undefined).
+FAIL timing.connectEnd should be 0 (of type number). Was undefined (of type undefined).
+FAIL timing.requestStart should be >= timing.navigationStart. Was undefined (of type undefined).
+FAIL timing.requestEnd should be >= timing.requestStart. Was undefined (of type undefined).
+FAIL timing.responseStart should be >= timing.requestEnd. Was undefined (of type undefined).
FAIL timing.loadEventStart should be 0 (of type number). Was undefined (of type undefined).
FAIL timing.loadEventEnd should be 0 (of type number). Was undefined (of type undefined).
FAIL timing.navigationStart should be >= oneHourAgoUTC. Was undefined (of type undefined).
FAIL timing.unloadEventEnd should be >= timing.navigationStart. Was undefined (of type undefined).
FAIL timing.fetchStart should be >= timing.navigationStart. Was undefined (of type undefined).
-FAIL timing.responseEnd should be >= timing.fetchStart. Was undefined (of type undefined).
+FAIL timing.domainLookupStart should be 0 (of type number). Was undefined (of type undefined).
+FAIL timing.domainLookupEnd should be 0 (of type number). Was undefined (of type undefined).
+FAIL timing.connectStart should be 0 (of type number). Was undefined (of type undefined).
+FAIL timing.connectEnd should be 0 (of type number). Was undefined (of type undefined).
+FAIL timing.requestStart should be >= timing.navigationStart. Was undefined (of type undefined).
+FAIL timing.requestEnd should be >= timing.requestStart. Was undefined (of type undefined).
+FAIL timing.responseStart should be >= timing.requestEnd. Was undefined (of type undefined).
+FAIL timing.responseEnd should be >= timing.responseStart. Was undefined (of type undefined).
FAIL timing.loadEventStart should be >= timing.responseEnd. Was undefined (of type undefined).
FAIL timing.loadEventEnd should be 0 (of type number). Was undefined (of type undefined).
FAIL timing.navigationStart should be >= oneHourAgoUTC. Was undefined (of type undefined).
FAIL timing.unloadEventEnd should be >= timing.navigationStart. Was undefined (of type undefined).
FAIL timing.fetchStart should be >= timing.navigationStart. Was undefined (of type undefined).
-FAIL timing.responseEnd should be >= timing.fetchStart. Was undefined (of type undefined).
+FAIL timing.domainLookupStart should be 0 (of type number). Was undefined (of type undefined).
+FAIL timing.domainLookupEnd should be 0 (of type number). Was undefined (of type undefined).
+FAIL timing.connectStart should be 0 (of type number). Was undefined (of type undefined).
+FAIL timing.connectEnd should be 0 (of type number). Was undefined (of type undefined).
+FAIL timing.requestStart should be >= timing.navigationStart. Was undefined (of type undefined).
+FAIL timing.requestEnd should be >= timing.requestStart. Was undefined (of type undefined).
+FAIL timing.responseStart should be >= timing.requestEnd. Was undefined (of type undefined).
+FAIL timing.responseEnd should be >= timing.responseStart. Was undefined (of type undefined).
FAIL timing.loadEventStart should be >= timing.responseEnd. Was undefined (of type undefined).
FAIL timing.loadEventEnd should be >= timing.loadEventStart + 50. Was undefined (of type undefined).
PASS successfullyParsed is true
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index c41dd7c..3650d79 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,22 @@
+2010-07-12 Tony Gentilcore <tonyg at chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Wire network times from ResourceLoadTiming to performance.timing
+ https://bugs.webkit.org/show_bug.cgi?id=41824
+
+ * page/Timing.cpp:
+ (WebCore::Timing::domainLookupStart): http://dev.w3.org/2006/webapi/WebTiming/#nt-domain-lookupstart
+ (WebCore::Timing::domainLookupEnd): http://dev.w3.org/2006/webapi/WebTiming/#nt-domain-lookupend
+ (WebCore::Timing::connectStart): http://dev.w3.org/2006/webapi/WebTiming/#nt-connect-start
+ (WebCore::Timing::connectEnd): http://dev.w3.org/2006/webapi/WebTiming/#nt-connect-end
+ (WebCore::Timing::requestStart): http://dev.w3.org/2006/webapi/WebTiming/#nt-request-start
+ (WebCore::Timing::requestEnd): http://dev.w3.org/2006/webapi/WebTiming/#nt-request-end
+ (WebCore::Timing::responseStart): http://dev.w3.org/2006/webapi/WebTiming/#nt-response-start
+ (WebCore::Timing::resourceLoadTiming):
+ * page/Timing.h:
+ * page/Timing.idl:
+
2010-07-13 Anders Carlsson <andersca at apple.com>
Reviewed by Sam Weinig.
diff --git a/WebCore/page/Timing.cpp b/WebCore/page/Timing.cpp
index 1a218b9..2ef4450 100644
--- a/WebCore/page/Timing.cpp
+++ b/WebCore/page/Timing.cpp
@@ -33,7 +33,10 @@
#if ENABLE(WEB_TIMING)
+#include "DocumentLoader.h"
#include "Frame.h"
+#include "ResourceLoadTiming.h"
+#include "ResourceResponse.h"
namespace WebCore {
@@ -57,7 +60,7 @@ unsigned long long Timing::navigationStart() const
if (!m_frame)
return 0;
- return static_cast<unsigned long long>(m_frame->loader()->frameLoadTimeline()->navigationStart * 1000);
+ return toIntegerMilliseconds(m_frame->loader()->frameLoadTimeline()->navigationStart);
}
unsigned long long Timing::unloadEventEnd() const
@@ -65,7 +68,7 @@ unsigned long long Timing::unloadEventEnd() const
if (!m_frame)
return 0;
- return static_cast<unsigned long long>(m_frame->loader()->frameLoadTimeline()->unloadEventEnd * 1000);
+ return toIntegerMilliseconds(m_frame->loader()->frameLoadTimeline()->unloadEventEnd);
}
unsigned long long Timing::fetchStart() const
@@ -73,7 +76,76 @@ unsigned long long Timing::fetchStart() const
if (!m_frame)
return 0;
- return static_cast<unsigned long long>(m_frame->loader()->frameLoadTimeline()->fetchStart * 1000);
+ return toIntegerMilliseconds(m_frame->loader()->frameLoadTimeline()->fetchStart);
+}
+
+unsigned long long Timing::domainLookupStart() const
+{
+ ResourceLoadTiming* timing = resourceLoadTiming();
+ if (!timing)
+ return 0;
+
+ return toIntegerMilliseconds(timing->dnsStart);
+}
+
+unsigned long long Timing::domainLookupEnd() const
+{
+ ResourceLoadTiming* timing = resourceLoadTiming();
+ if (!timing)
+ return 0;
+
+ return toIntegerMilliseconds(timing->dnsEnd);
+}
+
+unsigned long long Timing::connectStart() const
+{
+ ResourceLoadTiming* timing = resourceLoadTiming();
+ if (!timing)
+ return 0;
+
+ return toIntegerMilliseconds(timing->connectStart);
+}
+
+unsigned long long Timing::connectEnd() const
+{
+ ResourceLoadTiming* timing = resourceLoadTiming();
+ if (!timing)
+ return 0;
+
+ return toIntegerMilliseconds(timing->connectEnd);
+}
+
+unsigned long long Timing::requestStart() const
+{
+ ResourceLoadTiming* timing = resourceLoadTiming();
+ if (!timing)
+ return 0;
+
+ return toIntegerMilliseconds(timing->sendStart);
+}
+
+unsigned long long Timing::requestEnd() const
+{
+ ResourceLoadTiming* timing = resourceLoadTiming();
+ if (!timing)
+ return 0;
+
+ return toIntegerMilliseconds(timing->sendEnd);
+}
+
+unsigned long long Timing::responseStart() const
+{
+ ResourceLoadTiming* timing = resourceLoadTiming();
+ if (!timing)
+ return 0;
+
+ // FIXME: Response start needs to be the time of the first received byte.
+ // However, the ResourceLoadTiming API currently only supports the time
+ // the last header byte was received. For many responses with reasonable
+ // sized cookies, the HTTP headers fit into a single packet so this time
+ // is basically equivalent. But for some responses, particularly those with
+ // headers larger than a single packet, this time will be too late.
+ return toIntegerMilliseconds(timing->receiveHeadersEnd);
}
unsigned long long Timing::responseEnd() const
@@ -81,7 +153,7 @@ unsigned long long Timing::responseEnd() const
if (!m_frame)
return 0;
- return static_cast<unsigned long long>(m_frame->loader()->frameLoadTimeline()->responseEnd * 1000);
+ return toIntegerMilliseconds(m_frame->loader()->frameLoadTimeline()->responseEnd);
}
unsigned long long Timing::loadEventStart() const
@@ -89,7 +161,7 @@ unsigned long long Timing::loadEventStart() const
if (!m_frame)
return 0;
- return static_cast<unsigned long long>(m_frame->loader()->frameLoadTimeline()->loadEventStart * 1000);
+ return toIntegerMilliseconds(m_frame->loader()->frameLoadTimeline()->loadEventStart);
}
unsigned long long Timing::loadEventEnd() const
@@ -97,7 +169,23 @@ unsigned long long Timing::loadEventEnd() const
if (!m_frame)
return 0;
- return static_cast<unsigned long long>(m_frame->loader()->frameLoadTimeline()->loadEventEnd * 1000);
+ return toIntegerMilliseconds(m_frame->loader()->frameLoadTimeline()->loadEventEnd);
+}
+
+ResourceLoadTiming* Timing::resourceLoadTiming() const
+{
+ DocumentLoader* documentLoader = m_frame->loader()->documentLoader();
+ if (!documentLoader)
+ return 0;
+
+ return documentLoader->response().resourceLoadTiming();
+}
+
+unsigned long long Timing::toIntegerMilliseconds(double milliseconds)
+{
+ if (milliseconds <= 0)
+ return 0;
+ return static_cast<unsigned long long>(milliseconds * 1000.0);
}
} // namespace WebCore
diff --git a/WebCore/page/Timing.h b/WebCore/page/Timing.h
index 1cdc09b..cdc9b0d 100644
--- a/WebCore/page/Timing.h
+++ b/WebCore/page/Timing.h
@@ -39,6 +39,7 @@
namespace WebCore {
class Frame;
+class ResourceLoadTiming;
class Timing : public RefCounted<Timing> {
public:
@@ -50,6 +51,13 @@ public:
unsigned long long navigationStart() const;
unsigned long long unloadEventEnd() const;
unsigned long long fetchStart() const;
+ unsigned long long domainLookupStart() const;
+ unsigned long long domainLookupEnd() const;
+ unsigned long long connectStart() const;
+ unsigned long long connectEnd() const;
+ unsigned long long requestStart() const;
+ unsigned long long requestEnd() const;
+ unsigned long long responseStart() const;
unsigned long long responseEnd() const;
unsigned long long loadEventStart() const;
unsigned long long loadEventEnd() const;
@@ -57,6 +65,10 @@ public:
private:
Timing(Frame*);
+ ResourceLoadTiming* resourceLoadTiming() const;
+
+ static unsigned long long toIntegerMilliseconds(double milliseconds);
+
Frame* m_frame;
};
diff --git a/WebCore/page/Timing.idl b/WebCore/page/Timing.idl
index a237ea9..58822e0 100644
--- a/WebCore/page/Timing.idl
+++ b/WebCore/page/Timing.idl
@@ -38,13 +38,13 @@ module window {
// readonly attribute unsigned long long redirectStart;
// readonly attribute unsigned long long redirectEnd;
readonly attribute unsigned long long fetchStart;
- // readonly attribute unsigned long long domainLookupStart;
- // readonly attribute unsigned long long domainLookupEnd;
- // readonly attribute unsigned long long connectStart;
- // readonly attribute unsigned long long connectEnd;
- // readonly attribute unsigned long long requestStart;
- // readonly attribute unsigned long long requestEnd;
- // readonly attribute unsigned long long responseStart;
+ readonly attribute unsigned long long domainLookupStart;
+ readonly attribute unsigned long long domainLookupEnd;
+ readonly attribute unsigned long long connectStart;
+ readonly attribute unsigned long long connectEnd;
+ readonly attribute unsigned long long requestStart;
+ readonly attribute unsigned long long requestEnd;
+ readonly attribute unsigned long long responseStart;
readonly attribute unsigned long long responseEnd;
readonly attribute unsigned long long loadEventStart;
readonly attribute unsigned long long loadEventEnd;
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list