Add User Timing Experimental Feature
authorjoepeck@webkit.org <joepeck@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 28 Jan 2017 09:26:14 +0000 (09:26 +0000)
committerjoepeck@webkit.org <joepeck@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 28 Jan 2017 09:26:14 +0000 (09:26 +0000)
https://bugs.webkit.org/show_bug.cgi?id=167542
<rdar://problem/22746307>

Reviewed by Ryosuke Niwa.

Source/WebCore:

* page/RuntimeEnabledFeatures.h:
(WebCore::RuntimeEnabledFeatures::performanceTimelineEnabled):
* page/Performance.idl:
* page/PerformanceEntry.idl:
Make a better RuntimeEnabledFeature named "PerformanceTiming" which
is enabled if either UserTiming or ResourceTiming is enabled. This
will then expose the APIs that are only useful when at least one of
the APIs are available.

* page/PerformanceEntry.cpp:
(WebCore::PerformanceEntry::name): Deleted.
(WebCore::PerformanceEntry::entryType): Deleted.
(WebCore::PerformanceEntry::startTime): Deleted.
(WebCore::PerformanceEntry::duration): Deleted.
* page/PerformanceEntry.h:
(WebCore::PerformanceEntry::name):
(WebCore::PerformanceEntry::entryType):
(WebCore::PerformanceEntry::startTime):
(WebCore::PerformanceEntry::duration):
Inline simple accessors.

* page/PerformanceUserTiming.cpp:
(WebCore::UserTiming::measure):
Fix a bug introduced by ExceptionOr refactoring.

(WebCore::UserTiming::clearMarks):
(WebCore::UserTiming::clearMeasures):
(WebCore::clearPerformanceEntries):
(WebCore::clearPeformanceEntries): Deleted.
Fix method name typo.

Source/WebKit/mac:

* WebView/WebPreferenceKeysPrivate.h:
* WebView/WebPreferences.mm:
(+[WebPreferences initialize]):
(-[WebPreferences userTimingEnabled]):
(-[WebPreferences setUserTimingEnabled:]):
* WebView/WebPreferencesPrivate.h:
* WebView/WebView.mm:
(-[WebView _preferencesChanged:]):
Add setting for User Timing runtime enabled feature.

Source/WebKit/win:

* Interfaces/IWebPreferencesPrivate.idl:
* WebPreferenceKeysPrivate.h:
* WebPreferences.cpp:
(WebPreferences::initializeDefaultSettings):
(WebPreferences::setUserTimingEnabled):
(WebPreferences::userTimingEnabled):
* WebPreferences.h:
* WebView.cpp:
(WebView::notifyPreferencesChanged):
Add setting for User Timing runtime enabled feature.

Source/WebKit2:

* Shared/WebPreferencesDefinitions.h:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetUserTimingEnabled):
(WKPreferencesGetUserTimingEnabled):
* UIProcess/API/C/WKPreferencesRefPrivate.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):
Experimental feature. Off for now while we update ResourceTiming
and NavigationTiming to be compatible with Performance Timing 2.

Tools:

* DumpRenderTree/mac/DumpRenderTree.mm:
(enableExperimentalFeatures):
(resetWebPreferencesToConsistentValues):
* DumpRenderTree/win/DumpRenderTree.cpp:
(enableExperimentalFeatures):

Websites/webkit.org:

* experimental-features.html:

LayoutTests:

* platform/efl/js/dom/global-constructors-attributes-expected.txt:
* platform/gtk/js/dom/global-constructors-attributes-expected.txt:
* platform/mac-elcapitan/js/dom/global-constructors-attributes-expected.txt:
* platform/mac-wk1/js/dom/global-constructors-attributes-expected.txt:
* platform/mac-yosemite/js/dom/global-constructors-attributes-expected.txt:
* platform/mac/js/dom/global-constructors-attributes-expected.txt:
* platform/win/js/dom/global-constructors-attributes-expected.txt:
Update results now that experimental User Timing feature is enabled in tests.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@211332 268f45cc-cd09-0410-ab3c-d52691b4dbfc

36 files changed:
LayoutTests/ChangeLog
LayoutTests/platform/efl/js/dom/global-constructors-attributes-expected.txt
LayoutTests/platform/gtk/js/dom/global-constructors-attributes-expected.txt
LayoutTests/platform/mac-elcapitan/js/dom/global-constructors-attributes-expected.txt
LayoutTests/platform/mac-wk1/js/dom/global-constructors-attributes-expected.txt
LayoutTests/platform/mac-yosemite/js/dom/global-constructors-attributes-expected.txt
LayoutTests/platform/mac/js/dom/global-constructors-attributes-expected.txt
LayoutTests/platform/win/js/dom/global-constructors-attributes-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/page/Performance.idl
Source/WebCore/page/PerformanceEntry.cpp
Source/WebCore/page/PerformanceEntry.h
Source/WebCore/page/PerformanceEntry.idl
Source/WebCore/page/PerformanceUserTiming.cpp
Source/WebCore/page/RuntimeEnabledFeatures.h
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/WebView/WebPreferenceKeysPrivate.h
Source/WebKit/mac/WebView/WebPreferences.mm
Source/WebKit/mac/WebView/WebPreferencesPrivate.h
Source/WebKit/mac/WebView/WebView.mm
Source/WebKit/win/ChangeLog
Source/WebKit/win/Interfaces/IWebPreferencesPrivate.idl
Source/WebKit/win/WebPreferenceKeysPrivate.h
Source/WebKit/win/WebPreferences.cpp
Source/WebKit/win/WebPreferences.h
Source/WebKit/win/WebView.cpp
Source/WebKit2/ChangeLog
Source/WebKit2/Shared/WebPreferencesDefinitions.h
Source/WebKit2/UIProcess/API/C/WKPreferences.cpp
Source/WebKit2/UIProcess/API/C/WKPreferencesRefPrivate.h
Source/WebKit2/WebProcess/WebPage/WebPage.cpp
Tools/ChangeLog
Tools/DumpRenderTree/mac/DumpRenderTree.mm
Tools/DumpRenderTree/win/DumpRenderTree.cpp
Websites/webkit.org/ChangeLog
Websites/webkit.org/experimental-features.html

