summaryrefslogtreecommitdiffstats
path: root/WebCore/page/PerformanceTiming.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/page/PerformanceTiming.cpp')
-rw-r--r--WebCore/page/PerformanceTiming.cpp32
1 files changed, 22 insertions, 10 deletions
diff --git a/WebCore/page/PerformanceTiming.cpp b/WebCore/page/PerformanceTiming.cpp
index 82b7027..47f9278 100644
--- a/WebCore/page/PerformanceTiming.cpp
+++ b/WebCore/page/PerformanceTiming.cpp
@@ -184,7 +184,7 @@ unsigned long long PerformanceTiming::connectStart() const
if (connectStart < 0 || loader->response().connectionReused())
return domainLookupEnd();
- // ResourceLoadTiming's connect phase includes DNS and SSL, however Web Timing's
+ // ResourceLoadTiming's connect phase includes DNS, however Navigation Timing's
// connect phase should not. So if there is DNS time, trim it from the start.
if (timing->dnsEnd >= 0 && timing->dnsEnd > connectStart)
connectStart = timing->dnsEnd;
@@ -208,14 +208,26 @@ unsigned long long PerformanceTiming::connectEnd() const
if (connectEnd < 0 || loader->response().connectionReused())
return connectStart();
- // ResourceLoadTiming's connect phase includes DNS and SSL, however Web Timing's
- // connect phase should not. So if there is SSL time, trim it from the end.
- if (timing->sslStart >= 0 && timing->sslStart < connectEnd)
- connectEnd = timing->sslStart;
-
return resourceLoadTimeRelativeToAbsolute(connectEnd);
}
+unsigned long long PerformanceTiming::sslHandshakeStart() const
+{
+ DocumentLoader* loader = documentLoader();
+ if (!loader)
+ return 0;
+
+ ResourceLoadTiming* timing = loader->response().resourceLoadTiming();
+ if (!timing)
+ return 0;
+
+ int sslStart = timing->sslStart;
+ if (sslStart < 0)
+ return 0;
+
+ return resourceLoadTimeRelativeToAbsolute(sslStart);
+}
+
unsigned long long PerformanceTiming::requestStart() const
{
ResourceLoadTiming* timing = resourceLoadTiming();
@@ -269,22 +281,22 @@ unsigned long long PerformanceTiming::domInteractive() const
return toIntegerMilliseconds(timing->domInteractive);
}
-unsigned long long PerformanceTiming::domContentLoadedStart() const
+unsigned long long PerformanceTiming::domContentLoadedEventStart() const
{
const DocumentTiming* timing = documentTiming();
if (!timing)
return 0;
- return toIntegerMilliseconds(timing->domContentLoadedStart);
+ return toIntegerMilliseconds(timing->domContentLoadedEventStart);
}
-unsigned long long PerformanceTiming::domContentLoadedEnd() const
+unsigned long long PerformanceTiming::domContentLoadedEventEnd() const
{
const DocumentTiming* timing = documentTiming();
if (!timing)
return 0;
- return toIntegerMilliseconds(timing->domContentLoadedEnd);
+ return toIntegerMilliseconds(timing->domContentLoadedEventEnd);
}
unsigned long long PerformanceTiming::domComplete() const