Diff
Modified: trunk/ChangeLog (200319 => 200320)
--- trunk/ChangeLog 2016-05-02 08:09:21 UTC (rev 200319)
+++ trunk/ChangeLog 2016-05-02 08:21:50 UTC (rev 200320)
@@ -1,3 +1,12 @@
+2016-05-02 Yoav Weiss <y...@yoav.ws>
+
+ Move ResourceTiming behind a runtime flag
+ https://bugs.webkit.org/show_bug.cgi?id=157133
+
+ Reviewed by Alex Christensen.
+
+ * Source/cmake/WebKitFeatures.cmake: Remove the PERFORMANCE_TIMELINE build flag.
+
2016-04-29 Commit Queue <commit-qu...@webkit.org>
Unreviewed, rolling out r200232.
Modified: trunk/LayoutTests/ChangeLog (200319 => 200320)
--- trunk/LayoutTests/ChangeLog 2016-05-02 08:09:21 UTC (rev 200319)
+++ trunk/LayoutTests/ChangeLog 2016-05-02 08:21:50 UTC (rev 200320)
@@ -1,3 +1,19 @@
+2016-05-02 Yoav Weiss <y...@yoav.ws>
+
+ Move ResourceTiming behind a runtime flag
+ https://bugs.webkit.org/show_bug.cgi?id=157133
+
+ Reviewed by Alex Christensen.
+
+ Added tests that make sure ResourceTiming APIs are exposed and that resources
+ show up as entries in the performance timeline.
+
+ * fast/dom/Window/window-properties-performance-resource-timing-expected.txt: Added.
+ * fast/dom/Window/window-properties-performance-resource-timing.html: Added.
+ * fast/dom/Window/window-properties-performance.html: Removed "//;".
+ * http/tests/performance/performance-resource-timing-entries-expected.txt: Added.
+ * http/tests/performance/performance-resource-timing-entries.html: Added.
+
2016-05-01 Nan Wang <n_w...@apple.com>
AX: Crash at WebCore::AccessibilityObject::getAttribute const + 9
Added: trunk/LayoutTests/fast/dom/Window/window-properties-performance-resource-timing-expected.txt (0 => 200320)
--- trunk/LayoutTests/fast/dom/Window/window-properties-performance-resource-timing-expected.txt (rev 0)
+++ trunk/LayoutTests/fast/dom/Window/window-properties-performance-resource-timing-expected.txt 2016-05-02 08:21:50 UTC (rev 200320)
@@ -0,0 +1,46 @@
+This test dumps all of the properties that are reachable from the window.performance object, along with their types.
+
+window.performance [object Performance]
+window.performance.addEventListener [function]
+window.performance.clearResourceTimings [function]
+window.performance.dispatchEvent [function]
+window.performance.getEntries [function]
+window.performance.getEntriesByName [function]
+window.performance.getEntriesByType [function]
+window.performance.navigation [object PerformanceNavigation]
+window.performance.navigation.TYPE_BACK_FORWARD [number]
+window.performance.navigation.TYPE_NAVIGATE [number]
+window.performance.navigation.TYPE_RELOAD [number]
+window.performance.navigation.TYPE_RESERVED [number]
+window.performance.navigation.redirectCount [number]
+window.performance.navigation.type [number]
+window.performance.now [function]
+window.performance.onresourcetimingbufferfull [null]
+window.performance.removeEventListener [function]
+window.performance.setResourceTimingBufferSize [function]
+window.performance.timing [object PerformanceTiming]
+window.performance.timing.connectEnd [number]
+window.performance.timing.connectStart [number]
+window.performance.timing.domComplete [number]
+window.performance.timing.domContentLoadedEventEnd [number]
+window.performance.timing.domContentLoadedEventStart [number]
+window.performance.timing.domInteractive [number]
+window.performance.timing.domLoading [number]
+window.performance.timing.domainLookupEnd [number]
+window.performance.timing.domainLookupStart [number]
+window.performance.timing.fetchStart [number]
+window.performance.timing.loadEventEnd [number]
+window.performance.timing.loadEventStart [number]
+window.performance.timing.navigationStart [number]
+window.performance.timing.redirectEnd [number]
+window.performance.timing.redirectStart [number]
+window.performance.timing.requestStart [number]
+window.performance.timing.responseEnd [number]
+window.performance.timing.responseStart [number]
+window.performance.timing.secureConnectionStart [number]
+window.performance.timing.unloadEventEnd [number]
+window.performance.timing.unloadEventStart [number]
+window.performance.timing [printed above as window.performance.timing]
+window.performance.navigation [printed above as window.performance.navigation]
+window.performance [string]
+
Copied: trunk/LayoutTests/fast/dom/Window/window-properties-performance-resource-timing.html (from rev 200319, trunk/LayoutTests/fast/dom/Window/window-properties-performance.html) (0 => 200320)
--- trunk/LayoutTests/fast/dom/Window/window-properties-performance-resource-timing.html (rev 0)
+++ trunk/LayoutTests/fast/dom/Window/window-properties-performance-resource-timing.html 2016-05-02 08:21:50 UTC (rev 200320)
@@ -0,0 +1,104 @@
+<p>This test dumps all of the properties that are reachable from the window.performance object, along with their types.</p>
+<hr>
+<pre id="pre"></pre>
+
+<script>
+if (window.testRunner)
+ testRunner.dumpAsText();
+
+if (window.internals)
+ internals.setResourceTimingSupport(true);
+
+var logBuffer = [];
+function log(s)
+{
+ logBuffer.push(s);
+}
+
+var pre = document.getElementById('pre');
+function flushLog()
+{
+ var logMessage = logBuffer.join("");
+ pre.appendChild(document.createTextNode(logMessage));
+}
+
+function tryEval(string)
+{
+ try {
+ return eval(string);
+ } catch (e) {
+ return new String("Caught exception: " + e);
+ }
+}
+
+function typeOfNullAware(value)
+{
+ if (typeof value == "object" && value == null)
+ return "null";
+ return typeof value;
+}
+
+function typeStringNullAware(value)
+{
+ var valueType = typeOfNullAware(value);
+ return valueType == "object"
+ ? Object.prototype.toString.call(value)
+ : "[" + valueType + "]";
+}
+
+function logValue(valueName)
+{
+ var value = tryEval(valueName);
+ var valueType = typeOfNullAware(value);
+
+ // Don't taint the test with our own variables
+ if (value == logBuffer || value == pre)
+ return;
+
+ // Don't taint the test with our own properties
+ if (/__visitedByLogValue__/.test(valueName) || /__nameWhenVisitedByLogValue__/.test(valueName))
+ return;
+
+ // Work around Firefox infinite recursion
+ if (/\.[0-9]/.test(valueName))
+ return;
+
+ // Avoid infinite recursion
+ if (valueType == "object" && value.__visitedByLogValue__) {
+ log(valueName + " [printed above as " + value.__nameWhenVisitedByLogValue__ + "]\n");
+ return;
+ }
+
+ log(valueName + " " + typeStringNullAware(value) + "\n");
+
+ if (valueType == "object") {
+ value.__visitedByLogValue__ = true;
+ value.__nameWhenVisitedByLogValue__ = valueName;
+ logProperties(value, valueName);
+ }
+}
+
+function logProperties(object, objectName)
+{
+ var array = new Array;
+ for (var property in object) {
+ array.push(property);
+ }
+ array.sort();
+ for (var i = 0; i < array.length; i++) {
+ var property = array[i];
+ logValue(objectName + "." + property);
+ }
+}
+
+logValue('window.performance');
+window.performance.timing = 'timing is not replaceable';
+logValue('window.performance.timing');
+window.performance.navigation = 'navigation is not replaceable';
+logValue('window.performance.navigation');
+window.performance = 'performance is replaceable';
+logValue('window.performance');
+flushLog();
+if (window.internals)
+ internals.setResourceTimingSupport(false);
+</script>
Modified: trunk/LayoutTests/fast/dom/Window/window-properties-performance.html (200319 => 200320)
--- trunk/LayoutTests/fast/dom/Window/window-properties-performance.html 2016-05-02 08:09:21 UTC (rev 200319)
+++ trunk/LayoutTests/fast/dom/Window/window-properties-performance.html 2016-05-02 08:21:50 UTC (rev 200320)
@@ -30,7 +30,7 @@
function typeOfNullAware(value)
{
- if (typeof value == "object" && value == null) //;
+ if (typeof value == "object" && value == null)
return "null";
return typeof value;
}
@@ -61,7 +61,7 @@
return;
// Avoid infinite recursion
- if (valueType == "object" && value.__visitedByLogValue__) { //;
+ if (valueType == "object" && value.__visitedByLogValue__) {
log(valueName + " [printed above as " + value.__nameWhenVisitedByLogValue__ + "]\n");
return;
}
Added: trunk/LayoutTests/http/tests/performance/performance-resource-timing-entries-expected.txt (0 => 200320)
--- trunk/LayoutTests/http/tests/performance/performance-resource-timing-entries-expected.txt (rev 0)
+++ trunk/LayoutTests/http/tests/performance/performance-resource-timing-entries-expected.txt 2016-05-02 08:21:50 UTC (rev 200320)
@@ -0,0 +1,2 @@
+PASS foundImg is true
+
Added: trunk/LayoutTests/http/tests/performance/performance-resource-timing-entries.html (0 => 200320)
--- trunk/LayoutTests/http/tests/performance/performance-resource-timing-entries.html (rev 0)
+++ trunk/LayoutTests/http/tests/performance/performance-resource-timing-entries.html 2016-05-02 08:21:50 UTC (rev 200320)
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<html>
+<script>
+ if (window.internals)
+ internals.setResourceTimingSupport(true);
+ var url = ""
+ url += Math.random();
+ document.write("<img src=''>");
+
+</script>
+<script src=""
+<script>
+ var foundImg = false;
+ window.addEventListener("load", function() {
+ var resources = performance.getEntriesByType('resource');
+ for (var i = 0; i < resources.length; ++i) {
+ if (resources[i].name.indexOf("square100") != -1) {
+ foundImg = true;
+ break;
+ }
+ };
+ shouldBeTrue("foundImg");
+ if (window.internals)
+ window.internals.setResourceTimingSupport(false);
+ });
+</script>
+</body>
+</html>
Modified: trunk/Source/_javascript_Core/ChangeLog (200319 => 200320)
--- trunk/Source/_javascript_Core/ChangeLog 2016-05-02 08:09:21 UTC (rev 200319)
+++ trunk/Source/_javascript_Core/ChangeLog 2016-05-02 08:21:50 UTC (rev 200320)
@@ -1,3 +1,12 @@
+2016-05-02 Yoav Weiss <y...@yoav.ws>
+
+ Move ResourceTiming behind a runtime flag
+ https://bugs.webkit.org/show_bug.cgi?id=157133
+
+ Reviewed by Alex Christensen.
+
+ * runtime/CommonIdentifiers.h: Added PerformanceEntry, PerformanceEntryList and PerformanceResourceTiming as property names.
+
2016-05-02 Yusuke Suzuki <utatane....@gmail.com>
Assertion failure for bound function with custom prototype and Reflect.construct
Modified: trunk/Source/_javascript_Core/runtime/CommonIdentifiers.h (200319 => 200320)
--- trunk/Source/_javascript_Core/runtime/CommonIdentifiers.h 2016-05-02 08:09:21 UTC (rev 200319)
+++ trunk/Source/_javascript_Core/runtime/CommonIdentifiers.h 2016-05-02 08:21:50 UTC (rev 200320)
@@ -71,6 +71,9 @@
macro(Number) \
macro(NumberFormat) \
macro(Object) \
+ macro(PerformanceEntry) \
+ macro(PerformanceEntryList) \
+ macro(PerformanceResourceTiming) \
macro(Promise) \
macro(Proxy) \
macro(RangeError) \
Modified: trunk/Source/WebCore/ChangeLog (200319 => 200320)
--- trunk/Source/WebCore/ChangeLog 2016-05-02 08:09:21 UTC (rev 200319)
+++ trunk/Source/WebCore/ChangeLog 2016-05-02 08:21:50 UTC (rev 200320)
@@ -1,3 +1,58 @@
+2016-05-02 Yoav Weiss <y...@yoav.ws>
+
+ Move ResourceTiming behind a runtime flag
+ https://bugs.webkit.org/show_bug.cgi?id=157133
+
+ Reviewed by Alex Christensen.
+
+ Move the ResourceTiming API from being behind a build time flag to be behind an
+ off-by-default runtime flag, that can be turned on using internals.
+
+ Tests: fast/dom/Window/window-properties-performance-resource-timing.html
+ http/tests/performance/performance-resource-timing-entries.html
+
+ * DerivedSources.make: Added idl files for PerformanceEntry, PerformanceEntryList and PerformanceResourceTiming.
+ * WebCore.xcodeproj/project.pbxproj: Added the various Performance* files to the project.
+ * bindings/generic/RuntimeEnabledFeatures.cpp: Added ResourceTiming as a runtime flag.
+ (WebCore::RuntimeEnabledFeatures::RuntimeEnabledFeatures):
+ * bindings/generic/RuntimeEnabledFeatures.h: Added ResourceTiming as a runtime flag.
+ (WebCore::RuntimeEnabledFeatures::setResourceTimingEnabled):
+ (WebCore::RuntimeEnabledFeatures::resourceTimingEnabled):
+ * bindings/js/JSPerformanceEntryCustom.cpp: Removed #if for ResourceTiming, and replaced PERFORMANCE_TIMELINE for WEB_TIMING.
+ Added build flag around UserTiming related h files.
+ (WebCore::toJS): Deleted.
+ * dom/EventNames.h: Renamed webkitresourcetimingbufferfull to resourcetimingbufferfull.
+ * loader/DocumentThreadableLoader.cpp: Replace #if for ResourceTiming with runtime flag.
+ (WebCore::DocumentThreadableLoader::loadRequest):
+ * loader/ResourceLoadNotifier.cpp: Replace #if for ResourceTiming with runtime flag.
+ (WebCore::ResourceLoadNotifier::dispatchWillSendRequest):
+ * loader/cache/CachedResourceLoader.cpp: Replace #if for ResourceTiming with runtime flag.
+ (WebCore::CachedResourceLoader::revalidateResource):
+ (WebCore::CachedResourceLoader::loadResource):
+ (WebCore::CachedResourceLoader::storeResourceTimingInitiatorInformation):
+ (WebCore::CachedResourceLoader::loadDone):
+ * loader/cache/CachedResourceLoader.h: Remove #if for ResourceTiming.
+ * page/Performance.cpp: Remove #if for ResourceTiming.
+ (WebCore::Performance::Performance): Removed #if for ResourceTiming related initialization.
+ (WebCore::Performance::webkitGetEntries): Renamed to getEntries.
+ (WebCore::Performance::webkitGetEntriesByType): Renamed to getEntriesByType.
+ (WebCore::Performance::webkitGetEntriesByName): Renamed to getEntriesByName.
+ * page/Performance.h: Remove #if for ResourceTiming.
+ * page/Performance.idl: Replace #if for ResourceTiming with runtime flag.
+ * page/PerformanceEntry.cpp: Remove the PERFORMANCE_TIMELINE build flag.
+ * page/PerformanceEntry.h: Remove the PERFORMANCE_TIMELINE build flag.
+ * page/PerformanceEntry.idl: Replace the PERFORMANCE_TIMELINE build flag with runtime flag.
+ * page/PerformanceEntryList.cpp: Remove the PERFORMANCE_TIMELINE build flag.
+ * page/PerformanceEntryList.h: Remove the PERFORMANCE_TIMELINE build flag.
+ * page/PerformanceEntryList.idl: Replace the PERFORMANCE_TIMELINE build flag with runtime flag.
+ * page/PerformanceResourceTiming.cpp: Remove the RESOURCE_TIMING build flag.
+ * page/PerformanceResourceTiming.h: Remove the RESOURCE_TIMING build flag.
+ * page/PerformanceResourceTiming.idl: Replace the RESOURCE_TIMING build flag with runtime flag.
+ * testing/Internals.cpp: Add a method that enables ResourceTiming.
+ (WebCore::Internals::setResourceTimingSupport):
+ * testing/Internals.h: Add a method that enables ResourceTiming.
+ * testing/Internals.idl: Add a method that enables ResourceTiming.
+
2016-05-01 Nan Wang <n_w...@apple.com>
AX: Crash at WebCore::AccessibilityObject::getAttribute const + 9
Modified: trunk/Source/WebCore/DerivedSources.make (200319 => 200320)
--- trunk/Source/WebCore/DerivedSources.make 2016-05-02 08:09:21 UTC (rev 200319)
+++ trunk/Source/WebCore/DerivedSources.make 2016-05-02 08:21:50 UTC (rev 200320)
@@ -518,7 +518,10 @@
$(WebCore)/page/Location.idl \
$(WebCore)/page/Navigator.idl \
$(WebCore)/page/Performance.idl \
+ $(WebCore)/page/PerformanceEntry.idl \
+ $(WebCore)/page/PerformanceEntryList.idl \
$(WebCore)/page/PerformanceNavigation.idl \
+ $(WebCore)/page/PerformanceResourceTiming.idl \
$(WebCore)/page/PerformanceTiming.idl \
$(WebCore)/page/Screen.idl \
$(WebCore)/page/WebKitPoint.idl \
Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (200319 => 200320)
--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2016-05-02 08:09:21 UTC (rev 200319)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2016-05-02 08:21:50 UTC (rev 200320)
@@ -5991,6 +5991,14 @@
CA3BF67E10D99BAE00E6CE53 /* ScrollAnimator.h in Headers */ = {isa = PBXBuildFile; fileRef = CA3BF67D10D99BAE00E6CE53 /* ScrollAnimator.h */; settings = {ATTRIBUTES = (Private, ); }; };
CAE9F90F146441F000C245B0 /* CSSAspectRatioValue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CAE9F90D146441F000C245B0 /* CSSAspectRatioValue.cpp */; };
CAE9F910146441F000C245B0 /* CSSAspectRatioValue.h in Headers */ = {isa = PBXBuildFile; fileRef = CAE9F90E146441F000C245B0 /* CSSAspectRatioValue.h */; };
+ CB38FD4B1CCCF36600592A3F /* PerformanceEntry.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CB38FD4A1CCCF2DD00592A3F /* PerformanceEntry.cpp */; };
+ CB38FD511CCF938900592A3F /* JSPerformanceEntry.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CB38FD4D1CCF937E00592A3F /* JSPerformanceEntry.cpp */; };
+ CB38FD521CCF939400592A3F /* JSPerformanceEntry.h in Headers */ = {isa = PBXBuildFile; fileRef = CB38FD4E1CCF937E00592A3F /* JSPerformanceEntry.h */; };
+ CB38FD531CCF939B00592A3F /* JSPerformanceEntryList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CB38FD4F1CCF937E00592A3F /* JSPerformanceEntryList.cpp */; };
+ CB38FD541CCF939E00592A3F /* JSPerformanceEntryList.h in Headers */ = {isa = PBXBuildFile; fileRef = CB38FD501CCF937E00592A3F /* JSPerformanceEntryList.h */; };
+ CB38FD571CD21E2A00592A3F /* JSPerformanceEntryCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CB38FD551CD21D5B00592A3F /* JSPerformanceEntryCustom.cpp */; };
+ CB38FD5A1CD2325800592A3F /* JSPerformanceResourceTiming.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CB38FD581CD2314500592A3F /* JSPerformanceResourceTiming.cpp */; };
+ CB38FD5B1CD2325B00592A3F /* JSPerformanceResourceTiming.h in Headers */ = {isa = PBXBuildFile; fileRef = CB38FD591CD2314500592A3F /* JSPerformanceResourceTiming.h */; };
CB8CF0181A9358D4000D510B /* Microtasks.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CB8CF0151A934B43000D510B /* Microtasks.cpp */; };
CCC2B51415F613060048CDD6 /* DeviceClient.h in Headers */ = {isa = PBXBuildFile; fileRef = CCC2B51015F613060048CDD6 /* DeviceClient.h */; settings = {ATTRIBUTES = (Private, ); }; };
CCC2B51515F613060048CDD6 /* DeviceController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CCC2B51115F613060048CDD6 /* DeviceController.cpp */; };
@@ -13958,6 +13966,14 @@
CA3BF67D10D99BAE00E6CE53 /* ScrollAnimator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScrollAnimator.h; sourceTree = "<group>"; };
CAE9F90D146441F000C245B0 /* CSSAspectRatioValue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CSSAspectRatioValue.cpp; sourceTree = "<group>"; };
CAE9F90E146441F000C245B0 /* CSSAspectRatioValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CSSAspectRatioValue.h; sourceTree = "<group>"; };
+ CB38FD4A1CCCF2DD00592A3F /* PerformanceEntry.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PerformanceEntry.cpp; sourceTree = "<group>"; };
+ CB38FD4D1CCF937E00592A3F /* JSPerformanceEntry.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.cpp; fileEncoding = 4; path = JSPerformanceEntry.cpp; sourceTree = "<group>"; };
+ CB38FD4E1CCF937E00592A3F /* JSPerformanceEntry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSPerformanceEntry.h; sourceTree = "<group>"; };
+ CB38FD4F1CCF937E00592A3F /* JSPerformanceEntryList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSPerformanceEntryList.cpp; sourceTree = "<group>"; };
+ CB38FD501CCF937E00592A3F /* JSPerformanceEntryList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = JSPerformanceEntryList.h; sourceTree = "<group>"; };
+ CB38FD551CD21D5B00592A3F /* JSPerformanceEntryCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSPerformanceEntryCustom.cpp; sourceTree = "<group>"; };
+ CB38FD581CD2314500592A3F /* JSPerformanceResourceTiming.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSPerformanceResourceTiming.cpp; sourceTree = "<group>"; };
+ CB38FD591CD2314500592A3F /* JSPerformanceResourceTiming.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSPerformanceResourceTiming.h; sourceTree = "<group>"; };
CB8CF0151A934B43000D510B /* Microtasks.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Microtasks.cpp; sourceTree = "<group>"; };
CCC2B51015F613060048CDD6 /* DeviceClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DeviceClient.h; sourceTree = "<group>"; };
CCC2B51115F613060048CDD6 /* DeviceController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DeviceController.cpp; sourceTree = "<group>"; };
@@ -18064,6 +18080,7 @@
8A844D0211D3C18E0014065C /* Performance.h */,
8A844D0311D3C18E0014065C /* Performance.idl */,
86BE33FB15058CB200CE0FD8 /* PerformanceEntry.h */,
+ CB38FD4A1CCCF2DD00592A3F /* PerformanceEntry.cpp */,
86BE33FC15058CB200CE0FD8 /* PerformanceEntry.idl */,
86BE33FD15058CB200CE0FD8 /* PerformanceEntryList.cpp */,
86BE33FE15058CB200CE0FD8 /* PerformanceEntryList.h */,
@@ -22319,6 +22336,7 @@
83F1206A1B8C103600D75F63 /* JSNodeFilterCustom.cpp */,
7C91A38D1B498ABE003F9EFA /* JSNodeOrString.cpp */,
7C91A38E1B498ABE003F9EFA /* JSNodeOrString.h */,
+ CB38FD551CD21D5B00592A3F /* JSPerformanceEntryCustom.cpp */,
93B70D4F09EB0C7C009D8468 /* JSPluginElementFunctions.cpp */,
93B70D5009EB0C7C009D8468 /* JSPluginElementFunctions.h */,
4129DF831BB5B7F700322A16 /* JSReadableStreamPrivateConstructors.cpp */,
@@ -22655,8 +22673,14 @@
A9D247F60D757E3300FDF959 /* JSNavigator.h */,
E51A81DE17298D7700BFCA61 /* JSPerformance.cpp */,
8A9A587311E84C81008ACFD1 /* JSPerformance.h */,
+ CB38FD4D1CCF937E00592A3F /* JSPerformanceEntry.cpp */,
+ CB38FD4E1CCF937E00592A3F /* JSPerformanceEntry.h */,
+ CB38FD4F1CCF937E00592A3F /* JSPerformanceEntryList.cpp */,
+ CB38FD501CCF937E00592A3F /* JSPerformanceEntryList.h */,
8A9A586E11E84C35008ACFD1 /* JSPerformanceNavigation.cpp */,
8A9A586F11E84C36008ACFD1 /* JSPerformanceNavigation.h */,
+ CB38FD581CD2314500592A3F /* JSPerformanceResourceTiming.cpp */,
+ CB38FD591CD2314500592A3F /* JSPerformanceResourceTiming.h */,
0F43C85E189E15A600019AE2 /* JSPerformanceTiming.cpp */,
8A9A587711E84C98008ACFD1 /* JSPerformanceTiming.h */,
BCEC01C00C274DDD009F4EC9 /* JSScreen.cpp */,
@@ -25562,6 +25586,7 @@
2D29ECCA192F1F1D00984B78 /* DisplayRefreshMonitorIOS.h in Headers */,
2DE70023192FE82A00B0975C /* DisplayRefreshMonitorMac.h in Headers */,
2D29ECC8192ECC8300984B78 /* DisplayRefreshMonitorManager.h in Headers */,
+ CB38FD521CCF939400592A3F /* JSPerformanceEntry.h in Headers */,
CD52481B18E200ED0008A07D /* DisplaySleepDisabler.h in Headers */,
5D8C4DC01428222C0026CE72 /* DisplaySleepDisablerCocoa.h in Headers */,
FD31609112B026F700C1A359 /* Distance.h in Headers */,
@@ -27698,6 +27723,7 @@
BCEA4868097D93020094C9E4 /* RenderView.h in Headers */,
BE20507E18A458C20080647E /* RenderVTTCue.h in Headers */,
A871DFE40A15376B00B12A68 /* RenderWidget.h in Headers */,
+ CB38FD5B1CD2325B00592A3F /* JSPerformanceResourceTiming.h in Headers */,
A89CCC530F44E98100B5DA10 /* ReplaceNodeWithSpanCommand.h in Headers */,
93309E0A099E64920056E581 /* ReplaceSelectionCommand.h in Headers */,
99CC0B5418BE9849006CEBCC /* ReplayController.h in Headers */,
@@ -28027,6 +28053,7 @@
A8EA800A0A19516E00A8EF5F /* StyleSheetList.h in Headers */,
BC5EB5E50E81BF6D00B25965 /* StyleSurroundData.h in Headers */,
BC5EB8100E81F2CE00B25965 /* StyleTransformData.h in Headers */,
+ CB38FD541CCF939E00592A3F /* JSPerformanceEntryList.h in Headers */,
E4DEAA1817A93DC3000E0430 /* StyleTreeResolver.h in Headers */,
BC5EB69A0E81DA6300B25965 /* StyleVisualData.h in Headers */,
D000ED2811C1B9CD00C47726 /* SubframeLoader.h in Headers */,
@@ -29209,6 +29236,7 @@
B27535770B053814002CE64F /* ColorMac.mm in Sources */,
43EDD67E1B485DBF00640E75 /* CombinedFiltersAlphabet.cpp in Sources */,
26E944D81AC4B2DD007B85B5 /* CombinedURLFilters.cpp in Sources */,
+ CB38FD4B1CCCF36600592A3F /* PerformanceEntry.cpp in Sources */,
A584FE341864D5AF00843B10 /* CommandLineAPIHost.cpp in Sources */,
A584FE2B1863870F00843B10 /* CommandLineAPIModule.cpp in Sources */,
6550B6A1099DF0270090D781 /* Comment.cpp in Sources */,
@@ -31227,6 +31255,7 @@
BC96DB460F3A882200573CB3 /* RenderBoxModelObject.cpp in Sources */,
BCEA4865097D93020094C9E4 /* RenderButton.cpp in Sources */,
BCE4413312F748E2009B84B8 /* RenderCombineText.cpp in Sources */,
+ CB38FD5A1CD2325800592A3F /* JSPerformanceResourceTiming.cpp in Sources */,
9392F1440AD185FE00691BD4 /* RenderCounter.cpp in Sources */,
BCEA486D097D93020094C9E4 /* RenderDeprecatedFlexibleBox.cpp in Sources */,
D302754912A5FE84004BD828 /* RenderDetailsMarker.cpp in Sources */,
@@ -32004,6 +32033,7 @@
444D4E230F708B2E003158E0 /* WebCoreURLResponseIOS.mm in Sources */,
93F19B0708245E59001E9ABC /* WebCoreView.m in Sources */,
A5E616731894581F009ADF50 /* WebDebuggerAgent.cpp in Sources */,
+ CB38FD571CD21E2A00592A3F /* JSPerformanceEntryCustom.cpp in Sources */,
FE0D84EB1048436E001A179E /* WebEvent.mm in Sources */,
225A16B60D5C11E900090295 /* WebEventRegion.mm in Sources */,
D3F3D36D1A69B7DC0059FC2B /* WebGL2RenderingContext.cpp in Sources */,
@@ -32083,6 +32113,7 @@
B10B6981140C174000BC1C26 /* WebVTTTokenizer.cpp in Sources */,
CD8203111395ACE700F956C6 /* WebWindowAnimation.mm in Sources */,
F55B3DDF1251F12D003EF269 /* WeekInputType.cpp in Sources */,
+ CB38FD511CCF938900592A3F /* JSPerformanceEntry.cpp in Sources */,
85031B500A44EFC700F992E0 /* WheelEvent.cpp in Sources */,
2E19516B1B6598D200DF6EEF /* WheelEventDeltaFilter.cpp in Sources */,
2EEEE55C1B66A047008E2CBC /* WheelEventDeltaFilterMac.mm in Sources */,
@@ -32120,6 +32151,7 @@
00B9318913BA8DBC0035A948 /* XMLDocumentParserLibxml2.cpp in Sources */,
00B9318B13BA8DC90035A948 /* XMLDocumentParserScope.cpp in Sources */,
59C28045138DC2410079B7E2 /* XMLErrors.cpp in Sources */,
+ CB38FD531CCF939B00592A3F /* JSPerformanceEntryList.cpp in Sources */,
BC772C460C4EB2C60083285F /* XMLHttpRequest.cpp in Sources */,
A136A00C1134DBD200CC8D50 /* XMLHttpRequestProgressEventThrottle.cpp in Sources */,
BCDFD48F0E305290009D10AD /* XMLHttpRequestUpload.cpp in Sources */,
Modified: trunk/Source/WebCore/bindings/generic/RuntimeEnabledFeatures.cpp (200319 => 200320)
--- trunk/Source/WebCore/bindings/generic/RuntimeEnabledFeatures.cpp 2016-05-02 08:09:21 UTC (rev 200319)
+++ trunk/Source/WebCore/bindings/generic/RuntimeEnabledFeatures.cpp 2016-05-02 08:21:50 UTC (rev 200320)
@@ -59,6 +59,7 @@
#else
, m_isPluginReplacementEnabled(false)
#endif
+ , m_isResourceTimingEnabled(false)
#if ENABLE(INDEXED_DATABASE)
, m_isIndexedDBEnabled(false)
#endif
Modified: trunk/Source/WebCore/bindings/generic/RuntimeEnabledFeatures.h (200319 => 200320)
--- trunk/Source/WebCore/bindings/generic/RuntimeEnabledFeatures.h 2016-05-02 08:09:21 UTC (rev 200319)
+++ trunk/Source/WebCore/bindings/generic/RuntimeEnabledFeatures.h 2016-05-02 08:21:50 UTC (rev 200320)
@@ -201,6 +201,9 @@
void setPluginReplacementEnabled(bool isEnabled) { m_isPluginReplacementEnabled = isEnabled; }
bool pluginReplacementEnabled() const { return m_isPluginReplacementEnabled; }
+ void setResourceTimingEnabled(bool isEnabled) { m_isResourceTimingEnabled = isEnabled; }
+ bool resourceTimingEnabled() const { return m_isResourceTimingEnabled; }
+
#if ENABLE(GAMEPAD)
void setGamepadsEnabled(bool areEnabled) { m_areGamepadsEnabled = areEnabled; }
bool gamepadsEnabled() const { return m_areGamepadsEnabled; }
@@ -267,6 +270,7 @@
bool m_isCSSCompositingEnabled;
bool m_isLangAttributeAwareFormControlUIEnabled;
bool m_isPluginReplacementEnabled;
+ bool m_isResourceTimingEnabled;
#if ENABLE(INDEXED_DATABASE)
bool m_isIndexedDBEnabled;
Modified: trunk/Source/WebCore/bindings/js/JSPerformanceEntryCustom.cpp (200319 => 200320)
--- trunk/Source/WebCore/bindings/js/JSPerformanceEntryCustom.cpp 2016-05-02 08:09:21 UTC (rev 200319)
+++ trunk/Source/WebCore/bindings/js/JSPerformanceEntryCustom.cpp 2016-05-02 08:21:50 UTC (rev 200320)
@@ -30,13 +30,14 @@
#include "config.h"
-#if ENABLE(PERFORMANCE_TIMELINE)
-
+#if ENABLE(WEB_TIMING)
#include "JSPerformanceEntry.h"
#include "JSDOMBinding.h"
+#if ENABLE(USER_TIMING)
#include "JSPerformanceMark.h"
#include "JSPerformanceMeasure.h"
+#endif
#include "JSPerformanceResourceTiming.h"
#include "PerformanceMark.h"
#include "PerformanceMeasure.h"
@@ -51,10 +52,8 @@
if (!entry)
return jsNull();
-#if ENABLE(RESOURCE_TIMING)
if (is<PerformanceResourceTiming>(*entry))
return wrap<JSPerformanceResourceTiming>(globalObject, downcast<PerformanceResourceTiming>(*entry));
-#endif
#if ENABLE(USER_TIMING)
if (is<PerformanceMark>(*entry))
@@ -68,5 +67,4 @@
}
} // namespace WebCore
-
-#endif // ENABLE(PERFORMANCE_TIMELINE)
+#endif // ENABLE(WEB_TIMING)
Modified: trunk/Source/WebCore/dom/EventNames.h (200319 => 200320)
--- trunk/Source/WebCore/dom/EventNames.h 2016-05-02 08:09:21 UTC (rev 200319)
+++ trunk/Source/WebCore/dom/EventNames.h 2016-05-02 08:21:50 UTC (rev 200320)
@@ -183,6 +183,7 @@
macro(removetrack) \
macro(reset) \
macro(resize) \
+ macro(resourcetimingbufferfull) \
macro(result) \
macro(resume) \
macro(scroll) \
@@ -261,7 +262,6 @@
macro(webkitpresentationmodechanged) \
macro(webkitregionoversetchange) \
macro(webkitremovesourcebuffer) \
- macro(webkitresourcetimingbufferfull) \
macro(webkitsourceclose) \
macro(webkitsourceended) \
macro(webkitsourceopen) \
Modified: trunk/Source/WebCore/loader/DocumentThreadableLoader.cpp (200319 => 200320)
--- trunk/Source/WebCore/loader/DocumentThreadableLoader.cpp 2016-05-02 08:09:21 UTC (rev 200319)
+++ trunk/Source/WebCore/loader/DocumentThreadableLoader.cpp 2016-05-02 08:21:50 UTC (rev 200320)
@@ -45,6 +45,7 @@
#include "ProgressTracker.h"
#include "ResourceError.h"
#include "ResourceRequest.h"
+#include "RuntimeEnabledFeatures.h"
#include "SchemeRegistry.h"
#include "SecurityOrigin.h"
#include "SubresourceLoader.h"
@@ -385,9 +386,8 @@
}
CachedResourceRequest newRequest(request, options);
-#if ENABLE(RESOURCE_TIMING)
- newRequest.setInitiator(m_options.initiator);
-#endif
+ if (RuntimeEnabledFeatures::sharedFeatures().resourceTimingEnabled())
+ newRequest.setInitiator(m_options.initiator);
ASSERT(!m_resource);
m_resource = m_document.cachedResourceLoader().requestRawResource(newRequest);
if (m_resource)
Modified: trunk/Source/WebCore/loader/ResourceLoadNotifier.cpp (200319 => 200320)
--- trunk/Source/WebCore/loader/ResourceLoadNotifier.cpp 2016-05-02 08:09:21 UTC (rev 200319)
+++ trunk/Source/WebCore/loader/ResourceLoadNotifier.cpp 2016-05-02 08:21:50 UTC (rev 200320)
@@ -39,6 +39,7 @@
#include "Page.h"
#include "ProgressTracker.h"
#include "ResourceLoader.h"
+#include "RuntimeEnabledFeatures.h"
#if USE(QUICK_LOOK)
#include "QuickLook.h"
@@ -146,9 +147,8 @@
if (loader && !request.isNull() && request.url() == loader->url())
request.setReportLoadTiming(true);
-#if ENABLE(RESOURCE_TIMING)
- request.setReportLoadTiming(true);
-#endif
+ if (RuntimeEnabledFeatures::sharedFeatures().resourceTimingEnabled())
+ request.setReportLoadTiming(true);
}
void ResourceLoadNotifier::dispatchDidReceiveResponse(DocumentLoader* loader, unsigned long identifier, const ResourceResponse& r, ResourceLoader* resourceLoader)
Modified: trunk/Source/WebCore/loader/cache/CachedResourceLoader.cpp (200319 => 200320)
--- trunk/Source/WebCore/loader/cache/CachedResourceLoader.cpp 2016-05-02 08:09:21 UTC (rev 200319)
+++ trunk/Source/WebCore/loader/cache/CachedResourceLoader.cpp 2016-05-02 08:21:50 UTC (rev 200320)
@@ -57,10 +57,12 @@
#include "MainFrame.h"
#include "MemoryCache.h"
#include "Page.h"
+#include "Performance.h"
#include "PingLoader.h"
#include "PlatformStrategies.h"
#include "RenderElement.h"
#include "ResourceLoadInfo.h"
+#include "RuntimeEnabledFeatures.h"
#include "ScriptController.h"
#include "SecurityOrigin.h"
#include "SessionID.h"
@@ -75,10 +77,6 @@
#include "CachedTextTrack.h"
#endif
-#if ENABLE(RESOURCE_TIMING)
-#include "Performance.h"
-#endif
-
#define PRELOAD_DEBUG 0
namespace WebCore {
@@ -671,11 +669,8 @@
memoryCache.remove(*resource);
memoryCache.add(*newResource);
-#if ENABLE(RESOURCE_TIMING)
- storeResourceTimingInitiatorInformation(resource, request);
-#else
- UNUSED_PARAM(request);
-#endif
+ if (RuntimeEnabledFeatures::sharedFeatures().resourceTimingEnabled())
+ storeResourceTimingInitiatorInformation(resource, request);
return newResource;
}
@@ -690,15 +685,14 @@
if (request.allowsCaching() && !memoryCache.add(*resource))
resource->setOwningCachedResourceLoader(this);
-#if ENABLE(RESOURCE_TIMING)
- storeResourceTimingInitiatorInformation(resource, request);
-#endif
+ if (RuntimeEnabledFeatures::sharedFeatures().resourceTimingEnabled())
+ storeResourceTimingInitiatorInformation(resource, request);
return resource;
}
-#if ENABLE(RESOURCE_TIMING)
void CachedResourceLoader::storeResourceTimingInitiatorInformation(const CachedResourceHandle<CachedResource>& resource, const CachedResourceRequest& request)
{
+ ASSERT(RuntimeEnabledFeatures::sharedFeatures().resourceTimingEnabled());
if (resource->type() == CachedResource::MainResource) {
// <iframe>s should report the initial navigation requested by the parent document, but not subsequent navigations.
if (frame()->ownerElement() && m_documentLoader->frameLoader()->stateMachine().committingFirstRealLoad()) {
@@ -710,7 +704,6 @@
m_initiatorMap.add(resource.get(), info);
}
}
-#endif // ENABLE(RESOURCE_TIMING)
static void logRevalidation(const String& reason, DiagnosticLoggingClient& logClient)
{
@@ -976,8 +969,9 @@
RefPtr<DocumentLoader> protectDocumentLoader(m_documentLoader);
RefPtr<Document> protectDocument(m_document);
-#if ENABLE(RESOURCE_TIMING)
- if (resource && resource->response().isHTTP() && ((!resource->errorOccurred() && !resource->wasCanceled()) || resource->response().httpStatusCode() == 304)) {
+ if (RuntimeEnabledFeatures::sharedFeatures().resourceTimingEnabled()
+ && resource && resource->response().isHTTP()
+ && ((!resource->errorOccurred() && !resource->wasCanceled()) || resource->response().httpStatusCode() == 304)) {
HashMap<CachedResource*, InitiatorInfo>::iterator initiatorIt = m_initiatorMap.find(resource);
if (initiatorIt != m_initiatorMap.end()) {
ASSERT(document());
@@ -990,9 +984,6 @@
m_initiatorMap.remove(initiatorIt);
}
}
-#else
- UNUSED_PARAM(resource);
-#endif // ENABLE(RESOURCE_TIMING)
if (frame())
frame()->loader().loadDone();
Modified: trunk/Source/WebCore/loader/cache/CachedResourceLoader.h (200319 => 200320)
--- trunk/Source/WebCore/loader/cache/CachedResourceLoader.h 2016-05-02 08:09:21 UTC (rev 200319)
+++ trunk/Source/WebCore/loader/cache/CachedResourceLoader.h 2016-05-02 08:21:50 UTC (rev 200320)
@@ -144,9 +144,7 @@
CachedResourceHandle<CachedResource> requestResource(CachedResource::Type, CachedResourceRequest&);
CachedResourceHandle<CachedResource> revalidateResource(const CachedResourceRequest&, CachedResource*);
CachedResourceHandle<CachedResource> loadResource(CachedResource::Type, CachedResourceRequest&);
-#if ENABLE(RESOURCE_TIMING)
void storeResourceTimingInitiatorInformation(const CachedResourceHandle<CachedResource>&, const CachedResourceRequest&);
-#endif
void requestPreload(CachedResource::Type, CachedResourceRequest&, const String& charset);
enum RevalidationPolicy { Use, Revalidate, Reload, Load };
@@ -179,13 +177,11 @@
Timer m_garbageCollectDocumentResourcesTimer;
-#if ENABLE(RESOURCE_TIMING)
struct InitiatorInfo {
AtomicString name;
double startTime;
};
HashMap<CachedResource*, InitiatorInfo> m_initiatorMap;
-#endif
// 29 bits left
bool m_autoLoadImages : 1;
Modified: trunk/Source/WebCore/page/Performance.cpp (200319 => 200320)
--- trunk/Source/WebCore/page/Performance.cpp 2016-05-02 08:09:21 UTC (rev 200319)
+++ trunk/Source/WebCore/page/Performance.cpp 2016-05-02 08:21:50 UTC (rev 200320)
@@ -47,15 +47,11 @@
namespace WebCore {
-#if ENABLE(RESOURCE_TIMING)
static const size_t defaultResourceTimingBufferSize = 150;
-#endif
Performance::Performance(Frame& frame)
: DOMWindowProperty(&frame)
-#if ENABLE(RESOURCE_TIMING)
, m_resourceTimingBufferSize(defaultResourceTimingBufferSize)
-#endif // ENABLE(RESOURCE_TIMING)
, m_referenceTime(frame.document()->loader() ? frame.document()->loader()->timing().referenceMonotonicTime() : monotonicallyIncreasingTime())
#if ENABLE(USER_TIMING)
, m_userTiming(nullptr)
@@ -91,14 +87,11 @@
return m_timing.get();
}
-#if ENABLE(PERFORMANCE_TIMELINE)
-PassRefPtr<PerformanceEntryList> Performance::webkitGetEntries() const
+RefPtr<PerformanceEntryList> Performance::getEntries() const
{
RefPtr<PerformanceEntryList> entries = PerformanceEntryList::create();
-#if ENABLE(RESOURCE_TIMING)
entries->appendAll(m_resourceTimingBuffer);
-#endif // ENABLE(RESOURCE_TIMING)
#if ENABLE(USER_TIMING)
if (m_userTiming) {
@@ -111,16 +104,14 @@
return entries;
}
-PassRefPtr<PerformanceEntryList> Performance::webkitGetEntriesByType(const String& entryType)
+RefPtr<PerformanceEntryList> Performance::getEntriesByType(const String& entryType)
{
RefPtr<PerformanceEntryList> entries = PerformanceEntryList::create();
-#if ENABLE(RESOURCE_TIMING)
if (equalLettersIgnoringASCIICase(entryType, "resource")) {
for (auto& resource : m_resourceTimingBuffer)
entries->append(resource);
}
-#endif
#if ENABLE(USER_TIMING)
if (m_userTiming) {
@@ -135,18 +126,16 @@
return entries;
}
-PassRefPtr<PerformanceEntryList> Performance::webkitGetEntriesByName(const String& name, const String& entryType)
+RefPtr<PerformanceEntryList> Performance::getEntriesByName(const String& name, const String& entryType)
{
RefPtr<PerformanceEntryList> entries = PerformanceEntryList::create();
-#if ENABLE(RESOURCE_TIMING)
if (entryType.isNull() || equalLettersIgnoringASCIICase(entryType, "resource")) {
for (auto& resource : m_resourceTimingBuffer) {
if (resource->name() == name)
entries->append(resource);
}
}
-#endif
#if ENABLE(USER_TIMING)
if (m_userTiming) {
@@ -161,20 +150,16 @@
return entries;
}
-#endif // ENABLE(PERFORMANCE_TIMELINE)
-
-#if ENABLE(RESOURCE_TIMING)
-
-void Performance::webkitClearResourceTimings()
+void Performance::clearResourceTimings()
{
m_resourceTimingBuffer.clear();
}
-void Performance::webkitSetResourceTimingBufferSize(unsigned size)
+void Performance::setResourceTimingBufferSize(unsigned size)
{
m_resourceTimingBufferSize = size;
if (isResourceTimingBufferFull())
- dispatchEvent(Event::create(eventNames().webkitresourcetimingbufferfullEvent, false, false));
+ dispatchEvent(Event::create(eventNames().resourcetimingbufferfullEvent, false, false));
}
void Performance::addResourceTiming(const String& initiatorName, Document* initiatorDocument, const ResourceRequest& request, const ResourceResponse& response, double initiationTime, double finishTime)
@@ -187,7 +172,7 @@
m_resourceTimingBuffer.append(entry);
if (isResourceTimingBufferFull())
- dispatchEvent(Event::create(eventNames().webkitresourcetimingbufferfullEvent, false, false));
+ dispatchEvent(Event::create(eventNames().resourcetimingbufferfullEvent, false, false));
}
bool Performance::isResourceTimingBufferFull()
@@ -195,8 +180,6 @@
return m_resourceTimingBuffer.size() >= m_resourceTimingBufferSize;
}
-#endif // ENABLE(RESOURCE_TIMING)
-
#if ENABLE(USER_TIMING)
void Performance::webkitMark(const String& markName, ExceptionCode& ec)
{
Modified: trunk/Source/WebCore/page/Performance.h (200319 => 200320)
--- trunk/Source/WebCore/page/Performance.h 2016-05-02 08:09:21 UTC (rev 200319)
+++ trunk/Source/WebCore/page/Performance.h 2016-05-02 08:21:50 UTC (rev 200320)
@@ -40,7 +40,6 @@
#include "PerformanceNavigation.h"
#include "PerformanceTiming.h"
#include "ScriptWrappable.h"
-#include <wtf/PassRefPtr.h>
#include <wtf/RefCounted.h>
#include <wtf/RefPtr.h>
#include <wtf/text/WTFString.h>
@@ -64,18 +63,14 @@
PerformanceTiming* timing() const;
double now() const;
-#if ENABLE(PERFORMANCE_TIMELINE)
- PassRefPtr<PerformanceEntryList> webkitGetEntries() const;
- PassRefPtr<PerformanceEntryList> webkitGetEntriesByType(const String& entryType);
- PassRefPtr<PerformanceEntryList> webkitGetEntriesByName(const String& name, const String& entryType);
-#endif
+ RefPtr<PerformanceEntryList> getEntries() const;
+ RefPtr<PerformanceEntryList> getEntriesByType(const String& entryType);
+ RefPtr<PerformanceEntryList> getEntriesByName(const String& name, const String& entryType);
-#if ENABLE(RESOURCE_TIMING)
- void webkitClearResourceTimings();
- void webkitSetResourceTimingBufferSize(unsigned int);
+ void clearResourceTimings();
+ void setResourceTimingBufferSize(unsigned);
void addResourceTiming(const String& initiatorName, Document*, const ResourceRequest&, const ResourceResponse&, double initiationTime, double finishTime);
-#endif
using RefCounted<Performance>::ref;
using RefCounted<Performance>::deref;
@@ -97,11 +92,9 @@
mutable RefPtr<PerformanceNavigation> m_navigation;
mutable RefPtr<PerformanceTiming> m_timing;
-
-#if ENABLE(RESOURCE_TIMING)
+
Vector<RefPtr<PerformanceEntry>> m_resourceTimingBuffer;
unsigned m_resourceTimingBufferSize;
-#endif
double m_referenceTime;
Modified: trunk/Source/WebCore/page/Performance.idl (200319 => 200320)
--- trunk/Source/WebCore/page/Performance.idl 2016-05-02 08:09:21 UTC (rev 200319)
+++ trunk/Source/WebCore/page/Performance.idl 2016-05-02 08:21:50 UTC (rev 200320)
@@ -36,19 +36,16 @@
readonly attribute PerformanceNavigation navigation;
readonly attribute PerformanceTiming timing;
-#if defined(ENABLE_PERFORMANCE_TIMELINE) && ENABLE_PERFORMANCE_TIMELINE
- PerformanceEntryList webkitGetEntries();
- PerformanceEntryList webkitGetEntriesByType(DOMString entryType);
- PerformanceEntryList webkitGetEntriesByName(DOMString name, optional DOMString entryType);
-#endif
+ [EnabledAtRuntime=ResourceTiming] PerformanceEntryList getEntries();
+ [EnabledAtRuntime=ResourceTiming] PerformanceEntryList getEntriesByType(DOMString entryType);
+ [EnabledAtRuntime=ResourceTiming] PerformanceEntryList getEntriesByName(DOMString name, optional DOMString entryType);
-#if defined(ENABLE_RESOURCE_TIMING) && ENABLE_RESOURCE_TIMING
- void webkitClearResourceTimings();
- void webkitSetResourceTimingBufferSize(unsigned long maxSize);
- attribute EventHandler onwebkitresourcetimingbufferfull;
-#endif
+ [EnabledAtRuntime=ResourceTiming] void clearResourceTimings();
+ [EnabledAtRuntime=ResourceTiming] void setResourceTimingBufferSize(unsigned long maxSize);
+ [EnabledAtRuntime=ResourceTiming] attribute EventHandler onresourcetimingbufferfull;
+
// See http://www.w3.org/TR/2012/CR-user-timing-20120726/
#if defined(ENABLE_USER_TIMING) && ENABLE_USER_TIMING
[RaisesException] void webkitMark(DOMString markName);
Modified: trunk/Source/WebCore/page/PerformanceEntry.cpp (200319 => 200320)
--- trunk/Source/WebCore/page/PerformanceEntry.cpp 2016-05-02 08:09:21 UTC (rev 200319)
+++ trunk/Source/WebCore/page/PerformanceEntry.cpp 2016-05-02 08:21:50 UTC (rev 200320)
@@ -31,7 +31,7 @@
#include "config.h"
#include "PerformanceEntry.h"
-#if ENABLE(WEB_TIMING) && ENABLE(PERFORMANCE_TIMELINE)
+#if ENABLE(WEB_TIMING)
namespace WebCore {
@@ -69,4 +69,4 @@
} // namespace WebCore
-#endif // ENABLE(WEB_TIMING) && ENABLE(PERFORMANCE_TIMELINE)
+#endif // ENABLE(WEB_TIMING)
Modified: trunk/Source/WebCore/page/PerformanceEntry.h (200319 => 200320)
--- trunk/Source/WebCore/page/PerformanceEntry.h 2016-05-02 08:09:21 UTC (rev 200319)
+++ trunk/Source/WebCore/page/PerformanceEntry.h 2016-05-02 08:21:50 UTC (rev 200320)
@@ -32,7 +32,7 @@
#ifndef PerformanceEntry_h
#define PerformanceEntry_h
-#if ENABLE(WEB_TIMING) && ENABLE(PERFORMANCE_TIMELINE)
+#if ENABLE(WEB_TIMING)
#include "Performance.h"
#include <wtf/PassRefPtr.h>
@@ -72,5 +72,5 @@
}
-#endif // !ENABLE(WEB_TIMING) && ENABLE(PERFORMANCE_TIMELINE)
+#endif // ENABLE(WEB_TIMING)
#endif // !defined(PerformanceEntry_h)
Modified: trunk/Source/WebCore/page/PerformanceEntry.idl (200319 => 200320)
--- trunk/Source/WebCore/page/PerformanceEntry.idl 2016-05-02 08:09:21 UTC (rev 200319)
+++ trunk/Source/WebCore/page/PerformanceEntry.idl 2016-05-02 08:21:50 UTC (rev 200320)
@@ -31,7 +31,7 @@
// See: https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/PerformanceTimeline/Overview.html
[
Conditional=WEB_TIMING,
- Conditional=PERFORMANCE_TIMELINE,
+ EnabledAtRuntime=ResourceTiming,
CustomToJSObject,
] interface PerformanceEntry {
readonly attribute DOMString name;
Modified: trunk/Source/WebCore/page/PerformanceEntryList.cpp (200319 => 200320)
--- trunk/Source/WebCore/page/PerformanceEntryList.cpp 2016-05-02 08:09:21 UTC (rev 200319)
+++ trunk/Source/WebCore/page/PerformanceEntryList.cpp 2016-05-02 08:21:50 UTC (rev 200320)
@@ -32,7 +32,7 @@
#include "config.h"
#include "PerformanceEntryList.h"
-#if ENABLE(WEB_TIMING) && ENABLE(PERFORMANCE_TIMELINE)
+#if ENABLE(WEB_TIMING)
#include "PerformanceEntry.h"
@@ -75,4 +75,4 @@
} // namespace WebCore
-#endif // ENABLE(WEB_TIMING) && ENABLE(PERFORMANCE_TIMELINE)
+#endif // ENABLE(WEB_TIMING)
Modified: trunk/Source/WebCore/page/PerformanceEntryList.h (200319 => 200320)
--- trunk/Source/WebCore/page/PerformanceEntryList.h 2016-05-02 08:09:21 UTC (rev 200319)
+++ trunk/Source/WebCore/page/PerformanceEntryList.h 2016-05-02 08:21:50 UTC (rev 200320)
@@ -32,7 +32,7 @@
#ifndef PerformanceEntryList_h
#define PerformanceEntryList_h
-#if ENABLE(WEB_TIMING) && ENABLE(PERFORMANCE_TIMELINE)
+#if ENABLE(WEB_TIMING)
#include <wtf/PassRefPtr.h>
#include <wtf/RefCounted.h>
@@ -64,5 +64,5 @@
} // namespace WebCore
-#endif // !ENABLE(WEB_TIMING) && ENABLE(PERFORMANCE_TIMELINE)
+#endif // ENABLE(WEB_TIMING)
#endif // PerformanceEntryList_h
Modified: trunk/Source/WebCore/page/PerformanceEntryList.idl (200319 => 200320)
--- trunk/Source/WebCore/page/PerformanceEntryList.idl 2016-05-02 08:09:21 UTC (rev 200319)
+++ trunk/Source/WebCore/page/PerformanceEntryList.idl 2016-05-02 08:21:50 UTC (rev 200320)
@@ -32,10 +32,9 @@
[
NoInterfaceObject,
Conditional=WEB_TIMING,
- Conditional=PERFORMANCE_TIMELINE,
+ EnabledAtRuntime=ResourceTiming,
ImplementationLacksVTable,
] interface PerformanceEntryList {
readonly attribute unsigned long length;
getter PerformanceEntry item(unsigned long index);
};
-
Modified: trunk/Source/WebCore/page/PerformanceResourceTiming.cpp (200319 => 200320)
--- trunk/Source/WebCore/page/PerformanceResourceTiming.cpp 2016-05-02 08:09:21 UTC (rev 200319)
+++ trunk/Source/WebCore/page/PerformanceResourceTiming.cpp 2016-05-02 08:21:50 UTC (rev 200320)
@@ -32,7 +32,7 @@
#include "config.h"
#include "PerformanceResourceTiming.h"
-#if ENABLE(RESOURCE_TIMING)
+#if ENABLE(WEB_TIMING)
#include "Document.h"
#include "DocumentLoadTiming.h"
@@ -199,5 +199,4 @@
}
} // namespace WebCore
-
-#endif // ENABLE(RESOURCE_TIMING)
+#endif // ENABLE(WEB_TIMING)
Modified: trunk/Source/WebCore/page/PerformanceResourceTiming.h (200319 => 200320)
--- trunk/Source/WebCore/page/PerformanceResourceTiming.h 2016-05-02 08:09:21 UTC (rev 200319)
+++ trunk/Source/WebCore/page/PerformanceResourceTiming.h 2016-05-02 08:21:50 UTC (rev 200320)
@@ -32,7 +32,7 @@
#ifndef PerformanceResourceTiming_h
#define PerformanceResourceTiming_h
-#if ENABLE(RESOURCE_TIMING)
+#if ENABLE(WEB_TIMING)
#include "PerformanceEntry.h"
#include "ResourceLoadTiming.h"
@@ -85,11 +85,9 @@
}
-
SPECIALIZE_TYPE_TRAITS_BEGIN(WebCore::PerformanceResourceTiming)
static bool isType(const WebCore::PerformanceEntry& entry) { return entry.isResource(); }
SPECIALIZE_TYPE_TRAITS_END()
-#endif // ENABLE(RESOURCE_TIMING)
-
+#endif // ENABLE(WEB_TIMING)
#endif // !defined(PerformanceResourceTiming_h)
Modified: trunk/Source/WebCore/page/PerformanceResourceTiming.idl (200319 => 200320)
--- trunk/Source/WebCore/page/PerformanceResourceTiming.idl 2016-05-02 08:09:21 UTC (rev 200319)
+++ trunk/Source/WebCore/page/PerformanceResourceTiming.idl 2016-05-02 08:21:50 UTC (rev 200320)
@@ -30,7 +30,8 @@
// See: https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/ResourceTiming/Overview.html
[
- Conditional=RESOURCE_TIMING,
+ Conditional=WEB_TIMING,
+ EnabledAtRuntime=ResourceTiming
] interface PerformanceResourceTiming : PerformanceEntry {
readonly attribute DOMString initiatorType;
Modified: trunk/Source/WebCore/testing/Internals.cpp (200319 => 200320)
--- trunk/Source/WebCore/testing/Internals.cpp 2016-05-02 08:09:21 UTC (rev 200319)
+++ trunk/Source/WebCore/testing/Internals.cpp 2016-05-02 08:21:50 UTC (rev 200320)
@@ -3316,4 +3316,9 @@
}
#endif
+void Internals::setResourceTimingSupport(bool enable)
+{
+ RuntimeEnabledFeatures::sharedFeatures().setResourceTimingEnabled(enable);
}
+
+}
Modified: trunk/Source/WebCore/testing/Internals.h (200319 => 200320)
--- trunk/Source/WebCore/testing/Internals.h 2016-05-02 08:09:21 UTC (rev 200319)
+++ trunk/Source/WebCore/testing/Internals.h 2016-05-02 08:21:50 UTC (rev 200320)
@@ -473,6 +473,7 @@
void setViewportForceAlwaysUserScalable(bool);
void setLinkPreloadSupport(bool);
+ void setResourceTimingSupport(bool);
#if ENABLE(CSS_GRID_LAYOUT)
void setCSSGridLayoutEnabled(bool);
Modified: trunk/Source/WebCore/testing/Internals.idl (200319 => 200320)
--- trunk/Source/WebCore/testing/Internals.idl 2016-05-02 08:09:21 UTC (rev 200319)
+++ trunk/Source/WebCore/testing/Internals.idl 2016-05-02 08:21:50 UTC (rev 200320)
@@ -453,4 +453,5 @@
void setCSSGridLayoutEnabled(boolean enable);
#endif
+ void setResourceTimingSupport(boolean scalable);
};
Modified: trunk/Source/cmake/WebKitFeatures.cmake (200319 => 200320)
--- trunk/Source/cmake/WebKitFeatures.cmake 2016-05-02 08:09:21 UTC (rev 200319)
+++ trunk/Source/cmake/WebKitFeatures.cmake 2016-05-02 08:21:50 UTC (rev 200320)
@@ -158,7 +158,6 @@
WEBKIT_OPTION_DEFINE(ENABLE_NOTIFICATIONS "Toggle Desktop Notifications Support" PRIVATE OFF)
WEBKIT_OPTION_DEFINE(ENABLE_ORIENTATION_EVENTS "Toggle Orientation Events support" PRIVATE OFF)
WEBKIT_OPTION_DEFINE(ENABLE_PDFKIT_PLUGIN "Toggle PDFKit plugin support" PRIVATE OFF)
- WEBKIT_OPTION_DEFINE(ENABLE_PERFORMANCE_TIMELINE "Toggle Performance Timeline support" PRIVATE OFF)
WEBKIT_OPTION_DEFINE(ENABLE_POINTER_LOCK "Toggle pointer lock support" PRIVATE OFF)
WEBKIT_OPTION_DEFINE(ENABLE_PROXIMITY_EVENTS "Toggle Proximity Events support" PRIVATE OFF)
WEBKIT_OPTION_DEFINE(ENABLE_PUBLIC_SUFFIX_LIST "Toggle public suffix list support" PRIVATE OFF)