Source/WebCore/ChangeLog

 12012-03-05 James Simonsen <simonjam@chromium.org>
 2
 3 [Web Timing] Add a vendor-prefixed Performance Timeline API
 4 https://bugs.webkit.org/show_bug.cgi?id=80350
 5
 6 As described here: http://dvcs.w3.org/hg/webperf/raw-file/tip/specs/PerformanceTimeline/Overview.html
 7
 8 The API is there and should be correct, but it isn't particularly useful,
 9 because nothing is populated. Upcoming changes will add Navigation Timing
 10 and Resource Timing.
 11
 12 Reviewed by NOBODY (OOPS!).
 13
 14 Test: fast/dom/Window/window-properties-performance.html
 15
 16 * CMakeLists.txt: Added PerformanceEntry* files.
 17 * DerivedSources.pri: Ditto.
 18 * GNUmakefile.list.am: Ditto.
 19 * WebCore.gypi: Ditto.
 20 * WebCore.vcproj/WebCore.vcproj: Ditto.
 21 * WebCore.xcodeproj/project.pbxproj: Ditto.
 22 * page/Performance.cpp:
 23 (WebCore::Performance::webkitGetEntries): Added.
 24 (WebCore):
 25 (WebCore::Performance::webkitGetEntriesByType): Added.
 26 (WebCore::Performance::webkitGetEntriesByName): Added.
 27 * page/Performance.h:
 28 (Performance):
 29 * page/Performance.idl:
 30 * page/PerformanceEntry.cpp: Added.
 31 (WebCore):
 32 (WebCore::PerformanceEntry::PerformanceEntry):
 33 (WebCore::PerformanceEntry::name):
 34 (WebCore::PerformanceEntry::entryType):
 35 (WebCore::PerformanceEntry::startTime):
 36 (WebCore::PerformanceEntry::duration):
 37 * page/PerformanceEntry.h: Added.
 38 (WebCore):
 39 (PerformanceEntry):
 40 * page/PerformanceEntry.idl: Added.
 41 * page/PerformanceEntryList.cpp: Added.
 42 (WebCore):
 43 (WebCore::PerformanceEntryList::PerformanceEntryList):
 44 (WebCore::PerformanceEntryList::~PerformanceEntryList):
 45 (WebCore::PerformanceEntryList::length):
 46 (WebCore::PerformanceEntryList::item):
 47 (WebCore::PerformanceEntryList::append):
 48 * page/PerformanceEntryList.h: Added.
 49 (WebCore):
 50 (PerformanceEntryList):
 51 (WebCore::PerformanceEntryList::create):
 52 * page/PerformanceEntryList.idl: Added.
 53
1542012-03-05 Stephen Chenney <schenney@chromium.org>
255
356 [Chromium] SVG Composite of Offset crashes

Source/WebCore/CMakeLists.txt

