[SCM] WebKit Debian packaging branch, debian/experimental, updated. debian/1.3.8-1-1049-g2e11a8e
simonjam at chromium.org
simonjam at chromium.org
Fri Jan 21 14:59:29 UTC 2011
The following commit has been merged in the debian/experimental branch:
commit f6fac3900bd536482776049ea2276f26fa091e95
Author: simonjam at chromium.org <simonjam at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Jan 6 01:22:46 2011 +0000
2011-01-05 James Simonsen <simonjam at chromium.org>
Reviewed by Darin Fisher.
[Web Timing] requestStart and responseStart should be available even if the document is still loading
https://bugs.webkit.org/show_bug.cgi?id=51368
* http/tests/misc/webtiming-slow-load-expected.txt: Added.
* http/tests/misc/webtiming-slow-load.php: Added.
2011-01-05 James Simonsen <simonjam at chromium.org>
Reviewed by Darin Fisher.
[Web Timing] requestStart and responseStart should be available even if the document is still loading
https://bugs.webkit.org/show_bug.cgi?id=51368
Test: http/tests/misc/webtiming-slow-load.php
* page/PerformanceTiming.cpp:
(WebCore::getPossiblySkewedTimeInKnownRange): Handle case where response is not yet complete.
(WebCore::PerformanceTiming::resourceLoadTimeRelativeToAbsolute): Use full upper bound.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75120 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 30309f8..d6dd7b5 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,13 @@
+2011-01-05 James Simonsen <simonjam at chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ [Web Timing] requestStart and responseStart should be available even if the document is still loading
+ https://bugs.webkit.org/show_bug.cgi?id=51368
+
+ * http/tests/misc/webtiming-slow-load-expected.txt: Added.
+ * http/tests/misc/webtiming-slow-load.php: Added.
+
2011-01-05 Kent Tamura <tkent at chromium.org>
Unreviewed, test expectation update.
diff --git a/LayoutTests/http/tests/misc/webtiming-slow-load-expected.txt b/LayoutTests/http/tests/misc/webtiming-slow-load-expected.txt
new file mode 100644
index 0000000..349927e
--- /dev/null
+++ b/LayoutTests/http/tests/misc/webtiming-slow-load-expected.txt
@@ -0,0 +1,12 @@
+Verifies that requestStart and responseStart are available before the main document has finished loading.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS timing.requestStart is non-zero.
+PASS timing.responseStart is non-zero.
+PASS timing.responseEnd is 0
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/http/tests/misc/webtiming-slow-load.php b/LayoutTests/http/tests/misc/webtiming-slow-load.php
new file mode 100644
index 0000000..905944c
--- /dev/null
+++ b/LayoutTests/http/tests/misc/webtiming-slow-load.php
@@ -0,0 +1,33 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<script>
+</script>
+<link rel="stylesheet" href="../../js-test-resources/js-test-style.css">
+<script src="../../js-test-resources/js-test-pre.js"></script>
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+<script>
+description("Verifies that requestStart and responseStart are available before the main document has finished loading.");
+
+var performance = window.webkitPerformance || {};
+var navigation = performance.navigation || {};
+var timing = performance.timing || {};
+
+shouldBeNonZero("timing.requestStart");
+shouldBeNonZero("timing.responseStart");
+shouldBe("timing.responseEnd", "0");
+
+var successfullyParsed = true;
+</script>
+<script src="../../js-test-resources/js-test-post.js"></script>
+<?php
+ echo str_repeat(" ", 100000);
+ flush();
+ ob_flush();
+ sleep(1);
+?>
+</body>
+</html>
diff --git a/LayoutTests/platform/gtk/Skipped b/LayoutTests/platform/gtk/Skipped
index 290ef4f..084b60a 100644
--- a/LayoutTests/platform/gtk/Skipped
+++ b/LayoutTests/platform/gtk/Skipped
@@ -5313,6 +5313,7 @@ fast/dom/webtiming.html
fast/dom/webtiming-navigate-within-document.html
fast/dom/webtiming-document-open.html
http/tests/misc/webtiming-one-redirect.php
+http/tests/misc/webtiming-slow-load.php
http/tests/misc/webtiming-ssl.php
http/tests/misc/webtiming-two-redirects.php
diff --git a/LayoutTests/platform/mac/Skipped b/LayoutTests/platform/mac/Skipped
index 1e02052..73dcbc7 100644
--- a/LayoutTests/platform/mac/Skipped
+++ b/LayoutTests/platform/mac/Skipped
@@ -216,6 +216,7 @@ fast/dom/webtiming.html
fast/dom/webtiming-document-open.html
fast/dom/webtiming-navigate-within-document.html
http/tests/misc/webtiming-one-redirect.php
+http/tests/misc/webtiming-slow-load.php
http/tests/misc/webtiming-ssl.php
http/tests/misc/webtiming-two-redirects.php
diff --git a/LayoutTests/platform/win/Skipped b/LayoutTests/platform/win/Skipped
index 7eb6dcd..c4f685d 100644
--- a/LayoutTests/platform/win/Skipped
+++ b/LayoutTests/platform/win/Skipped
@@ -1043,6 +1043,7 @@ fast/dom/webtiming.html
fast/dom/webtiming-document-open.html
fast/dom/webtiming-navigate-within-document.html
http/tests/misc/webtiming-one-redirect.php
+http/tests/misc/webtiming-slow-load.php
http/tests/misc/webtiming-ssl.php
http/tests/misc/webtiming-two-redirects.php
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index a71a7c8..c7cbac4 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,16 @@
+2011-01-05 James Simonsen <simonjam at chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ [Web Timing] requestStart and responseStart should be available even if the document is still loading
+ https://bugs.webkit.org/show_bug.cgi?id=51368
+
+ Test: http/tests/misc/webtiming-slow-load.php
+
+ * page/PerformanceTiming.cpp:
+ (WebCore::getPossiblySkewedTimeInKnownRange): Handle case where response is not yet complete.
+ (WebCore::PerformanceTiming::resourceLoadTimeRelativeToAbsolute): Use full upper bound.
+
2011-01-05 Chris Rogers <crogers at google.com>
Reviewed by Darin Fisher.
diff --git a/WebCore/page/PerformanceTiming.cpp b/WebCore/page/PerformanceTiming.cpp
index 47f9278..189023c 100644
--- a/WebCore/page/PerformanceTiming.cpp
+++ b/WebCore/page/PerformanceTiming.cpp
@@ -39,6 +39,7 @@
#include "Frame.h"
#include "ResourceLoadTiming.h"
#include "ResourceResponse.h"
+#include <wtf/CurrentTime.h>
namespace WebCore {
@@ -59,6 +60,9 @@ static double getPossiblySkewedTimeInKnownRange(double skewedTime, double lowerB
if (skewedTime <= lowerBound)
return lowerBound;
+ if (upperBound <= 0.0)
+ upperBound = currentTime();
+
if (skewedTime >= upperBound)
return upperBound;
#else
@@ -378,7 +382,7 @@ unsigned long long PerformanceTiming::resourceLoadTimeRelativeToAbsolute(int rel
//
// Since ResourceLoadTimings came from the network platform layer, we must
// check them for skew because they may be from another thread/process.
- double baseTime = getPossiblySkewedTimeInKnownRange(resourceTiming->requestTime, documentTiming->fetchStart, documentTiming->responseEnd - (resourceTiming->receiveHeadersEnd / 1000.0));
+ double baseTime = getPossiblySkewedTimeInKnownRange(resourceTiming->requestTime, documentTiming->fetchStart, documentTiming->responseEnd);
return toIntegerMilliseconds(baseTime) + relativeSeconds;
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list