[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 13:41:12 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 2349c4589fb7ec57df9683212f616b298d150a6d
Author: tonyg at chromium.org <tonyg at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Sep 23 15:29:22 2010 +0000
2010-09-08 Tony Gentilcore <tonyg at chromium.org>
Reviewed by Darin Fisher.
[chromium] Add chromium port API for accessing Web Timing information
https://bugs.webkit.org/show_bug.cgi?id=45428
* WebKit.gyp:
* public/WebFrame.h:
* public/WebPerformance.h: Added.
(WebKit::WebPerformance::WebPerformance):
* src/WebFrameImpl.cpp:
(WebKit::WebFrameImpl::performance):
* src/WebFrameImpl.h:
* src/WebPerformance.cpp: Added.
(WebKit::WebPerformance::WebPerformance):
(WebKit::WebPerformance::~WebPerformance):
(WebKit::WebPerformance::operator=):
(WebKit::WebPerformance::navigationType):
(WebKit::WebPerformance::navigationStart):
(WebKit::WebPerformance::unloadEventEnd):
(WebKit::WebPerformance::redirectStart):
(WebKit::WebPerformance::redirectEnd):
(WebKit::WebPerformance::redirectCount):
(WebKit::WebPerformance::fetchStart):
(WebKit::WebPerformance::domainLookupStart):
(WebKit::WebPerformance::domainLookupEnd):
(WebKit::WebPerformance::connectStart):
(WebKit::WebPerformance::connectEnd):
(WebKit::WebPerformance::requestStart):
(WebKit::WebPerformance::requestEnd):
(WebKit::WebPerformance::responseStart):
(WebKit::WebPerformance::responseEnd):
(WebKit::WebPerformance::loadEventStart):
(WebKit::WebPerformance::loadEventEnd):
(WebKit::WebPerformance::operator PassRefPtr<Performance>):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@68141 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit/chromium/ChangeLog b/WebKit/chromium/ChangeLog
index 54add6f..5be7317 100644
--- a/WebKit/chromium/ChangeLog
+++ b/WebKit/chromium/ChangeLog
@@ -1,3 +1,40 @@
+2010-09-08 Tony Gentilcore <tonyg at chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ [chromium] Add chromium port API for accessing Web Timing information
+ https://bugs.webkit.org/show_bug.cgi?id=45428
+
+ * WebKit.gyp:
+ * public/WebFrame.h:
+ * public/WebPerformance.h: Added.
+ (WebKit::WebPerformance::WebPerformance):
+ * src/WebFrameImpl.cpp:
+ (WebKit::WebFrameImpl::performance):
+ * src/WebFrameImpl.h:
+ * src/WebPerformance.cpp: Added.
+ (WebKit::WebPerformance::WebPerformance):
+ (WebKit::WebPerformance::~WebPerformance):
+ (WebKit::WebPerformance::operator=):
+ (WebKit::WebPerformance::navigationType):
+ (WebKit::WebPerformance::navigationStart):
+ (WebKit::WebPerformance::unloadEventEnd):
+ (WebKit::WebPerformance::redirectStart):
+ (WebKit::WebPerformance::redirectEnd):
+ (WebKit::WebPerformance::redirectCount):
+ (WebKit::WebPerformance::fetchStart):
+ (WebKit::WebPerformance::domainLookupStart):
+ (WebKit::WebPerformance::domainLookupEnd):
+ (WebKit::WebPerformance::connectStart):
+ (WebKit::WebPerformance::connectEnd):
+ (WebKit::WebPerformance::requestStart):
+ (WebKit::WebPerformance::requestEnd):
+ (WebKit::WebPerformance::responseStart):
+ (WebKit::WebPerformance::responseEnd):
+ (WebKit::WebPerformance::loadEventStart):
+ (WebKit::WebPerformance::loadEventEnd):
+ (WebKit::WebPerformance::operator PassRefPtr<Performance>):
+
2010-09-23 Andrei Popescu <andreip at google.com>
Reviewed by Jeremy Orlow.
diff --git a/WebKit/chromium/WebKit.gyp b/WebKit/chromium/WebKit.gyp
index bdee5f9..a5c9c0d 100644
--- a/WebKit/chromium/WebKit.gyp
+++ b/WebKit/chromium/WebKit.gyp
@@ -215,6 +215,7 @@
'public/WebPageSerializerClient.h',
'public/WebPasswordAutocompleteListener.h',
'public/WebPasswordFormData.h',
+ 'public/WebPerformance.h',
'public/WebPlugin.h',
'public/WebPluginContainer.h',
'public/WebPluginDocument.h',
@@ -481,6 +482,7 @@
'src/WebPasswordFormData.cpp',
'src/WebPasswordFormUtils.cpp',
'src/WebPasswordFormUtils.h',
+ 'src/WebPerformance.cpp',
'src/WebPluginContainerImpl.h',
'src/WebPluginContainerImpl.cpp',
'src/WebPluginDocument.cpp',
diff --git a/WebKit/chromium/public/WebFrame.h b/WebKit/chromium/public/WebFrame.h
index 6725f58..13de5da 100644
--- a/WebKit/chromium/public/WebFrame.h
+++ b/WebKit/chromium/public/WebFrame.h
@@ -56,6 +56,7 @@ class WebFormElement;
class WebHistoryItem;
class WebInputElement;
class WebPasswordAutocompleteListener;
+class WebPerformance;
class WebRange;
class WebSecurityOrigin;
class WebString;
@@ -193,6 +194,8 @@ public:
virtual WebAnimationController* animationController() = 0;
+ virtual WebPerformance performance() const = 0;
+
// Scripting ----------------------------------------------------------
diff --git a/WebKit/chromium/public/WebPerformance.h b/WebKit/chromium/public/WebPerformance.h
new file mode 100644
index 0000000..012f2fd
--- /dev/null
+++ b/WebKit/chromium/public/WebPerformance.h
@@ -0,0 +1,92 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef WebPerformance_h
+#define WebPerformance_h
+
+#include "WebCommon.h"
+#include "WebNavigationType.h"
+#include "WebPrivatePtr.h"
+
+namespace WebCore { class Performance; }
+
+namespace WebKit {
+
+class WebPerformance {
+public:
+ ~WebPerformance() { reset(); }
+
+ WebPerformance() { }
+
+ WebPerformance(const WebPerformance& p) { assign(p); }
+
+ WebPerformance& operator=(const WebPerformance& p)
+ {
+ assign(p);
+ return *this;
+ }
+
+ WEBKIT_API void reset();
+ WEBKIT_API void assign(const WebPerformance&);
+
+ // This only returns one of {Other|Reload|BackForward}.
+ // Form submits and link clicks all fall under other.
+ WEBKIT_API WebNavigationType navigationType() const;
+
+ WEBKIT_API double navigationStart() const;
+ WEBKIT_API double unloadEventEnd() const;
+ WEBKIT_API double redirectStart() const;
+ WEBKIT_API double redirectEnd() const;
+ WEBKIT_API unsigned short redirectCount() const;
+ WEBKIT_API double fetchStart() const;
+ WEBKIT_API double domainLookupStart() const;
+ WEBKIT_API double domainLookupEnd() const;
+ WEBKIT_API double connectStart() const;
+ WEBKIT_API double connectEnd() const;
+ WEBKIT_API double requestStart() const;
+ WEBKIT_API double requestEnd() const;
+ WEBKIT_API double responseStart() const;
+ WEBKIT_API double responseEnd() const;
+ WEBKIT_API double loadEventStart() const;
+ WEBKIT_API double loadEventEnd() const;
+
+#if WEBKIT_IMPLEMENTATION
+ WebPerformance(const WTF::PassRefPtr<WebCore::Performance>&);
+ WebPerformance& operator=(const WTF::PassRefPtr<WebCore::Performance>&);
+ operator WTF::PassRefPtr<WebCore::Performance>() const;
+#endif
+
+private:
+ WebPrivatePtr<WebCore::Performance> m_private;
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/WebKit/chromium/src/WebFrameImpl.cpp b/WebKit/chromium/src/WebFrameImpl.cpp
index 0ae3f42..f048cb9 100644
--- a/WebKit/chromium/src/WebFrameImpl.cpp
+++ b/WebKit/chromium/src/WebFrameImpl.cpp
@@ -99,6 +99,7 @@
#include "HistoryItem.h"
#include "InspectorController.h"
#include "Page.h"
+#include "Performance.h"
#include "PlatformContextSkia.h"
#include "PluginDocument.h"
#include "PrintContext.h"
@@ -130,6 +131,7 @@
#include "WebHistoryItem.h"
#include "WebInputElement.h"
#include "WebPasswordAutocompleteListener.h"
+#include "WebPerformance.h"
#include "WebPlugin.h"
#include "WebPluginContainerImpl.h"
#include "WebRange.h"
@@ -692,6 +694,14 @@ WebAnimationController* WebFrameImpl::animationController()
return &m_animationController;
}
+WebPerformance WebFrameImpl::performance() const
+{
+ if (!m_frame || !m_frame->domWindow())
+ return WebPerformance();
+
+ return WebPerformance(m_frame->domWindow()->webkitPerformance());
+}
+
WebSecurityOrigin WebFrameImpl::securityOrigin() const
{
if (!m_frame || !m_frame->document())
diff --git a/WebKit/chromium/src/WebFrameImpl.h b/WebKit/chromium/src/WebFrameImpl.h
index 25e7004..89afca7 100644
--- a/WebKit/chromium/src/WebFrameImpl.h
+++ b/WebKit/chromium/src/WebFrameImpl.h
@@ -56,6 +56,7 @@ class WebDataSourceImpl;
class WebInputElement;
class WebFrameClient;
class WebPasswordAutocompleteListener;
+class WebPerformance;
class WebPluginContainerImpl;
class WebView;
class WebViewImpl;
@@ -90,6 +91,7 @@ public:
virtual WebDocument document() const;
virtual void forms(WebVector<WebFormElement>&) const;
virtual WebAnimationController* animationController();
+ virtual WebPerformance performance() const;
virtual WebSecurityOrigin securityOrigin() const;
virtual void grantUniversalAccess();
virtual NPObject* windowObject() const;
diff --git a/WebKit/chromium/src/WebPerformance.cpp b/WebKit/chromium/src/WebPerformance.cpp
new file mode 100644
index 0000000..f019793
--- /dev/null
+++ b/WebKit/chromium/src/WebPerformance.cpp
@@ -0,0 +1,160 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "WebPerformance.h"
+
+#include "Performance.h"
+
+using namespace WebCore;
+
+namespace WebKit {
+
+void WebPerformance::reset()
+{
+ m_private.reset();
+}
+
+void WebPerformance::assign(const WebPerformance& other)
+{
+ m_private = other.m_private;
+}
+
+WebNavigationType WebPerformance::navigationType() const
+{
+ switch (m_private->navigation()->type()) {
+ case Navigation::NAVIGATE:
+ return WebNavigationTypeOther;
+ case Navigation::RELOAD:
+ return WebNavigationTypeReload;
+ case Navigation::BACK_FORWARD:
+ return WebNavigationTypeBackForward;
+ }
+ ASSERT_NOT_REACHED();
+ return WebNavigationTypeOther;
+}
+
+double WebPerformance::navigationStart() const
+{
+ return static_cast<double>(m_private->timing()->navigationStart());
+}
+
+double WebPerformance::unloadEventEnd() const
+{
+ return static_cast<double>(m_private->timing()->unloadEventEnd());
+}
+
+double WebPerformance::redirectStart() const
+{
+ return static_cast<double>(m_private->timing()->redirectStart());
+}
+
+double WebPerformance::redirectEnd() const
+{
+ return static_cast<double>(m_private->timing()->redirectEnd());
+}
+
+unsigned short WebPerformance::redirectCount() const
+{
+ return m_private->navigation()->redirectCount();
+}
+
+double WebPerformance::fetchStart() const
+{
+ return static_cast<double>(m_private->timing()->fetchStart());
+}
+
+double WebPerformance::domainLookupStart() const
+{
+ return static_cast<double>(m_private->timing()->domainLookupStart());
+}
+
+double WebPerformance::domainLookupEnd() const
+{
+ return static_cast<double>(m_private->timing()->domainLookupEnd());
+}
+
+double WebPerformance::connectStart() const
+{
+ return static_cast<double>(m_private->timing()->connectStart());
+}
+
+double WebPerformance::connectEnd() const
+{
+ return static_cast<double>(m_private->timing()->connectEnd());
+}
+
+double WebPerformance::requestStart() const
+{
+ return static_cast<double>(m_private->timing()->requestStart());
+}
+
+double WebPerformance::requestEnd() const
+{
+ return static_cast<double>(m_private->timing()->requestEnd());
+}
+
+double WebPerformance::responseStart() const
+{
+ return static_cast<double>(m_private->timing()->responseStart());
+}
+
+double WebPerformance::responseEnd() const
+{
+ return static_cast<double>(m_private->timing()->responseEnd());
+}
+
+double WebPerformance::loadEventStart() const
+{
+ return static_cast<double>(m_private->timing()->loadEventStart());
+}
+
+double WebPerformance::loadEventEnd() const
+{
+ return static_cast<double>(m_private->timing()->loadEventEnd());
+}
+
+WebPerformance::WebPerformance(const PassRefPtr<Performance>& performance)
+ : m_private(performance)
+{
+}
+
+WebPerformance& WebPerformance::operator=(const PassRefPtr<Performance>& performance)
+{
+ m_private = performance;
+ return *this;
+}
+
+WebPerformance::operator PassRefPtr<Performance>() const
+{
+ return m_private.get();
+}
+
+} // namespace WebKit
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list