Runtime feature flag for Server-Timing
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 11 May 2018 18:33:43 +0000 (18:33 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 11 May 2018 18:33:43 +0000 (18:33 +0000)
commit6160ab650296546ece101d80ebe6151fb9f962b2
tree05529ee40f2cea83444d8b99dce4d9761ea8a722
parentd3596da8082d0827547994d5648144aa9e8def40
Runtime feature flag for Server-Timing
https://bugs.webkit.org/show_bug.cgi?id=184758

Patch by Charles Vazac <cvazac@gmail.com> on 2018-05-11
Reviewed by Youenn Fablet.

Source/WebCore:

* 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.

Source/WebKit:

* 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.

Source/WebKitLegacy:

* 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.

Tools:

* TestWebKitAPI/Configurations/FeatureDefines.xcconfig: added ENABLE_SERVER_TIMING.
* DumpRenderTree/win/DumpRenderTree.cpp: enable Server Timing

LayoutTests:

* 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.
* platform/ios-wk1/TestExpectations: Skip service-worker test.
* platform/mac-wk1/TestExpectations: Skip service-worker test.
* platform/win/TestExpectations: Skip service-worker test.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@231709 268f45cc-cd09-0410-ab3c-d52691b4dbfc
41 files changed:
LayoutTests/ChangeLog
LayoutTests/imported/w3c/resources/import-expectations.json
LayoutTests/imported/w3c/web-platform-tests/server-timing/resource_timing_idl-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/server-timing/resource_timing_idl.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/server-timing/service_worker_idl-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/server-timing/service_worker_idl.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/server-timing/sw.js [new file with mode: 0644]
LayoutTests/platform/ios-wk1/TestExpectations
LayoutTests/platform/mac-wk1/TestExpectations
LayoutTests/platform/win/TestExpectations
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/DerivedSources.make
Source/WebCore/Sources.txt
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/bindings/js/WebCoreBuiltinNames.h
Source/WebCore/page/PerformanceResourceTiming.h
Source/WebCore/page/PerformanceResourceTiming.idl
Source/WebCore/page/PerformanceServerTiming.cpp [new file with mode: 0644]
Source/WebCore/page/PerformanceServerTiming.h [new file with mode: 0644]
Source/WebCore/page/PerformanceServerTiming.idl [new file with mode: 0644]
Source/WebCore/page/RuntimeEnabledFeatures.h
Source/WebKit/ChangeLog
Source/WebKit/Shared/WebPreferences.yaml
Source/WebKit/UIProcess/API/C/WKPreferences.cpp
Source/WebKit/UIProcess/API/C/WKPreferencesRefPrivate.h
Source/WebKit/WebProcess/Storage/WebSWContextManagerConnection.cpp
Source/WebKitLegacy/ChangeLog
Source/WebKitLegacy/mac/WebView/WebPreferenceKeysPrivate.h
Source/WebKitLegacy/mac/WebView/WebPreferences.mm
Source/WebKitLegacy/mac/WebView/WebPreferencesPrivate.h
Source/WebKitLegacy/mac/WebView/WebView.mm
Source/WebKitLegacy/win/Interfaces/IWebPreferencesPrivate.idl
Source/WebKitLegacy/win/WebPreferenceKeysPrivate.h
Source/WebKitLegacy/win/WebPreferences.cpp
Source/WebKitLegacy/win/WebPreferences.h
Source/WebKitLegacy/win/WebView.cpp
Tools/ChangeLog
Tools/DumpRenderTree/mac/DumpRenderTree.mm
Tools/DumpRenderTree/win/DumpRenderTree.cpp
Tools/WebKitTestRunner/TestController.cpp