Changeset 200320 in webkit
- Timestamp:
- May 2, 2016 1:21:50 AM (8 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 32 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/ChangeLog
r200252 r200320 1 2016-05-02 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-29 Commit Queue <commit-queue@webkit.org> 2 11 -
trunk/LayoutTests/ChangeLog
r200318 r200320 1 2016-05-02 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-05-01 Nan Wang <n_wang@apple.com> 2 18 -
trunk/LayoutTests/fast/dom/Window/window-properties-performance-resource-timing.html
r200319 r200320 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
r200252 r200320 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
r200319 r200320 1 2016-05-02 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-05-02 Yusuke Suzuki <utatane.tea@gmail.com> 2 11 -
trunk/Source/JavaScriptCore/runtime/CommonIdentifiers.h
r200272 r200320 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
r200318 r200320 1 2016-05-02 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, and replaced PERFORMANCE_TIMELINE for WEB_TIMING. 22 Added build flag around UserTiming related h files. 23 (WebCore::toJS): Deleted. 24 * dom/EventNames.h: Renamed webkitresourcetimingbufferfull to resourcetimingbufferfull. 25 * loader/DocumentThreadableLoader.cpp: Replace #if for ResourceTiming with runtime flag. 26 (WebCore::DocumentThreadableLoader::loadRequest): 27 * loader/ResourceLoadNotifier.cpp: Replace #if for ResourceTiming with runtime flag. 28 (WebCore::ResourceLoadNotifier::dispatchWillSendRequest): 29 * loader/cache/CachedResourceLoader.cpp: Replace #if for ResourceTiming with runtime flag. 30 (WebCore::CachedResourceLoader::revalidateResource): 31 (WebCore::CachedResourceLoader::loadResource): 32 (WebCore::CachedResourceLoader::storeResourceTimingInitiatorInformation): 33 (WebCore::CachedResourceLoader::loadDone): 34 * loader/cache/CachedResourceLoader.h: Remove #if for ResourceTiming. 35 * page/Performance.cpp: Remove #if for ResourceTiming. 36 (WebCore::Performance::Performance): Removed #if for ResourceTiming related initialization. 37 (WebCore::Performance::webkitGetEntries): Renamed to getEntries. 38 (WebCore::Performance::webkitGetEntriesByType): Renamed to getEntriesByType. 39 (WebCore::Performance::webkitGetEntriesByName): Renamed to getEntriesByName. 40 * page/Performance.h: Remove #if for ResourceTiming. 41 * page/Performance.idl: Replace #if for ResourceTiming with runtime flag. 42 * page/PerformanceEntry.cpp: Remove the PERFORMANCE_TIMELINE build flag. 43 * page/PerformanceEntry.h: Remove the PERFORMANCE_TIMELINE build flag. 44 * page/PerformanceEntry.idl: Replace the PERFORMANCE_TIMELINE build flag with runtime flag. 45 * page/PerformanceEntryList.cpp: Remove the PERFORMANCE_TIMELINE build flag. 46 * page/PerformanceEntryList.h: Remove the PERFORMANCE_TIMELINE build flag. 47 * page/PerformanceEntryList.idl: Replace the PERFORMANCE_TIMELINE build flag with runtime flag. 48 * page/PerformanceResourceTiming.cpp: Remove the RESOURCE_TIMING build flag. 49 * page/PerformanceResourceTiming.h: Remove the RESOURCE_TIMING build flag. 50 * page/PerformanceResourceTiming.idl: Replace the RESOURCE_TIMING build flag with runtime flag. 51 * testing/Internals.cpp: Add a method that enables ResourceTiming. 52 (WebCore::Internals::setResourceTimingSupport): 53 * testing/Internals.h: Add a method that enables ResourceTiming. 54 * testing/Internals.idl: Add a method that enables ResourceTiming. 55 1 56 2016-05-01 Nan Wang <n_wang@apple.com> 2 57 -
trunk/Source/WebCore/DerivedSources.make
r200252 r200320 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
r200254 r200320 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, ); }; }; … … 13959 13967 CAE9F90D146441F000C245B0 /* CSSAspectRatioValue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CSSAspectRatioValue.cpp; sourceTree = "<group>"; }; 13960 13968 CAE9F90E146441F000C245B0 /* CSSAspectRatioValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CSSAspectRatioValue.h; sourceTree = "<group>"; }; 13969 CB38FD4A1CCCF2DD00592A3F /* PerformanceEntry.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PerformanceEntry.cpp; sourceTree = "<group>"; }; 13970 CB38FD4D1CCF937E00592A3F /* JSPerformanceEntry.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.cpp; fileEncoding = 4; path = JSPerformanceEntry.cpp; sourceTree = "<group>"; }; 13971 CB38FD4E1CCF937E00592A3F /* JSPerformanceEntry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSPerformanceEntry.h; sourceTree = "<group>"; }; 13972 CB38FD4F1CCF937E00592A3F /* JSPerformanceEntryList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSPerformanceEntryList.cpp; sourceTree = "<group>"; }; 13973 CB38FD501CCF937E00592A3F /* JSPerformanceEntryList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = JSPerformanceEntryList.h; sourceTree = "<group>"; }; 13974 CB38FD551CD21D5B00592A3F /* JSPerformanceEntryCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSPerformanceEntryCustom.cpp; sourceTree = "<group>"; }; 13975 CB38FD581CD2314500592A3F /* JSPerformanceResourceTiming.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSPerformanceResourceTiming.cpp; sourceTree = "<group>"; }; 13976 CB38FD591CD2314500592A3F /* JSPerformanceResourceTiming.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSPerformanceResourceTiming.h; sourceTree = "<group>"; }; 13961 13977 CB8CF0151A934B43000D510B /* Microtasks.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Microtasks.cpp; sourceTree = "<group>"; }; 13962 13978 CCC2B51015F613060048CDD6 /* DeviceClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DeviceClient.h; sourceTree = "<group>"; }; … … 18065 18081 8A844D0311D3C18E0014065C /* Performance.idl */, 18066 18082 86BE33FB15058CB200CE0FD8 /* PerformanceEntry.h */, 18083 CB38FD4A1CCCF2DD00592A3F /* PerformanceEntry.cpp */, 18067 18084 86BE33FC15058CB200CE0FD8 /* PerformanceEntry.idl */, 18068 18085 86BE33FD15058CB200CE0FD8 /* PerformanceEntryList.cpp */, … … 22320 22337 7C91A38D1B498ABE003F9EFA /* JSNodeOrString.cpp */, 22321 22338 7C91A38E1B498ABE003F9EFA /* JSNodeOrString.h */, 22339 CB38FD551CD21D5B00592A3F /* JSPerformanceEntryCustom.cpp */, 22322 22340 93B70D4F09EB0C7C009D8468 /* JSPluginElementFunctions.cpp */, 22323 22341 93B70D5009EB0C7C009D8468 /* JSPluginElementFunctions.h */, … … 22656 22674 E51A81DE17298D7700BFCA61 /* JSPerformance.cpp */, 22657 22675 8A9A587311E84C81008ACFD1 /* JSPerformance.h */, 22676 CB38FD4D1CCF937E00592A3F /* JSPerformanceEntry.cpp */, 22677 CB38FD4E1CCF937E00592A3F /* JSPerformanceEntry.h */, 22678 CB38FD4F1CCF937E00592A3F /* JSPerformanceEntryList.cpp */, 22679 CB38FD501CCF937E00592A3F /* JSPerformanceEntryList.h */, 22658 22680 8A9A586E11E84C35008ACFD1 /* JSPerformanceNavigation.cpp */, 22659 22681 8A9A586F11E84C36008ACFD1 /* JSPerformanceNavigation.h */, 22682 CB38FD581CD2314500592A3F /* JSPerformanceResourceTiming.cpp */, 22683 CB38FD591CD2314500592A3F /* JSPerformanceResourceTiming.h */, 22660 22684 0F43C85E189E15A600019AE2 /* JSPerformanceTiming.cpp */, 22661 22685 8A9A587711E84C98008ACFD1 /* JSPerformanceTiming.h */, … … 25563 25587 2DE70023192FE82A00B0975C /* DisplayRefreshMonitorMac.h in Headers */, 25564 25588 2D29ECC8192ECC8300984B78 /* DisplayRefreshMonitorManager.h in Headers */, 25589 CB38FD521CCF939400592A3F /* JSPerformanceEntry.h in Headers */, 25565 25590 CD52481B18E200ED0008A07D /* DisplaySleepDisabler.h in Headers */, 25566 25591 5D8C4DC01428222C0026CE72 /* DisplaySleepDisablerCocoa.h in Headers */, … … 27699 27724 BE20507E18A458C20080647E /* RenderVTTCue.h in Headers */, 27700 27725 A871DFE40A15376B00B12A68 /* RenderWidget.h in Headers */, 27726 CB38FD5B1CD2325B00592A3F /* JSPerformanceResourceTiming.h in Headers */, 27701 27727 A89CCC530F44E98100B5DA10 /* ReplaceNodeWithSpanCommand.h in Headers */, 27702 27728 93309E0A099E64920056E581 /* ReplaceSelectionCommand.h in Headers */, … … 28028 28054 BC5EB5E50E81BF6D00B25965 /* StyleSurroundData.h in Headers */, 28029 28055 BC5EB8100E81F2CE00B25965 /* StyleTransformData.h in Headers */, 28056 CB38FD541CCF939E00592A3F /* JSPerformanceEntryList.h in Headers */, 28030 28057 E4DEAA1817A93DC3000E0430 /* StyleTreeResolver.h in Headers */, 28031 28058 BC5EB69A0E81DA6300B25965 /* StyleVisualData.h in Headers */, … … 29210 29237 43EDD67E1B485DBF00640E75 /* CombinedFiltersAlphabet.cpp in Sources */, 29211 29238 26E944D81AC4B2DD007B85B5 /* CombinedURLFilters.cpp in Sources */, 29239 CB38FD4B1CCCF36600592A3F /* PerformanceEntry.cpp in Sources */, 29212 29240 A584FE341864D5AF00843B10 /* CommandLineAPIHost.cpp in Sources */, 29213 29241 A584FE2B1863870F00843B10 /* CommandLineAPIModule.cpp in Sources */, … … 31228 31256 BCEA4865097D93020094C9E4 /* RenderButton.cpp in Sources */, 31229 31257 BCE4413312F748E2009B84B8 /* RenderCombineText.cpp in Sources */, 31258 CB38FD5A1CD2325800592A3F /* JSPerformanceResourceTiming.cpp in Sources */, 31230 31259 9392F1440AD185FE00691BD4 /* RenderCounter.cpp in Sources */, 31231 31260 BCEA486D097D93020094C9E4 /* RenderDeprecatedFlexibleBox.cpp in Sources */, … … 32005 32034 93F19B0708245E59001E9ABC /* WebCoreView.m in Sources */, 32006 32035 A5E616731894581F009ADF50 /* WebDebuggerAgent.cpp in Sources */, 32036 CB38FD571CD21E2A00592A3F /* JSPerformanceEntryCustom.cpp in Sources */, 32007 32037 FE0D84EB1048436E001A179E /* WebEvent.mm in Sources */, 32008 32038 225A16B60D5C11E900090295 /* WebEventRegion.mm in Sources */, … … 32084 32114 CD8203111395ACE700F956C6 /* WebWindowAnimation.mm in Sources */, 32085 32115 F55B3DDF1251F12D003EF269 /* WeekInputType.cpp in Sources */, 32116 CB38FD511CCF938900592A3F /* JSPerformanceEntry.cpp in Sources */, 32086 32117 85031B500A44EFC700F992E0 /* WheelEvent.cpp in Sources */, 32087 32118 2E19516B1B6598D200DF6EEF /* WheelEventDeltaFilter.cpp in Sources */, … … 32121 32152 00B9318B13BA8DC90035A948 /* XMLDocumentParserScope.cpp in Sources */, 32122 32153 59C28045138DC2410079B7E2 /* XMLErrors.cpp in Sources */, 32154 CB38FD531CCF939B00592A3F /* JSPerformanceEntryList.cpp in Sources */, 32123 32155 BC772C460C4EB2C60083285F /* XMLHttpRequest.cpp in Sources */, 32124 32156 A136A00C1134DBD200CC8D50 /* XMLHttpRequestProgressEventThrottle.cpp in Sources */, -
trunk/Source/WebCore/bindings/generic/RuntimeEnabledFeatures.cpp
r200252 r200320 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
r200252 r200320 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
r200287 r200320 31 31 #include "config.h" 32 32 33 #if ENABLE(PERFORMANCE_TIMELINE) 34 33 #if ENABLE(WEB_TIMING) 35 34 #include "JSPerformanceEntry.h" 36 35 37 36 #include "JSDOMBinding.h" 37 #if ENABLE(USER_TIMING) 38 38 #include "JSPerformanceMark.h" 39 39 #include "JSPerformanceMeasure.h" 40 #endif 40 41 #include "JSPerformanceResourceTiming.h" 41 42 #include "PerformanceMark.h" … … 52 53 return jsNull(); 53 54 54 #if ENABLE(RESOURCE_TIMING)55 55 if (is<PerformanceResourceTiming>(*entry)) 56 56 return wrap<JSPerformanceResourceTiming>(globalObject, downcast<PerformanceResourceTiming>(*entry)); 57 #endif58 57 59 58 #if ENABLE(USER_TIMING) … … 69 68 70 69 } // namespace WebCore 71 72 #endif // ENABLE(PERFORMANCE_TIMELINE) 70 #endif // ENABLE(WEB_TIMING) -
trunk/Source/WebCore/dom/EventNames.h
r200252 r200320 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
r200252 r200320 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
r200252 r200320 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
r200252 r200320 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
r200252 r200320 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
r200252 r200320 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
r200252 r200320 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
r200252 r200320 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
r200252 r200320 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
r200287 r200320 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" … … 73 73 } 74 74 75 #endif // !ENABLE(WEB_TIMING) && ENABLE(PERFORMANCE_TIMELINE)75 #endif // ENABLE(WEB_TIMING) 76 76 #endif // !defined(PerformanceEntry_h) -
trunk/Source/WebCore/page/PerformanceEntry.idl
r200252 r200320 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
r200252 r200320 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
r200252 r200320 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
r200252 r200320 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
r200252 r200320 33 33 #include "PerformanceResourceTiming.h" 34 34 35 #if ENABLE( RESOURCE_TIMING)35 #if ENABLE(WEB_TIMING) 36 36 37 37 #include "Document.h" … … 200 200 201 201 } // namespace WebCore 202 203 #endif // ENABLE(RESOURCE_TIMING) 202 #endif // ENABLE(WEB_TIMING) -
trunk/Source/WebCore/page/PerformanceResourceTiming.h
r200287 r200320 33 33 #define PerformanceResourceTiming_h 34 34 35 #if ENABLE( RESOURCE_TIMING)35 #if ENABLE(WEB_TIMING) 36 36 37 37 #include "PerformanceEntry.h" … … 86 86 } 87 87 88 89 88 SPECIALIZE_TYPE_TRAITS_BEGIN(WebCore::PerformanceResourceTiming) 90 89 static bool isType(const WebCore::PerformanceEntry& entry) { return entry.isResource(); } 91 90 SPECIALIZE_TYPE_TRAITS_END() 92 91 93 #endif // ENABLE(RESOURCE_TIMING) 94 92 #endif // ENABLE(WEB_TIMING) 95 93 #endif // !defined(PerformanceResourceTiming_h) -
trunk/Source/WebCore/page/PerformanceResourceTiming.idl
r200252 r200320 31 31 // See: https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/ResourceTiming/Overview.html 32 32 [ 33 Conditional=RESOURCE_TIMING, 33 Conditional=WEB_TIMING, 34 EnabledAtRuntime=ResourceTiming 34 35 ] interface PerformanceResourceTiming : PerformanceEntry { 35 36 readonly attribute DOMString initiatorType; -
trunk/Source/WebCore/testing/Internals.cpp
r200315 r200320 3317 3317 #endif 3318 3318 3319 } 3319 void Internals::setResourceTimingSupport(bool enable) 3320 { 3321 RuntimeEnabledFeatures::sharedFeatures().setResourceTimingEnabled(enable); 3322 } 3323 3324 } -
trunk/Source/WebCore/testing/Internals.h
r200298 r200320 474 474 void setViewportForceAlwaysUserScalable(bool); 475 475 void setLinkPreloadSupport(bool); 476 void setResourceTimingSupport(bool); 476 477 477 478 #if ENABLE(CSS_GRID_LAYOUT) -
trunk/Source/WebCore/testing/Internals.idl
r200294 r200320 454 454 #endif 455 455 456 }; 456 void setResourceTimingSupport(boolean scalable); 457 }; -
trunk/Source/cmake/WebKitFeatures.cmake
r200252 r200320 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.