@@SET(WebCore_IDL_FILES
350350 page/MemoryInfo.idl
351351 page/Navigator.idl
352352 page/Performance.idl
 353 page/PerformanceEntry.idl
 354 page/PerformanceEntryList.idl
353355 page/PerformanceNavigation.idl
354356 page/PerformanceTiming.idl
355357 page/Screen.idl

@@SET(WebCore_SOURCES
10681070 page/PageSerializer.cpp
10691071 page/PageVisibilityState.cpp
10701072 page/Performance.cpp
 1073 page/PerformanceEntry.cpp
 1074 page/PerformanceEntryList.cpp
10711075 page/PerformanceNavigation.cpp
10721076 page/PerformanceTiming.cpp
10731077 page/PrintContext.cpp

Source/WebCore/DerivedSources.pri

@@IDL_BINDINGS += \
373373 $$PWD/page/MemoryInfo.idl \
374374 $$PWD/page/Navigator.idl \
375375 $$PWD/page/Performance.idl \
 376 $$PWD/page/PerformanceEntry.idl \
 377 $$PWD/page/PerformanceEntryList.idl \
376378 $$PWD/page/PerformanceNavigation.idl \
377379 $$PWD/page/PerformanceTiming.idl \
378380 $$PWD/page/Screen.idl \

Source/WebCore/GNUmakefile.list.am

@@webcore_built_sources += \
436436 DerivedSources/WebCore/JSPeerConnection.h \
437437 DerivedSources/WebCore/JSPerformance.cpp \
438438 DerivedSources/WebCore/JSPerformance.h \
 439 DerivedSources/WebCore/JSPerformanceEntry.cpp \
 440 DerivedSources/WebCore/JSPerformanceEntry.h \
 441 DerivedSources/WebCore/JSPerformanceEntryList.cpp \
 442 DerivedSources/WebCore/JSPerformanceEntryList.h \
439443 DerivedSources/WebCore/JSPerformanceNavigation.cpp \
440444 DerivedSources/WebCore/JSPerformanceNavigation.h \
441445 DerivedSources/WebCore/JSPerformanceTiming.cpp \

@@dom_binding_idls += \
912916 $(WebCore)/page/MemoryInfo.idl \
913917 $(WebCore)/page/Navigator.idl \
914918 $(WebCore)/page/Performance.idl \
 919 $(WebCore)/page/PerformanceEntry.idl \
 920 $(WebCore)/page/PerformanceEntryList.idl \
915921 $(WebCore)/page/PerformanceNavigation.idl \
916922 $(WebCore)/page/PerformanceTiming.idl \
917923 $(WebCore)/page/Screen.idl \

@@webcore_sources += \
28672873 Source/WebCore/page/PageVisibilityState.h \
28682874 Source/WebCore/page/Performance.cpp \
28692875 Source/WebCore/page/Performance.h \
 2876 Source/WebCore/page/PerformanceEntry.cpp \
 2877 Source/WebCore/page/PerformanceEntry.h \
 2878 Source/WebCore/page/PerformanceEntryList.cpp \
 2879 Source/WebCore/page/PerformanceEntryList.h \
28702880 Source/WebCore/page/PerformanceNavigation.cpp \
28712881 Source/WebCore/page/PerformanceNavigation.h \
28722882 Source/WebCore/page/PerformanceTiming.cpp \

Source/WebCore/Target.pri

@@SOURCES += \
10161016 page/PageGroupLoadDeferrer.cpp \
10171017 page/PageVisibilityState.cpp \
10181018 page/Performance.cpp \
 1019 page/PerformanceEntry.cpp \
 1020 page/PerformanceEntryList.cpp \
10191021 page/PerformanceNavigation.cpp \
10201022 page/PerformanceTiming.cpp \
10211023 page/PrintContext.cpp \

Source/WebCore/WebCore.gypi

10431043 'page/Navigator.idl',
10441044 'page/NavigatorRegisterProtocolHandler.idl',
10451045 'page/Performance.idl',
 1046 'page/PerformanceEntry.idl',
 1047 'page/PerformanceEntryList.idl',
10461048 'page/PerformanceNavigation.idl',
10471049 'page/PerformanceTiming.idl',
10481050 'page/PointerLock.idl',

27712773 'page/PageVisibilityState.cpp',
27722774 'page/Performance.cpp',
27732775 'page/Performance.h',
 2776 'page/PerformanceEntry.cpp',
 2777 'page/PerformanceEntry.h',
 2778 'page/PerformanceEntryList.cpp',
 2779 'page/PerformanceEntryList.h',
27742780 'page/PerformanceNavigation.cpp',
27752781 'page/PerformanceNavigation.h',
27762782 'page/PerformanceTiming.cpp',

74747480 '<(PRODUCT_DIR)/DerivedSources/WebCore/JSPageTransitionEvent.h',
74757481 '<(PRODUCT_DIR)/DerivedSources/WebCore/JSPerformance.cpp',
74767482 '<(PRODUCT_DIR)/DerivedSources/WebCore/JSPerformance.h',
 7483 '<(PRODUCT_DIR)/DerivedSources/WebCore/JSPerformanceEntry.cpp',
 7484 '<(PRODUCT_DIR)/DerivedSources/WebCore/JSPerformanceEntry.h',
 7485 '<(PRODUCT_DIR)/DerivedSources/WebCore/JSPerformanceEntryList.cpp',
 7486 '<(PRODUCT_DIR)/DerivedSources/WebCore/JSPerformanceEntryList.h',
74777487 '<(PRODUCT_DIR)/DerivedSources/WebCore/JSPerformanceNavigation.cpp',
74787488 '<(PRODUCT_DIR)/DerivedSources/WebCore/JSPerformanceNavigation.h',
74797489 '<(PRODUCT_DIR)/DerivedSources/WebCore/JSPerformanceTiming.cpp',

Source/WebCore/WebCore.vcproj/WebCore.vcproj

1226612266 >
1226712267 </File>
1226812268 <File
 12269 RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\JSPerformanceEntry.cpp"
 12270 >
 12271 <FileConfiguration
 12272 Name="Debug|Win32"
 12273 ExcludedFromBuild="true"
 12274 >
 12275 <Tool
 12276 Name="VCCLCompilerTool"
 12277 />
 12278 </FileConfiguration>
 12279 <FileConfiguration
 12280 Name="Release|Win32"
 12281 ExcludedFromBuild="true"
 12282 >
 12283 <Tool
 12284 Name="VCCLCompilerTool"
 12285 />
 12286 </FileConfiguration>
 12287 <FileConfiguration
 12288 Name="Debug_Cairo_CFLite|Win32"
 12289 ExcludedFromBuild="true"
 12290 >
 12291 <Tool
 12292 Name="VCCLCompilerTool"
 12293 />
 12294 </FileConfiguration>
 12295 <FileConfiguration
 12296 Name="Release_Cairo_CFLite|Win32"
 12297 ExcludedFromBuild="true"
 12298 >
 12299 <Tool
 12300 Name="VCCLCompilerTool"
 12301 />
 12302 </FileConfiguration>
 12303 <FileConfiguration
 12304 Name="Debug_All|Win32"
 12305 ExcludedFromBuild="true"
 12306 >
 12307 <Tool
 12308 Name="VCCLCompilerTool"
 12309 />
 12310 </FileConfiguration>
 12311 <FileConfiguration
 12312 Name="Production|Win32"
 12313 ExcludedFromBuild="true"
 12314 >
 12315 <Tool
 12316 Name="VCCLCompilerTool"
 12317 />
 12318 </FileConfiguration>
 12319 </File>
 12320 <File
 12321 RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\JSPerformanceEntry.h"
 12322 >
 12323 </File>
 12324 <File
 12325 RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\JSPerformanceEntryList.cpp"
 12326 >
 12327 <FileConfiguration
 12328 Name="Debug|Win32"
 12329 ExcludedFromBuild="true"
 12330 >
 12331 <Tool
 12332 Name="VCCLCompilerTool"
 12333 />
 12334 </FileConfiguration>
 12335 <FileConfiguration
 12336 Name="Release|Win32"
 12337 ExcludedFromBuild="true"
 12338 >
 12339 <Tool
 12340 Name="VCCLCompilerTool"
 12341 />
 12342 </FileConfiguration>
 12343 <FileConfiguration
 12344 Name="Debug_Cairo_CFLite|Win32"
 12345 ExcludedFromBuild="true"
 12346 >
 12347 <Tool
 12348 Name="VCCLCompilerTool"
 12349 />
 12350 </FileConfiguration>
 12351 <FileConfiguration
 12352 Name="Release_Cairo_CFLite|Win32"
 12353 ExcludedFromBuild="true"
 12354 >
 12355 <Tool
 12356 Name="VCCLCompilerTool"
 12357 />
 12358 </FileConfiguration>
 12359 <FileConfiguration
 12360 Name="Debug_All|Win32"
 12361 ExcludedFromBuild="true"
 12362 >
 12363 <Tool
 12364 Name="VCCLCompilerTool"
 12365 />
 12366 </FileConfiguration>
 12367 <FileConfiguration
 12368 Name="Production|Win32"
 12369 ExcludedFromBuild="true"
 12370 >
 12371 <Tool
 12372 Name="VCCLCompilerTool"
 12373 />
 12374 </FileConfiguration>
 12375 </File>
 12376 <File
 12377 RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\JSPerformanceEntryList.h"
 12378 >
 12379 </File>
 12380 <File
1226912381 RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\JSPerformanceNavigation.cpp"
1227012382 >
1227112383 <FileConfiguration

2595426066 >
2595526067 </File>
2595626068 <File
 26069 RelativePath="..\page\PerformanceEntry.cpp"
 26070 >
 26071 </File>
 26072 <File
 26073 RelativePath="..\page\PerformanceEntry.h"
 26074 >
 26075 </File>
 26076 <File
 26077 RelativePath="..\page\PerformanceEntryList.cpp"
 26078 >
 26079 </File>
 26080 <File
 26081 RelativePath="..\page\PerformanceEntryList.h"
 26082 >
 26083 </File>
 26084 <File
2595726085 RelativePath="..\page\PerformanceNavigation.cpp"
2595826086 >
2595926087 </File>

Source/WebCore/WebCore.xcodeproj/project.pbxproj

28782878 861C2EA413FB4FDD00062ABB /* DocumentLoadTiming.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 861C2EA313FB4FDD00062ABB /* DocumentLoadTiming.cpp */; };
28792879 861C2EA613FB4FFF00062ABB /* ResourceLoadTiming.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 861C2EA513FB4FFF00062ABB /* ResourceLoadTiming.cpp */; };
28802880 86243D0111BC31F700CC006A /* JSArrayBufferViewHelper.h in Headers */ = {isa = PBXBuildFile; fileRef = 86243D0011BC31F700CC006A /* JSArrayBufferViewHelper.h */; };
 2881 86BE340015058CB200CE0FD8 /* PerformanceEntry.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 86BE33FA15058CB200CE0FD8 /* PerformanceEntry.cpp */; };
 2882 86BE340115058CB200CE0FD8 /* PerformanceEntry.h in Headers */ = {isa = PBXBuildFile; fileRef = 86BE33FB15058CB200CE0FD8 /* PerformanceEntry.h */; };
 2883 86BE340315058CB200CE0FD8 /* PerformanceEntryList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 86BE33FD15058CB200CE0FD8 /* PerformanceEntryList.cpp */; };
 2884 86BE340415058CB200CE0FD8 /* PerformanceEntryList.h in Headers */ = {isa = PBXBuildFile; fileRef = 86BE33FE15058CB200CE0FD8 /* PerformanceEntryList.h */; };
