Changeset 200232 in webkit
- Timestamp:
- Apr 29, 2016 12:33:02 AM (8 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 32 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/ChangeLog
r200186 r200232 1 2016-04-29 Yoav Weiss <yoav@yoav.ws> 2 3 Move ResourceTiming behind a runtime flag 4 https://bugs.webkit.org/show_bug.cgi?id=157133 5 6 Reviewed by Alex Christensen. 7 8 * Source/cmake/WebKitFeatures.cmake: Remove the PERFORMANCE_TIMELINE build flag. 9 1 10 2016-04-28 Commit Queue <commit-queue@webkit.org> 2 11 -
trunk/LayoutTests/ChangeLog
r200231 r200232 1 2016-04-29 Yoav Weiss <yoav@yoav.ws> 2 3 Move ResourceTiming behind a runtime flag 4 https://bugs.webkit.org/show_bug.cgi?id=157133 5 6 Reviewed by Alex Christensen. 7 8 Added tests that make sure ResourceTiming APIs are exposed and that resources 9 show up as entries in the performance timeline. 10 11 * fast/dom/Window/window-properties-performance-resource-timing-expected.txt: Added. 12 * fast/dom/Window/window-properties-performance-resource-timing.html: Added. 13 * fast/dom/Window/window-properties-performance.html: Removed "//;". 14 * http/tests/performance/performance-resource-timing-entries-expected.txt: Added. 15 * http/tests/performance/performance-resource-timing-entries.html: Added. 16 1 17 2016-04-29 Youenn Fablet <youenn.fablet@crf.canon.fr> 2 18 -
trunk/LayoutTests/fast/dom/Window/window-properties-performance-resource-timing.html
r200231 r200232 6 6 if (window.testRunner) 7 7 testRunner.dumpAsText(); 8 9 if (window.internals) 10 internals.setResourceTimingSupport(true); 8 11 9 12 var logBuffer = []; … … 31 34 function typeOfNullAware(value) 32 35 { 33 if (typeof value == "object" && value == null) //;36 if (typeof value == "object" && value == null) 34 37 return "null"; 35 38 return typeof value; … … 62 65 63 66 // Avoid infinite recursion 64 if (valueType == "object" && value.__visitedByLogValue__) { //;67 if (valueType == "object" && value.__visitedByLogValue__) { 65 68 log(valueName + " [printed above as " + value.__nameWhenVisitedByLogValue__ + "]\n"); 66 69 return; … … 97 100 logValue('window.performance'); 98 101 flushLog(); 102 if (window.internals) 103 internals.setResourceTimingSupport(false); 99 104 </script> -
trunk/LayoutTests/fast/dom/Window/window-properties-performance.html
r120792 r200232 31 31 function typeOfNullAware(value) 32 32 { 33 if (typeof value == "object" && value == null) //;33 if (typeof value == "object" && value == null) 34 34 return "null"; 35 35 return typeof value; … … 62 62 63 63 // Avoid infinite recursion 64 if (valueType == "object" && value.__visitedByLogValue__) { //;64 if (valueType == "object" && value.__visitedByLogValue__) { 65 65 log(valueName + " [printed above as " + value.__nameWhenVisitedByLogValue__ + "]\n"); 66 66 return; -
trunk/Source/JavaScriptCore/ChangeLog
r200218 r200232 1 2016-04-29 Yoav Weiss <yoav@yoav.ws> 2 3 Move ResourceTiming behind a runtime flag 4 https://bugs.webkit.org/show_bug.cgi?id=157133 5 6 Reviewed by Alex Christensen. 7 8 * runtime/CommonIdentifiers.h: Added PerformanceEntry, PerformanceEntryList and PerformanceResourceTiming as property names. 9 1 10 2016-04-28 Joseph Pecoraro <pecoraro@apple.com> 2 11 -
trunk/Source/JavaScriptCore/runtime/CommonIdentifiers.h
r200149 r200232 72 72 macro(NumberFormat) \ 73 73 macro(Object) \ 74 macro(PerformanceEntry) \ 75 macro(PerformanceEntryList) \ 76 macro(PerformanceResourceTiming) \ 74 77 macro(Promise) \ 75 78 macro(Proxy) \ -
trunk/Source/WebCore/ChangeLog
r200231 r200232 1 2016-04-29 Yoav Weiss <yoav@yoav.ws> 2 3 Move ResourceTiming behind a runtime flag 4 https://bugs.webkit.org/show_bug.cgi?id=157133 5 6 Reviewed by Alex Christensen. 7 8 Move the ResourceTiming API from being behind a build time flag to be behind an 9 off-by-default runtime flag, that can be turned on using internals. 10 11 Tests: fast/dom/Window/window-properties-performance-resource-timing.html 12 http/tests/performance/performance-resource-timing-entries.html 13 14 * DerivedSources.make: Added idl files for PerformanceEntry, PerformanceEntryList and PerformanceResourceTiming. 15 * WebCore.xcodeproj/project.pbxproj: Added the various Performance* files to the project. 16 * bindings/generic/RuntimeEnabledFeatures.cpp: Added ResourceTiming as a runtime flag. 17 (WebCore::RuntimeEnabledFeatures::RuntimeEnabledFeatures): 18 * bindings/generic/RuntimeEnabledFeatures.h: Added ResourceTiming as a runtime flag. 19 (WebCore::RuntimeEnabledFeatures::setResourceTimingEnabled): 20 (WebCore::RuntimeEnabledFeatures::resourceTimingEnabled): 21 * bindings/js/JSPerformanceEntryCustom.cpp: Removed #if for ResourceTiming. Added build flag around UserTiming related h files. 22 (WebCore::toJS): Deleted. 23 * dom/EventNames.h: Renamed webkitresourcetimingbufferfull to resourcetimingbufferfull. 24 * loader/DocumentThreadableLoader.cpp: Replace #if for ResourceTiming with runtime flag. 25 (WebCore::DocumentThreadableLoader::loadRequest): 26 * loader/ResourceLoadNotifier.cpp: Replace #if for ResourceTiming with runtime flag. 27 (WebCore::ResourceLoadNotifier::dispatchWillSendRequest): 28 * loader/cache/CachedResourceLoader.cpp: Replace #if for ResourceTiming with runtime flag. 29 (WebCore::CachedResourceLoader::revalidateResource): 30 (WebCore::CachedResourceLoader::loadResource): 31 (WebCore::CachedResourceLoader::storeResourceTimingInitiatorInformation): 32 (WebCore::CachedResourceLoader::loadDone): 33 * loader/cache/CachedResourceLoader.h: Remove #if for ResourceTiming. 34 * page/Performance.cpp: Remove #if for ResourceTiming. 35 (WebCore::Performance::Performance): Removed #if for ResourceTiming related initialization. 36 (WebCore::Performance::webkitGetEntries): Renamed to getEntries. 37 (WebCore::Performance::webkitGetEntriesByType): Renamed to getEntriesByType. 38 (WebCore::Performance::webkitGetEntriesByName): Renamed to getEntriesByName. 39 * page/Performance.h: Remove #if for ResourceTiming. 40 * page/Performance.idl: Replace #if for ResourceTiming with runtime flag. 41 * page/PerformanceEntry.cpp: Remove the PERFORMANCE_TIMELINE build flag. 42 * page/PerformanceEntry.h: Remove the PERFORMANCE_TIMELINE build flag. 43 * page/PerformanceEntry.idl: Replace the PERFORMANCE_TIMELINE build flag with runtime flag. 44 * page/PerformanceEntryList.cpp: Remove the PERFORMANCE_TIMELINE build flag. 45 * page/PerformanceEntryList.h: Remove the PERFORMANCE_TIMELINE build flag. 46 * page/PerformanceEntryList.idl: Replace the PERFORMANCE_TIMELINE build flag with runtime flag. 47 * page/PerformanceResourceTiming.cpp: Remove the RESOURCE_TIMING build flag. 48 * page/PerformanceResourceTiming.h: Remove the RESOURCE_TIMING build flag. 49 * page/PerformanceResourceTiming.idl: Replace the RESOURCE_TIMING build flag with runtime flag. 50 * testing/Internals.cpp: Add a method that enables ResourceTiming. 51 (WebCore::Internals::setResourceTimingSupport): 52 * testing/Internals.h: Add a method that enables ResourceTiming. 53 * testing/Internals.idl: Add a method that enables ResourceTiming. 54 1 55 2016-04-29 Youenn Fablet <youenn.fablet@crf.canon.fr> 2 56 -
trunk/Source/WebCore/DerivedSources.make
r199668 r200232 519 519 $(WebCore)/page/Navigator.idl \ 520 520 $(WebCore)/page/Performance.idl \ 521 $(WebCore)/page/PerformanceEntry.idl \ 522 $(WebCore)/page/PerformanceEntryList.idl \ 521 523 $(WebCore)/page/PerformanceNavigation.idl \ 524 $(WebCore)/page/PerformanceResourceTiming.idl \ 522 525 $(WebCore)/page/PerformanceTiming.idl \ 523 526 $(WebCore)/page/Screen.idl \ -
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
r200144 r200232 5992 5992 CAE9F90F146441F000C245B0 /* CSSAspectRatioValue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CAE9F90D146441F000C245B0 /* CSSAspectRatioValue.cpp */; }; 5993 5993 CAE9F910146441F000C245B0 /* CSSAspectRatioValue.h in Headers */ = {isa = PBXBuildFile; fileRef = CAE9F90E146441F000C245B0 /* CSSAspectRatioValue.h */; }; 5994 CB38FD4B1CCCF36600592A3F /* PerformanceEntry.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CB38FD4A1CCCF2DD00592A3F /* PerformanceEntry.cpp */; }; 5995 CB38FD511CCF938900592A3F /* JSPerformanceEntry.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CB38FD4D1CCF937E00592A3F /* JSPerformanceEntry.cpp */; }; 5996 CB38FD521CCF939400592A3F /* JSPerformanceEntry.h in Headers */ = {isa = PBXBuildFile; fileRef = CB38FD4E1CCF937E00592A3F /* JSPerformanceEntry.h */; }; 5997 CB38FD531CCF939B00592A3F /* JSPerformanceEntryList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CB38FD4F1CCF937E00592A3F /* JSPerformanceEntryList.cpp */; }; 5998 CB38FD541CCF939E00592A3F /* JSPerformanceEntryList.h in Headers */ = {isa = PBXBuildFile; fileRef = CB38FD501CCF937E00592A3F /* JSPerformanceEntryList.h */; }; 5999 CB38FD571CD21E2A00592A3F /* JSPerformanceEntryCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CB38FD551CD21D5B00592A3F /* JSPerformanceEntryCustom.cpp */; }; 6000 CB38FD5A1CD2325800592A3F /* JSPerformanceResourceTiming.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CB38FD581CD2314500592A3F /* JSPerformanceResourceTiming.cpp */; }; 6001 CB38FD5B1CD2325B00592A3F /* JSPerformanceResourceTiming.h in Headers */ = {isa = PBXBuildFile; fileRef = CB38FD591CD2314500592A3F /* JSPerformanceResourceTiming.h */; }; 5994 6002 CB8CF0181A9358D4000D510B /* Microtasks.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CB8CF0151A934B43000D510B /* Microtasks.cpp */; }; 5995 6003 CCC2B51415F613060048CDD6 /* DeviceClient.h in Headers */ = {isa = PBXBuildFile; fileRef = CCC2B51015F613060048CDD6 /* DeviceClient.h */; settings = {ATTRIBUTES = (Private, ); }; }; … … 13957 13965 CAE9F90D146441F000C245B0 /* CSSAspectRatioValue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CSSAspectRatioValue.cpp; sourceTree = "<group>"; }; 13958 13966 CAE9F90E146441F000C245B0 /* CSSAspectRatioValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CSSAspectRatioValue.h; sourceTree = "<group>"; }; 13967 CB38FD4A1CCCF2DD00592A3F /* PerformanceEntry.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PerformanceEntry.cpp; sourceTree = "<group>"; }; 13968 CB38FD4D1CCF937E00592A3F /* JSPerformanceEntry.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.cpp; fileEncoding = 4; path = JSPerformanceEntry.cpp; sourceTree = "<group>"; }; 13969 CB38FD4E1CCF937E00592A3F /* JSPerformanceEntry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSPerformanceEntry.h; sourceTree = "<group>"; }; 13970 CB38FD4F1CCF937E00592A3F /* JSPerformanceEntryList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSPerformanceEntryList.cpp; sourceTree = "<group>"; }; 13971 CB38FD501CCF937E00592A3F /* JSPerformanceEntryList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = JSPerformanceEntryList.h; sourceTree = "<group>"; }; 13972 CB38FD551CD21D5B00592A3F /* JSPerformanceEntryCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSPerformanceEntryCustom.cpp; sourceTree = "<group>"; }; 13973 CB38FD581CD2314500592A3F /* JSPerformanceResourceTiming.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSPerformanceResourceTiming.cpp; sourceTree = "<group>"; }; 13974 CB38FD591CD2314500592A3F /* JSPerformanceResourceTiming.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSPerformanceResourceTiming.h; sourceTree = "<group>"; }; 13959 13975 CB8CF0151A934B43000D510B /* Microtasks.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Microtasks.cpp; sourceTree = "<group>"; }; 13960 13976 CCC2B51015F613060048CDD6 /* DeviceClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DeviceClient.h; sourceTree = "<group>"; }; … … 18059 18075 8A844D0311D3C18E0014065C /* Performance.idl */, 18060 18076 86BE33FB15058CB200CE0FD8 /* PerformanceEntry.h */, 18077 CB38FD4A1CCCF2DD00592A3F /* PerformanceEntry.cpp */, 18061 18078 86BE33FC15058CB200CE0FD8 /* PerformanceEntry.idl */, 18062 18079 86BE33FD15058CB200CE0FD8 /* PerformanceEntryList.cpp */, … … 22314 22331 7C91A38D1B498ABE003F9EFA /* JSNodeOrString.cpp */, 22315 22332 7C91A38E1B498ABE003F9EFA /* JSNodeOrString.h */, 22333 CB38FD551CD21D5B00592A3F /* JSPerformanceEntryCustom.cpp */, 22316 22334 93B70D4F09EB0C7C009D8468 /* JSPluginElementFunctions.cpp */, 22317 22335 93B70D5009EB0C7C009D8468 /* JSPluginElementFunctions.h */, … … 22650 22668 E51A81DE17298D7700BFCA61 /* JSPerformance.cpp */, 22651 22669 8A9A587311E84C81008ACFD1 /* JSPerformance.h */, 22670 CB38FD4D1CCF937E00592A3F /* JSPerformanceEntry.cpp */, 22671 CB38FD4E1CCF937E00592A3F /* JSPerformanceEntry.h */, 22672 CB38FD4F1CCF937E00592A3F /* JSPerformanceEntryList.cpp */, 22673 CB38FD501CCF937E00592A3F /* JSPerformanceEntryList.h */, 22652 22674 8A9A586E11E84C35008ACFD1 /* JSPerformanceNavigation.cpp */, 22653 22675 8A9A586F11E84C36008ACFD1 /* JSPerformanceNavigation.h */, 22676 CB38FD581CD2314500592A3F /* JSPerformanceResourceTiming.cpp */, 22677 CB38FD591CD2314500592A3F /* JSPerformanceResourceTiming.h */, 22654 22678 0F43C85E189E15A600019AE2 /* JSPerformanceTiming.cpp */, 22655 22679 8A9A587711E84C98008ACFD1 /* JSPerformanceTiming.h */, … … 25557 25581 2DE70023192FE82A00B0975C /* DisplayRefreshMonitorMac.h in Headers */, 25558 25582 2D29ECC8192ECC8300984B78 /* DisplayRefreshMonitorManager.h in Headers */, 25583 CB38FD521CCF939400592A3F /* JSPerformanceEntry.h in Headers */, 25559 25584 CD52481B18E200ED0008A07D /* DisplaySleepDisabler.h in Headers */, 25560 25585 5D8C4DC01428222C0026CE72 /* DisplaySleepDisablerCocoa.h in Headers */, … … 27692 27717 BE20507E18A458C20080647E /* RenderVTTCue.h in Headers */, 27693 27718 A871DFE40A15376B00B12A68 /* RenderWidget.h in Headers */, 27719 CB38FD5B1CD2325B00592A3F /* JSPerformanceResourceTiming.h in Headers */, 27694 27720 A89CCC530F44E98100B5DA10 /* ReplaceNodeWithSpanCommand.h in Headers */, 27695 27721 93309E0A099E64920056E581 /* ReplaceSelectionCommand.h in Headers */, … … 28021 28047 BC5EB5E50E81BF6D00B25965 /* StyleSurroundData.h in Headers */, 28022 28048 BC5EB8100E81F2CE00B25965 /* StyleTransformData.h in Headers */, 28049 CB38FD541CCF939E00592A3F /* JSPerformanceEntryList.h in Headers */, 28023 28050 E4DEAA1817A93DC3000E0430 /* StyleTreeResolver.h in Headers */, 28024 28051 BC5EB69A0E81DA6300B25965 /* StyleVisualData.h in Headers */, … … 29203 29230 43EDD67E1B485DBF00640E75 /* CombinedFiltersAlphabet.cpp in Sources */, 29204 29231 26E944D81AC4B2DD007B85B5 /* CombinedURLFilters.cpp in Sources */, 29232 CB38FD4B1CCCF36600592A3F /* PerformanceEntry.cpp in Sources */, 29205 29233 A584FE341864D5AF00843B10 /* CommandLineAPIHost.cpp in Sources */, 29206 29234 A584FE2B1863870F00843B10 /* CommandLineAPIModule.cpp in Sources */, … … 31221 31249 BCEA4865097D93020094C9E4 /* RenderButton.cpp in Sources */, 31222 31250 BCE4413312F748E2009B84B8 /* RenderCombineText.cpp in Sources */, 31251 CB38FD5A1CD2325800592A3F /* JSPerformanceResourceTiming.cpp in Sources */, 31223 31252 9392F1440AD185FE00691BD4 /* RenderCounter.cpp in Sources */, 31224 31253 BCEA486D097D93020094C9E4 /* RenderDeprecatedFlexibleBox.cpp in Sources */, … … 31997 32026 93F19B0708245E59001E9ABC /* WebCoreView.m in Sources */, 31998 32027 A5E616731894581F009ADF50 /* WebDebuggerAgent.cpp in Sources */, 32028 CB38FD571CD21E2A00592A3F /* JSPerformanceEntryCustom.cpp in Sources */, 31999 32029 FE0D84EB1048436E001A179E /* WebEvent.mm in Sources */, 32000 32030 225A16B60D5C11E900090295 /* WebEventRegion.mm in Sources */, … … 32076 32106 CD8203111395ACE700F956C6 /* WebWindowAnimation.mm in Sources */, 32077 32107 F55B3DDF1251F12D003EF269 /* WeekInputType.cpp in Sources */, 32108 CB38FD511CCF938900592A3F /* JSPerformanceEntry.cpp in Sources */, 32078 32109 85031B500A44EFC700F992E0 /* WheelEvent.cpp in Sources */, 32079 32110 2E19516B1B6598D200DF6EEF /* WheelEventDeltaFilter.cpp in Sources */, … … 32113 32144 00B9318B13BA8DC90035A948 /* XMLDocumentParserScope.cpp in Sources */, 32114 32145 59C28045138DC2410079B7E2 /* XMLErrors.cpp in Sources */, 32146 CB38FD531CCF939B00592A3F /* JSPerformanceEntryList.cpp in Sources */, 32115 32147 BC772C460C4EB2C60083285F /* XMLHttpRequest.cpp in Sources */, 32116 32148 A136A00C1134DBD200CC8D50 /* XMLHttpRequestProgressEventThrottle.cpp in Sources */, -
trunk/Source/WebCore/bindings/generic/RuntimeEnabledFeatures.cpp
r200215 r200232 60 60 , m_isPluginReplacementEnabled(false) 61 61 #endif 62 , m_isResourceTimingEnabled(false) 62 63 #if ENABLE(INDEXED_DATABASE) 63 64 , m_isIndexedDBEnabled(false) -
trunk/Source/WebCore/bindings/generic/RuntimeEnabledFeatures.h
r200215 r200232 202 202 bool pluginReplacementEnabled() const { return m_isPluginReplacementEnabled; } 203 203 204 void setResourceTimingEnabled(bool isEnabled) { m_isResourceTimingEnabled = isEnabled; } 205 bool resourceTimingEnabled() const { return m_isResourceTimingEnabled; } 206 204 207 #if ENABLE(GAMEPAD) 205 208 void setGamepadsEnabled(bool areEnabled) { m_areGamepadsEnabled = areEnabled; } … … 268 271 bool m_isLangAttributeAwareFormControlUIEnabled; 269 272 bool m_isPluginReplacementEnabled; 273 bool m_isResourceTimingEnabled; 270 274 271 275 #if ENABLE(INDEXED_DATABASE) -
trunk/Source/WebCore/bindings/js/JSPerformanceEntryCustom.cpp
r166128 r200232 31 31 #include "config.h" 32 32 33 #if ENABLE(PERFORMANCE_TIMELINE)34 35 33 #include "JSPerformanceEntry.h" 36 34 37 35 #include "JSDOMBinding.h" 36 #if ENABLE(USER_TIMING) 38 37 #include "JSPerformanceMark.h" 39 38 #include "JSPerformanceMeasure.h" 39 #endif 40 40 #include "JSPerformanceResourceTiming.h" 41 41 #include "PerformanceMark.h" … … 52 52 return jsNull(); 53 53 54 #if ENABLE(RESOURCE_TIMING)55 54 if (entry->isResource()) 56 55 return wrap<JSPerformanceResourceTiming>(globalObject, static_cast<PerformanceResourceTiming*>(entry)); 57 #endif58 56 59 57 #if ENABLE(USER_TIMING) … … 69 67 70 68 } // namespace WebCore 71 72 #endif // ENABLE(PERFORMANCE_TIMELINE) -
trunk/Source/WebCore/dom/EventNames.h
r198115 r200232 184 184 macro(reset) \ 185 185 macro(resize) \ 186 macro(resourcetimingbufferfull) \ 186 187 macro(result) \ 187 188 macro(resume) \ … … 262 263 macro(webkitregionoversetchange) \ 263 264 macro(webkitremovesourcebuffer) \ 264 macro(webkitresourcetimingbufferfull) \265 265 macro(webkitsourceclose) \ 266 266 macro(webkitsourceended) \ -
trunk/Source/WebCore/loader/DocumentThreadableLoader.cpp
r199612 r200232 46 46 #include "ResourceError.h" 47 47 #include "ResourceRequest.h" 48 #include "RuntimeEnabledFeatures.h" 48 49 #include "SchemeRegistry.h" 49 50 #include "SecurityOrigin.h" … … 386 387 387 388 CachedResourceRequest newRequest(request, options); 388 #if ENABLE(RESOURCE_TIMING) 389 newRequest.setInitiator(m_options.initiator); 390 #endif 389 if (RuntimeEnabledFeatures::sharedFeatures().resourceTimingEnabled()) 390 newRequest.setInitiator(m_options.initiator); 391 391 ASSERT(!m_resource); 392 392 m_resource = m_document.cachedResourceLoader().requestRawResource(newRequest); -
trunk/Source/WebCore/loader/ResourceLoadNotifier.cpp
r199840 r200232 40 40 #include "ProgressTracker.h" 41 41 #include "ResourceLoader.h" 42 #include "RuntimeEnabledFeatures.h" 42 43 43 44 #if USE(QUICK_LOOK) … … 147 148 request.setReportLoadTiming(true); 148 149 149 #if ENABLE(RESOURCE_TIMING) 150 request.setReportLoadTiming(true); 151 #endif 150 if (RuntimeEnabledFeatures::sharedFeatures().resourceTimingEnabled()) 151 request.setReportLoadTiming(true); 152 152 } 153 153 -
trunk/Source/WebCore/loader/cache/CachedResourceLoader.cpp
r199955 r200232 58 58 #include "MemoryCache.h" 59 59 #include "Page.h" 60 #include "Performance.h" 60 61 #include "PingLoader.h" 61 62 #include "PlatformStrategies.h" 62 63 #include "RenderElement.h" 63 64 #include "ResourceLoadInfo.h" 65 #include "RuntimeEnabledFeatures.h" 64 66 #include "ScriptController.h" 65 67 #include "SecurityOrigin.h" … … 74 76 #if ENABLE(VIDEO_TRACK) 75 77 #include "CachedTextTrack.h" 76 #endif77 78 #if ENABLE(RESOURCE_TIMING)79 #include "Performance.h"80 78 #endif 81 79 … … 672 670 memoryCache.remove(*resource); 673 671 memoryCache.add(*newResource); 674 #if ENABLE(RESOURCE_TIMING) 675 storeResourceTimingInitiatorInformation(resource, request); 676 #else 677 UNUSED_PARAM(request); 678 #endif 672 if (RuntimeEnabledFeatures::sharedFeatures().resourceTimingEnabled()) 673 storeResourceTimingInitiatorInformation(resource, request); 679 674 return newResource; 680 675 } … … 691 686 if (request.allowsCaching() && !memoryCache.add(*resource)) 692 687 resource->setOwningCachedResourceLoader(this); 693 #if ENABLE(RESOURCE_TIMING) 694 storeResourceTimingInitiatorInformation(resource, request); 695 #endif 688 if (RuntimeEnabledFeatures::sharedFeatures().resourceTimingEnabled()) 689 storeResourceTimingInitiatorInformation(resource, request); 696 690 return resource; 697 691 } 698 692 699 #if ENABLE(RESOURCE_TIMING)700 693 void CachedResourceLoader::storeResourceTimingInitiatorInformation(const CachedResourceHandle<CachedResource>& resource, const CachedResourceRequest& request) 701 694 { 695 ASSERT(RuntimeEnabledFeatures::sharedFeatures().resourceTimingEnabled()); 702 696 if (resource->type() == CachedResource::MainResource) { 703 697 // <iframe>s should report the initial navigation requested by the parent document, but not subsequent navigations. … … 711 705 } 712 706 } 713 #endif // ENABLE(RESOURCE_TIMING)714 707 715 708 static void logRevalidation(const String& reason, DiagnosticLoggingClient& logClient) … … 977 970 RefPtr<Document> protectDocument(m_document); 978 971 979 #if ENABLE(RESOURCE_TIMING) 980 if (resource && resource->response().isHTTP() && ((!resource->errorOccurred() && !resource->wasCanceled()) || resource->response().httpStatusCode() == 304)) { 972 if (RuntimeEnabledFeatures::sharedFeatures().resourceTimingEnabled() 973 && resource && resource->response().isHTTP() 974 && ((!resource->errorOccurred() && !resource->wasCanceled()) || resource->response().httpStatusCode() == 304)) { 981 975 HashMap<CachedResource*, InitiatorInfo>::iterator initiatorIt = m_initiatorMap.find(resource); 982 976 if (initiatorIt != m_initiatorMap.end()) { … … 991 985 } 992 986 } 993 #else994 UNUSED_PARAM(resource);995 #endif // ENABLE(RESOURCE_TIMING)996 987 997 988 if (frame()) -
trunk/Source/WebCore/loader/cache/CachedResourceLoader.h
r199612 r200232 145 145 CachedResourceHandle<CachedResource> revalidateResource(const CachedResourceRequest&, CachedResource*); 146 146 CachedResourceHandle<CachedResource> loadResource(CachedResource::Type, CachedResourceRequest&); 147 #if ENABLE(RESOURCE_TIMING)148 147 void storeResourceTimingInitiatorInformation(const CachedResourceHandle<CachedResource>&, const CachedResourceRequest&); 149 #endif150 148 void requestPreload(CachedResource::Type, CachedResourceRequest&, const String& charset); 151 149 … … 180 178 Timer m_garbageCollectDocumentResourcesTimer; 181 179 182 #if ENABLE(RESOURCE_TIMING)183 180 struct InitiatorInfo { 184 181 AtomicString name; … … 186 183 }; 187 184 HashMap<CachedResource*, InitiatorInfo> m_initiatorMap; 188 #endif189 185 190 186 // 29 bits left -
trunk/Source/WebCore/page/Performance.cpp
r195743 r200232 48 48 namespace WebCore { 49 49 50 #if ENABLE(RESOURCE_TIMING)51 50 static const size_t defaultResourceTimingBufferSize = 150; 52 #endif53 51 54 52 Performance::Performance(Frame& frame) 55 53 : DOMWindowProperty(&frame) 56 #if ENABLE(RESOURCE_TIMING)57 54 , m_resourceTimingBufferSize(defaultResourceTimingBufferSize) 58 #endif // ENABLE(RESOURCE_TIMING)59 55 , m_referenceTime(frame.document()->loader() ? frame.document()->loader()->timing().referenceMonotonicTime() : monotonicallyIncreasingTime()) 60 56 #if ENABLE(USER_TIMING) … … 92 88 } 93 89 94 #if ENABLE(PERFORMANCE_TIMELINE) 95 PassRefPtr<PerformanceEntryList> Performance::webkitGetEntries() const 90 RefPtr<PerformanceEntryList> Performance::getEntries() const 96 91 { 97 92 RefPtr<PerformanceEntryList> entries = PerformanceEntryList::create(); 98 93 99 #if ENABLE(RESOURCE_TIMING)100 94 entries->appendAll(m_resourceTimingBuffer); 101 #endif // ENABLE(RESOURCE_TIMING)102 95 103 96 #if ENABLE(USER_TIMING) … … 112 105 } 113 106 114 PassRefPtr<PerformanceEntryList> Performance::webkitGetEntriesByType(const String& entryType)107 RefPtr<PerformanceEntryList> Performance::getEntriesByType(const String& entryType) 115 108 { 116 109 RefPtr<PerformanceEntryList> entries = PerformanceEntryList::create(); 117 110 118 #if ENABLE(RESOURCE_TIMING)119 111 if (equalLettersIgnoringASCIICase(entryType, "resource")) { 120 112 for (auto& resource : m_resourceTimingBuffer) 121 113 entries->append(resource); 122 114 } 123 #endif124 115 125 116 #if ENABLE(USER_TIMING) … … 136 127 } 137 128 138 PassRefPtr<PerformanceEntryList> Performance::webkitGetEntriesByName(const String& name, const String& entryType)129 RefPtr<PerformanceEntryList> Performance::getEntriesByName(const String& name, const String& entryType) 139 130 { 140 131 RefPtr<PerformanceEntryList> entries = PerformanceEntryList::create(); 141 132 142 #if ENABLE(RESOURCE_TIMING)143 133 if (entryType.isNull() || equalLettersIgnoringASCIICase(entryType, "resource")) { 144 134 for (auto& resource : m_resourceTimingBuffer) { … … 147 137 } 148 138 } 149 #endif150 139 151 140 #if ENABLE(USER_TIMING) … … 162 151 } 163 152 164 #endif // ENABLE(PERFORMANCE_TIMELINE) 165 166 #if ENABLE(RESOURCE_TIMING) 167 168 void Performance::webkitClearResourceTimings() 153 void Performance::clearResourceTimings() 169 154 { 170 155 m_resourceTimingBuffer.clear(); 171 156 } 172 157 173 void Performance:: webkitSetResourceTimingBufferSize(unsigned size)158 void Performance::setResourceTimingBufferSize(unsigned size) 174 159 { 175 160 m_resourceTimingBufferSize = size; 176 161 if (isResourceTimingBufferFull()) 177 dispatchEvent(Event::create(eventNames(). webkitresourcetimingbufferfullEvent, false, false));162 dispatchEvent(Event::create(eventNames().resourcetimingbufferfullEvent, false, false)); 178 163 } 179 164 … … 188 173 189 174 if (isResourceTimingBufferFull()) 190 dispatchEvent(Event::create(eventNames(). webkitresourcetimingbufferfullEvent, false, false));175 dispatchEvent(Event::create(eventNames().resourcetimingbufferfullEvent, false, false)); 191 176 } 192 177 … … 195 180 return m_resourceTimingBuffer.size() >= m_resourceTimingBufferSize; 196 181 } 197 198 #endif // ENABLE(RESOURCE_TIMING)199 182 200 183 #if ENABLE(USER_TIMING) -
trunk/Source/WebCore/page/Performance.h
r197563 r200232 41 41 #include "PerformanceTiming.h" 42 42 #include "ScriptWrappable.h" 43 #include <wtf/PassRefPtr.h>44 43 #include <wtf/RefCounted.h> 45 44 #include <wtf/RefPtr.h> … … 65 64 double now() const; 66 65 67 #if ENABLE(PERFORMANCE_TIMELINE) 68 PassRefPtr<PerformanceEntryList> webkitGetEntries() const; 69 PassRefPtr<PerformanceEntryList> webkitGetEntriesByType(const String& entryType); 70 PassRefPtr<PerformanceEntryList> webkitGetEntriesByName(const String& name, const String& entryType); 71 #endif 66 RefPtr<PerformanceEntryList> getEntries() const; 67 RefPtr<PerformanceEntryList> getEntriesByType(const String& entryType); 68 RefPtr<PerformanceEntryList> getEntriesByName(const String& name, const String& entryType); 72 69 73 #if ENABLE(RESOURCE_TIMING) 74 void webkitClearResourceTimings(); 75 void webkitSetResourceTimingBufferSize(unsigned int); 70 void clearResourceTimings(); 71 void setResourceTimingBufferSize(unsigned); 76 72 77 73 void addResourceTiming(const String& initiatorName, Document*, const ResourceRequest&, const ResourceResponse&, double initiationTime, double finishTime); 78 #endif79 74 80 75 using RefCounted<Performance>::ref; … … 98 93 mutable RefPtr<PerformanceNavigation> m_navigation; 99 94 mutable RefPtr<PerformanceTiming> m_timing; 100 101 #if ENABLE(RESOURCE_TIMING) 95 102 96 Vector<RefPtr<PerformanceEntry>> m_resourceTimingBuffer; 103 97 unsigned m_resourceTimingBufferSize; 104 #endif105 98 106 99 double m_referenceTime; -
trunk/Source/WebCore/page/Performance.idl
r200192 r200232 37 37 readonly attribute PerformanceTiming timing; 38 38 39 #if defined(ENABLE_PERFORMANCE_TIMELINE) && ENABLE_PERFORMANCE_TIMELINE 40 PerformanceEntryList webkitGetEntries(); 41 PerformanceEntryList webkitGetEntriesByType(DOMString entryType); 42 PerformanceEntryList webkitGetEntriesByName(DOMString name, optional DOMString entryType); 43 #endif 39 [EnabledAtRuntime=ResourceTiming] PerformanceEntryList getEntries(); 40 [EnabledAtRuntime=ResourceTiming] PerformanceEntryList getEntriesByType(DOMString entryType); 41 [EnabledAtRuntime=ResourceTiming] PerformanceEntryList getEntriesByName(DOMString name, optional DOMString entryType); 44 42 45 #if defined(ENABLE_RESOURCE_TIMING) && ENABLE_RESOURCE_TIMING46 void webkitClearResourceTimings();47 void webkitSetResourceTimingBufferSize(unsigned long maxSize);48 43 49 attribute EventHandler onwebkitresourcetimingbufferfull; 50 #endif 44 [EnabledAtRuntime=ResourceTiming] void clearResourceTimings(); 45 [EnabledAtRuntime=ResourceTiming] void setResourceTimingBufferSize(unsigned long maxSize); 46 47 [EnabledAtRuntime=ResourceTiming] attribute EventHandler onresourcetimingbufferfull; 51 48 52 49 // See http://www.w3.org/TR/2012/CR-user-timing-20120726/ -
trunk/Source/WebCore/page/PerformanceEntry.cpp
r135458 r200232 32 32 #include "PerformanceEntry.h" 33 33 34 #if ENABLE(WEB_TIMING) && ENABLE(PERFORMANCE_TIMELINE)34 #if ENABLE(WEB_TIMING) 35 35 36 36 namespace WebCore { … … 70 70 } // namespace WebCore 71 71 72 #endif // ENABLE(WEB_TIMING) && ENABLE(PERFORMANCE_TIMELINE)72 #endif // ENABLE(WEB_TIMING) -
trunk/Source/WebCore/page/PerformanceEntry.h
r140882 r200232 33 33 #define PerformanceEntry_h 34 34 35 #if ENABLE(WEB_TIMING) && ENABLE(PERFORMANCE_TIMELINE)35 #if ENABLE(WEB_TIMING) 36 36 37 37 #include "Performance.h" … … 72 72 } 73 73 74 #endif // !ENABLE(WEB_TIMING) && ENABLE(PERFORMANCE_TIMELINE)74 #endif // !ENABLE(WEB_TIMING) 75 75 #endif // !defined(PerformanceEntry_h) -
trunk/Source/WebCore/page/PerformanceEntry.idl
r168302 r200232 32 32 [ 33 33 Conditional=WEB_TIMING, 34 Conditional=PERFORMANCE_TIMELINE,34 EnabledAtRuntime=ResourceTiming, 35 35 CustomToJSObject, 36 36 ] interface PerformanceEntry { -
trunk/Source/WebCore/page/PerformanceEntryList.cpp
r157653 r200232 33 33 #include "PerformanceEntryList.h" 34 34 35 #if ENABLE(WEB_TIMING) && ENABLE(PERFORMANCE_TIMELINE)35 #if ENABLE(WEB_TIMING) 36 36 37 37 #include "PerformanceEntry.h" … … 76 76 } // namespace WebCore 77 77 78 #endif // ENABLE(WEB_TIMING) && ENABLE(PERFORMANCE_TIMELINE)78 #endif // ENABLE(WEB_TIMING) -
trunk/Source/WebCore/page/PerformanceEntryList.h
r184066 r200232 33 33 #define PerformanceEntryList_h 34 34 35 #if ENABLE(WEB_TIMING) && ENABLE(PERFORMANCE_TIMELINE)35 #if ENABLE(WEB_TIMING) 36 36 37 37 #include <wtf/PassRefPtr.h> … … 65 65 } // namespace WebCore 66 66 67 #endif // !ENABLE(WEB_TIMING) && ENABLE(PERFORMANCE_TIMELINE)67 #endif // !ENABLE(WEB_TIMING) 68 68 #endif // PerformanceEntryList_h -
trunk/Source/WebCore/page/PerformanceEntryList.idl
r159061 r200232 33 33 NoInterfaceObject, 34 34 Conditional=WEB_TIMING, 35 Conditional=PERFORMANCE_TIMELINE,35 EnabledAtRuntime=ResourceTiming, 36 36 ImplementationLacksVTable, 37 37 ] interface PerformanceEntryList { … … 39 39 getter PerformanceEntry item(unsigned long index); 40 40 }; 41 -
trunk/Source/WebCore/page/PerformanceResourceTiming.cpp
r195452 r200232 32 32 #include "config.h" 33 33 #include "PerformanceResourceTiming.h" 34 35 #if ENABLE(RESOURCE_TIMING)36 34 37 35 #include "Document.h" … … 200 198 201 199 } // namespace WebCore 202 203 #endif // ENABLE(RESOURCE_TIMING) -
trunk/Source/WebCore/page/PerformanceResourceTiming.h
r184066 r200232 32 32 #ifndef PerformanceResourceTiming_h 33 33 #define PerformanceResourceTiming_h 34 35 #if ENABLE(RESOURCE_TIMING)36 34 37 35 #include "PerformanceEntry.h" … … 86 84 } 87 85 88 #endif // ENABLE(RESOURCE_TIMING)89 90 86 #endif // !defined(PerformanceResourceTiming_h) -
trunk/Source/WebCore/page/PerformanceResourceTiming.idl
r168647 r200232 31 31 // See: https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/ResourceTiming/Overview.html 32 32 [ 33 Conditional=RESOURCE_TIMING,33 EnabledAtRuntime=ResourceTiming 34 34 ] interface PerformanceResourceTiming : PerformanceEntry { 35 35 readonly attribute DOMString initiatorType; -
trunk/Source/WebCore/testing/Internals.cpp
r200215 r200232 3326 3326 #endif 3327 3327 3328 } 3328 void Internals::setResourceTimingSupport(bool enable) 3329 { 3330 RuntimeEnabledFeatures::sharedFeatures().setResourceTimingEnabled(enable); 3331 } 3332 3333 } -
trunk/Source/WebCore/testing/Internals.h
r200215 r200232 469 469 void setViewportForceAlwaysUserScalable(bool); 470 470 void setLinkPreloadSupport(bool); 471 void setResourceTimingSupport(bool); 471 472 472 473 #if ENABLE(CSS_GRID_LAYOUT) -
trunk/Source/WebCore/testing/Internals.idl
r200215 r200232 452 452 #endif 453 453 454 }; 454 void setResourceTimingSupport(boolean scalable); 455 }; -
trunk/Source/cmake/WebKitFeatures.cmake
r200075 r200232 159 159 WEBKIT_OPTION_DEFINE(ENABLE_ORIENTATION_EVENTS "Toggle Orientation Events support" PRIVATE OFF) 160 160 WEBKIT_OPTION_DEFINE(ENABLE_PDFKIT_PLUGIN "Toggle PDFKit plugin support" PRIVATE OFF) 161 WEBKIT_OPTION_DEFINE(ENABLE_PERFORMANCE_TIMELINE "Toggle Performance Timeline support" PRIVATE OFF)162 161 WEBKIT_OPTION_DEFINE(ENABLE_POINTER_LOCK "Toggle pointer lock support" PRIVATE OFF) 163 162 WEBKIT_OPTION_DEFINE(ENABLE_PROXIMITY_EVENTS "Toggle Proximity Events support" PRIVATE OFF)
Note: See TracChangeset
for help on using the changeset viewer.