Title: [212945] trunk
Revision
212945
Author
joep...@webkit.org
Date
2017-02-23 22:52:02 -0800 (Thu, 23 Feb 2017)

Log Message

[Resource Timing] Add Experimental Feature Flag
https://bugs.webkit.org/show_bug.cgi?id=167147

Reviewed by Ryosuke Niwa.

Source/WebKit2:

* Shared/WebPreferencesDefinitions.h:
Move ResourceTiming to experimental section.
Disable it for El Capitan due to known issues.

Tools:

* DumpRenderTree/mac/DumpRenderTree.mm:
(enableExperimentalFeatures):
(resetWebPreferencesToConsistentValues):
* DumpRenderTree/win/DumpRenderTree.cpp:
(enableExperimentalFeatures):
(resetWebPreferencesToConsistentValues):
Put experimental flags in the experimental section.

Websites/webkit.org:

* experimental-features.html:
Test for Resource Timing.

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (212944 => 212945)


--- trunk/Source/WebKit2/ChangeLog	2017-02-24 06:51:54 UTC (rev 212944)
+++ trunk/Source/WebKit2/ChangeLog	2017-02-24 06:52:02 UTC (rev 212945)
@@ -1,5 +1,16 @@
 2017-02-23  Joseph Pecoraro  <pecor...@apple.com>
 
+        [Resource Timing] Add Experimental Feature Flag
+        https://bugs.webkit.org/show_bug.cgi?id=167147
+
+        Reviewed by Ryosuke Niwa.
+
+        * Shared/WebPreferencesDefinitions.h:
+        Move ResourceTiming to experimental section.
+        Disable it for El Capitan due to known issues.
+
+2017-02-23  Joseph Pecoraro  <pecor...@apple.com>
+
         [Resource Timing] Gather timing information with reliable responseEnd time
         https://bugs.webkit.org/show_bug.cgi?id=168351
 

Modified: trunk/Source/WebKit2/Shared/WebPreferencesDefinitions.h (212944 => 212945)


--- trunk/Source/WebKit2/Shared/WebPreferencesDefinitions.h	2017-02-24 06:51:54 UTC (rev 212944)
+++ trunk/Source/WebKit2/Shared/WebPreferencesDefinitions.h	2017-02-24 06:52:02 UTC (rev 212945)
@@ -240,7 +240,6 @@
     macro(InteractiveFormValidationEnabled, interactiveFormValidationEnabled, Bool, bool, DEFAULT_HTML_INTERACTIVE_FORM_VALIDATION_ENABLED, "HTML Interactive Form Validation", "HTML interactive form validation") \
     macro(ShouldSuppressKeyboardInputDuringProvisionalNavigation, shouldSuppressKeyboardInputDuringProvisionalNavigation, Bool, bool, false, "", "") \
     macro(CSSGridLayoutEnabled, cssGridLayoutEnabled, Bool, bool, true, "CSS Grid", "CSS Grid Layout Module support") \
-    macro(ResourceTimingEnabled, resourceTimingEnabled, Bool, bool, false, "Resource Timing", "Enable ResourceTiming API") \
     \
 
 #define FOR_EACH_WEBKIT_DOUBLE_PREFERENCE(macro) \
@@ -289,7 +288,7 @@
 #define FOR_EACH_WEBKIT_DEBUG_UINT32_PREFERENCE(macro) \
     macro(VisibleDebugOverlayRegions, visibleDebugOverlayRegions, UInt32, uint32_t, 0, "", "")
 
-// Our XCode build system does not currently have any concept of DEVELOPER_MODE.
+// Our Xcode build system does not currently have any concept of DEVELOPER_MODE.
 // Cocoa ports must disable experimental features on release branches for now.
 #if ENABLE(DEVELOPER_MODE) || PLATFORM(COCOA)
 #define DEFAULT_EXPERIMENTAL_FEATURES_ENABLED true
@@ -296,13 +295,20 @@
 #else
 #define DEFAULT_EXPERIMENTAL_FEATURES_ENABLED false
 #endif
+        
+#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101200
+// <https://webkit.org/b/168415> El Capitan NetworkLoadTiming values are sometimes jumbled
+#define DEFAULT_RESOURCE_TIMING_ENABLED false
+#else
+#define DEFAULT_RESOURCE_TIMING_ENABLED DEFAULT_EXPERIMENTAL_FEATURES_ENABLED
+#endif
 
 // For experimental features:
 // - The type should be boolean.
 // - You must provide the last two parameters for all experimental features. They
 //   are the text exposed to the user from the WebKit client.
-// - They should be alphabetically ordered by the human readable text.
-// - The default value may be either false (for very unstable features) or
+// - They should be alphabetically ordered by the human readable text (the first string).
+// - The default value may be either false (for unstable features) or
 //   DEFAULT_EXPERIMENTAL_FEATURE_ENABLED (for features that are ready for
 //   wider testing).
 