28812885 86D982F7125C154000AD9E3D /* DocumentTiming.h in Headers */ = {isa = PBXBuildFile; fileRef = 86D982F6125C154000AD9E3D /* DocumentTiming.h */; settings = {ATTRIBUTES = (Private, ); }; };
28822886 890AE0E11256A07900F5968C /* DirectoryReaderBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 890AE0E01256A07900F5968C /* DirectoryReaderBase.h */; };
28832887 892CF192134C620D00AAEDA1 /* StorageInfoErrorCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = 892CF18D134C620D00AAEDA1 /* StorageInfoErrorCallback.h */; };

97869790 861C2EA313FB4FDD00062ABB /* DocumentLoadTiming.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DocumentLoadTiming.cpp; sourceTree = "<group>"; };
97879791 861C2EA513FB4FFF00062ABB /* ResourceLoadTiming.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ResourceLoadTiming.cpp; sourceTree = "<group>"; };
97889792 86243D0011BC31F700CC006A /* JSArrayBufferViewHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSArrayBufferViewHelper.h; sourceTree = "<group>"; };
 9793 86BE33FA15058CB200CE0FD8 /* PerformanceEntry.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PerformanceEntry.cpp; sourceTree = "<group>"; };
 9794 86BE33FB15058CB200CE0FD8 /* PerformanceEntry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PerformanceEntry.h; sourceTree = "<group>"; };
 9795 86BE33FC15058CB200CE0FD8 /* PerformanceEntry.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = PerformanceEntry.idl; sourceTree = "<group>"; };
 9796 86BE33FD15058CB200CE0FD8 /* PerformanceEntryList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PerformanceEntryList.cpp; sourceTree = "<group>"; };
 9797 86BE33FE15058CB200CE0FD8 /* PerformanceEntryList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PerformanceEntryList.h; sourceTree = "<group>"; };
 9798 86BE33FF15058CB200CE0FD8 /* PerformanceEntryList.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = PerformanceEntryList.idl; sourceTree = "<group>"; };
97899799 86D982F6125C154000AD9E3D /* DocumentTiming.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DocumentTiming.h; sourceTree = "<group>"; };
97909800 890AE0E01256A07900F5968C /* DirectoryReaderBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DirectoryReaderBase.h; path = fileapi/DirectoryReaderBase.h; sourceTree = "<group>"; };
97919801 892CF18D134C620D00AAEDA1 /* StorageInfoErrorCallback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StorageInfoErrorCallback.h; sourceTree = "<group>"; };

1531015320 8A844D0111D3C18E0014065C /* Performance.cpp */,
1531115321 8A844D0211D3C18E0014065C /* Performance.h */,
1531215322 8A844D0311D3C18E0014065C /* Performance.idl */,
 15323 86BE33FA15058CB200CE0FD8 /* PerformanceEntry.cpp */,
 15324 86BE33FB15058CB200CE0FD8 /* PerformanceEntry.h */,
 15325 86BE33FC15058CB200CE0FD8 /* PerformanceEntry.idl */,
 15326 86BE33FD15058CB200CE0FD8 /* PerformanceEntryList.cpp */,
 15327 86BE33FE15058CB200CE0FD8 /* PerformanceEntryList.h */,
 15328 86BE33FF15058CB200CE0FD8 /* PerformanceEntryList.idl */,
