WebKit Bugzilla
Attachment 339816 Details for
Bug 184758
: Runtime feature flag for Server-Timing
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-184758-20180508091131.patch (text/plain), 34.81 KB, created by
cvazac
on 2018-05-08 07:11:32 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
cvazac
Created:
2018-05-08 07:11:32 PDT
Size:
34.81 KB
patch
obsolete
>Subversion Revision: 231438 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 0e101ba5bc3297f130769a486e509ce485cffafb..9a6e580646a480024f63d79747bbcec6e60aadd9 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,21 @@ >+2018-05-07 Charles Vazac <cvazac@gmail.com> >+ >+ Runtime feature flag for Server-Timing >+ https://bugs.webkit.org/show_bug.cgi?id=184758 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * Source/WebCore/CMakeLists.txt: Added reference to PerformanceServerTiming.idl. >+ * Source/WebCore/DerivedSources.make: Added reference to PerformanceServerTiming.idl. >+ * Source/WebCore/Sources.txt: Added reference to PerformanceServerTiming.cpp and JSPerformanceServerTiming.cpp. >+ * Source/WebCore/WebCore.xcodeproj/project.pbxproj: Added references to PerformanceServerTiming.cpp, PerformanceServerTiming.h, and PerformanceServerTiming.idl. >+ * Source/WebCore/bindings/js/WebCoreBuiltinNames.h: Added PerformanceServerTiming. >+ * Source/WebCore/page/PerformanceResourceTiming.h: Added serverTiming member. >+ * Source/WebCore/page/PerformanceResourceTiming.idl: Added serverTiming attribute. >+ * Source/WebCore/page/PerformanceServerTiming.cpp: Added. >+ * Source/WebCore/page/PerformanceServerTiming.h: Added. >+ * Source/WebCore/page/PerformanceServerTiming.idl: Added. >+ > 2018-05-07 Eric Carlson <eric.carlson@apple.com> > > Text track cue logging should include cue text >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index 6bc61b61b4fa0246738dc1fa2eae9f8e23d6f533..5d1db7c8c24e686a097bb9111e2de6177a732168 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,16 @@ >+2018-05-07 Charles Vazac <cvazac@gmail.com> >+ >+ Runtime feature flag for Server-Timing >+ https://bugs.webkit.org/show_bug.cgi?id=184758 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * Shared/WebPreferences.yaml: Added ServerTimingEnabled. >+ * UIProcess/API/C/WKPreferences.cpp: >+ (WKPreferencesGetServerTimingEnabled): >+ * UIProcess/API/C/WKPreferencesRefPrivate.h: WK_EXPORT for WKPreferencesSetServerTimingEnabled. >+ * WebProcess/Storage/WebSWContextManagerConnection.cpp: Call setServerTimingEnabled. >+ > 2018-05-04 Tim Horton <timothy_horton@apple.com> > > Shift to a lower-level framework for simplifying URLs >diff --git a/Source/WebKitLegacy/ChangeLog b/Source/WebKitLegacy/ChangeLog >index 2279487c7b7c9df5ba0f1e10dd39ea992fa9f1f4..69db0fd3a6d35d89ac5c29ba763c7ea788c1d6f7 100644 >--- a/Source/WebKitLegacy/ChangeLog >+++ b/Source/WebKitLegacy/ChangeLog >@@ -1,3 +1,26 @@ >+2018-05-02 Charles Vazac <cvazac@gmail.com> >+ >+ Runtime feature flag for Server-Timing >+ https://bugs.webkit.org/show_bug.cgi?id=184758 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * mac/WebView/WebPreferenceKeysPrivate.h: Added server-timing preference. >+ * mac/WebView/WebPreferences.mm: >+ (WebKit::WebPreferences::serverTimingEnabled): >+ (WebKit::WebPreferences::setServerTimingEnabled): >+ * mac/WebView/WebPreferencesPrivate.h: >+ (WebKit::WebPreferences::setServerTimingEnabled): >+ (WebKit::WebPreferences::serverTimingEnabled): >+ * mac/WebView/WebView.mm: Set runtime enabled feature based on preference. >+ * win/Interfaces/IWebPreferencesPrivate.idl: define serverTimingEnabled and setServerTimingEnabled. >+ * win/WebPreferenceKeysPrivate.h: Added server-timing preference. >+ * win/WebPreferences.cpp: Initialize server-timing as false and define setter and getter. >+ (WebKit::WebPreferences::serverTimingEnabled): >+ (WebKit::WebPreferences::setServerTimingEnabled): >+ * win/WebPreferences.h: Define serverTimingEnabled and setServerTimingEnabled. >+ * win/WebView.cpp: Set runtime enabled feature based on preference. >+ > 2018-05-02 Keith Rollin <krollin@apple.com> > > Add facility for tracking times and results of page and resource loading >diff --git a/Source/WebCore/CMakeLists.txt b/Source/WebCore/CMakeLists.txt >index 23c95bf9681507da7c83c8378c2e608039bf1f32..ef4943a14b10da9c97d5edda41574045ebc07310 100644 >--- a/Source/WebCore/CMakeLists.txt >+++ b/Source/WebCore/CMakeLists.txt >@@ -819,6 +819,7 @@ set(WebCore_NON_SVG_IDL_FILES > page/PerformanceObserverEntryList.idl > page/PerformanceNavigation.idl > page/PerformanceResourceTiming.idl >+ page/PerformanceServerTiming.idl > page/PerformanceTiming.idl > page/RemoteDOMWindow.idl > page/Screen.idl >diff --git a/Source/WebCore/DerivedSources.make b/Source/WebCore/DerivedSources.make >index ac0b6f1692776c5e4be9a663fd306c277ceb162c..d59a12abd4dbf30f7bebab78fb4dc048a10b13f3 100644 >--- a/Source/WebCore/DerivedSources.make >+++ b/Source/WebCore/DerivedSources.make >@@ -782,6 +782,7 @@ JS_BINDING_IDLS = \ > $(WebCore)/page/PerformanceObserverCallback.idl \ > $(WebCore)/page/PerformanceObserverEntryList.idl \ > $(WebCore)/page/PerformanceResourceTiming.idl \ >+ $(WebCore)/page/PerformanceServerTiming.idl \ > $(WebCore)/page/PerformanceTiming.idl \ > $(WebCore)/page/RemoteDOMWindow.idl \ > $(WebCore)/page/Screen.idl \ >diff --git a/Source/WebCore/Sources.txt b/Source/WebCore/Sources.txt >index e803a7c104dd14f3a00d2d2a99e729d44767e164..bf0b8ce8e5cb229e9b9d5232fc116ce65d06f449 100644 >--- a/Source/WebCore/Sources.txt >+++ b/Source/WebCore/Sources.txt >@@ -1392,6 +1392,7 @@ page/PerformanceNavigation.cpp > page/PerformanceObserver.cpp > page/PerformanceObserverEntryList.cpp > page/PerformanceResourceTiming.cpp >+page/PerformanceServerTiming.cpp > page/PerformanceTiming.cpp > page/PerformanceUserTiming.cpp > page/PointerLockController.cpp >@@ -2808,6 +2809,7 @@ JSPerformanceObserver.cpp > JSPerformanceObserverCallback.cpp > JSPerformanceObserverEntryList.cpp > JSPerformanceResourceTiming.cpp >+JSPerformanceServerTiming.cpp > JSPerformanceTiming.cpp > JSPeriodicWave.cpp > JSPlaybackDirection.cpp >diff --git a/Source/WebCore/WebCore.xcodeproj/project.pbxproj b/Source/WebCore/WebCore.xcodeproj/project.pbxproj >index ec0c7b736dafb4ad41d7ab461ed1de09e177f934..844630619ff88ca357dd19b6fdcd92c2154a5454 100644 >--- a/Source/WebCore/WebCore.xcodeproj/project.pbxproj >+++ b/Source/WebCore/WebCore.xcodeproj/project.pbxproj >@@ -6379,6 +6379,9 @@ > 26F756B41B3B68F20005DD79 /* ImmutableNFANodeBuilder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ImmutableNFANodeBuilder.h; sourceTree = "<group>"; }; > 26F9A83618A046AC00AEB88A /* ViewportConfiguration.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ViewportConfiguration.cpp; sourceTree = "<group>"; }; > 26F9A83718A046AC00AEB88A /* ViewportConfiguration.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ViewportConfiguration.h; sourceTree = "<group>"; }; >+ 28DB9BC52020EA0400E54A07 /* PerformanceServerTiming.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PerformanceServerTiming.cpp; sourceTree = "<group>"; }; >+ 28DB9BC62020EA0400E54A07 /* PerformanceServerTiming.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PerformanceServerTiming.h; sourceTree = "<group>"; }; >+ 28DB9BC72020EA0400E54A07 /* PerformanceServerTiming.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = PerformanceServerTiming.idl; sourceTree = "<group>"; }; > 2914E3051CAB5A440049966F /* AccessibilityAttachment.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AccessibilityAttachment.cpp; sourceTree = "<group>"; }; > 2914E3061CAB5A440049966F /* AccessibilityAttachment.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AccessibilityAttachment.h; sourceTree = "<group>"; }; > 2917B55E1473496C0052C9D0 /* LayerFlushScheduler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LayerFlushScheduler.cpp; sourceTree = "<group>"; }; >@@ -19304,6 +19307,9 @@ > 86512EDB154A2AEE00A90426 /* PerformanceResourceTiming.cpp */, > 86512EDC154A2AEF00A90426 /* PerformanceResourceTiming.h */, > 86512EDD154A2AEF00A90426 /* PerformanceResourceTiming.idl */, >+ 28DB9BC52020EA0400E54A07 /* PerformanceServerTiming.cpp */, >+ 28DB9BC62020EA0400E54A07 /* PerformanceServerTiming.h */, >+ 28DB9BC72020EA0400E54A07 /* PerformanceServerTiming.idl */, > 0F43C85C189E10CF00019AE2 /* PerformanceTiming.cpp */, > 8AF4E55911DC5A63000ED3DE /* PerformanceTiming.h */, > 8AF4E55A11DC5A63000ED3DE /* PerformanceTiming.idl */, >diff --git a/Source/WebCore/bindings/js/WebCoreBuiltinNames.h b/Source/WebCore/bindings/js/WebCoreBuiltinNames.h >index 150192ff78fbeda234ce0ca877eaa238508ce733..e9bf55c922ef51b094c483db39ebe994153707b2 100644 >--- a/Source/WebCore/bindings/js/WebCoreBuiltinNames.h >+++ b/Source/WebCore/bindings/js/WebCoreBuiltinNames.h >@@ -118,6 +118,7 @@ namespace WebCore { > macro(PerformanceObserver) \ > macro(PerformanceObserverEntryList) \ > macro(PerformanceResourceTiming) \ >+ macro(PerformanceServerTiming) \ > macro(PublicKeyCredential) \ > macro(RTCDTMFSender) \ > macro(RTCDTMFToneChangeEvent) \ >diff --git a/Source/WebCore/page/PerformanceResourceTiming.h b/Source/WebCore/page/PerformanceResourceTiming.h >index f994d9e2ffdd1d84b72fe693d20cc56a18c4834d..bbb3f349b6d7bb7da27772d59428324ce393d9b8 100644 >--- a/Source/WebCore/page/PerformanceResourceTiming.h >+++ b/Source/WebCore/page/PerformanceResourceTiming.h >@@ -39,6 +39,7 @@ > > namespace WebCore { > >+class PerformanceServerTiming; > class ResourceTiming; > > class PerformanceResourceTiming final : public PerformanceEntry { >@@ -60,6 +61,7 @@ public: > double requestStart() const; > double responseStart() const; > double responseEnd() const; >+ const Vector<Ref<PerformanceServerTiming>>& serverTiming() const { return m_serverTiming; } > > private: > PerformanceResourceTiming(MonotonicTime timeOrigin, ResourceTiming&&); >@@ -72,6 +74,7 @@ private: > LoadTiming m_loadTiming; > NetworkLoadMetrics m_networkLoadMetrics; > bool m_shouldReportDetails; >+ Vector<Ref<PerformanceServerTiming>> m_serverTiming; > }; > > } // namespace WebCore >diff --git a/Source/WebCore/page/PerformanceResourceTiming.idl b/Source/WebCore/page/PerformanceResourceTiming.idl >index 8a62d5c7dd04344648c1c8cec36f1dc0510f5ddb..bbd800a42841a01891dd753f59ad32d1a4994c19 100644 >--- a/Source/WebCore/page/PerformanceResourceTiming.idl >+++ b/Source/WebCore/page/PerformanceResourceTiming.idl >@@ -51,6 +51,7 @@ typedef double DOMHighResTimeStamp; > readonly attribute DOMHighResTimeStamp requestStart; > readonly attribute DOMHighResTimeStamp responseStart; > readonly attribute DOMHighResTimeStamp responseEnd; >+ [EnabledAtRuntime=ServerTiming] readonly attribute FrozenArray<PerformanceServerTiming> serverTiming; > > serializer = { inherit, attribute }; > }; >diff --git a/Source/WebCore/page/PerformanceServerTiming.cpp b/Source/WebCore/page/PerformanceServerTiming.cpp >new file mode 100644 >index 0000000000000000000000000000000000000000..484087699eb20555e7551dbc52ab44537b4670e4 >--- /dev/null >+++ b/Source/WebCore/page/PerformanceServerTiming.cpp >@@ -0,0 +1,46 @@ >+/* >+ * Copyright 2017 The Chromium Authors. All rights reserved. >+ * Copyright (C) 2018 Akamai Technologies 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: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. 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. >+ * >+ * 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 "PerformanceServerTiming.h" >+ >+namespace WebCore { >+ >+Ref<PerformanceServerTiming> PerformanceServerTiming::create(String&& name, double duration, String&& description) >+{ >+ return adoptRef(*new PerformanceServerTiming(WTFMove(name), duration, WTFMove(description))); >+} >+ >+PerformanceServerTiming::PerformanceServerTiming(String&& name, double duration, String&& description) >+ : m_name(WTFMove(name)) >+ , m_duration(duration) >+ , m_description(WTFMove(description)) >+{ >+} >+ >+PerformanceServerTiming::~PerformanceServerTiming() = default; >+ >+} // namespace WebCore >diff --git a/Source/WebCore/page/PerformanceServerTiming.h b/Source/WebCore/page/PerformanceServerTiming.h >new file mode 100644 >index 0000000000000000000000000000000000000000..fba992220cb3dc74e6d33c3c18a84748f2960815 >--- /dev/null >+++ b/Source/WebCore/page/PerformanceServerTiming.h >@@ -0,0 +1,50 @@ >+/* >+ * Copyright 2017 The Chromium Authors. All rights reserved. >+ * Copyright (C) 2018 Akamai Technologies 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: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. 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. >+ * >+ * 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. >+ */ >+ >+#pragma once >+ >+#include <wtf/RefCounted.h> >+#include <wtf/text/WTFString.h> >+ >+namespace WebCore { >+ >+class PerformanceServerTiming : public RefCounted<PerformanceServerTiming> { >+public: >+ static Ref<PerformanceServerTiming> create(String&& name, double duration, String&& description); >+ ~PerformanceServerTiming(); >+ >+ const String& name() const { return m_name; } >+ double duration() const { return m_duration; } >+ const String& description() const { return m_description; } >+ >+private: >+ PerformanceServerTiming(String&& name, double duration, String&& description); >+ String m_name; >+ double m_duration; >+ String m_description; >+}; >+ >+} // namespace WebCore >diff --git a/Source/WebCore/page/PerformanceServerTiming.idl b/Source/WebCore/page/PerformanceServerTiming.idl >new file mode 100644 >index 0000000000000000000000000000000000000000..e4cefec07075c0821e548825c175d59fe7d75178 >--- /dev/null >+++ b/Source/WebCore/page/PerformanceServerTiming.idl >@@ -0,0 +1,40 @@ >+/* >+ * Copyright 2017 The Chromium Authors. All rights reserved. >+ * Copyright (C) 2018 Akamai Technologies 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: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. 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. >+ * >+ * 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. >+ */ >+ >+// https://w3c.github.io/server-timing/#dom-performanceservertiming >+ >+typedef double DOMHighResTimeStamp; >+ >+[ >+ Exposed=(Window,Worker), >+ ImplementationLacksVTable, >+ EnabledAtRuntime=ServerTiming >+] interface PerformanceServerTiming { >+ readonly attribute DOMString name; >+ readonly attribute DOMHighResTimeStamp duration; >+ readonly attribute DOMString description; >+ serializer = {attribute}; >+}; >diff --git a/Source/WebCore/page/RuntimeEnabledFeatures.h b/Source/WebCore/page/RuntimeEnabledFeatures.h >index 7df0ac0689c46a10586a6af68215c450562c62b1..eb65b7b2fbe42b551cab6d3c9f0731d4882dd456 100644 >--- a/Source/WebCore/page/RuntimeEnabledFeatures.h >+++ b/Source/WebCore/page/RuntimeEnabledFeatures.h >@@ -256,6 +256,9 @@ public: > void setWebGLCompressedTextureASTCSupportEnabled(bool isEnabled) { m_isWebGLCompressedTextureASTCSupportEnabled = isEnabled; } > bool webGLCompressedTextureASTCSupportEnabled() const { return m_isWebGLCompressedTextureASTCSupportEnabled; } > >+ void setServerTimingEnabled(bool isEnabled) { m_isServerTimingEnabled = isEnabled; } >+ bool serverTimingEnabled() const { return m_isServerTimingEnabled; } >+ > WEBCORE_EXPORT static RuntimeEnabledFeatures& sharedFeatures(); > > private: >@@ -394,6 +397,8 @@ private: > > bool m_isWebGLCompressedTextureASTCSupportEnabled { false }; > >+ bool m_isServerTimingEnabled { false }; >+ > friend class WTF::NeverDestroyed<RuntimeEnabledFeatures>; > }; > >diff --git a/Source/WebKit/Shared/WebPreferences.yaml b/Source/WebKit/Shared/WebPreferences.yaml >index 0e04ccd9dce6a0b16aa08b215e3d85028ba92ab1..23262828999f17689806e1fa8b2dcb8e0d79be1a 100644 >--- a/Source/WebKit/Shared/WebPreferences.yaml >+++ b/Source/WebKit/Shared/WebPreferences.yaml >@@ -1259,3 +1259,12 @@ WebGLCompressedTextureASTCSupportEnabled: > humanReadableDescription: "Support for ASTC compressed texture formats in WebGL" > category: experimental > webcoreBinding: RuntimeEnabledFeatures >+ >+ServerTimingEnabled: >+ type: bool >+ defaultValue: false >+ humanReadableName: "Server Timing" >+ humanReadableDescription: "Enable Server Timing API" >+ category: experimental >+ webcoreBinding: RuntimeEnabledFeatures >+ webcoreName: serverTimingEnabled >diff --git a/Source/WebKit/UIProcess/API/C/WKPreferences.cpp b/Source/WebKit/UIProcess/API/C/WKPreferences.cpp >index edd474fe4d9d4e259e42ba879a042443958d9d4c..d4ffa897748c43b88a4377caba1b8f16f07a0417 100644 >--- a/Source/WebKit/UIProcess/API/C/WKPreferences.cpp >+++ b/Source/WebKit/UIProcess/API/C/WKPreferences.cpp >@@ -1983,3 +1983,13 @@ bool WKPreferencesGetRestrictedHTTPResponseAccess(WKPreferencesRef preferencesRe > { > return toImpl(preferencesRef)->restrictedHTTPResponseAccess(); > } >+ >+void WKPreferencesSetServerTimingEnabled(WKPreferencesRef preferencesRef, bool flag) >+{ >+ toImpl(preferencesRef)->setServerTimingEnabled(flag); >+} >+ >+bool WKPreferencesGetServerTimingEnabled(WKPreferencesRef preferencesRef) >+{ >+ return toImpl(preferencesRef)->serverTimingEnabled(); >+} >diff --git a/Source/WebKit/UIProcess/API/C/WKPreferencesRefPrivate.h b/Source/WebKit/UIProcess/API/C/WKPreferencesRefPrivate.h >index 809b31891b2c501a013e6ae8937c1c787843e9c4..142ba2220db9f1cdf5ca2163af22743491ddb06f 100644 >--- a/Source/WebKit/UIProcess/API/C/WKPreferencesRefPrivate.h >+++ b/Source/WebKit/UIProcess/API/C/WKPreferencesRefPrivate.h >@@ -561,6 +561,10 @@ WK_EXPORT bool WKPreferencesGetShouldAllowUserInstalledFonts(WKPreferencesRef); > WK_EXPORT void WKPreferencesSetAllowCrossOriginSubresourcesToAskForCredentials(WKPreferencesRef, bool flag); > WK_EXPORT bool WKPreferencesGetAllowCrossOriginSubresourcesToAskForCredentials(WKPreferencesRef); > >+// Defaults to false. >+WK_EXPORT void WKPreferencesSetServerTimingEnabled(WKPreferencesRef, bool flag); >+WK_EXPORT bool WKPreferencesGetServerTimingEnabled(WKPreferencesRef); >+ > #ifdef __cplusplus > } > #endif >diff --git a/Source/WebKit/WebProcess/Storage/WebSWContextManagerConnection.cpp b/Source/WebKit/WebProcess/Storage/WebSWContextManagerConnection.cpp >index 015d70e9f87c7d07be4b3431f33f7d1b46d7b2e7..9658b926d0210bb7ddbe9e41ed6305639c9ef03e 100644 >--- a/Source/WebKit/WebProcess/Storage/WebSWContextManagerConnection.cpp >+++ b/Source/WebKit/WebProcess/Storage/WebSWContextManagerConnection.cpp >@@ -129,6 +129,7 @@ void WebSWContextManagerConnection::updatePreferencesStore(const WebPreferencesS > RuntimeEnabledFeatures::sharedFeatures().setResourceTimingEnabled(store.getBoolValueForKey(WebPreferencesKey::resourceTimingEnabledKey())); > RuntimeEnabledFeatures::sharedFeatures().setFetchAPIKeepAliveEnabled(store.getBoolValueForKey(WebPreferencesKey::fetchAPIKeepAliveEnabledKey())); > RuntimeEnabledFeatures::sharedFeatures().setRestrictedHTTPResponseAccess(store.getBoolValueForKey(WebPreferencesKey::restrictedHTTPResponseAccessKey())); >+ RuntimeEnabledFeatures::sharedFeatures().setServerTimingEnabled(store.getBoolValueForKey(WebPreferencesKey::serverTimingEnabledKey())); > > m_storageBlockingPolicy = static_cast<SecurityOrigin::StorageBlockingPolicy>(store.getUInt32ValueForKey(WebPreferencesKey::storageBlockingPolicyKey())); > } >diff --git a/Source/WebKitLegacy/mac/WebView/WebPreferenceKeysPrivate.h b/Source/WebKitLegacy/mac/WebView/WebPreferenceKeysPrivate.h >index 5cc4a2b7def1b804294cc1355b224e59d7ba749e..8befdef998edeaf734f468c119fa95fad7a12537 100644 >--- a/Source/WebKitLegacy/mac/WebView/WebPreferenceKeysPrivate.h >+++ b/Source/WebKitLegacy/mac/WebView/WebPreferenceKeysPrivate.h >@@ -257,3 +257,4 @@ > #define WebKitInspectorAdditionsEnabledPreferenceKey @"WebKitInspectorAdditionsEnabled" > #define WebKitAccessibilityObjectModelEnabledPreferenceKey @"WebKitAccessibilityObjectModelEnabled" > #define WebKitMediaCapabilitiesEnabledPreferenceKey @"WebKitMediaCapabilitiesEnabled" >+#define WebKitServerTimingEnabledPreferenceKey @"WebKitServerTimingEnabled" >diff --git a/Source/WebKitLegacy/mac/WebView/WebPreferences.mm b/Source/WebKitLegacy/mac/WebView/WebPreferences.mm >index 6858597adf9a2cefe5bf245281569c2cf21bf62d..efee2407c9a0bd8db077d0257e104013f8b71c5e 100644 >--- a/Source/WebKitLegacy/mac/WebView/WebPreferences.mm >+++ b/Source/WebKitLegacy/mac/WebView/WebPreferences.mm >@@ -683,6 +683,7 @@ public: > @NO, WebKitAccessibilityObjectModelEnabledPreferenceKey, > @NO, WebKitMediaCapabilitiesEnabledPreferenceKey, > @NO, WebKitFetchAPIKeepAliveEnabledPreferenceKey, >+ @NO, WebKitServerTimingEnabledPreferenceKey, > nil]; > > #if !PLATFORM(IOS) >@@ -3311,6 +3312,16 @@ static NSString *classIBCreatorID = nil; > [self _setBoolValue:flag forKey:WebKitMediaCapabilitiesEnabledPreferenceKey]; > } > >+- (BOOL)serverTimingEnabled >+{ >+ return [self _boolValueForKey:WebKitServerTimingEnabledPreferenceKey]; >+} >+ >+- (void)setServerTimingEnabled:(BOOL)flag >+{ >+ [self _setBoolValue:flag forKey:WebKitServerTimingEnabledPreferenceKey]; >+} >+ > @end > > @implementation WebPreferences (WebInternal) >diff --git a/Source/WebKitLegacy/mac/WebView/WebPreferencesPrivate.h b/Source/WebKitLegacy/mac/WebView/WebPreferencesPrivate.h >index fdaba840ec8db1f6925748c76510e1322257c200..33a91f7e3d7965a372d91d4ccae6bad9356c3325 100644 >--- a/Source/WebKitLegacy/mac/WebView/WebPreferencesPrivate.h >+++ b/Source/WebKitLegacy/mac/WebView/WebPreferencesPrivate.h >@@ -576,6 +576,9 @@ extern NSString *WebPreferencesCacheModelChangedInternalNotification WEBKIT_DEPR > - (void)setIsSecureContextAttributeEnabled:(BOOL)flag; > - (BOOL)isSecureContextAttributeEnabled; > >+- (void)setServerTimingEnabled:(BOOL)flag; >+- (BOOL)serverTimingEnabled; >+ > @property (nonatomic) BOOL visualViewportEnabled; > @property (nonatomic) BOOL visualViewportAPIEnabled; > @property (nonatomic) BOOL largeImageAsyncDecodingEnabled; >diff --git a/Source/WebKitLegacy/mac/WebView/WebView.mm b/Source/WebKitLegacy/mac/WebView/WebView.mm >index fefadfc81a6c1e31ff9fcdb51164492145f5b3b9..6b96374c3d8d782aa6623ed57bbc5f3460abd96f 100644 >--- a/Source/WebKitLegacy/mac/WebView/WebView.mm >+++ b/Source/WebKitLegacy/mac/WebView/WebView.mm >@@ -3161,6 +3161,8 @@ static bool needsSelfRetainWhileLoadingQuirk() > > settings.setLargeImageAsyncDecodingEnabled([preferences largeImageAsyncDecodingEnabled]); > settings.setAnimatedImageAsyncDecodingEnabled([preferences animatedImageAsyncDecodingEnabled]); >+ >+ RuntimeEnabledFeatures::sharedFeatures().setServerTimingEnabled([preferences serverTimingEnabled]); > } > > static inline IMP getMethod(id o, SEL s) >diff --git a/Source/WebKitLegacy/win/Interfaces/IWebPreferencesPrivate.idl b/Source/WebKitLegacy/win/Interfaces/IWebPreferencesPrivate.idl >index 891a7d0fa8f729649c8047fc600888f3a2d79146..b629382bb7a1eb519556f835f07c92a988ff405d 100644 >--- a/Source/WebKitLegacy/win/Interfaces/IWebPreferencesPrivate.idl >+++ b/Source/WebKitLegacy/win/Interfaces/IWebPreferencesPrivate.idl >@@ -227,4 +227,6 @@ interface IWebPreferencesPrivate6 : IWebPreferencesPrivate5 > HRESULT setSpatialNavigationEnabled([in] BOOL enabled); > HRESULT menuItemElementEnabled([out, retval] BOOL* enabled); > HRESULT setMenuItemElementEnabled([in] BOOL enabled); >+ HRESULT serverTimingEnabled([out, retval] BOOL* enabled); >+ HRESULT setServerTimingEnabled([in] BOOL enabled); > } >diff --git a/Source/WebKitLegacy/win/WebPreferenceKeysPrivate.h b/Source/WebKitLegacy/win/WebPreferenceKeysPrivate.h >index 37d73e6dfd4a89ec10ef4bb64cdad81a77546f68..26299818d6ebf1d1f61aa4ebe3f50b18a2185e61 100644 >--- a/Source/WebKitLegacy/win/WebPreferenceKeysPrivate.h >+++ b/Source/WebKitLegacy/win/WebPreferenceKeysPrivate.h >@@ -201,3 +201,5 @@ > #define WebKitInspectorAdditionsEnabledPreferenceKey "WebKitInspectorAdditionsEnabled" > > #define WebKitVisualViewportAPIEnabledPreferenceKey "WebKitVisualViewportAPIEnabled" >+ >+#define WebKitServerTimingEnabledPreferenceKey "WebKitServerTimingEnabled" >diff --git a/Source/WebKitLegacy/win/WebPreferences.cpp b/Source/WebKitLegacy/win/WebPreferences.cpp >index e460d13d3cbb553c79299cbd0e8f9432e09c61b5..e7fea707be65ffcd78208ffc63710c6c75cba13b 100644 >--- a/Source/WebKitLegacy/win/WebPreferences.cpp >+++ b/Source/WebKitLegacy/win/WebPreferences.cpp >@@ -2214,3 +2214,17 @@ HRESULT WebPreferences::resourceTimingEnabled(_Out_ BOOL* enabled) > *enabled = boolValueForKey(WebKitResourceTimingEnabledPreferenceKey); > return S_OK; > } >+ >+HRESULT WebPreferences::serverTimingEnabled(_Out_ BOOL* enabled) >+{ >+ if (!enabled) >+ return E_POINTER; >+ *enabled = boolValueForKey(WebKitServerTimingEnabledPreferenceKey); >+ return S_OK; >+} >+ >+HRESULT WebPreferences::setServerTimingEnabled(BOOL enabled) >+{ >+ setBoolValue(WebKitServerTimingEnabledPreferenceKey, enabled); >+ return S_OK; >+} >diff --git a/Source/WebKitLegacy/win/WebPreferences.h b/Source/WebKitLegacy/win/WebPreferences.h >index ddd8dcca9d2f9510f97d6a3fba18226c906359fc..db3a252a6e766c5831eb8a2ea8563c08150cc502 100644 >--- a/Source/WebKitLegacy/win/WebPreferences.h >+++ b/Source/WebKitLegacy/win/WebPreferences.h >@@ -276,6 +276,9 @@ public: > virtual HRESULT STDMETHODCALLTYPE menuItemElementEnabled(_Out_ BOOL*); > virtual HRESULT STDMETHODCALLTYPE setMenuItemElementEnabled(BOOL); > >+ virtual HRESULT STDMETHODCALLTYPE serverTimingEnabled(_Out_ BOOL*); >+ virtual HRESULT STDMETHODCALLTYPE setServerTimingEnabled(BOOL); >+ > // WebPreferences > > // This method accesses a different preference key than developerExtrasEnabled. >diff --git a/Source/WebKitLegacy/win/WebView.cpp b/Source/WebKitLegacy/win/WebView.cpp >index d81c831fe2eb75675564da493f44070d7ef1a3d4..db706ff776fec2706da2583825331172d994c261 100644 >--- a/Source/WebKitLegacy/win/WebView.cpp >+++ b/Source/WebKitLegacy/win/WebView.cpp >@@ -5573,6 +5573,11 @@ HRESULT WebView::notifyPreferencesChanged(IWebNotification* notification) > return hr; > settings.setJavaScriptRuntimeFlags(JSC::RuntimeFlags(javaScriptRuntimeFlags)); > >+ hr = prefsPrivate->serverTimingEnabled(&enabled); >+ if (FAILED(hr)) >+ return hr; >+ RuntimeEnabledFeatures::sharedFeatures().setServerTimingEnabled(!!enabled); >+ > return S_OK; > } > >diff --git a/Tools/ChangeLog b/Tools/ChangeLog >index 5a2e27668cb51f1d50f98892aee48fc9c862c56f..b49729aa9b8ca7ee954f2f4e326e4dcfc5e43169 100644 >--- a/Tools/ChangeLog >+++ b/Tools/ChangeLog >@@ -1,3 +1,13 @@ >+2018-05-07 Charles Vazac <cvazac@gmail.com> >+ >+ Runtime feature flag for Server-Timing >+ https://bugs.webkit.org/show_bug.cgi?id=184758 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * TestWebKitAPI/Configurations/FeatureDefines.xcconfig: added ENABLE_SERVER_TIMING. >+ * DumpRenderTree/win/DumpRenderTree.cpp: enable Server Timing >+ > 2018-05-04 Wenson Hsieh <wenson_hsieh@apple.com> > > [iOS] Multiple links in Mail are dropped in a single line, and are difficult to tell apart >diff --git a/Tools/DumpRenderTree/mac/DumpRenderTree.mm b/Tools/DumpRenderTree/mac/DumpRenderTree.mm >index 5ac28d2f7045149fde99113b97572225309c9113..81492bb63e09e8505844f6517a934d1cdcbc7d4c 100644 >--- a/Tools/DumpRenderTree/mac/DumpRenderTree.mm >+++ b/Tools/DumpRenderTree/mac/DumpRenderTree.mm >@@ -862,6 +862,7 @@ static void enableExperimentalFeatures(WebPreferences* preferences) > [preferences setAccessibilityObjectModelEnabled:YES]; > [preferences setVisualViewportAPIEnabled:YES]; > [preferences setColorFilterEnabled:YES]; >+ [preferences setServerTimingEnabled:YES]; > } > > // Called before each test. >diff --git a/Tools/DumpRenderTree/win/DumpRenderTree.cpp b/Tools/DumpRenderTree/win/DumpRenderTree.cpp >index ac6519f412c244a04f99268da6b40d887ac83722..5adc7eede2179d8c4e2cebe95926d5d16d11454d 100644 >--- a/Tools/DumpRenderTree/win/DumpRenderTree.cpp >+++ b/Tools/DumpRenderTree/win/DumpRenderTree.cpp >@@ -786,6 +786,7 @@ static void enableExperimentalFeatures(IWebPreferences* preferences) > // FIXME: SubtleCrypto > prefsPrivate->setVisualViewportAPIEnabled(TRUE); > prefsPrivate->setWebAnimationsEnabled(TRUE); >+ prefsPrivate->setServerTimingEnabled(TRUE); > // FIXME: WebGL2 > // FIXME: WebRTC > } >diff --git a/Tools/WebKitTestRunner/TestController.cpp b/Tools/WebKitTestRunner/TestController.cpp >index 68c49c841302dfc9bb1809b79294b6b1fb81d597..3fcfe63f319531fb2055632d6710783080ccaed5 100644 >--- a/Tools/WebKitTestRunner/TestController.cpp >+++ b/Tools/WebKitTestRunner/TestController.cpp >@@ -771,6 +771,8 @@ void TestController::resetPreferencesToConsistentValues(const TestOptions& optio > > WKPreferencesSetRestrictedHTTPResponseAccess(preferences, true); > >+ WKPreferencesSetServerTimingEnabled(preferences, true); >+ > platformResetPreferencesToConsistentValues(); > } > >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index c898d3795aad6b0628fc521d8da2690b48512b28..c4a93a5a0a194271875060c31c602dfe54065c19 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,14 @@ >+2018-05-07 Charles Vazac <cvazac@gmail.com> >+ >+ Runtime feature flag for Server-Timing >+ https://bugs.webkit.org/show_bug.cgi?id=184758 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * imported/w3c/resources/import-expectations.json: Import server-timing tests. >+ * imported/w3c/web-platform-tests/server-timing/resource_timing_idl.html: Added. >+ * imported/w3c/web-platform-tests/server-timing/resource_timing_idl-expected.txt: Added. >+ > 2018-05-04 Youenn Fablet <youenn@apple.com> > > webrtc/addICECandidate-closed.html is timing out >@@ -372,6 +383,7 @@ > > * fast/mediastream/change-tracks-media-stream-being-played-expected.txt: Added. > * fast/mediastream/change-tracks-media-stream-being-played.html: Added. >+>>>>>>> 9b2bcf92b31b044290f53f47cfa485c16dab2b77 > > 2018-05-02 Said Abou-Hallawa <sabouhallawa@apple.com> > >diff --git a/LayoutTests/imported/w3c/resources/import-expectations.json b/LayoutTests/imported/w3c/resources/import-expectations.json >index 054ff2f77f28a59608a852b35904267b6de0bad5..56fe4f68beadcd08e9f69fea60081e01b37deddc 100644 >--- a/LayoutTests/imported/w3c/resources/import-expectations.json >+++ b/LayoutTests/imported/w3c/resources/import-expectations.json >@@ -290,7 +290,7 @@ > "web-platform-tests/selection": "skip", > "web-platform-tests/selectors": "skip", > "web-platform-tests/selectors-api": "skip", >- "web-platform-tests/server-timing": "skip", >+ "web-platform-tests/server-timing": "import", > "web-platform-tests/service-workers/cache-storage": "import", > "web-platform-tests/service-workers/service-worker": "import", > "web-platform-tests/service-workers/tools": "import", >diff --git a/LayoutTests/imported/w3c/web-platform-tests/server-timing/resource_timing_idl-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/server-timing/resource_timing_idl-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..c2c15e0b8a0e54a623bcb4fdca1f4cef72eeb240 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/server-timing/resource_timing_idl-expected.txt >@@ -0,0 +1,3 @@ >+ >+PASS Untitled >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/server-timing/resource_timing_idl.html b/LayoutTests/imported/w3c/web-platform-tests/server-timing/resource_timing_idl.html >new file mode 100644 >index 0000000000000000000000000000000000000000..d2c3c9274eab862e8962019a7cc7c39d27804b16 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/server-timing/resource_timing_idl.html >@@ -0,0 +1,14 @@ >+<!DOCTYPE html> >+<head> >+ <meta charset='utf-8' /> >+ <script src="/resources/testharness.js"></script> >+ <script src='/resources/testharnessreport.js'></script> >+ <script> >+ setup({explicit_done: true}) >+ window.addEventListener('load', function(){ >+ assert_not_equals(typeof performance.getEntriesByType('resource')[0].serverTiming, 'undefined', >+ 'An instance of `PerformanceResourceTiming` should have a `serverTiming` attribute.') >+ done() >+ }) >+ </script> >+</head>
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 184758
:
338263
|
338990
|
338996
|
339381
|
339383
|
339389
|
339725
|
339726
|
339732
|
339816
|
339818
|
339866
|
339880
|
339890
|
339891
|
339893
|
339908
|
339965
|
339970
|
339975
|
340025
|
340095
|
340096