Changeset 200232 in webkit


Ignore:
Timestamp:
Apr 29, 2016 12:33:02 AM (8 years ago)
Author:
yoav@yoav.ws
Message:

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.

Source/JavaScriptCore:

  • runtime/CommonIdentifiers.h: Added PerformanceEntry, PerformanceEntryList and PerformanceResourceTiming as property names.

Source/WebCore:

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. 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.

LayoutTests:

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.
Location:
trunk
Files:
4 added
32 edited
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/ChangeLog

    r200186 r200232  
     12016-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
    1102016-04-28  Commit Queue  <commit-queue@webkit.org>
    211
  • trunk/LayoutTests/ChangeLog

    r200231 r200232  
     12016-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
    1172016-04-29  Youenn Fablet  <youenn.fablet@crf.canon.fr>
    218
  • trunk/LayoutTests/fast/dom/Window/window-properties-performance-resource-timing.html

    r200231 r200232  
    66if (window.testRunner)
    77    testRunner.dumpAsText();
     8
     9if (window.internals)
     10    internals.setResourceTimingSupport(true);
    811   
    912var logBuffer = [];
     
    3134function typeOfNullAware(value)
    3235{
    33     if (typeof value == "object" && value == null) //;
     36    if (typeof value == "object" && value == null)
    3437        return "null";
    3538    return typeof value;
     
    6265
    6366    // Avoid infinite recursion
    64     if (valueType == "object" && value.__visitedByLogValue__) { //;
     67    if (valueType == "object" && value.__visitedByLogValue__) {
    6568        log(valueName + " [printed above as " + value.__nameWhenVisitedByLogValue__ + "]\n");
    6669        return;
     
    97100logValue('window.performance');
    98101flushLog();
     102if (window.internals)
     103    internals.setResourceTimingSupport(false);
    99104</script>
  • trunk/LayoutTests/fast/dom/Window/window-properties-performance.html

    r120792 r200232  
    3131function typeOfNullAware(value)
    3232{
    33     if (typeof value == "object" && value == null) //;
     33    if (typeof value == "object" && value == null)
    3434        return "null";
    3535    return typeof value;
     
    6262
    6363    // Avoid infinite recursion
    64     if (valueType == "object" && value.__visitedByLogValue__) { //;
     64    if (valueType == "object" && value.__visitedByLogValue__) {
    6565        log(valueName + " [printed above as " + value.__nameWhenVisitedByLogValue__ + "]\n");
    6666        return;
  • trunk/Source/JavaScriptCore/ChangeLog

    r200218 r200232  
     12016-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
    1102016-04-28  Joseph Pecoraro  <pecoraro@apple.com>
    211
  • trunk/Source/JavaScriptCore/runtime/CommonIdentifiers.h

    r200149 r200232  
    7272    macro(NumberFormat) \
    7373    macro(Object) \
     74    macro(PerformanceEntry) \
     75    macro(PerformanceEntryList) \
     76    macro(PerformanceResourceTiming) \
    7477    macro(Promise) \
    7578    macro(Proxy) \
  • trunk/Source/WebCore/ChangeLog

    r200231 r200232  
     12016-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
    1552016-04-29  Youenn Fablet  <youenn.fablet@crf.canon.fr>
    256
  • trunk/Source/WebCore/DerivedSources.make

    r199668 r200232  
    519519    $(WebCore)/page/Navigator.idl \
    520520    $(WebCore)/page/Performance.idl \
     521    $(WebCore)/page/PerformanceEntry.idl \
     522    $(WebCore)/page/PerformanceEntryList.idl \
    521523    $(WebCore)/page/PerformanceNavigation.idl \
     524    $(WebCore)/page/PerformanceResourceTiming.idl \
    522525    $(WebCore)/page/PerformanceTiming.idl \
    523526    $(WebCore)/page/Screen.idl \
  • trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj

    r200144 r200232  
    59925992                CAE9F90F146441F000C245B0 /* CSSAspectRatioValue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CAE9F90D146441F000C245B0 /* CSSAspectRatioValue.cpp */; };
    59935993                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 */; };
    59946002                CB8CF0181A9358D4000D510B /* Microtasks.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CB8CF0151A934B43000D510B /* Microtasks.cpp */; };
    59956003                CCC2B51415F613060048CDD6 /* DeviceClient.h in Headers */ = {isa = PBXBuildFile; fileRef = CCC2B51015F613060048CDD6 /* DeviceClient.h */; settings = {ATTRIBUTES = (Private, ); }; };
     
    1395713965                CAE9F90D146441F000C245B0 /* CSSAspectRatioValue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CSSAspectRatioValue.cpp; sourceTree = "<group>"; };
    1395813966                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>"; };
    1395913975                CB8CF0151A934B43000D510B /* Microtasks.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Microtasks.cpp; sourceTree = "<group>"; };
    1396013976                CCC2B51015F613060048CDD6 /* DeviceClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DeviceClient.h; sourceTree = "<group>"; };
     
    1805918075                                8A844D0311D3C18E0014065C /* Performance.idl */,
    1806018076                                86BE33FB15058CB200CE0FD8 /* PerformanceEntry.h */,
     18077                                CB38FD4A1CCCF2DD00592A3F /* PerformanceEntry.cpp */,
    1806118078                                86BE33FC15058CB200CE0FD8 /* PerformanceEntry.idl */,
    1806218079                                86BE33FD15058CB200CE0FD8 /* PerformanceEntryList.cpp */,
     
    2231422331                                7C91A38D1B498ABE003F9EFA /* JSNodeOrString.cpp */,
    2231522332                                7C91A38E1B498ABE003F9EFA /* JSNodeOrString.h */,
     22333                                CB38FD551CD21D5B00592A3F /* JSPerformanceEntryCustom.cpp */,
    2231622334                                93B70D4F09EB0C7C009D8468 /* JSPluginElementFunctions.cpp */,
    2231722335                                93B70D5009EB0C7C009D8468 /* JSPluginElementFunctions.h */,
     
    2265022668                                E51A81DE17298D7700BFCA61 /* JSPerformance.cpp */,
    2265122669                                8A9A587311E84C81008ACFD1 /* JSPerformance.h */,
     22670                                CB38FD4D1CCF937E00592A3F /* JSPerformanceEntry.cpp */,
     22671                                CB38FD4E1CCF937E00592A3F /* JSPerformanceEntry.h */,
     22672                                CB38FD4F1CCF937E00592A3F /* JSPerformanceEntryList.cpp */,
     22673                                CB38FD501CCF937E00592A3F /* JSPerformanceEntryList.h */,
    2265222674                                8A9A586E11E84C35008ACFD1 /* JSPerformanceNavigation.cpp */,
    2265322675                                8A9A586F11E84C36008ACFD1 /* JSPerformanceNavigation.h */,
     22676                                CB38FD581CD2314500592A3F /* JSPerformanceResourceTiming.cpp */,
     22677                                CB38FD591CD2314500592A3F /* JSPerformanceResourceTiming.h */,
    2265422678                                0F43C85E189E15A600019AE2 /* JSPerformanceTiming.cpp */,
    2265522679                                8A9A587711E84C98008ACFD1 /* JSPerformanceTiming.h */,
     
    2555725581                                2DE70023192FE82A00B0975C /* DisplayRefreshMonitorMac.h in Headers */,
    2555825582                                2D29ECC8192ECC8300984B78 /* DisplayRefreshMonitorManager.h in Headers */,
     25583                                CB38FD521CCF939400592A3F /* JSPerformanceEntry.h in Headers */,
    2555925584                                CD52481B18E200ED0008A07D /* DisplaySleepDisabler.h in Headers */,
    2556025585                                5D8C4DC01428222C0026CE72 /* DisplaySleepDisablerCocoa.h in Headers */,
     
    2769227717                                BE20507E18A458C20080647E /* RenderVTTCue.h in Headers */,
    2769327718                                A871DFE40A15376B00B12A68 /* RenderWidget.h in Headers */,
     27719                                CB38FD5B1CD2325B00592A3F /* JSPerformanceResourceTiming.h in Headers */,
    2769427720                                A89CCC530F44E98100B5DA10 /* ReplaceNodeWithSpanCommand.h in Headers */,
    2769527721                                93309E0A099E64920056E581 /* ReplaceSelectionCommand.h in Headers */,
     
    2802128047                                BC5EB5E50E81BF6D00B25965 /* StyleSurroundData.h in Headers */,
    2802228048                                BC5EB8100E81F2CE00B25965 /* StyleTransformData.h in Headers */,
     28049                                CB38FD541CCF939E00592A3F /* JSPerformanceEntryList.h in Headers */,
    2802328050                                E4DEAA1817A93DC3000E0430 /* StyleTreeResolver.h in Headers */,
    2802428051                                BC5EB69A0E81DA6300B25965 /* StyleVisualData.h in Headers */,
     
    2920329230                                43EDD67E1B485DBF00640E75 /* CombinedFiltersAlphabet.cpp in Sources */,
    2920429231                                26E944D81AC4B2DD007B85B5 /* CombinedURLFilters.cpp in Sources */,
     29232                                CB38FD4B1CCCF36600592A3F /* PerformanceEntry.cpp in Sources */,
    2920529233                                A584FE341864D5AF00843B10 /* CommandLineAPIHost.cpp in Sources */,
    2920629234                                A584FE2B1863870F00843B10 /* CommandLineAPIModule.cpp in Sources */,
     
    3122131249                                BCEA4865097D93020094C9E4 /* RenderButton.cpp in Sources */,
    3122231250                                BCE4413312F748E2009B84B8 /* RenderCombineText.cpp in Sources */,
     31251                                CB38FD5A1CD2325800592A3F /* JSPerformanceResourceTiming.cpp in Sources */,
    3122331252                                9392F1440AD185FE00691BD4 /* RenderCounter.cpp in Sources */,
    3122431253                                BCEA486D097D93020094C9E4 /* RenderDeprecatedFlexibleBox.cpp in Sources */,
     
    3199732026                                93F19B0708245E59001E9ABC /* WebCoreView.m in Sources */,
    3199832027                                A5E616731894581F009ADF50 /* WebDebuggerAgent.cpp in Sources */,
     32028                                CB38FD571CD21E2A00592A3F /* JSPerformanceEntryCustom.cpp in Sources */,
    3199932029                                FE0D84EB1048436E001A179E /* WebEvent.mm in Sources */,
    3200032030                                225A16B60D5C11E900090295 /* WebEventRegion.mm in Sources */,
     
    3207632106                                CD8203111395ACE700F956C6 /* WebWindowAnimation.mm in Sources */,
    3207732107                                F55B3DDF1251F12D003EF269 /* WeekInputType.cpp in Sources */,
     32108                                CB38FD511CCF938900592A3F /* JSPerformanceEntry.cpp in Sources */,
    3207832109                                85031B500A44EFC700F992E0 /* WheelEvent.cpp in Sources */,
    3207932110                                2E19516B1B6598D200DF6EEF /* WheelEventDeltaFilter.cpp in Sources */,
     
    3211332144                                00B9318B13BA8DC90035A948 /* XMLDocumentParserScope.cpp in Sources */,
    3211432145                                59C28045138DC2410079B7E2 /* XMLErrors.cpp in Sources */,
     32146                                CB38FD531CCF939B00592A3F /* JSPerformanceEntryList.cpp in Sources */,
    3211532147                                BC772C460C4EB2C60083285F /* XMLHttpRequest.cpp in Sources */,
    3211632148                                A136A00C1134DBD200CC8D50 /* XMLHttpRequestProgressEventThrottle.cpp in Sources */,
  • trunk/Source/WebCore/bindings/generic/RuntimeEnabledFeatures.cpp

    r200215 r200232  
    6060    , m_isPluginReplacementEnabled(false)
    6161#endif
     62    , m_isResourceTimingEnabled(false)
    6263#if ENABLE(INDEXED_DATABASE)
    6364    , m_isIndexedDBEnabled(false)
  • trunk/Source/WebCore/bindings/generic/RuntimeEnabledFeatures.h

    r200215 r200232  
    202202    bool pluginReplacementEnabled() const { return m_isPluginReplacementEnabled; }
    203203
     204    void setResourceTimingEnabled(bool isEnabled) { m_isResourceTimingEnabled = isEnabled; }
     205    bool resourceTimingEnabled() const { return m_isResourceTimingEnabled; }
     206
    204207#if ENABLE(GAMEPAD)
    205208    void setGamepadsEnabled(bool areEnabled) { m_areGamepadsEnabled = areEnabled; }
     
    268271    bool m_isLangAttributeAwareFormControlUIEnabled;
    269272    bool m_isPluginReplacementEnabled;
     273    bool m_isResourceTimingEnabled;
    270274
    271275#if ENABLE(INDEXED_DATABASE)
  • trunk/Source/WebCore/bindings/js/JSPerformanceEntryCustom.cpp

    r166128 r200232  
    3131#include "config.h"
    3232
    33 #if ENABLE(PERFORMANCE_TIMELINE)
    34 
    3533#include "JSPerformanceEntry.h"
    3634
    3735#include "JSDOMBinding.h"
     36#if ENABLE(USER_TIMING)
    3837#include "JSPerformanceMark.h"
    3938#include "JSPerformanceMeasure.h"
     39#endif
    4040#include "JSPerformanceResourceTiming.h"
    4141#include "PerformanceMark.h"
     
    5252        return jsNull();
    5353
    54 #if ENABLE(RESOURCE_TIMING)
    5554    if (entry->isResource())
    5655        return wrap<JSPerformanceResourceTiming>(globalObject, static_cast<PerformanceResourceTiming*>(entry));
    57 #endif
    5856
    5957#if ENABLE(USER_TIMING)
     
    6967
    7068} // namespace WebCore
    71 
    72 #endif // ENABLE(PERFORMANCE_TIMELINE)
  • trunk/Source/WebCore/dom/EventNames.h

    r198115 r200232  
    184184    macro(reset) \
    185185    macro(resize) \
     186    macro(resourcetimingbufferfull) \
    186187    macro(result) \
    187188    macro(resume) \
     
    262263    macro(webkitregionoversetchange) \
    263264    macro(webkitremovesourcebuffer) \
    264     macro(webkitresourcetimingbufferfull) \
    265265    macro(webkitsourceclose) \
    266266    macro(webkitsourceended) \
  • trunk/Source/WebCore/loader/DocumentThreadableLoader.cpp

    r199612 r200232  
    4646#include "ResourceError.h"
    4747#include "ResourceRequest.h"
     48#include "RuntimeEnabledFeatures.h"
    4849#include "SchemeRegistry.h"
    4950#include "SecurityOrigin.h"
     
    386387
    387388        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);
    391391        ASSERT(!m_resource);
    392392        m_resource = m_document.cachedResourceLoader().requestRawResource(newRequest);
  • trunk/Source/WebCore/loader/ResourceLoadNotifier.cpp

    r199840 r200232  
    4040#include "ProgressTracker.h"
    4141#include "ResourceLoader.h"
     42#include "RuntimeEnabledFeatures.h"
    4243
    4344#if USE(QUICK_LOOK)
     
    147148        request.setReportLoadTiming(true);
    148149
    149 #if ENABLE(RESOURCE_TIMING)
    150     request.setReportLoadTiming(true);
    151 #endif
     150    if (RuntimeEnabledFeatures::sharedFeatures().resourceTimingEnabled())
     151        request.setReportLoadTiming(true);
    152152}
    153153
  • trunk/Source/WebCore/loader/cache/CachedResourceLoader.cpp

    r199955 r200232  
    5858#include "MemoryCache.h"
    5959#include "Page.h"
     60#include "Performance.h"
    6061#include "PingLoader.h"
    6162#include "PlatformStrategies.h"
    6263#include "RenderElement.h"
    6364#include "ResourceLoadInfo.h"
     65#include "RuntimeEnabledFeatures.h"
    6466#include "ScriptController.h"
    6567#include "SecurityOrigin.h"
     
    7476#if ENABLE(VIDEO_TRACK)
    7577#include "CachedTextTrack.h"
    76 #endif
    77 
    78 #if ENABLE(RESOURCE_TIMING)
    79 #include "Performance.h"
    8078#endif
    8179
     
    672670    memoryCache.remove(*resource);
    673671    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);
    679674    return newResource;
    680675}
     
    691686    if (request.allowsCaching() && !memoryCache.add(*resource))
    692687        resource->setOwningCachedResourceLoader(this);
    693 #if ENABLE(RESOURCE_TIMING)
    694     storeResourceTimingInitiatorInformation(resource, request);
    695 #endif
     688    if (RuntimeEnabledFeatures::sharedFeatures().resourceTimingEnabled())
     689        storeResourceTimingInitiatorInformation(resource, request);
    696690    return resource;
    697691}
    698692
    699 #if ENABLE(RESOURCE_TIMING)
    700693void CachedResourceLoader::storeResourceTimingInitiatorInformation(const CachedResourceHandle<CachedResource>& resource, const CachedResourceRequest& request)
    701694{
     695    ASSERT(RuntimeEnabledFeatures::sharedFeatures().resourceTimingEnabled());
    702696    if (resource->type() == CachedResource::MainResource) {
    703697        // <iframe>s should report the initial navigation requested by the parent document, but not subsequent navigations.
     
    711705    }
    712706}
    713 #endif // ENABLE(RESOURCE_TIMING)
    714707
    715708static void logRevalidation(const String& reason, DiagnosticLoggingClient& logClient)
     
    977970    RefPtr<Document> protectDocument(m_document);
    978971
    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)) {
    981975        HashMap<CachedResource*, InitiatorInfo>::iterator initiatorIt = m_initiatorMap.find(resource);
    982976        if (initiatorIt != m_initiatorMap.end()) {
     
    991985        }
    992986    }
    993 #else
    994     UNUSED_PARAM(resource);
    995 #endif // ENABLE(RESOURCE_TIMING)
    996987
    997988    if (frame())
  • trunk/Source/WebCore/loader/cache/CachedResourceLoader.h

    r199612 r200232  
    145145    CachedResourceHandle<CachedResource> revalidateResource(const CachedResourceRequest&, CachedResource*);
    146146    CachedResourceHandle<CachedResource> loadResource(CachedResource::Type, CachedResourceRequest&);
    147 #if ENABLE(RESOURCE_TIMING)
    148147    void storeResourceTimingInitiatorInformation(const CachedResourceHandle<CachedResource>&, const CachedResourceRequest&);
    149 #endif
    150148    void requestPreload(CachedResource::Type, CachedResourceRequest&, const String& charset);
    151149
     
    180178    Timer m_garbageCollectDocumentResourcesTimer;
    181179
    182 #if ENABLE(RESOURCE_TIMING)
    183180    struct InitiatorInfo {
    184181        AtomicString name;
     
    186183    };
    187184    HashMap<CachedResource*, InitiatorInfo> m_initiatorMap;
    188 #endif
    189185
    190186    // 29 bits left
  • trunk/Source/WebCore/page/Performance.cpp

    r195743 r200232  
    4848namespace WebCore {
    4949
    50 #if ENABLE(RESOURCE_TIMING)
    5150static const size_t defaultResourceTimingBufferSize = 150;
    52 #endif
    5351
    5452Performance::Performance(Frame& frame)
    5553    : DOMWindowProperty(&frame)
    56 #if ENABLE(RESOURCE_TIMING)
    5754    , m_resourceTimingBufferSize(defaultResourceTimingBufferSize)
    58 #endif // ENABLE(RESOURCE_TIMING)
    5955    , m_referenceTime(frame.document()->loader() ? frame.document()->loader()->timing().referenceMonotonicTime() : monotonicallyIncreasingTime())
    6056#if ENABLE(USER_TIMING)
     
    9288}
    9389
    94 #if ENABLE(PERFORMANCE_TIMELINE)
    95 PassRefPtr<PerformanceEntryList> Performance::webkitGetEntries() const
     90RefPtr<PerformanceEntryList> Performance::getEntries() const
    9691{
    9792    RefPtr<PerformanceEntryList> entries = PerformanceEntryList::create();
    9893
    99 #if ENABLE(RESOURCE_TIMING)
    10094    entries->appendAll(m_resourceTimingBuffer);
    101 #endif // ENABLE(RESOURCE_TIMING)
    10295
    10396#if ENABLE(USER_TIMING)
     
    112105}
    113106
    114 PassRefPtr<PerformanceEntryList> Performance::webkitGetEntriesByType(const String& entryType)
     107RefPtr<PerformanceEntryList> Performance::getEntriesByType(const String& entryType)
    115108{
    116109    RefPtr<PerformanceEntryList> entries = PerformanceEntryList::create();
    117110
    118 #if ENABLE(RESOURCE_TIMING)
    119111    if (equalLettersIgnoringASCIICase(entryType, "resource")) {
    120112        for (auto& resource : m_resourceTimingBuffer)
    121113            entries->append(resource);
    122114    }
    123 #endif
    124115
    125116#if ENABLE(USER_TIMING)
     
    136127}
    137128
    138 PassRefPtr<PerformanceEntryList> Performance::webkitGetEntriesByName(const String& name, const String& entryType)
     129RefPtr<PerformanceEntryList> Performance::getEntriesByName(const String& name, const String& entryType)
    139130{
    140131    RefPtr<PerformanceEntryList> entries = PerformanceEntryList::create();
    141132
    142 #if ENABLE(RESOURCE_TIMING)
    143133    if (entryType.isNull() || equalLettersIgnoringASCIICase(entryType, "resource")) {
    144134        for (auto& resource : m_resourceTimingBuffer) {
     
    147137        }
    148138    }
    149 #endif
    150139
    151140#if ENABLE(USER_TIMING)
     
    162151}
    163152
    164 #endif // ENABLE(PERFORMANCE_TIMELINE)
    165 
    166 #if ENABLE(RESOURCE_TIMING)
    167 
    168 void Performance::webkitClearResourceTimings()
     153void Performance::clearResourceTimings()
    169154{
    170155    m_resourceTimingBuffer.clear();
    171156}
    172157
    173 void Performance::webkitSetResourceTimingBufferSize(unsigned size)
     158void Performance::setResourceTimingBufferSize(unsigned size)
    174159{
    175160    m_resourceTimingBufferSize = size;
    176161    if (isResourceTimingBufferFull())
    177         dispatchEvent(Event::create(eventNames().webkitresourcetimingbufferfullEvent, false, false));
     162        dispatchEvent(Event::create(eventNames().resourcetimingbufferfullEvent, false, false));
    178163}
    179164
     
    188173
    189174    if (isResourceTimingBufferFull())
    190         dispatchEvent(Event::create(eventNames().webkitresourcetimingbufferfullEvent, false, false));
     175        dispatchEvent(Event::create(eventNames().resourcetimingbufferfullEvent, false, false));
    191176}
    192177
     
    195180    return m_resourceTimingBuffer.size() >= m_resourceTimingBufferSize;
    196181}
    197 
    198 #endif // ENABLE(RESOURCE_TIMING)
    199182
    200183#if ENABLE(USER_TIMING)
  • trunk/Source/WebCore/page/Performance.h

    r197563 r200232  
    4141#include "PerformanceTiming.h"
    4242#include "ScriptWrappable.h"
    43 #include <wtf/PassRefPtr.h>
    4443#include <wtf/RefCounted.h>
    4544#include <wtf/RefPtr.h>
     
    6564    double now() const;
    6665
    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);
    7269
    73 #if ENABLE(RESOURCE_TIMING)
    74     void webkitClearResourceTimings();
    75     void webkitSetResourceTimingBufferSize(unsigned int);
     70    void clearResourceTimings();
     71    void setResourceTimingBufferSize(unsigned);
    7672
    7773    void addResourceTiming(const String& initiatorName, Document*, const ResourceRequest&, const ResourceResponse&, double initiationTime, double finishTime);
    78 #endif
    7974
    8075    using RefCounted<Performance>::ref;
     
    9893    mutable RefPtr<PerformanceNavigation> m_navigation;
    9994    mutable RefPtr<PerformanceTiming> m_timing;
    100    
    101 #if ENABLE(RESOURCE_TIMING)
     95
    10296    Vector<RefPtr<PerformanceEntry>> m_resourceTimingBuffer;
    10397    unsigned m_resourceTimingBufferSize;
    104 #endif
    10598
    10699    double m_referenceTime;
  • trunk/Source/WebCore/page/Performance.idl

    r200192 r200232  
    3737    readonly attribute PerformanceTiming timing;
    3838
    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);
    4442
    45 #if defined(ENABLE_RESOURCE_TIMING) && ENABLE_RESOURCE_TIMING
    46     void webkitClearResourceTimings();
    47     void webkitSetResourceTimingBufferSize(unsigned long maxSize);
    4843
    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;
    5148
    5249    // See http://www.w3.org/TR/2012/CR-user-timing-20120726/
  • trunk/Source/WebCore/page/PerformanceEntry.cpp

    r135458 r200232  
    3232#include "PerformanceEntry.h"
    3333
    34 #if ENABLE(WEB_TIMING) && ENABLE(PERFORMANCE_TIMELINE)
     34#if ENABLE(WEB_TIMING)
    3535
    3636namespace WebCore {
     
    7070} // namespace WebCore
    7171
    72 #endif // ENABLE(WEB_TIMING) && ENABLE(PERFORMANCE_TIMELINE)
     72#endif // ENABLE(WEB_TIMING)
  • trunk/Source/WebCore/page/PerformanceEntry.h

    r140882 r200232  
    3333#define PerformanceEntry_h
    3434
    35 #if ENABLE(WEB_TIMING) && ENABLE(PERFORMANCE_TIMELINE)
     35#if ENABLE(WEB_TIMING)
    3636
    3737#include "Performance.h"
     
    7272}
    7373
    74 #endif // !ENABLE(WEB_TIMING) && ENABLE(PERFORMANCE_TIMELINE)
     74#endif // !ENABLE(WEB_TIMING)
    7575#endif // !defined(PerformanceEntry_h)
  • trunk/Source/WebCore/page/PerformanceEntry.idl

    r168302 r200232  
    3232[
    3333    Conditional=WEB_TIMING,
    34     Conditional=PERFORMANCE_TIMELINE,
     34    EnabledAtRuntime=ResourceTiming,
    3535    CustomToJSObject,
    3636] interface PerformanceEntry {
  • trunk/Source/WebCore/page/PerformanceEntryList.cpp

    r157653 r200232  
    3333#include "PerformanceEntryList.h"
    3434
    35 #if ENABLE(WEB_TIMING) && ENABLE(PERFORMANCE_TIMELINE)
     35#if ENABLE(WEB_TIMING)
    3636
    3737#include "PerformanceEntry.h"
     
    7676} // namespace WebCore
    7777
    78 #endif // ENABLE(WEB_TIMING) && ENABLE(PERFORMANCE_TIMELINE)
     78#endif // ENABLE(WEB_TIMING)
  • trunk/Source/WebCore/page/PerformanceEntryList.h

    r184066 r200232  
    3333#define PerformanceEntryList_h
    3434
    35 #if ENABLE(WEB_TIMING) && ENABLE(PERFORMANCE_TIMELINE)
     35#if ENABLE(WEB_TIMING)
    3636
    3737#include <wtf/PassRefPtr.h>
     
    6565} // namespace WebCore
    6666
    67 #endif // !ENABLE(WEB_TIMING) && ENABLE(PERFORMANCE_TIMELINE)
     67#endif // !ENABLE(WEB_TIMING)
    6868#endif // PerformanceEntryList_h
  • trunk/Source/WebCore/page/PerformanceEntryList.idl

    r159061 r200232  
    3333    NoInterfaceObject,
    3434    Conditional=WEB_TIMING,
    35     Conditional=PERFORMANCE_TIMELINE,
     35    EnabledAtRuntime=ResourceTiming,
    3636    ImplementationLacksVTable,
    3737] interface PerformanceEntryList {
     
    3939    getter PerformanceEntry item(unsigned long index);
    4040};
    41 
  • trunk/Source/WebCore/page/PerformanceResourceTiming.cpp

    r195452 r200232  
    3232#include "config.h"
    3333#include "PerformanceResourceTiming.h"
    34 
    35 #if ENABLE(RESOURCE_TIMING)
    3634
    3735#include "Document.h"
     
    200198
    201199} // namespace WebCore
    202 
    203 #endif // ENABLE(RESOURCE_TIMING)
  • trunk/Source/WebCore/page/PerformanceResourceTiming.h

    r184066 r200232  
    3232#ifndef PerformanceResourceTiming_h
    3333#define PerformanceResourceTiming_h
    34 
    35 #if ENABLE(RESOURCE_TIMING)
    3634
    3735#include "PerformanceEntry.h"
     
    8684}
    8785
    88 #endif // ENABLE(RESOURCE_TIMING)
    89 
    9086#endif // !defined(PerformanceResourceTiming_h)
  • trunk/Source/WebCore/page/PerformanceResourceTiming.idl

    r168647 r200232  
    3131// See: https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/ResourceTiming/Overview.html
    3232[
    33     Conditional=RESOURCE_TIMING,
     33    EnabledAtRuntime=ResourceTiming
    3434] interface PerformanceResourceTiming : PerformanceEntry {
    3535    readonly attribute DOMString initiatorType;
  • trunk/Source/WebCore/testing/Internals.cpp

    r200215 r200232  
    33263326#endif
    33273327
    3328 }
     3328void Internals::setResourceTimingSupport(bool enable)
     3329{
     3330    RuntimeEnabledFeatures::sharedFeatures().setResourceTimingEnabled(enable);
     3331}
     3332
     3333}
  • trunk/Source/WebCore/testing/Internals.h

    r200215 r200232  
    469469    void setViewportForceAlwaysUserScalable(bool);
    470470    void setLinkPreloadSupport(bool);
     471    void setResourceTimingSupport(bool);
    471472
    472473#if ENABLE(CSS_GRID_LAYOUT)
  • trunk/Source/WebCore/testing/Internals.idl

    r200215 r200232  
    452452#endif
    453453
    454 };
     454    void setResourceTimingSupport(boolean scalable);
     455};
  • trunk/Source/cmake/WebKitFeatures.cmake

    r200075 r200232  
    159159    WEBKIT_OPTION_DEFINE(ENABLE_ORIENTATION_EVENTS "Toggle Orientation Events support" PRIVATE OFF)
    160160    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)
    162161    WEBKIT_OPTION_DEFINE(ENABLE_POINTER_LOCK "Toggle pointer lock support" PRIVATE OFF)
    163162    WEBKIT_OPTION_DEFINE(ENABLE_PROXIMITY_EVENTS "Toggle Proximity Events support" PRIVATE OFF)
Note: See TracChangeset for help on using the changeset viewer.