1531315329 8AF4E55211DC5A36000ED3DE /* PerformanceNavigation.cpp */,
1531415330 8AF4E55311DC5A36000ED3DE /* PerformanceNavigation.h */,
1531515331 8AF4E55411DC5A36000ED3DE /* PerformanceNavigation.idl */,

2359023606 B27535650B053814002CE64F /* PDFDocumentImage.h in Headers */,
2359123607 8A7CC96B12076D73001D4588 /* PendingScript.h in Headers */,
2359223608 8A844D0511D3C18E0014065C /* Performance.h in Headers */,
 23609 86BE340115058CB200CE0FD8 /* PerformanceEntry.h in Headers */,
 23610 86BE340415058CB200CE0FD8 /* PerformanceEntryList.h in Headers */,
2359323611 8AF4E55611DC5A36000ED3DE /* PerformanceNavigation.h in Headers */,
2359423612 8AF4E55C11DC5A63000ED3DE /* PerformanceTiming.h in Headers */,
2359523613 49D5DC2E0F423A73008F20FD /* PerspectiveTransformOperation.h in Headers */,

2674826766 B27535640B053814002CE64F /* PDFDocumentImage.cpp in Sources */,
2674926767 8A7CC97012076F8A001D4588 /* PendingScript.cpp in Sources */,
2675026768 8A844D0411D3C18E0014065C /* Performance.cpp in Sources */,
 26769 86BE340015058CB200CE0FD8 /* PerformanceEntry.cpp in Sources */,
 26770 86BE340315058CB200CE0FD8 /* PerformanceEntryList.cpp in Sources */,