@@ -314,14 +320,15 @@
 #define FOR_EACH_WEBKIT_EXPERIMENTAL_FEATURE_PREFERENCE(macro) \
     macro(SpringTimingFunctionEnabled, springTimingFunctionEnabled, Bool, bool, DEFAULT_EXPERIMENTAL_FEATURES_ENABLED, "CSS Spring Animations", "CSS Spring Animation prototype") \
     macro(GamepadsEnabled, gamepadsEnabled, Bool, bool, DEFAULT_EXPERIMENTAL_FEATURES_ENABLED, "Gamepads", "Web Gamepad API support") \
+    macro(InputEventsEnabled, inputEventsEnabled, Bool, bool, DEFAULT_EXPERIMENTAL_FEATURES_ENABLED, "Input Events", "Enable InputEvents support") \
     macro(LinkPreloadEnabled, linkPreloadEnabled, Bool, bool, DEFAULT_EXPERIMENTAL_FEATURES_ENABLED, "Link Preload", "Link preload support") \
     macro(ModernMediaControlsEnabled, modernMediaControlsEnabled, Bool, bool, DEFAULT_EXPERIMENTAL_FEATURES_ENABLED, "Modern Media Controls", "Use modern media controls look") \
-    macro(InputEventsEnabled, inputEventsEnabled, Bool, bool, DEFAULT_EXPERIMENTAL_FEATURES_ENABLED, "Input Events", "Enable InputEvents support") \
-    macro(PeerConnectionEnabled, peerConnectionEnabled, Bool, bool, checkWebRTCAvailability(), "WebRTC", "Enable WebRTC API") \
+    macro(ResourceTimingEnabled, resourceTimingEnabled, Bool, bool, DEFAULT_RESOURCE_TIMING_ENABLED, "Resource Timing", "Enable ResourceTiming API") \
     macro(SubtleCryptoEnabled, subtleCryptoEnabled, Bool, bool, DEFAULT_EXPERIMENTAL_FEATURES_ENABLED, "SubtleCrypto", "Enable SubtleCrypto support") \
-    macro(UserTimingEnabled, userTimingEnabled, Bool, bool, false, "User Timing", "Enable UserTiming API") \
+    macro(UserTimingEnabled, userTimingEnabled, Bool, bool, DEFAULT_EXPERIMENTAL_FEATURES_ENABLED, "User Timing", "Enable UserTiming API") \
     macro(WebAnimationsEnabled, webAnimationsEnabled, Bool, bool, false, "Web Animations", "Web Animations prototype") \
     macro(WebGL2Enabled, webGL2Enabled, Bool, bool, DEFAULT_EXPERIMENTAL_FEATURES_ENABLED, "WebGL 2.0", "WebGL 2 prototype") \
+    macro(PeerConnectionEnabled, peerConnectionEnabled, Bool, bool, checkWebRTCAvailability(), "WebRTC", "Enable WebRTC API") \
     \
 
 #if PLATFORM(COCOA)

Modified: trunk/Tools/ChangeLog (212944 => 212945)


--- trunk/Tools/ChangeLog	2017-02-24 06:51:54 UTC (rev 212944)
+++ trunk/Tools/ChangeLog	2017-02-24 06:52:02 UTC (rev 212945)
@@ -1,3 +1,18 @@
+2017-02-23  Joseph Pecoraro  <pecor...@apple.com>
+
+        [Resource Timing] Add Experimental Feature Flag
+        https://bugs.webkit.org/show_bug.cgi?id=167147
+
+        Reviewed by Ryosuke Niwa.
+
+        * DumpRenderTree/mac/DumpRenderTree.mm:
+        (enableExperimentalFeatures):
+        (resetWebPreferencesToConsistentValues):
+        * DumpRenderTree/win/DumpRenderTree.cpp:
+        (enableExperimentalFeatures):
+        (resetWebPreferencesToConsistentValues):
+        Put experimental flags in the experimental section.
+
 2017-02-23  Beth Dakin  <bda...@apple.com> + Dan Saunders  <da...@microsoft.com>
 
         No reliable way to get a snapshot of WKWebView (macOS)

Modified: trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm (212944 => 212945)


--- trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm	2017-02-24 06:51:54 UTC (rev 212944)
+++ trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm	2017-02-24 06:52:02 UTC (rev 212945)
@@ -842,10 +842,12 @@
     [preferences setLinkPreloadEnabled:YES];
     [preferences setModernMediaControlsEnabled:YES];
     // FIXME: InputEvents
+    [preferences setResourceTimingEnabled:YES];
     [preferences setSubtleCryptoEnabled:YES];
     [preferences setUserTimingEnabled:YES];
     [preferences setWebAnimationsEnabled:YES];
     [preferences setWebGL2Enabled:YES];
+    [preferences setPeerConnectionEnabled:YES];
 }
 
 // Called before each test.
@@ -951,10 +953,7 @@
     [preferences setHiddenPageCSSAnimationSuspensionEnabled:NO];
     
     [preferences setMediaStreamEnabled:YES];
-    [preferences setPeerConnectionEnabled:YES];
 