index 5913164..a87cbcd 100644 (file)
@@ -1,3 +1,20 @@
+2017-01-28  Joseph Pecoraro  <pecoraro@apple.com>
+
+        Add User Timing Experimental Feature
+        https://bugs.webkit.org/show_bug.cgi?id=167542
+        <rdar://problem/22746307>
+
+        Reviewed by Ryosuke Niwa.
+
+        * platform/efl/js/dom/global-constructors-attributes-expected.txt:
+        * platform/gtk/js/dom/global-constructors-attributes-expected.txt:
+        * platform/mac-elcapitan/js/dom/global-constructors-attributes-expected.txt:
+        * platform/mac-wk1/js/dom/global-constructors-attributes-expected.txt:
+        * platform/mac-yosemite/js/dom/global-constructors-attributes-expected.txt:
+        * platform/mac/js/dom/global-constructors-attributes-expected.txt:
+        * platform/win/js/dom/global-constructors-attributes-expected.txt:
+        Update results now that experimental User Timing feature is enabled in tests.
+
 2017-01-27  Yusuke Suzuki  <utatane.tea@gmail.com>
 
         Lift template escape sequence restrictions in tagged templates
index d16a482..a4aea0a 100644 (file)
@@ -993,6 +993,36 @@ PASS Object.getOwnPropertyDescriptor(global, 'Performance').hasOwnProperty('get'
 PASS Object.getOwnPropertyDescriptor(global, 'Performance').hasOwnProperty('set') is false
 PASS Object.getOwnPropertyDescriptor(global, 'Performance').enumerable is false
 PASS Object.getOwnPropertyDescriptor(global, 'Performance').configurable is true
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceEntry').value is PerformanceEntry
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceEntry').hasOwnProperty('get') is false
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceEntry').hasOwnProperty('set') is false
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceEntry').enumerable is false
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceEntry').configurable is true
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceMark').value is PerformanceMark
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceMark').hasOwnProperty('get') is false
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceMark').hasOwnProperty('set') is false
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceMark').enumerable is false
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceMark').configurable is true
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceMeasure').value is PerformanceMeasure
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceMeasure').hasOwnProperty('get') is false
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceMeasure').hasOwnProperty('set') is false
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceMeasure').enumerable is false
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceMeasure').configurable is true
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceEntry').value is PerformanceEntry
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceEntry').hasOwnProperty('get') is false
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceEntry').hasOwnProperty('set') is false
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceEntry').enumerable is false
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceEntry').configurable is true
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceMark').value is PerformanceMark
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceMark').hasOwnProperty('get') is false
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceMark').hasOwnProperty('set') is false
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceMark').enumerable is false
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceMark').configurable is true
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceMeasure').value is PerformanceMeasure
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceMeasure').hasOwnProperty('get') is false
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceMeasure').hasOwnProperty('set') is false
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceMeasure').enumerable is false
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceMeasure').configurable is true
 PASS Object.getOwnPropertyDescriptor(global, 'PerformanceNavigation').value is PerformanceNavigation
 PASS Object.getOwnPropertyDescriptor(global, 'PerformanceNavigation').hasOwnProperty('get') is false
 PASS Object.getOwnPropertyDescriptor(global, 'PerformanceNavigation').hasOwnProperty('set') is false
index aa43f5b..52ad9fc 100644 (file)
@@ -1138,6 +1138,11 @@ PASS Object.getOwnPropertyDescriptor(global, 'Performance').hasOwnProperty('get'
 PASS Object.getOwnPropertyDescriptor(global, 'Performance').hasOwnProperty('set') is false
 PASS Object.getOwnPropertyDescriptor(global, 'Performance').enumerable is false
 PASS Object.getOwnPropertyDescriptor(global, 'Performance').configurable is true
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceEntry').value is PerformanceEntry
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceEntry').hasOwnProperty('get') is false
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceEntry').hasOwnProperty('set') is false
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceEntry').enumerable is false
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceEntry').configurable is true
 PASS Object.getOwnPropertyDescriptor(global, 'PerformanceMark').value is PerformanceMark
 PASS Object.getOwnPropertyDescriptor(global, 'PerformanceMark').hasOwnProperty('get') is false
 PASS Object.getOwnPropertyDescriptor(global, 'PerformanceMark').hasOwnProperty('set') is false
index ae5ea03..ab91b8e 100644 (file)
@@ -1173,6 +1173,21 @@ PASS Object.getOwnPropertyDescriptor(global, 'Performance').hasOwnProperty('get'
 PASS Object.getOwnPropertyDescriptor(global, 'Performance').hasOwnProperty('set') is false
 PASS Object.getOwnPropertyDescriptor(global, 'Performance').enumerable is false
 PASS Object.getOwnPropertyDescriptor(global, 'Performance').configurable is true
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceEntry').value is PerformanceEntry
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceEntry').hasOwnProperty('get') is false
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceEntry').hasOwnProperty('set') is false
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceEntry').enumerable is false
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceEntry').configurable is true
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceMark').value is PerformanceMark
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceMark').hasOwnProperty('get') is false
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceMark').hasOwnProperty('set') is false
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceMark').enumerable is false
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceMark').configurable is true
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceMeasure').value is PerformanceMeasure
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceMeasure').hasOwnProperty('get') is false
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceMeasure').hasOwnProperty('set') is false
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceMeasure').enumerable is false
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceMeasure').configurable is true
 PASS Object.getOwnPropertyDescriptor(global, 'PerformanceNavigation').value is PerformanceNavigation
 PASS Object.getOwnPropertyDescriptor(global, 'PerformanceNavigation').hasOwnProperty('get') is false
 PASS Object.getOwnPropertyDescriptor(global, 'PerformanceNavigation').hasOwnProperty('set') is false
index ae5ea03..ab91b8e 100644 (file)
@@ -1173,6 +1173,21 @@ PASS Object.getOwnPropertyDescriptor(global, 'Performance').hasOwnProperty('get'
 PASS Object.getOwnPropertyDescriptor(global, 'Performance').hasOwnProperty('set') is false
 PASS Object.getOwnPropertyDescriptor(global, 'Performance').enumerable is false
 PASS Object.getOwnPropertyDescriptor(global, 'Performance').configurable is true
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceEntry').value is PerformanceEntry
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceEntry').hasOwnProperty('get') is false
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceEntry').hasOwnProperty('set') is false
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceEntry').enumerable is false
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceEntry').configurable is true
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceMark').value is PerformanceMark
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceMark').hasOwnProperty('get') is false
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceMark').hasOwnProperty('set') is false
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceMark').enumerable is false
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceMark').configurable is true
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceMeasure').value is PerformanceMeasure
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceMeasure').hasOwnProperty('get') is false
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceMeasure').hasOwnProperty('set') is false
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceMeasure').enumerable is false
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceMeasure').configurable is true
 PASS Object.getOwnPropertyDescriptor(global, 'PerformanceNavigation').value is PerformanceNavigation
 PASS Object.getOwnPropertyDescriptor(global, 'PerformanceNavigation').hasOwnProperty('get') is false
 PASS Object.getOwnPropertyDescriptor(global, 'PerformanceNavigation').hasOwnProperty('set') is false
index 7a47993..d517567 100644 (file)
@@ -1168,6 +1168,21 @@ PASS Object.getOwnPropertyDescriptor(global, 'Performance').hasOwnProperty('get'
 PASS Object.getOwnPropertyDescriptor(global, 'Performance').hasOwnProperty('set') is false
 PASS Object.getOwnPropertyDescriptor(global, 'Performance').enumerable is false
 PASS Object.getOwnPropertyDescriptor(global, 'Performance').configurable is true
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceEntry').value is PerformanceEntry
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceEntry').hasOwnProperty('get') is false
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceEntry').hasOwnProperty('set') is false
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceEntry').enumerable is false
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceEntry').configurable is true
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceMark').value is PerformanceMark
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceMark').hasOwnProperty('get') is false
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceMark').hasOwnProperty('set') is false
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceMark').enumerable is false
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceMark').configurable is true
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceMeasure').value is PerformanceMeasure
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceMeasure').hasOwnProperty('get') is false
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceMeasure').hasOwnProperty('set') is false
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceMeasure').enumerable is false
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceMeasure').configurable is true
 PASS Object.getOwnPropertyDescriptor(global, 'PerformanceNavigation').value is PerformanceNavigation
 PASS Object.getOwnPropertyDescriptor(global, 'PerformanceNavigation').hasOwnProperty('get') is false
 PASS Object.getOwnPropertyDescriptor(global, 'PerformanceNavigation').hasOwnProperty('set') is false
index 70b9ab9..d57e71c 100644 (file)
@@ -1178,6 +1178,21 @@ PASS Object.getOwnPropertyDescriptor(global, 'Performance').hasOwnProperty('get'
 PASS Object.getOwnPropertyDescriptor(global, 'Performance').hasOwnProperty('set') is false
 PASS Object.getOwnPropertyDescriptor(global, 'Performance').enumerable is false
 PASS Object.getOwnPropertyDescriptor(global, 'Performance').configurable is true
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceEntry').value is PerformanceEntry
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceEntry').hasOwnProperty('get') is false
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceEntry').hasOwnProperty('set') is false
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceEntry').enumerable is false
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceEntry').configurable is true
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceMark').value is PerformanceMark
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceMark').hasOwnProperty('get') is false
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceMark').hasOwnProperty('set') is false
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceMark').enumerable is false
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceMark').configurable is true
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceMeasure').value is PerformanceMeasure
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceMeasure').hasOwnProperty('get') is false
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceMeasure').hasOwnProperty('set') is false
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceMeasure').enumerable is false
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceMeasure').configurable is true
 PASS Object.getOwnPropertyDescriptor(global, 'PerformanceNavigation').value is PerformanceNavigation
 PASS Object.getOwnPropertyDescriptor(global, 'PerformanceNavigation').hasOwnProperty('get') is false
 PASS Object.getOwnPropertyDescriptor(global, 'PerformanceNavigation').hasOwnProperty('set') is false
index 9779f89..66aea2d 100644 (file)
@@ -868,6 +868,21 @@ PASS Object.getOwnPropertyDescriptor(global, 'Performance').hasOwnProperty('get'
 PASS Object.getOwnPropertyDescriptor(global, 'Performance').hasOwnProperty('set') is false
 PASS Object.getOwnPropertyDescriptor(global, 'Performance').enumerable is false
 PASS Object.getOwnPropertyDescriptor(global, 'Performance').configurable is true
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceEntry').value is PerformanceEntry
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceEntry').hasOwnProperty('get') is false
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceEntry').hasOwnProperty('set') is false
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceEntry').enumerable is false
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceEntry').configurable is true
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceMark').value is PerformanceMark
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceMark').hasOwnProperty('get') is false
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceMark').hasOwnProperty('set') is false
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceMark').enumerable is false
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceMark').configurable is true
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceMeasure').value is PerformanceMeasure
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceMeasure').hasOwnProperty('get') is false
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceMeasure').hasOwnProperty('set') is false
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceMeasure').enumerable is false
+PASS Object.getOwnPropertyDescriptor(global, 'PerformanceMeasure').configurable is true
 PASS Object.getOwnPropertyDescriptor(global, 'PerformanceNavigation').value is PerformanceNavigation
 PASS Object.getOwnPropertyDescriptor(global, 'PerformanceNavigation').hasOwnProperty('get') is false
 PASS Object.getOwnPropertyDescriptor(global, 'PerformanceNavigation').hasOwnProperty('set') is false
index 4281152..ccc6aef 100644 (file)
@@ -1,3 +1,42 @@
+2017-01-28  Joseph Pecoraro  <pecoraro@apple.com>
+
+        Add User Timing Experimental Feature
+        https://bugs.webkit.org/show_bug.cgi?id=167542
+        <rdar://problem/22746307>
+
+        Reviewed by Ryosuke Niwa.
+
+        * page/RuntimeEnabledFeatures.h:
+        (WebCore::RuntimeEnabledFeatures::performanceTimelineEnabled):
+        * page/Performance.idl:
+        * page/PerformanceEntry.idl:
+        Make a better RuntimeEnabledFeature named "PerformanceTiming" which
+        is enabled if either UserTiming or ResourceTiming is enabled. This
+        will then expose the APIs that are only useful when at least one of
+        the APIs are available.
+
+        * page/PerformanceEntry.cpp:
+        (WebCore::PerformanceEntry::name): Deleted.
+        (WebCore::PerformanceEntry::entryType): Deleted.
+        (WebCore::PerformanceEntry::startTime): Deleted.
+        (WebCore::PerformanceEntry::duration): Deleted.
+        * page/PerformanceEntry.h:
+        (WebCore::PerformanceEntry::name):
+        (WebCore::PerformanceEntry::entryType):
+        (WebCore::PerformanceEntry::startTime):
+        (WebCore::PerformanceEntry::duration):
+        Inline simple accessors.
+
+        * page/PerformanceUserTiming.cpp:
+        (WebCore::UserTiming::measure):
+        Fix a bug introduced by ExceptionOr refactoring.
+
+        (WebCore::UserTiming::clearMarks):
+        (WebCore::UserTiming::clearMeasures):
+        (WebCore::clearPerformanceEntries):
+        (WebCore::clearPeformanceEntries): Deleted.
+        Fix method name typo.
+
 2017-01-27  Dan Bernstein  <mitz@apple.com>
 
         Ignore Xcode’s project.xcworkspace and userdata directories in this new project like we do
index 59da96e..aa9ddf3 100644 (file)
@@ -45,9 +45,9 @@ typedef double DOMHighResTimeStamp;
     readonly attribute PerformanceTiming timing;
 
     // https://w3c.github.io/performance-timeline/
-    [EnabledAtRuntime=ResourceTiming] PerformanceEntryList getEntries();
-    [EnabledAtRuntime=ResourceTiming] PerformanceEntryList getEntriesByType(DOMString entryType);
-    [EnabledAtRuntime=ResourceTiming] PerformanceEntryList getEntriesByName(DOMString name, optional DOMString entryType);
+    [EnabledAtRuntime=PerformanceTimeline] PerformanceEntryList getEntries();
+    [EnabledAtRuntime=PerformanceTimeline] PerformanceEntryList getEntriesByType(DOMString entryType);
+    [EnabledAtRuntime=PerformanceTimeline] PerformanceEntryList getEntriesByName(DOMString name, optional DOMString entryType);
 
     // https://w3c.github.io/resource-timing/
     [EnabledAtRuntime=ResourceTiming] void clearResourceTimings();
index 374e142..0a6c5e9 100644 (file)
@@ -47,26 +47,6 @@ PerformanceEntry::~PerformanceEntry()
 {
 }
 
-String PerformanceEntry::name() const
-{
-    return m_name;
-}
-
-String PerformanceEntry::entryType() const
-{
-    return m_entryType;
-}
-
-double PerformanceEntry::startTime() const
-{
-    return m_startTime;
-}
-
-double PerformanceEntry::duration() const
-{
-    return m_duration;
-}
-
 } // namespace WebCore
 
 #endif // ENABLE(WEB_TIMING)
index f8d6ca7..68c1019 100644 (file)
@@ -44,10 +44,10 @@ class PerformanceEntry : public RefCounted<PerformanceEntry> {
 public:
     virtual ~PerformanceEntry();
 
-    String name() const;
-    String entryType() const;
-    double startTime() const;
-    double duration() const;
+    String name() const { return m_name; }
+    String entryType() const { return m_entryType; }
+    double startTime() const { return m_startTime; }
+    double duration() const { return m_duration; }
 
     virtual bool isResource() const { return false; }
     virtual bool isMark() const { return false; }
index fc2fcc5..fa74a10 100644 (file)
@@ -34,7 +34,7 @@ typedef double DOMHighResTimeStamp;
 
 [
     Conditional=WEB_TIMING,
-    EnabledAtRuntime=ResourceTiming,
+    EnabledAtRuntime=PerformanceTimeline,
     CustomToJSObject,
 ] interface PerformanceEntry {
     readonly attribute DOMString name;
index a80a40e..c547160 100644 (file)
@@ -46,6 +46,7 @@ typedef unsigned long long (PerformanceTiming::*NavigationTimingFunction)() cons
 
 static NavigationTimingFunction restrictedMarkFunction(const String& markName)
 {
+    // FIXME: Update this list when moving to Navigation Timing Level 2.
     using MapPair = std::pair<ASCIILiteral, NavigationTimingFunction>;
     static const std::array<MapPair, 21> pairs = { {
         MapPair { ASCIILiteral("navigationStart"), &PerformanceTiming::navigationStart },
@@ -97,7 +98,7 @@ static void insertPerformanceEntry(PerformanceEntryMap& performanceEntryMap, Ref
         performanceEntryMap.set(entry->name(), Vector<RefPtr<PerformanceEntry>> { WTFMove(entry) });
 }
 
-static void clearPeformanceEntries(PerformanceEntryMap& performanceEntryMap, const String& name)
+static void clearPerformanceEntries(PerformanceEntryMap& performanceEntryMap, const String& name)
 {
     if (name.isNull()) {
         performanceEntryMap.clear();
@@ -118,7 +119,7 @@ ExceptionOr<void> UserTiming::mark(const String& markName)
 
 void UserTiming::clearMarks(const String& markName)
 {
-    clearPeformanceEntries(m_marksMap, markName);
+    clearPerformanceEntries(m_marksMap, markName);
 }
 
 ExceptionOr<double> UserTiming::findExistingMarkStartTime(const String& markName)
@@ -148,7 +149,7 @@ ExceptionOr<void> UserTiming::measure(const String& measureName, const String& s
         auto startMarkResult = findExistingMarkStartTime(startMark);
         if (startMarkResult.hasException())
             return startMarkResult.releaseException();
-        endTime = startMarkResult.releaseReturnValue();
+        startTime = startMarkResult.releaseReturnValue();
     } else {
         auto endMarkResult = findExistingMarkStartTime(endMark);
         if (endMarkResult.hasException())
@@ -166,7 +167,7 @@ ExceptionOr<void> UserTiming::measure(const String& measureName, const String& s
 
 void UserTiming::clearMeasures(const String& measureName)
 {
-    clearPeformanceEntries(m_measuresMap, measureName);
+    clearPerformanceEntries(m_measuresMap, measureName);
 }
 
 static Vector<RefPtr<PerformanceEntry>> convertToEntrySequence(const PerformanceEntryMap& performanceEntryMap)
index a62604a..b856662 100644 (file)
@@ -58,6 +58,8 @@ public:
     void setUserTimingEnabled(bool isEnabled) { m_isUserTimingEnabled = isEnabled; }
     bool userTimingEnabled() const { return m_isUserTimingEnabled; }
 
+    bool performanceTimelineEnabled() const { return resourceTimingEnabled() || userTimingEnabled(); }
+
     void setShadowDOMEnabled(bool isEnabled) { m_isShadowDOMEnabled = isEnabled; }
     bool shadowDOMEnabled() const { return m_isShadowDOMEnabled; }
 
index 0167ba3..403644e 100644 (file)
@@ -1,3 +1,21 @@
+2017-01-28  Joseph Pecoraro  <pecoraro@apple.com>
+
+        Add User Timing Experimental Feature
+        https://bugs.webkit.org/show_bug.cgi?id=167542
+        <rdar://problem/22746307>
+
+        Reviewed by Ryosuke Niwa.
+
+        * WebView/WebPreferenceKeysPrivate.h:
+        * WebView/WebPreferences.mm:
+        (+[WebPreferences initialize]):
+        (-[WebPreferences userTimingEnabled]):
+        (-[WebPreferences setUserTimingEnabled:]):
+        * WebView/WebPreferencesPrivate.h:
+        * WebView/WebView.mm:
+        (-[WebView _preferencesChanged:]):
+        Add setting for User Timing runtime enabled feature.
+
 2017-01-27  Wenson Hsieh  <wenson_hsieh@apple.com>
 
         [WK1] Do not prevent the drag client from initializing on Mac
index c35de82..6e5135d 100644 (file)
 #define WebKitMediaCaptureRequiresSecureConnectionPreferenceKey @"WebKitMediaCaptureRequiresSecureConnection"
 #define WebKitAttachmentElementEnabledPreferenceKey @"WebKitAttachmentElementEnabled"
 #define WebKitIntersectionObserverEnabledPreferenceKey @"WebKitIntersectionObserverEnabled"
-
+#define WebKitUserTimingEnabledPreferenceKey @"WebKitUserTimingEnabled"
index 430693b..916d791 100644 (file)
@@ -642,15 +642,16 @@ public:
 #if ENABLE(SUBTLE_CRYPTO)
         [NSNumber numberWithBool:YES], WebKitSubtleCryptoEnabledPreferenceKey,
 #endif
-
 #if ENABLE(MEDIA_STREAM)
         [NSNumber numberWithBool:NO], WebKitMediaStreamEnabledPreferenceKey,
 #endif
-
 #if ENABLE(WEB_RTC)
         [NSNumber numberWithBool:NO], WebKitPeerConnectionEnabledPreferenceKey,
 #endif
-
+#if ENABLE(INTERSECTION_OBSERVER)
+        @NO, WebKitIntersectionObserverEnabledPreferenceKey,
+#endif
+        @NO, WebKitUserTimingEnabledPreferenceKey,
         nil];
 
 #if !PLATFORM(IOS)
@@ -2924,6 +2925,16 @@ static NSString *classIBCreatorID = nil;
     [self _setBoolValue:flag forKey:WebKitIntersectionObserverEnabledPreferenceKey];
 }
 
+- (BOOL)userTimingEnabled
+{
+    return [self _boolValueForKey:WebKitUserTimingEnabledPreferenceKey];
+}
+
+- (void)setUserTimingEnabled:(BOOL)flag
+{
+    [self _setBoolValue:flag forKey:WebKitUserTimingEnabledPreferenceKey];
+}
+
 @end
 
 @implementation WebPreferences (WebInternal)
index 6f94ce4..752748c 100644 (file)
@@ -528,5 +528,6 @@ extern NSString *WebPreferencesCacheModelChangedInternalNotification;
 @property (nonatomic) BOOL attachmentElementEnabled;
 @property (nonatomic) BOOL allowsInlineMediaPlaybackAfterFullscreen;
 @property (nonatomic) BOOL intersectionObserverEnabled;
+@property (nonatomic) BOOL userTimingEnabled;
 
 @end
index d4afde9..073fc18 100644 (file)
@@ -2910,6 +2910,8 @@ static bool needsSelfRetainWhileLoadingQuirk()
     RuntimeEnabledFeatures::sharedFeatures().setSubtleCryptoEnabled([preferences subtleCryptoEnabled]);
 #endif
 
+    RuntimeEnabledFeatures::sharedFeatures().setUserTimingEnabled(preferences.userTimingEnabled);
+
     NSTimeInterval timeout = [preferences incrementalRenderingSuppressionTimeoutInSeconds];
     if (timeout > 0)
         settings.setIncrementalRenderingSuppressionTimeoutInSeconds(timeout);
index 2016415..64d6084 100644 (file)
@@ -1,3 +1,22 @@
+2017-01-28  Joseph Pecoraro  <pecoraro@apple.com>
+
+        Add User Timing Experimental Feature
+        https://bugs.webkit.org/show_bug.cgi?id=167542
+        <rdar://problem/22746307>
+
+        Reviewed by Ryosuke Niwa.
+
+        * Interfaces/IWebPreferencesPrivate.idl:
+        * WebPreferenceKeysPrivate.h:
+        * WebPreferences.cpp:
+        (WebPreferences::initializeDefaultSettings):
+        (WebPreferences::setUserTimingEnabled):
+        (WebPreferences::userTimingEnabled):
+        * WebPreferences.h:
+        * WebView.cpp:
+        (WebView::notifyPreferencesChanged):
+        Add setting for User Timing runtime enabled feature.
+
 2017-01-26  Chris Dumez  <cdumez@apple.com>
 
         Crash when navigating back to a page in PacheCache when one of its frames has been removed
index 834d5a9..4fc459e 100644 (file)
@@ -194,4 +194,6 @@ interface IWebPreferencesPrivate4 : IWebPreferencesPrivate3
     HRESULT setApplicationId([in] BSTR applicationId);
     HRESULT webAnimationsEnabled([out, retval] BOOL*);
     HRESULT setWebAnimationsEnabled([in] BOOL enabled);
+    HRESULT userTimingEnabled([out, retval] BOOL*);
+    HRESULT setUserTimingEnabled([in] BOOL enabled);
 }
index 0513fad..9bac32c 100644 (file)
 #define WebKitModernMediaControlsEnabledPreferenceKey "WebKitModernMediaControlsEnabled"
 
 #define WebKitWebAnimationsEnabledPreferenceKey "WebKitWebAnimationsEnabled"
+
+#define WebKitUserTimingEnabledPreferenceKey "WebKitUserTimingEnabled"
index a3c872b..236fa91 100644 (file)
@@ -307,6 +307,8 @@ void WebPreferences::initializeDefaultSettings()
 
     CFDictionaryAddValue(defaults, CFSTR(WebKitWebAnimationsEnabledPreferenceKey), kCFBooleanFalse);
 
+    CFDictionaryAddValue(defaults, CFSTR(WebKitUserTimingEnabledPreferenceKey), kCFBooleanFalse);
+
     defaultSettings = defaults;
 }
 
@@ -2025,3 +2027,17 @@ HRESULT WebPreferences::webAnimationsEnabled(_Out_ BOOL* enabled)
     *enabled = boolValueForKey(WebKitWebAnimationsEnabledPreferenceKey);
     return S_OK;
 }
+
+HRESULT WebPreferences::setUserTimingEnabled(BOOL enabled)
+{
+    setBoolValue(WebKitUserTimingEnabledPreferenceKey, enabled);
+    return S_OK;
+}
+
+HRESULT WebPreferences::userTimingEnabled(_Out_ BOOL* enabled)
+{
+    if (!enabled)
+        return E_POINTER;
+    *enabled = boolValueForKey(WebKitUserTimingEnabledPreferenceKey);
+    return S_OK;
+}
index 929e9ad..7983c10 100644 (file)
@@ -247,6 +247,8 @@ public:
     virtual HRESULT STDMETHODCALLTYPE setApplicationId(BSTR);
     virtual HRESULT STDMETHODCALLTYPE webAnimationsEnabled(_Out_ BOOL*);
     virtual HRESULT STDMETHODCALLTYPE setWebAnimationsEnabled(BOOL);
+    virtual HRESULT STDMETHODCALLTYPE userTimingEnabled(_Out_ BOOL*);
+    virtual HRESULT STDMETHODCALLTYPE setUserTimingEnabled(BOOL);
 
     // WebPreferences
 
index ec042a7..37bd3ea 100644 (file)
@@ -5262,6 +5262,11 @@ HRESULT WebView::notifyPreferencesChanged(IWebNotification* notification)
     RuntimeEnabledFeatures::sharedFeatures().setWebAnimationsEnabled(!!enabled);
 #endif
 
+    hr = prefsPrivate->userTimingEnabled(&enabled);
+    if (FAILED(hr))
+        return hr;
+    RuntimeEnabledFeatures::sharedFeatures().setUserTimingEnabled(!!enabled);
+
     hr = preferences->privateBrowsingEnabled(&enabled);
     if (FAILED(hr))
         return hr;
index 380207b..0832d5b 100644 (file)
@@ -1,3 +1,21 @@
+2017-01-28  Joseph Pecoraro  <pecoraro@apple.com>
+
+        Add User Timing Experimental Feature
+        https://bugs.webkit.org/show_bug.cgi?id=167542
+        <rdar://problem/22746307>
+
+        Reviewed by Ryosuke Niwa.
+
+        * Shared/WebPreferencesDefinitions.h:
+        * UIProcess/API/C/WKPreferences.cpp:
+        (WKPreferencesSetUserTimingEnabled):
+        (WKPreferencesGetUserTimingEnabled):
+        * UIProcess/API/C/WKPreferencesRefPrivate.h:
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::WebPage::updatePreferences):
+        Experimental feature. Off for now while we update ResourceTiming
+        and NavigationTiming to be compatible with Performance Timing 2.
+
 2017-01-28  Dan Bernstein  <mitz@apple.com>
 
         <rdar://problem/30247736> WebKit2-7604.1.5 has failed to build: error: only virtual member functions can be marked 'override'
index 283b231..81202aa 100644 (file)
     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(SubtleCryptoEnabled, subtleCryptoEnabled, Bool, bool, DEFAULT_EXPERIMENTAL_FEATURES_ENABLED, "SubtleCrypto", "Enable SubtleCrypto support") \
+    macro(UserTimingEnabled, userTimingEnabled, Bool, bool, false, "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") \
     \
index 2c8beb5..d3d5a2d 100644 (file)
@@ -1581,6 +1581,16 @@ bool WKPreferencesGetIntersectionObserverEnabled(WKPreferencesRef preferencesRef
     return toImpl(preferencesRef)->intersectionObserverEnabled();
 }
 
+void WKPreferencesSetUserTimingEnabled(WKPreferencesRef preferencesRef, bool flag)
+{
+    toImpl(preferencesRef)->setUserTimingEnabled(flag);
+}
+
+bool WKPreferencesGetUserTimingEnabled(WKPreferencesRef preferencesRef)
+{
+    return toImpl(preferencesRef)->userTimingEnabled();
+}
+
 void WKPreferencesSetSelectionPaintingWithoutSelectionGapsEnabled(WKPreferencesRef preferencesRef, bool flag)
 {
     toImpl(preferencesRef)->setSelectionPaintingWithoutSelectionGapsEnabled(flag);
index f8264bb..d11e0f6 100644 (file)
@@ -449,6 +449,10 @@ WK_EXPORT bool WKPreferencesGetAllowsPictureInPictureMediaPlayback(WKPreferences
 WK_EXPORT void WKPreferencesSetIntersectionObserverEnabled(WKPreferencesRef, bool flag);
 WK_EXPORT bool WKPreferencesGetIntersectionObserverEnabled(WKPreferencesRef);
 
+// Defaults to false
+WK_EXPORT void WKPreferencesSetUserTimingEnabled(WKPreferencesRef, bool flag);
+WK_EXPORT bool WKPreferencesGetUserTimingEnabled(WKPreferencesRef);
+
 // Defaults to true
 WK_EXPORT void WKPreferencesSetSubtleCryptoEnabled(WKPreferencesRef, bool flag);
 WK_EXPORT bool WKPreferencesGetSubtleCryptoEnabled(WKPreferencesRef);
index 2032c66..8d6f980 100644 (file)
@@ -3267,6 +3267,8 @@ void WebPage::updatePreferences(const WebPreferencesStore& store)
     RuntimeEnabledFeatures::sharedFeatures().setIntersectionObserverEnabled(store.getBoolValueForKey(WebPreferencesKey::intersectionObserverEnabledKey()));
 #endif
 
+    RuntimeEnabledFeatures::sharedFeatures().setUserTimingEnabled(store.getBoolValueForKey(WebPreferencesKey::userTimingEnabledKey()));
+
     bool processSuppressionEnabled = store.getBoolValueForKey(WebPreferencesKey::pageVisibilityBasedProcessSuppressionEnabledKey());
     if (m_processSuppressionEnabled != processSuppressionEnabled) {
         m_processSuppressionEnabled = processSuppressionEnabled;
index fa660ee..663657e 100644 (file)
@@ -1,5 +1,19 @@
 2017-01-28  Joseph Pecoraro  <pecoraro@apple.com>
 
+        Add User Timing Experimental Feature
+        https://bugs.webkit.org/show_bug.cgi?id=167542
+        <rdar://problem/22746307>
+
+        Reviewed by Ryosuke Niwa.
+
+        * DumpRenderTree/mac/DumpRenderTree.mm:
+        (enableExperimentalFeatures):
+        (resetWebPreferencesToConsistentValues):
+        * DumpRenderTree/win/DumpRenderTree.cpp:
+        (enableExperimentalFeatures):
+
+2017-01-28  Joseph Pecoraro  <pecoraro@apple.com>
+
         Patch Review: EWS Bubbles wrap to multiple lines but can fit on one line
         https://bugs.webkit.org/show_bug.cgi?id=167519
 
index 0458387..68ff473 100644 (file)
@@ -903,6 +903,8 @@ static void enableExperimentalFeatures(WebPreferences* preferences)
     [preferences setModernMediaControlsEnabled:YES];
     // FIXME: InputEvents
     [preferences setSubtleCryptoEnabled:YES];
+    [preferences setUserTimingEnabled:YES];
+    [preferences setWebAnimationsEnabled:YES];
     [preferences setWebGL2Enabled:YES];
 }
 
@@ -1009,7 +1011,6 @@ static void resetWebPreferencesToConsistentValues()
     
     [preferences setMediaStreamEnabled:YES];
     [preferences setPeerConnectionEnabled:YES];
-    [preferences setWebAnimationsEnabled:YES];
 
     [WebPreferences _clearNetworkLoaderSession];
     [WebPreferences _setCurrentNetworkLoaderSessionCookieAcceptPolicy:NSHTTPCookieAcceptPolicyOnlyFromMainDocumentDomain];
index a0bfb0a..cf4aba3 100644 (file)
@@ -777,6 +777,7 @@ static void enableExperimentalFeatures(IWebPreferences* preferences)
     // FIXME: ModernMediaControls
     // FIXME: InputEvents
     // FIXME: SubtleCrypto
+    prefsPrivate4->setUserTimingEnabled(TRUE);
     prefsPrivate4->setWebAnimationsEnabled(TRUE);
     // FIXME: WebGL2
 }
index 319859e..72eb351 100644 (file)
@@ -1,3 +1,13 @@
+2017-01-28  Joseph Pecoraro  <pecoraro@apple.com>
+
+        Add User Timing Experimental Feature
+        https://bugs.webkit.org/show_bug.cgi?id=167542
+        <rdar://problem/22746307>
+
+        Reviewed by Ryosuke Niwa.
+
+        * experimental-features.html:
+
 2017-01-27  Dean Jackson  <dino@apple.com>
 
         Add a simple demo for Touch stylus events
index f32f13c..ff5e1ba 100644 (file)
@@ -106,6 +106,10 @@ function testSubtleCrypto() {
     return window.crypto.subtle;
 }
 
+function testUserTiming() {
+    return window.performance.mark;
+}
+
 function testWebAnimations() {
     return !!window.Animation;
 }
@@ -138,6 +142,7 @@ window.addEventListener("load", function () {
         <div class="test" id="InputEvents"><p>HTML Input Events</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>
         <div class="test" id="WebAnimations"><p>Web Animations</p></div>
         <div class="test" id="WebGL2"><p>WebGL 2.0</p></div>
     </div>