2675126771 8AF4E55511DC5A36000ED3DE /* PerformanceNavigation.cpp in Sources */,
2675226772 8AF4E55B11DC5A63000ED3DE /* PerformanceTiming.cpp in Sources */,
2675326773 49D5DC2D0F423A73008F20FD /* PerspectiveTransformOperation.cpp in Sources */,

Source/WebCore/page/Performance.cpp

@@PerformanceTiming* Performance::timing() const
6767 return m_timing.get();
6868}
6969
 70PassRefPtr<PerformanceEntryList> Performance::webkitGetEntries() const
 71{
 72 RefPtr<PerformanceEntryList> entries = PerformanceEntryList::create();
 73 return entries;
 74}
 75
 76PassRefPtr<PerformanceEntryList> Performance::webkitGetEntriesByType(const String& entryType)
 77{
 78 RefPtr<PerformanceEntryList> entries = PerformanceEntryList::create();
 79 return entries;
 80}
 81
 82PassRefPtr<PerformanceEntryList> Performance::webkitGetEntriesByName(const String& name, const String& entryType)
 83{
 84 RefPtr<PerformanceEntryList> entries = PerformanceEntryList::create();
 85 return entries;
 86}
 87
7088} // namespace WebCore
7189
7290#endif // ENABLE(WEB_TIMING)