-    [preferences setResourceTimingEnabled:YES];
-
     [WebPreferences _clearNetworkLoaderSession];
     [WebPreferences _setCurrentNetworkLoaderSessionCookieAcceptPolicy:NSHTTPCookieAcceptPolicyOnlyFromMainDocumentDomain];
 }

Modified: trunk/Tools/DumpRenderTree/win/DumpRenderTree.cpp (212944 => 212945)


--- trunk/Tools/DumpRenderTree/win/DumpRenderTree.cpp	2017-02-24 06:51:54 UTC (rev 212944)
+++ trunk/Tools/DumpRenderTree/win/DumpRenderTree.cpp	2017-02-24 06:52:02 UTC (rev 212945)
@@ -774,12 +774,15 @@
     // FIXME: CSSGridLayout
     // FIXME: SpringTimingFunction
     // FIXME: Gamepads
+    prefsPrivate4->setLinkPreloadEnabled(TRUE);
     // FIXME: ModernMediaControls
     // FIXME: InputEvents
+    prefsPrivate4->setResourceTimingEnabled(TRUE);
     // FIXME: SubtleCrypto
     prefsPrivate4->setUserTimingEnabled(TRUE);
     prefsPrivate4->setWebAnimationsEnabled(TRUE);
     // FIXME: WebGL2
+    // FIXME: WebRTC
 }
 
 static void resetWebPreferencesToConsistentValues(IWebPreferences* preferences)
@@ -878,8 +881,6 @@
     prefsPrivate4->setShadowDOMEnabled(TRUE);
     prefsPrivate4->setCustomElementsEnabled(TRUE);
     prefsPrivate4->setModernMediaControlsEnabled(FALSE);
-    prefsPrivate4->setResourceTimingEnabled(TRUE);
-    prefsPrivate4->setLinkPreloadEnabled(TRUE);
 
     setAlwaysAcceptCookies(false);
 }

Modified: trunk/Websites/webkit.org/ChangeLog (212944 => 212945)


--- trunk/Websites/webkit.org/ChangeLog	2017-02-24 06:51:54 UTC (rev 212944)
+++ trunk/Websites/webkit.org/ChangeLog	2017-02-24 06:52:02 UTC (rev 212945)
@@ -1,3 +1,13 @@
+2017-02-23  Joseph Pecoraro  <pecor...@apple.com>
+
+        [Resource Timing] Add Experimental Feature Flag
+        https://bugs.webkit.org/show_bug.cgi?id=167147
+
+        Reviewed by Ryosuke Niwa.
+
+        * experimental-features.html:
+        Test for Resource Timing.
+
 2017-02-23  Alex Christensen  <achristen...@webkit.org>
 
         Add WebRTC to experimental-features.html

Modified: trunk/Websites/webkit.org/experimental-features.html (212944 => 212945)


--- trunk/Websites/webkit.org/experimental-features.html	2017-02-24 06:51:54 UTC (rev 212944)
+++ trunk/Websites/webkit.org/experimental-features.html	2017-02-24 06:52:02 UTC (rev 212945)
@@ -73,11 +73,6 @@
     return CSS.supports("display", "grid");
 }
 
-function testWebGL2() {
-    let canvas = document.createElement("canvas");
-    return canvas.getContext("webgl2");
-}
-
 function testLinkPreload() {
     var link = document.createElement("link");
     return link.relList.supports("preload");
@@ -87,10 +82,6 @@
     return navigator.getGamepads;
 }
 
-function testWebRTC() {
-    return window.RTCPeerConnection;
-}
-
 function testSpringAnimation() {
     return CSS.supports("transition-timing-function", "spring(1 100 10 0)");
 }
@@ -111,12 +102,16 @@
     return window.es6modules;
 }
 
+function testResourceTiming() {
+    return !!window.PerformanceResourceTiming;
+}
+
 function testSubtleCrypto() {
     return window.crypto.subtle;
 }
 
 function testUserTiming() {
-    return window.performance.mark;
+    return !!window.PerformanceMark;
 }
 
 function testWebAnimations() {
@@ -123,6 +118,15 @@
     return !!window.Animation;
 }
 
+function testWebGL2() {
+    let canvas = document.createElement("canvas");
+    return canvas.getContext("webgl2");
+}
+
+function testWebRTC() {
+    return window.RTCPeerConnection;
+}
+
 window.addEventListener("load", function () {
     Array.from(document.querySelectorAll(".test")).forEach(element => {
         var enabled = false;
@@ -150,6 +154,7 @@
         <div class="test" id="FormValidation"><p>HTML Form Validation</p></div>
         <div class="test" id="InputEvents"><p>HTML Input Events</p></div>
         <div class="test" id="LinkPreload"><p>Link Preload</p></div>
+        <div class="test" id="ResourceTiming"><p>Resource Timing</p></div>
         <div class="test" id="SubtleCrypto"><p>SubtleCrypto</p></div>
         <div class="test" id="VariationFonts"><p>Variation Fonts</p></div>
         <div class="test" id="UserTiming"><p>User Timing</p></div>
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to