Source/WebCore/page/Performance.h

3535
3636#include "DOMWindowProperty.h"
3737#include "MemoryInfo.h"
 38#include "PerformanceEntryList.h"
3839#include "PerformanceNavigation.h"
3940#include "PerformanceTiming.h"
4041#include <wtf/PassRefPtr.h>
4142#include <wtf/RefCounted.h>
4243#include <wtf/RefPtr.h>
 44#include <wtf/text/WTFString.h>
4345
4446namespace WebCore {
4547

@@public:
5153 PerformanceNavigation* navigation() const;
5254 PerformanceTiming* timing() const;
5355
 56 PassRefPtr<PerformanceEntryList> webkitGetEntries() const;
 57 PassRefPtr<PerformanceEntryList> webkitGetEntriesByType(const String& entryType);
 58 PassRefPtr<PerformanceEntryList> webkitGetEntriesByName(const String& name, const String& entryType);
 59
5460private:
5561 explicit Performance(Frame*);
5662

Source/WebCore/page/Performance.idl

@@module window {
3838 readonly attribute PerformanceNavigation navigation;
3939 readonly attribute PerformanceTiming timing;
4040 readonly attribute [V8CustomGetter] MemoryInfo memory;
 41
 42 PerformanceEntryList webkitGetEntries();
 43 PerformanceEntryList webkitGetEntriesByType(in DOMString entryType);
 44 PerformanceEntryList webkitGetEntriesByName(in DOMString name, in [Optional=DefaultIsNullString] DOMString entryType);
4145 };
4246
4347}

Source/WebCore/page/PerformanceEntry.cpp

 1/*
 2 * Copyright (C) 2012 Google Inc. All rights reserved.
 3 *
 4 * Redistribution and use in source and binary forms, with or without
 5 * modification, are permitted provided that the following conditions are
 6 * met:
 7 *
 8 * * Redistributions of source code must retain the above copyright
 9 * notice, this list of conditions and the following disclaimer.
 10 * * Redistributions in binary form must reproduce the above
 11 * copyright notice, this list of conditions and the following disclaimer
 12 * in the documentation and/or other materials provided with the
 13 * distribution.
 14 * * Neither the name of Google Inc. nor the names of its
 15 * contributors may be used to endorse or promote products derived from
 16 * this software without specific prior written permission.
 17 *
 18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 19 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 20 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 29 */
 30
 31#include "config.h"
 32#include "PerformanceEntry.h"
 33
 34#if ENABLE(WEB_TIMING)
 35
 36namespace WebCore {
 37
 38PerformanceEntry::PerformanceEntry(const String& name, const String& entryType, double startTime, double duration)
 39 : m_name(name)
 40 , m_entryType(entryType)
 41 , m_startTime(startTime)
 42 , m_duration(duration)
 43{
 44}
 45
 46String PerformanceEntry::name() const
 47{
 48 return m_name;
 49}
 50
 51String PerformanceEntry::entryType() const
 52{
 53 return m_entryType;
 54}
 55
 56double PerformanceEntry::startTime() const
 57{
 58 return m_startTime;
 59}
 60
 61double PerformanceEntry::duration() const
 62{
 63 return m_duration;
 64}
 65
 66} // namespace WebCore
 67
 68#endif // ENABLE(WEB_TIMING)

Source/WebCore/page/PerformanceEntry.h

 1/*
 2 * Copyright (C) 2012 Google Inc. All rights reserved.
 3 *
 4 * Redistribution and use in source and binary forms, with or without
 5 * modification, are permitted provided that the following conditions are
 6 * met:
 7 *
 8 * * Redistributions of source code must retain the above copyright
 9 * notice, this list of conditions and the following disclaimer.
 10 * * Redistributions in binary form must reproduce the above
 11 * copyright notice, this list of conditions and the following disclaimer
 12 * in the documentation and/or other materials provided with the
 13 * distribution.
 14 * * Neither the name of Google Inc. nor the names of its
 15 * contributors may be used to endorse or promote products derived from
 16 * this software without specific prior written permission.
 17 *
 18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 19 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 20 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 29 */
 30
 31#ifndef PerformanceEntry_h
 32#define PerformanceEntry_h
 33
 34#if ENABLE(WEB_TIMING)
 35
 36#include "Performance.h"
 37#include <wtf/PassRefPtr.h>
 38#include <wtf/RefCounted.h>
 39#include <wtf/text/WTFString.h>
 40
 41namespace WebCore {
 42
 43class PerformanceEntry : public RefCounted<PerformanceEntry> {
 44public:
 45 String name() const;
 46 String entryType() const;
 47 double startTime() const;
 48 double duration() const;
 49
 50protected:
 51 PerformanceEntry(const String& name, const String& entryType, double startTime, double duration);
 52
 53private:
 54 String m_name;
 55 String m_entryType;
 56 double m_startTime;
 57 double m_duration;
 58};
 59
 60}
 61
 62#endif // !ENABLE(WEB_TIMING)
 63#endif // !defined(PerformanceEntry_h)

Source/WebCore/page/PerformanceEntry.idl

 1/*
 2 * Copyright (C) 2012 Google Inc. All rights reserved.
 3 *
 4 * Redistribution and use in source and binary forms, with or without
 5 * modification, are permitted provided that the following conditions are
 6 * met:
 7 *
 8 * * Redistributions of source code must retain the above copyright
 9 * notice, this list of conditions and the following disclaimer.
 10 * * Redistributions in binary form must reproduce the above
 11 * copyright notice, this list of conditions and the following disclaimer
 12 * in the documentation and/or other materials provided with the
 13 * distribution.
 14 * * Neither the name of Google Inc. nor the names of its
 15 * contributors may be used to endorse or promote products derived from
 16 * this software without specific prior written permission.
 17 *
 18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 19 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 20 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 29 */
 30
 31module window {
 32
 33 // See: https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/PerformanceTimeline/Overview.html
 34 interface [
 35 Conditional=WEB_TIMING,
 36 OmitConstructor
 37 ] PerformanceEntry {
 38 readonly attribute DOMString name;
 39 readonly attribute DOMString entryType;
 40 readonly attribute double startTime;
 41 readonly attribute double duration;
 42 };
 43}

Source/WebCore/page/PerformanceEntryList.cpp

 1/*
 2 * Copyright (C) 2012 Google Inc. All rights reserved.
 3 *
 4 * Redistribution and use in source and binary forms, with or without
 5 * modification, are permitted provided that the following conditions are
 6 * met:
 7 *
 8 * * Redistributions of source code must retain the above copyright
 9 * notice, this list of conditions and the following disclaimer.
 10 * * Redistributions in binary form must reproduce the above
 11 * copyright notice, this list of conditions and the following disclaimer
 12 * in the documentation and/or other materials provided with the
 13 * distribution.
 14 * * Neither the name of Google Inc. nor the names of its
 15 * contributors may be used to endorse or promote products derived from
 16 * this software without specific prior written permission.
 17 *
 18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 19 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 20 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 29 */
 30
 31#include "config.h"
 32#include "PerformanceEntryList.h"
 33
 34#if ENABLE(WEB_TIMING)
 35
 36#include "PerformanceEntry.h"
 37
 38namespace WebCore {
 39
 40PerformanceEntryList::PerformanceEntryList()
 41{
 42}
 43
 44PerformanceEntryList::~PerformanceEntryList()
 45{
 46}
 47
 48unsigned PerformanceEntryList::length() const
 49{
 50 return m_entries.size();
 51}
 52
 53PerformanceEntry* PerformanceEntryList::item(unsigned index)
 54{
 55 if (index < m_entries.size())
 56 return m_entries[index].get();
 57 return 0;
 58}
 59
 60void PerformanceEntryList::append(PassRefPtr<PerformanceEntry> entry)
 61{
 62 m_entries.append(entry);
 63}
 64
 65} // namespace WebCore
 66
 67#endif // ENABLE(WEB_TIMING)

Source/WebCore/page/PerformanceEntryList.h

 1/*
 2 * Copyright (C) 2012 Google Inc. All rights reserved.
 3 *
 4 * Redistribution and use in source and binary forms, with or without
 5 * modification, are permitted provided that the following conditions are
 6 * met:
 7 *
 8 * * Redistributions of source code must retain the above copyright
 9 * notice, this list of conditions and the following disclaimer.
 10 * * Redistributions in binary form must reproduce the above
 11 * copyright notice, this list of conditions and the following disclaimer
 12 * in the documentation and/or other materials provided with the
 13 * distribution.
 14 * * Neither the name of Google Inc. nor the names of its
 15 * contributors may be used to endorse or promote products derived from
 16 * this software without specific prior written permission.
 17 *
 18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 19 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 20 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 29 */
 30
 31#ifndef PerformanceEntryList_h
 32#define PerformanceEntryList_h
 33
 34#if ENABLE(WEB_TIMING)
 35
 36#include <wtf/PassRefPtr.h>
 37#include <wtf/RefCounted.h>
 38#include <wtf/RefPtr.h>
 39#include <wtf/Vector.h>
 40
 41namespace WebCore {
 42
 43class PerformanceEntry;
 44
 45class PerformanceEntryList : public RefCounted<PerformanceEntryList> {
 46public:
 47 static PassRefPtr<PerformanceEntryList> create() { return adoptRef(new PerformanceEntryList); }
 48 ~PerformanceEntryList();
 49
 50 unsigned length() const;
 51 PerformanceEntry* item(unsigned index);
 52
 53 void append(PassRefPtr<PerformanceEntry>);
 54
 55private:
 56 PerformanceEntryList();
 57
 58 Vector<RefPtr<PerformanceEntry> > m_entries;
 59};
 60
 61} // namespace WebCore
 62
 63#endif // !ENABLE(WEB_TIMING)
 64#endif // PerformanceEntryList_h

Source/WebCore/page/PerformanceEntryList.idl

 1/*
 2 * Copyright (C) 2012 Google Inc. All rights reserved.
 3 *
 4 * Redistribution and use in source and binary forms, with or without
 5 * modification, are permitted provided that the following conditions are
 6 * met:
 7 *
 8 * * Redistributions of source code must retain the above copyright
 9 * notice, this list of conditions and the following disclaimer.
 10 * * Redistributions in binary form must reproduce the above
 11 * copyright notice, this list of conditions and the following disclaimer
 12 * in the documentation and/or other materials provided with the
 13 * distribution.
 14 * * Neither the name of Google Inc. nor the names of its
 15 * contributors may be used to endorse or promote products derived from
 16 * this software without specific prior written permission.
 17 *
 18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 19 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 20 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 29 */
 30
 31module window {
 32
 33 // See: https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/PerformanceTimeline/Overview.html
 34 interface [
 35 Conditional=WEB_TIMING,
 36 OmitConstructor,
 37 IndexedGetter
 38 ] PerformanceEntryList {
 39 readonly attribute unsigned long length;
 40 PerformanceEntry item(in unsigned long index);
 41 };
 42
 43}

LayoutTests/ChangeLog

 12012-03-05 James Simonsen <simonjam@chromium.org>
 2
 3 [Web Timing] Add a vendor-prefixed Performance Timeline API
 4 https://bugs.webkit.org/show_bug.cgi?id=80350
 5
 6 Reviewed by NOBODY (OOPS!).
 7
 8 * fast/dom/Window/window-properties-performance-expected.txt:
 9
1102012-03-05 Gavin Barraclough <barraclough@apple.com>
211
312 putByIndex should throw in strict mode

LayoutTests/fast/dom/Window/window-properties-performance-expected.txt

@@window.performance.timing.responseStart [number]
3434window.performance.timing.secureConnectionStart [number]
3535window.performance.timing.unloadEventEnd [number]
3636window.performance.timing.unloadEventStart [number]
 37window.performance.webkitGetEntries [function]
 38window.performance.webkitGetEntriesByName [function]
 39window.performance.webkitGetEntriesByType [function]
3740window.performance.timing [printed above as window.performance.timing]
3841window.performance.navigation [printed above as window.performance.navigation]
3942window.performance [string]