Commit 4e24b669 authored by timothy@apple.com's avatar timothy@apple.com

Start fleshing out the Overview Timeline view.

This gets the overview populating in the Timeline sidebar. The graph side is still empty.

https://bugs.webkit.org/show_bug.cgi?id=124005

Reviewed by Joseph Pecoraro.

* Localizations/en.lproj/localizedStrings.js: Updated.
* UserInterface/Frame.js:
(WebInspector.Frame.prototype.addResource):
* UserInterface/Images/TimelineRecordAnimation.svg: Added.
* UserInterface/Images/TimelineRecordEvent.svg: Added.
* UserInterface/Images/TimelineRecordLayout.svg: Added.
* UserInterface/Images/TimelineRecordPaint.svg: Added.
* UserInterface/Images/TimelineRecordScriptEvaluated.svg: Added.
* UserInterface/Images/TimelineRecordStyle.svg: Added.
* UserInterface/Images/TimelineRecordTimer.svg: Added.
* UserInterface/Main.html:
* UserInterface/OverviewTimelineView.js: Added.
(WebInspector.OverviewTimelineView):
(WebInspector.OverviewTimelineView.prototype.get navigationSidebarTreeOutlineLabel):
(WebInspector.OverviewTimelineView.prototype._childFrameWasAdded):
(WebInspector.OverviewTimelineView.prototype._mainResourceDidChange):
(WebInspector.OverviewTimelineView.prototype._provisionalResourceWasAdded):
(WebInspector.OverviewTimelineView.prototype._resourceWasAdded):
(WebInspector.OverviewTimelineView.prototype._compareTreeElementsByDetails):
(WebInspector.OverviewTimelineView.prototype._compareTreeElementsByStartTime):
(WebInspector.OverviewTimelineView.prototype._insertTreeElement):
(WebInspector.OverviewTimelineView.prototype._addResourceToTreeIfNeeded):
(WebInspector.OverviewTimelineView.prototype._sourceCodeTimelineAdded):
(WebInspector.OverviewTimelineView.prototype._treeElementSelected):
* UserInterface/SourceCodeTimelineTreeElement.js: Added.
(WebInspector.SourceCodeTimelineTreeElement):
(WebInspector.SourceCodeTimelineTreeElement.prototype.get sourceCodeTimeline):
* UserInterface/TimelineContentView.js:
(WebInspector.TimelineContentView.createPathComponent):
(WebInspector.TimelineContentView):
(WebInspector.TimelineContentView.prototype.showOverviewTimelineView):
(WebInspector.TimelineContentView.prototype.showTimelineView):
(WebInspector.TimelineContentView.prototype.get supportsSplitContentBrowser):
(WebInspector.TimelineContentView.prototype.get selectionPathComponents):
(WebInspector.TimelineContentView.prototype._pathComponentSelected):
(WebInspector.TimelineContentView.prototype._showTimelineView):
(WebInspector.TimelineContentView.prototype._recordingReset):
* UserInterface/TimelineIcons.css:
(.style-record .icon): Added.
(.layout-record .icon): Added.
(.paint-record .icon): Added.
(.evaluated-record .icon): Added.
(.event-record .icon): Added.
(.timer-record .icon): Added.
(.animation-record .icon): Added.
* UserInterface/TimelineView.css: Added.
(.timeline-view):
* UserInterface/TimelineView.js: Added.
(WebInspector.TimelineView):
(WebInspector.TimelineView.prototype.get navigationSidebarTreeOutline):
(WebInspector.TimelineView.prototype.get navigationSidebarTreeOutlineLabel):
(WebInspector.TimelineView.prototype.reset):
(WebInspector.TimelineView.prototype.shown):
(WebInspector.TimelineView.prototype.hidden):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162404 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent fe816eba
2013-11-07 Timothy Hatcher <timothy@apple.com>
Start fleshing out the Overview Timeline view.
This gets the overview populating in the Timeline sidebar. The graph side is still empty.
https://bugs.webkit.org/show_bug.cgi?id=124005
Reviewed by Joseph Pecoraro.
* Localizations/en.lproj/localizedStrings.js: Updated.
* UserInterface/Frame.js:
(WebInspector.Frame.prototype.addResource):
* UserInterface/Images/TimelineRecordAnimation.svg: Added.
* UserInterface/Images/TimelineRecordEvent.svg: Added.
* UserInterface/Images/TimelineRecordLayout.svg: Added.
* UserInterface/Images/TimelineRecordPaint.svg: Added.
* UserInterface/Images/TimelineRecordScriptEvaluated.svg: Added.
* UserInterface/Images/TimelineRecordStyle.svg: Added.
* UserInterface/Images/TimelineRecordTimer.svg: Added.
* UserInterface/Main.html:
* UserInterface/OverviewTimelineView.js: Added.
(WebInspector.OverviewTimelineView):
(WebInspector.OverviewTimelineView.prototype.get navigationSidebarTreeOutlineLabel):
(WebInspector.OverviewTimelineView.prototype._childFrameWasAdded):
(WebInspector.OverviewTimelineView.prototype._mainResourceDidChange):
(WebInspector.OverviewTimelineView.prototype._provisionalResourceWasAdded):
(WebInspector.OverviewTimelineView.prototype._resourceWasAdded):
(WebInspector.OverviewTimelineView.prototype._compareTreeElementsByDetails):
(WebInspector.OverviewTimelineView.prototype._compareTreeElementsByStartTime):
(WebInspector.OverviewTimelineView.prototype._insertTreeElement):
(WebInspector.OverviewTimelineView.prototype._addResourceToTreeIfNeeded):
(WebInspector.OverviewTimelineView.prototype._sourceCodeTimelineAdded):
(WebInspector.OverviewTimelineView.prototype._treeElementSelected):
* UserInterface/SourceCodeTimelineTreeElement.js: Added.
(WebInspector.SourceCodeTimelineTreeElement):
(WebInspector.SourceCodeTimelineTreeElement.prototype.get sourceCodeTimeline):
* UserInterface/TimelineContentView.js:
(WebInspector.TimelineContentView.createPathComponent):
(WebInspector.TimelineContentView):
(WebInspector.TimelineContentView.prototype.showOverviewTimelineView):
(WebInspector.TimelineContentView.prototype.showTimelineView):
(WebInspector.TimelineContentView.prototype.get supportsSplitContentBrowser):
(WebInspector.TimelineContentView.prototype.get selectionPathComponents):
(WebInspector.TimelineContentView.prototype._pathComponentSelected):
(WebInspector.TimelineContentView.prototype._showTimelineView):
(WebInspector.TimelineContentView.prototype._recordingReset):
* UserInterface/TimelineIcons.css:
(.style-record .icon): Added.
(.layout-record .icon): Added.
(.paint-record .icon): Added.
(.evaluated-record .icon): Added.
(.event-record .icon): Added.
(.timer-record .icon): Added.
(.animation-record .icon): Added.
* UserInterface/TimelineView.css: Added.
(.timeline-view):
* UserInterface/TimelineView.js: Added.
(WebInspector.TimelineView):
(WebInspector.TimelineView.prototype.get navigationSidebarTreeOutline):
(WebInspector.TimelineView.prototype.get navigationSidebarTreeOutlineLabel):
(WebInspector.TimelineView.prototype.reset):
(WebInspector.TimelineView.prototype.shown):
(WebInspector.TimelineView.prototype.hidden):
2013-11-07 Timothy Hatcher <timothy@apple.com>
Start fleshing out the new TimelineSidebarPanel and TimelineContentView.
......
......@@ -60,6 +60,7 @@ WebInspector.Frame.Event = {
ProvisionalLoadStarted: "frame-provisional-load-started",
ProvisionalLoadCommitted: "frame-provisional-load-committed",
ProvisionalLoadCleared: "frame-provisional-load-cleared",
ProvisionalResourceWasAdded: "frame-provisional-resource-was-added",
ResourceWasAdded: "frame-resource-was-added",
ResourceWasRemoved: "frame-resource-was-removed",
AllResourcesRemoved: "frame-all-resources-removed",
......@@ -425,7 +426,7 @@ WebInspector.Frame.prototype = {
if (this._isProvisionalResource(resource)) {
this._provisionalResourceCollection.addResource(resource);
// Provisional resources don't fire the ResourceWasAdded event.
this.dispatchEventToListeners(WebInspector.Frame.Event.ProvisionalResourceWasAdded, {resource: resource});
} else {
this._resourceCollection.addResource(resource);
this.dispatchEventToListeners(WebInspector.Frame.Event.ResourceWasAdded, {resource: resource});
......
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright © 2013 Apple Inc. All rights reserved. -->
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
<path fill="rgb(190, 165, 202)" d="M 3 1 C 1.898438 1 1 1.898438 1 3 L 1 13 C 1 14.101562 1.898438 15 3 15 L 13 15 C 14.101562 15 15 14.101562 15 13 L 15 3 C 15 1.898438 14.101562 1 13 1 L 3 1 Z M 3 1"/>
<path fill="rgb(141, 118, 153)" d="M 13 1 L 3 1 C 1.898438 1 1 1.898438 1 3 L 1 13 C 1 14.101562 1.898438 15 3 15 L 13 15 C 14.101562 15 15 14.101562 15 13 L 15 3 C 15 1.898438 14.101562 1 13 1 M 13 2 C 13.550781 2 14 2.449219 14 3 L 14 13 C 14 13.550781 13.550781 14 13 14 L 3 14 C 2.449219 14 2 13.550781 2 13 L 2 3 C 2 2.449219 2.449219 2 3 2 L 13 2"/>
<path fill="rgb(153, 127, 166)" d="M 2.61147641 12.75 L 5.96029528 12.75 L 6.8114662 10.628418 L 8.70346974 10.628418 L 9.53482191 12.75 L 13.3777814 12.75 L 9.50565303 2.80078125 L 6.48360478 2.80078125 L 2.61147641 12.75 Z M 2.61147641 12.75"/>
<path fill="white" d="M 4.07373047 11.75 L 7.16748047 3.80078125 L 8.82177734 3.80078125 L 11.9155273 11.75 L 10.2182617 11.75 L 9.39111328 9.62841797 L 6.10400391 9.62841797 L 5.27685547 11.75 L 4.07373047 11.75 Z M 6.51220703 8.5703125 L 8.98291016 8.5703125 L 7.74755859 5.40136719 L 6.51220703 8.5703125 Z M 6.51220703 8.5703125"/>
</svg>
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright © 2013 Apple Inc. All rights reserved. -->
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
<path fill="rgb(190, 165, 202)" d="M 13 1 L 3 1 C 1.898438 1 1 1.898438 1 3 L 1 13 C 1 14.101562 1.898438 15 3 15 L 13 15 C 14.101562 15 15 14.101562 15 13 L 15 3 C 15 1.898438 14.101562 1 13 1 Z"/>
<path fill="rgb(141, 118, 153)" d="M 13 1 L 3 1 C 1.898438 1 1 1.898438 1 3 L 1 13 C 1 14.101562 1.898438 15 3 15 L 13 15 C 14.101562 15 15 14.101562 15 13 L 15 3 C 15 1.898438 14.101562 1 13 1 M 13 2 C 13.550781 2 14 2.449219 14 3 L 14 13 C 14 13.550781 13.550781 14 13 14 L 3 14 C 2.449219 14 2 13.550781 2 13 L 2 3 C 2 2.449219 2.449219 2 3 2 L 13 2"/>
<path fill="rgb(153, 127, 166)" d="M 5.503906 12.742188 C 4.949219 12.742188 4.503906 12.292969 4.503906 11.742188 L 4.503906 3.792969 C 4.503906 3.242188 4.949219 2.792969 5.503906 2.792969 L 10.472656 2.792969 C 11.023438 2.792969 11.472656 3.242188 11.472656 3.792969 L 11.472656 4.882812 C 11.472656 5.4375 11.023438 5.882812 10.472656 5.882812 C 10.472656 5.882812 9.132812 5.882812 8.15625 5.882812 C 8.15625 5.992188 8.15625 5.996094 8.15625 6.101562 C 8.957031 6.101562 9.875 6.101562 9.875 6.101562 C 10.425781 6.101562 10.875 6.550781 10.875 7.101562 L 10.875 8.164062 C 10.875 8.71875 10.425781 9.164062 9.875 9.164062 C 9.875 9.164062 8.957031 9.164062 8.15625 9.164062 C 8.15625 9.382812 8.15625 9.398438 8.15625 9.613281 C 9.191406 9.613281 10.722656 9.613281 10.722656 9.613281 C 11.277344 9.613281 11.722656 10.0625 11.722656 10.613281 L 11.722656 11.742188 C 11.722656 12.292969 11.277344 12.742188 10.722656 12.742188 L 5.503906 12.742188"/>
<path fill="white" d="M 5.503906 11.742188 L 5.503906 3.792969 L 10.46875 3.792969 L 10.46875 4.882812 L 7.15625 4.882812 L 7.15625 7.101562 L 9.875 7.101562 L 9.875 8.164062 L 7.15625 8.164062 L 7.15625 10.613281 L 10.722656 10.613281 L 10.722656 11.742188 Z"/>
</svg>
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright © 2013 Apple Inc. All rights reserved. -->
<svg viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg">
<path fill="rgb(236, 151, 153)" d="M 13 1 L 3 1 C 1.898438 1 1 1.898438 1 3 L 1 13 C 1 14.101562 1.898438 15 3 15 L 13 15 C 14.101562 15 15 14.101562 15 13 L 15 3 C 15 1.898438 14.101562 1 13 1 Z"/>
<path fill="rgb(191, 109, 113)" d="M 13 1 L 3 1 C 1.898438 1 1 1.898438 1 3 L 1 13 C 1 14.101562 1.898438 15 3 15 L 13 15 C 14.101562 15 15 14.101562 15 13 L 15 3 C 15 1.898438 14.101562 1 13 1 M 13 2 C 13.550781 2 14 2.449219 14 3 L 14 13 C 14 13.550781 13.550781 14 13 14 L 3 14 C 2.449219 14 2 13.550781 2 13 L 2 3 C 2 2.449219 2.449219 2 3 2 L 13 2"/>
<path fill="rgb(204, 116, 121)" d="M 5 13 L 6 13 L 11 13 L 12 13 L 12 12 L 12 10.8648649 L 12 9.86486486 L 11 9.86486486 L 8.57948709 9.86486483 L 8.57948718 4 L 8.57948718 3 L 7.57948718 3 L 6 3 L 5 3 L 5 4 L 5 12 L 5 13 Z M 5 13"/>
<path fill="white" d="M 6 4 L 7.57948718 4 L 7.57948718 10.8648649 L 11 10.8648649 L 11 12 L 6 12 L 6 4 Z M 6 4"/>
</svg>
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright © 2013 Apple Inc. All rights reserved. -->
<svg viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg">
<path fill="rgb(236, 151, 153)" d="M 13 1 L 3 1 C 1.898438 1 1 1.898438 1 3 L 1 13 C 1 14.101562 1.898438 15 3 15 L 13 15 C 14.101562 15 15 14.101562 15 13 L 15 3 C 15 1.898438 14.101562 1 13 1 Z"/>
<path fill="rgb(191, 109, 113)" d="M 13 1 L 3 1 C 1.898438 1 1 1.898438 1 3 L 1 13 C 1 14.101562 1.898438 15 3 15 L 13 15 C 14.101562 15 15 14.101562 15 13 L 15 3 C 15 1.898438 14.101562 1 13 1 M 13 2 C 13.550781 2 14 2.449219 14 3 L 14 13 C 14 13.550781 13.550781 14 13 14 L 3 14 C 2.449219 14 2 13.550781 2 13 L 2 3 C 2 2.449219 2.449219 2 3 2 L 13 2"/>
<path fill="rgb(204, 116, 121)" d="M 7.09187665 9.86486483 L 8.09187665 9.86486483 L 8.09187675 12 L 8.09187675 13 L 7.09187675 13 L 5.4 13 L 4.4 13 L 4.4 12 L 4.4 4 L 4.4 3 L 5.4 3 L 8.2907563 3 C 9.49663194 3 10.4135483 3.20769232 11.0534889 3.69149996 C 11.7636984 4.22843229 12.097479 5.0719049 12.097479 6.12432432 C 12.097479 7.27475638 11.6870881 8.23200847 10.8722916 8.91131913 C 10.0975424 9.55724163 9.06464428 9.86486486 7.80896359 9.86486486 L 7.09187675 9.86486486 L 7.09187675 9.36486486 L 7.09187675 8.86486486 L 7.80896359 8.86486486 C 8.11369101 8.86486486 8.39855198 8.84414571 8.66354709 8.80270722 C 9.30146061 8.70295376 9.82425299 8.48313329 10.2319328 8.14324324 C 10.8089665 7.66215976 11.097479 6.98919351 11.097479 6.12432432 C 11.097479 5.36035654 10.8817949 4.81531695 10.4504202 4.48918919 C 10.0190455 4.16306143 9.29916471 4 8.2907563 4 L 5.4 4 L 5.4 12 L 7.09187675 12 L 7.09187675 9.36486486 L 7.09187665 9.86486483 Z M 7.09187675 7.76756757 L 7.4280112 7.76756757 C 8.01811686 7.76756757 8.4840319 7.63513646 8.82577031 7.37027027 C 9.16750871 7.10540408 9.33837535 6.74594822 9.33837535 6.29189189 C 9.33837535 5.49549151 8.81363737 5.0972973 7.76414566 5.0972973 L 7.09187675 5.0972973 L 7.09187675 7.76756757 Z M 7.09187675 7.76756757"/>
<path fill="white" d="M 5.4 12 L 5.4 4 L 8.2907563 4 C 9.29916471 4 10.0190455 4.16306143 10.4504202 4.48918919 C 10.8817949 4.81531695 11.097479 5.36035654 11.097479 6.12432432 C 11.097479 6.98919351 10.8089665 7.66215976 10.2319328 8.14324324 C 9.65489908 8.62432673 8.84725076 8.86486486 7.80896359 8.86486486 L 7.09187675 8.86486486 L 7.09187675 12 L 5.4 12 Z M 7.09187675 7.76756757 L 7.4280112 7.76756757 C 8.01811686 7.76756757 8.4840319 7.63513646 8.82577031 7.37027027 C 9.16750871 7.10540408 9.33837535 6.74594822 9.33837535 6.29189189 C 9.33837535 5.49549151 8.81363737 5.0972973 7.76414566 5.0972973 L 7.09187675 5.0972973 L 7.09187675 7.76756757 Z M 7.09187675 7.76756757"/>
</svg>
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright © 2013 Apple Inc. All rights reserved. -->
<svg viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg">
<path fill="rgb(190, 165, 202)" d="M 3 1 C 1.898438 1 1 1.898438 1 3 L 1 13 C 1 14.101562 1.898438 15 3 15 L 13 15 C 14.101562 15 15 14.101562 15 13 L 15 3 C 15 1.898438 14.101562 1 13 1 L 3 1 Z M 3 1"/>
<path fill="rgb(141, 118, 153)" d="M 13 1 L 3 1 C 1.898438 1 1 1.898438 1 3 L 1 13 C 1 14.101562 1.898438 15 3 15 L 13 15 C 14.101562 15 15 14.101562 15 13 L 15 3 C 15 1.898438 14.101562 1 13 1 M 13 2 C 13.550781 2 14 2.449219 14 3 L 14 13 C 14 13.550781 13.550781 14 13 14 L 3 14 C 2.449219 14 2 13.550781 2 13 L 2 3 C 2 2.449219 2.449219 2 3 2 L 13 2"/>
<path fill="rgb(153, 127, 166)" d="M 5.19849793 12.6584609 C 5.2831472 12.676395 6.98277851 12.9487305 7.62939453 12.9487305 C 8.79640591 12.9487305 9.76331344 12.6806542 10.5034462 12.1146703 C 11.3037555 11.5026691 11.7177734 10.6286312 11.7177734 9.58544922 C 11.7177734 8.84534902 11.4998181 8.18341061 11.0628295 7.63852362 C 10.6767371 7.15709971 10.0557113 6.69185669 9.18734192 6.20492057 L 8.61524891 5.88648574 C 8.27558142 5.69523066 8.15431716 5.69238281 8.23632812 5.69238281 C 8.56703836 5.69238281 9.10333246 5.81936052 9.8138795 6.08542439 L 11.1645508 6.59118236 L 11.1645508 5.14892578 L 11.1645508 3.87597656 L 11.1645508 3.07965768 L 10.3884483 2.90136387 C 9.52406853 2.70279014 8.73593121 2.60205078 8.02148438 2.60205078 C 7.01081351 2.60205078 6.14909735 2.87110984 5.47554965 3.42697448 C 4.76046595 4.01711791 4.38964844 4.82767811 4.38964844 5.77734375 C 4.38964844 6.49239045 4.61205052 7.14196725 5.04920932 7.68841575 C 5.43639142 8.17239338 6.03437082 8.62885808 6.84888633 9.08727887 L 7.38545082 9.38538774 C 7.71699471 9.57330366 7.92926232 9.72631865 7.99164827 9.79813503 C 7.94460492 9.81851991 7.82252674 9.85302734 7.60253906 9.85302734 C 7.14294036 9.85302734 6.53493744 9.70437137 5.79174704 9.39341305 L 4.40576172 8.81350287 L 4.40576172 10.315918 L 4.40576172 11.6801758 L 4.40576172 12.4905083 L 5.19849793 12.6584609 C 5.52713094 12.7280865 5.52713094 12.7280865 5.57407851 12.738033 L 5.19849793 12.6584609 Z M 5.19849793 12.6584609"/>
<path fill="white" d="M 5.40576172 11.6801758 L 5.40576172 10.315918 C 6.26156027 10.6739927 6.99381206 10.8530273 7.60253906 10.8530273 C 8.02864796 10.8530273 8.36433797 10.758139 8.60961914 10.5683594 C 8.85490031 10.3785798 8.97753906 10.1207699 8.97753906 9.79492188 C 8.97753906 9.53710809 8.90055416 9.31958096 8.74658203 9.14233398 C 8.59260991 8.965087 8.3007834 8.75472127 7.87109375 8.51123047 L 7.33935547 8.21582031 C 6.6267868 7.81477664 6.12369938 7.43074728 5.83007812 7.0637207 C 5.53645687 6.69669413 5.38964844 6.2679061 5.38964844 5.77734375 C 5.38964844 5.12206704 5.63045007 4.59570511 6.11206055 4.19824219 C 6.59367103 3.80077926 7.23013927 3.60205078 8.02148438 3.60205078 C 8.65527661 3.60205078 9.36962493 3.69335846 10.1645508 3.87597656 L 10.1645508 5.14892578 C 9.3517212 4.84456228 8.70898674 4.69238281 8.23632812 4.69238281 C 7.87109192 4.69238281 7.57837024 4.77384359 7.3581543 4.93676758 C 7.13793835 5.09969157 7.02783203 5.313638 7.02783203 5.57861328 C 7.02783203 5.79703885 7.10481694 5.98860595 7.25878906 6.15332031 C 7.41276119 6.31803468 7.70279735 6.52034385 8.12890625 6.76025391 L 8.69824219 7.07714844 C 9.46452206 7.50683809 9.99267433 7.9025047 10.2827148 8.26416016 C 10.5727554 8.62581561 10.7177734 9.06624089 10.7177734 9.58544922 C 10.7177734 10.3230831 10.4438504 10.9013651 9.89599609 11.3203125 C 9.34814179 11.7392599 8.59261549 11.9487305 7.62939453 11.9487305 C 6.99202155 11.9487305 6.25081803 11.8592131 5.40576172 11.6801758 C 5.40576172 11.6801758 6.25081803 11.8592131 5.40576172 11.6801758 L 5.40576172 11.6801758 L 5.40576172 11.6801758 Z M 5.40576172 11.6801758"/>
</svg>
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright © 2013 Apple Inc. All rights reserved. -->
<svg viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg">
<path fill="rgb(236, 151, 153)" d="M 13 1 L 3 1 C 1.898438 1 1 1.898438 1 3 L 1 13 C 1 14.101562 1.898438 15 3 15 L 13 15 C 14.101562 15 15 14.101562 15 13 L 15 3 C 15 1.898438 14.101562 1 13 1 Z"/>
<path fill="rgb(191, 109, 113)" d="M 13 1 L 3 1 C 1.898438 1 1 1.898438 1 3 L 1 13 C 1 14.101562 1.898438 15 3 15 L 13 15 C 14.101562 15 15 14.101562 15 13 L 15 3 C 15 1.898438 14.101562 1 13 1 M 13 2 C 13.550781 2 14 2.449219 14 3 L 14 13 C 14 13.550781 13.550781 14 13 14 L 3 14 C 2.449219 14 2 13.550781 2 13 L 2 3 C 2 2.449219 2.449219 2 3 2 L 13 2"/>
<path fill="rgb(204, 116, 121)" d="M 5.19849793 12.6584609 C 5.2831472 12.676395 6.98277851 12.9487305 7.62939453 12.9487305 C 8.79640591 12.9487305 9.76331344 12.6806542 10.5034462 12.1146703 C 11.3037555 11.5026691 11.7177734 10.6286312 11.7177734 9.58544922 C 11.7177734 8.84534902 11.4998181 8.18341061 11.0628295 7.63852362 C 10.6767371 7.15709971 10.0557113 6.69185669 9.18734192 6.20492057 L 8.61524891 5.88648574 C 8.27558142 5.69523066 8.15431716 5.69238281 8.23632812 5.69238281 C 8.56703836 5.69238281 9.10333246 5.81936052 9.8138795 6.08542439 L 11.1645508 6.59118236 L 11.1645508 5.14892578 L 11.1645508 3.87597656 L 11.1645508 3.07965768 L 10.3884483 2.90136387 C 9.52406853 2.70279014 8.73593121 2.60205078 8.02148438 2.60205078 C 7.01081351 2.60205078 6.14909735 2.87110984 5.47554965 3.42697448 C 4.76046595 4.01711791 4.38964844 4.82767811 4.38964844 5.77734375 C 4.38964844 6.49239045 4.61205052 7.14196725 5.04920932 7.68841575 C 5.43639142 8.17239338 6.03437082 8.62885808 6.84888633 9.08727887 L 7.38545082 9.38538774 C 7.71699471 9.57330366 7.92926232 9.72631865 7.99164827 9.79813503 C 7.94460492 9.81851991 7.82252674 9.85302734 7.60253906 9.85302734 C 7.14294036 9.85302734 6.53493744 9.70437137 5.79174704 9.39341305 L 4.40576172 8.81350287 L 4.40576172 10.315918 L 4.40576172 11.6801758 L 4.40576172 12.4905083 L 5.19849793 12.6584609 C 5.52713094 12.7280865 5.52713094 12.7280865 5.57407851 12.738033 L 5.19849793 12.6584609 Z M 5.19849793 12.6584609"/>
<path fill="white" d="M 5.40576172 11.6801758 L 5.40576172 10.315918 C 6.26156027 10.6739927 6.99381206 10.8530273 7.60253906 10.8530273 C 8.02864796 10.8530273 8.36433797 10.758139 8.60961914 10.5683594 C 8.85490031 10.3785798 8.97753906 10.1207699 8.97753906 9.79492188 C 8.97753906 9.53710809 8.90055416 9.31958096 8.74658203 9.14233398 C 8.59260991 8.965087 8.3007834 8.75472127 7.87109375 8.51123047 L 7.33935547 8.21582031 C 6.6267868 7.81477664 6.12369938 7.43074728 5.83007812 7.0637207 C 5.53645687 6.69669413 5.38964844 6.2679061 5.38964844 5.77734375 C 5.38964844 5.12206704 5.63045007 4.59570511 6.11206055 4.19824219 C 6.59367103 3.80077926 7.23013927 3.60205078 8.02148438 3.60205078 C 8.65527661 3.60205078 9.36962493 3.69335846 10.1645508 3.87597656 L 10.1645508 5.14892578 C 9.3517212 4.84456228 8.70898674 4.69238281 8.23632812 4.69238281 C 7.87109192 4.69238281 7.57837024 4.77384359 7.3581543 4.93676758 C 7.13793835 5.09969157 7.02783203 5.313638 7.02783203 5.57861328 C 7.02783203 5.79703885 7.10481694 5.98860595 7.25878906 6.15332031 C 7.41276119 6.31803468 7.70279735 6.52034385 8.12890625 6.76025391 L 8.69824219 7.07714844 C 9.46452206 7.50683809 9.99267433 7.9025047 10.2827148 8.26416016 C 10.5727554 8.62581561 10.7177734 9.06624089 10.7177734 9.58544922 C 10.7177734 10.3230831 10.4438504 10.9013651 9.89599609 11.3203125 C 9.34814179 11.7392599 8.59261549 11.9487305 7.62939453 11.9487305 C 6.99202155 11.9487305 6.25081803 11.8592131 5.40576172 11.6801758 C 5.40576172 11.6801758 6.25081803 11.8592131 5.40576172 11.6801758 L 5.40576172 11.6801758 L 5.40576172 11.6801758 Z M 5.40576172 11.6801758"/>
</svg>
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright © 2013 Apple Inc. All rights reserved. -->
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
<path fill="rgb(190, 165, 202)" d="M 13 1 L 3 1 C 1.898438 1 1 1.898438 1 3 L 1 13 C 1 14.101562 1.898438 15 3 15 L 13 15 C 14.101562 15 15 14.101562 15 13 L 15 3 C 15 1.898438 14.101562 1 13 1 Z"/>
<path fill="rgb(141, 118, 153)" d="M 13 1 L 3 1 C 1.898438 1 1 1.898438 1 3 L 1 13 C 1 14.101562 1.898438 15 3 15 L 13 15 C 14.101562 15 15 14.101562 15 13 L 15 3 C 15 1.898438 14.101562 1 13 1 M 13 2 C 13.550781 2 14 2.449219 14 3 L 14 13 C 14 13.550781 13.550781 14 13 14 L 3 14 C 2.449219 14 2 13.550781 2 13 L 2 3 C 2 2.449219 2.449219 2 3 2 L 13 2"/>
<path fill="rgb(153, 127, 166)" d="M 6.980469 12.742188 C 6.429688 12.742188 5.980469 12.292969 5.980469 11.742188 C 5.980469 11.742188 5.980469 7.34375 5.980469 5.882812 C 5.140625 5.882812 4.136719 5.882812 4.136719 5.882812 C 3.582031 5.882812 3.136719 5.4375 3.136719 4.882812 L 3.136719 3.792969 C 3.136719 3.242188 3.582031 2.792969 4.136719 2.792969 L 11.488281 2.792969 C 12.042969 2.792969 12.488281 3.242188 12.488281 3.792969 L 12.488281 4.882812 C 12.488281 5.4375 12.042969 5.882812 11.488281 5.882812 C 11.488281 5.882812 10.484375 5.882812 9.640625 5.882812 C 9.640625 7.34375 9.640625 11.742188 9.640625 11.742188 C 9.640625 12.292969 9.195312 12.742188 8.640625 12.742188 L 6.980469 12.742188"/>
<path fill="white" d="M 6.980469 11.742188 L 6.980469 4.882812 L 4.136719 4.882812 L 4.136719 3.792969 L 11.488281 3.792969 L 11.488281 4.882812 L 8.640625 4.882812 L 8.640625 11.742188 Z"/>
</svg>
......@@ -83,6 +83,7 @@
<link rel="stylesheet" href="TreeElementStatusButton.css">
<link rel="stylesheet" href="TimelineSidebarPanel.css">
<link rel="stylesheet" href="TimelineContentView.css">
<link rel="stylesheet" href="OverviewTimelineView.css">
<link rel="stylesheet" href="TimelineIcons.css">
<link rel="stylesheet" href="TimelineDecorations.css">
<link rel="stylesheet" href="TimelineDataGrid.css">
......@@ -189,6 +190,7 @@
<script src="TimelineManager.js"></script>
<script src="TimelineRecording.js"></script>
<script src="Timeline.js"></script>
<script src="NetworkTimeline.js"></script>
<script src="SourceCodeTimeline.js"></script>
<script src="TimelineRecord.js"></script>
<script src="TimelineEventMarker.js"></script>
......@@ -271,6 +273,8 @@
<script src="ApplicationCacheFrameContentView.js"></script>
<script src="TextContentView.js"></script>
<script src="TimelineContentView.js"></script>
<script src="TimelineView.js"></script>
<script src="OverviewTimelineView.js"></script>
<script src="ApplicationCacheDetailsSidebarPanel.js"></script>
<script src="DOMTreeManager.js"></script>
<script src="DOMNode.js"></script>
......@@ -338,6 +342,7 @@
<script src="CSSStyleDeclarationSection.js"></script>
<script src="IndeterminateProgressSpinner.js"></script>
<script src="TimelineSidebarPanel.js"></script>
<script src="SourceCodeTimelineTreeElement.js"></script>
<script src="TimelineDecorations.js"></script>
<script src="TimelineDataGrid.js"></script>
<script src="LayoutTimelineDataGrid.js"></script>
......
/*
* Copyright (C) 2014 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*/
WebInspector.NetworkTimeline = function()
{
WebInspector.Timeline.call(this);
this._resourceRecordMap = new Map;
};
WebInspector.NetworkTimeline.prototype = {
constructor: WebInspector.NetworkTimeline,
__proto__: WebInspector.Timeline.prototype,
// Public
recordForResource: function(resource)
{
console.assert(resource instanceof WebInspector.Resource);
return this._resourceRecordMap.get(resource) || null;
},
addRecord: function(record)
{
console.assert(record instanceof WebInspector.ResourceTimelineRecord);
// Don't allow duplicate records for a resource.
if (this._resourceRecordMap.has(record.resource))
return;
this._resourceRecordMap.set(record.resource, record);
WebInspector.Timeline.prototype.addRecord.call(this, record);
}
};
/*
* Copyright (C) 2013 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*/
.timeline-view.overview > .timeline-decorations {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
}
.timeline-view.overview > .timeline-decorations > .header {
border-bottom: 1px solid rgb(200, 200, 200);
height: 23px;
}
.timeline-view.overview > .timeline-decorations > .event-markers {
top: 23px;
}
/*
* Copyright (C) 2013 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*/
WebInspector.OverviewTimelineView = function()
{
WebInspector.TimelineView.call(this);
this.navigationSidebarTreeOutline.onselect = this._treeElementSelected.bind(this);
this._timelineDecorations = new WebInspector.TimelineDecorations;
this.element.appendChild(this._timelineDecorations.element);
this.element.classList.add(WebInspector.OverviewTimelineView.StyleClassName);
WebInspector.timelineManager.recording.addEventListener(WebInspector.TimelineRecording.Event.SourceCodeTimelineAdded, this._sourceCodeTimelineAdded, this);
};
WebInspector.OverviewTimelineView.StyleClassName = "overview";
WebInspector.OverviewTimelineView.prototype = {
constructor: WebInspector.OverviewTimelineView,
__proto__: WebInspector.TimelineView.prototype,
// Public
get navigationSidebarTreeOutlineLabel()
{
return WebInspector.UIString("Timeline Events");
},
reset: function()
{
WebInspector.TimelineView.prototype.reset.call(this);
this._networkTimeline = WebInspector.timelineManager.recording.timelines.get(WebInspector.TimelineRecord.Type.Network);
console.assert(this._networkTimeline);
this._networkTimeline.addEventListener(WebInspector.Timeline.Event.RecordAdded, this._networkTimelineRecordAdded, this);
},
// Private
_compareTreeElementsByDetails: function(a, b)
{
if (a instanceof WebInspector.SourceCodeTimelineTreeElement && b instanceof WebInspector.ResourceTreeElement)
return -1;
if (a instanceof WebInspector.ResourceTreeElement && b instanceof WebInspector.SourceCodeTimelineTreeElement)
return 1;
if (a instanceof WebInspector.SourceCodeTimelineTreeElement && b instanceof WebInspector.SourceCodeTimelineTreeElement) {
aTimeline = a.sourceCodeTimeline;
bTimeline = b.sourceCodeTimeline;
if (!aTimeline.sourceCodeLocation && !bTimeline.sourceCodeLocation) {
if (aTimeline.recordType !== bTimeline.recordType)
return aTimeline.recordType.localeCompare(bTimeline.recordType);
return a.mainTitle.localeCompare(b.mainTitle);
}
if (!aTimeline.sourceCodeLocation || !bTimeline.sourceCodeLocation)
return !!aTimeline.sourceCodeLocation - !!bTimeline.sourceCodeLocation;
if (aTimeline.sourceCodeLocation.lineNumber !== bTimeline.sourceCodeLocation.lineNumber)
return aTimeline.sourceCodeLocation.lineNumber - bTimeline.sourceCodeLocation.lineNumber;
return aTimeline.sourceCodeLocation.columnNumber - bTimeline.sourceCodeLocation.columnNumber;
}
// Fallback to comparing by start time for ResourceTreeElement or anything else.
return this._compareTreeElementsByStartTime(a, b);
},
_compareTreeElementsByStartTime: function(a, b)
{
function getStartTime(treeElement)
{
if (treeElement instanceof WebInspector.ResourceTreeElement)
return treeElement.resource.firstTimestamp;
if (treeElement instanceof WebInspector.SourceCodeTimelineTreeElement)
return treeElement.sourceCodeTimeline.startTime;
console.error("Unknown tree element.");
return 0;
}
var result = getStartTime(a) - getStartTime(b);
if (result)
return result;
// Fallback to comparing titles.
return a.mainTitle.localeCompare(b.mainTitle);
},
_insertTreeElement: function(treeElement, parentTreeElement)
{
console.assert(treeElement);
console.assert(!treeElement.parent);
console.assert(parentTreeElement);
parentTreeElement.insertChild(treeElement, insertionIndexForObjectInListSortedByFunction(treeElement, parentTreeElement.children, this._compareTreeElementsByStartTime.bind(this)));
},
_addResourceToTreeIfNeeded: function(resource)
{
console.assert(resource);
if (!resource)
return null;
var treeElement = this.navigationSidebarTreeOutline.findTreeElement(resource);
if (treeElement)
return treeElement;
var parentFrame = resource.parentFrame;
if (!parentFrame)
return;
if (parentFrame.mainResource === resource || parentFrame.provisionalMainResource === resource)
parentFrame = parentFrame.parentFrame;
var resourceTreeElement = new WebInspector.ResourceTreeElement(resource);
resourceTreeElement.expand();
var parentTreeElement = this.navigationSidebarTreeOutline;
if (parentFrame) {
// Find the parent main resource, adding it if needed, to append this resource as a child.
var parentResource = parentFrame.provisionalMainResource || parentFrame.mainResource;
parentTreeElement = this._addResourceToTreeIfNeeded(parentResource);
console.assert(parentTreeElement);
if (!parentTreeElement)
return;
}
this._insertTreeElement(resourceTreeElement, parentTreeElement);
return resourceTreeElement;
},
_networkTimelineRecordAdded: function(event)
{
var resourceTimelineRecord = event.data.record;
console.assert(resourceTimelineRecord instanceof WebInspector.ResourceTimelineRecord);
this._addResourceToTreeIfNeeded(resourceTimelineRecord.resource);
// We don't expect to have any source code timelines yet. Those should be added with _sourceCodeTimelineAdded.
console.assert(!WebInspector.timelineManager.recording.sourceCodeTimelinesForSourceCode(resourceTimelineRecord.resource).length);
},
_sourceCodeTimelineAdded: function(event)
{
var sourceCodeTimeline = event.data.sourceCodeTimeline;
console.assert(sourceCodeTimeline);
if (!sourceCodeTimeline)
return;
var parentTreeElement = sourceCodeTimeline.sourceCodeLocation ? this._addResourceToTreeIfNeeded(sourceCodeTimeline.sourceCode) : this.navigationSidebarTreeOutline;
console.assert(parentTreeElement);
if (!parentTreeElement)
return;
var sourceCodeTimelineTreeElement = new WebInspector.SourceCodeTimelineTreeElement(sourceCodeTimeline);
this._insertTreeElement(sourceCodeTimelineTreeElement, parentTreeElement);
},
_treeElementSelected: function(treeElement, selectedByUser)
{
if (treeElement instanceof WebInspector.FolderTreeElement)
return;
if (treeElement instanceof WebInspector.ResourceTreeElement || treeElement instanceof WebInspector.ScriptTreeElement) {
WebInspector.resourceSidebarPanel.showSourceCode(treeElement.representedObject);
return;
}
if (!(treeElement instanceof WebInspector.SourceCodeTimelineTreeElement)) {
console.error("Unknown tree element selected.");
return;
}
if (!treeElement.sourceCodeTimeline.sourceCodeLocation) {
WebInspector.timelineSidebarPanel.showTimelineOverview();
return;
}
WebInspector.resourceSidebarPanel.showOriginalOrFormattedSourceCodeLocation(treeElement.sourceCodeTimeline.sourceCodeLocation);
}
};
/*
* Copyright (C) 2013 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*/
WebInspector.SourceCodeTimelineTreeElement = function(sourceCodeTimeline)
{
console.assert(sourceCodeTimeline);
this._sourceCodeTimeline = sourceCodeTimeline;
var title = "";
var subtitle = "";
var sourceCodeLocation = sourceCodeTimeline.sourceCodeLocation;
if (sourceCodeLocation) {
// FIXME: This needs to live update the subtitle in response to the WebInspector.SourceCodeLocation.Event.DisplayLocationChanged event.
subtitle = WebInspector.UIString("line ") + (sourceCodeLocation.displayLineNumber + 1); // The user visible line number is 1-based.
if (sourceCodeLocation.displayColumnNumber > WebInspector.SourceCodeLocation.LargeColumnNumber)
subtitle += ":" + (sourceCodeLocation.displayColumnNumber + 1); // The user visible column number is 1-based.
}
var iconStyleClass = null;
switch (sourceCodeTimeline.recordType) {
case WebInspector.TimelineRecord.Type.Layout:
switch (sourceCodeTimeline.recordEventType) {
case WebInspector.LayoutTimelineRecord.EventType.InvalidateStyles:
title = WebInspector.UIString("Styles Invalidated");
iconStyleClass = WebInspector.SourceCodeTimelineTreeElement.StyleRecordIconStyleClass;
break;
case WebInspector.LayoutTimelineRecord.EventType.RecalculateStyles:
title = WebInspector.UIString("Styles Recalculated");
iconStyleClass = WebInspector.SourceCodeTimelineTreeElement.StyleRecordIconStyleClass;
break;
case WebInspector.LayoutTimelineRecord.EventType.InvalidateLayout:
title = WebInspector.UIString("Layout Invalidated");
iconStyleClass = WebInspector.SourceCodeTimelineTreeElement.LayoutRecordIconStyleClass;
break;
case WebInspector.LayoutTimelineRecord.EventType.Layout:
title = WebInspector.UIString("Layout");
iconStyleClass = WebInspector.SourceCodeTimelineTreeElement.LayoutRecordIconStyleClass;
break;
case WebInspector.LayoutTimelineRecord.EventType.Paint:
title = WebInspector.UIString("Paint");
iconStyleClass = WebInspector.SourceCodeTimelineTreeElement.PaintRecordIconStyleClass;
break;
}
case WebInspector.TimelineRecord.Type.Script:
switch (sourceCodeTimeline.recordEventType) {
case WebInspector.ScriptTimelineRecord.EventType.ScriptEvaluated:
title = WebInspector.UIString("Script Evaluated");
iconStyleClass = WebInspector.SourceCodeTimelineTreeElement.EvaluatedRecordIconStyleClass;
break;
case WebInspector.ScriptTimelineRecord.EventType.EventDispatched:
title = WebInspector.UIString("Event Dispatched");
subtitle += " \u2014 " + sourceCodeTimeline.records[0].details;
iconStyleClass = WebInspector.SourceCodeTimelineTreeElement.EventRecordIconStyleClass;
break;
case WebInspector.ScriptTimelineRecord.EventType.TimerFired:
title = WebInspector.UIString("Timer Fired");
iconStyleClass = WebInspector.SourceCodeTimelineTreeElement.TimerRecordIconStyleClass;
break;
case WebInspector.ScriptTimelineRecord.EventType.TimerInstalled:
title = WebInspector.UIString("Timer Installed");
iconStyleClass = WebInspector.SourceCodeTimelineTreeElement.TimerRecordIconStyleClass;
break;
case WebInspector.ScriptTimelineRecord.EventType.TimerRemoved:
title = WebInspector.UIString("Timer Removed");
iconStyleClass = WebInspector.SourceCodeTimelineTreeElement.TimerRecordIconStyleClass;
break;
case WebInspector.ScriptTimelineRecord.EventType.AnimationFrameFired:
title = WebInspector.UIString("Animation Frame Fired");
iconStyleClass = WebInspector.SourceCodeTimelineTreeElement.AnimationRecordIconStyleClass;
break;
}
}
WebInspector.GeneralTreeElement.call(this, [iconStyleClass], title, subtitle, sourceCodeTimeline, false);
this.small = true;
};
WebInspector.SourceCodeTimelineTreeElement.StyleRecordIconStyleClass = "style-record";
WebInspector.SourceCodeTimelineTreeElement.LayoutRecordIconStyleClass = "layout-record";
WebInspector.SourceCodeTimelineTreeElement.PaintRecordIconStyleClass = "paint-record";
WebInspector.SourceCodeTimelineTreeElement.EvaluatedRecordIconStyleClass = "evaluated-record";
WebInspector.SourceCodeTimelineTreeElement.EventRecordIconStyleClass = "event-record";
WebInspector.SourceCodeTimelineTreeElement.TimerRecordIconStyleClass = "timer-record";
WebInspector.SourceCodeTimelineTreeElement.AnimationRecordIconStyleClass = "animation-record";
WebInspector.SourceCodeTimelineTreeElement.prototype = {
constructor: WebInspector.SourceCodeTimelineTreeElement,
__proto__: WebInspector.GeneralTreeElement.prototype,
// Public
get sourceCodeTimeline()
{
return this._sourceCodeTimeline;
}
};
......@@ -28,6 +28,46 @@ WebInspector.TimelineContentView = function(recording)
WebInspector.ContentView.call(this, recording);
this.element.classList.add(WebInspector.TimelineContentView.StyleClassName);
this._viewContainer = document.createElement("div");
this._viewContainer.classList.add(WebInspector.TimelineContentView.ViewContainerStyleClassName);
this.element.appendChild(this._viewContainer);
this._overviewTimelineView = new WebInspector.OverviewTimelineView;
this._discreteTimelineViewMap = {
[WebInspector.TimelineRecord.Type.Network]: new WebInspector.TimelineView,
[WebInspector.TimelineRecord.Type.Layout]: new WebInspector.TimelineView,
[WebInspector.TimelineRecord.Type.Script]: new WebInspector.TimelineView
};
function createPathComponent(displayName, className, representedObject)
{
var pathComponent = new WebInspector.HierarchicalPathComponent(displayName, className, representedObject);
pathComponent.addEventListener(WebInspector.HierarchicalPathComponent.Event.SiblingWasSelected, this._pathComponentSelected, this);
return pathComponent;
}
var networkPathComponent = createPathComponent.call(this, WebInspector.UIString("Network Requests"), WebInspector.TimelineSidebarPanel.NetworkIconStyleClass, WebInspector.TimelineRecord.Type.Network);
var layoutPathComponent = createPathComponent.call(this, WebInspector.UIString("Layout & Rendering"), WebInspector.TimelineSidebarPanel.ColorsIconStyleClass, WebInspector.TimelineRecord.Type.Layout);
var scriptPathComponent = createPathComponent.call(this, WebInspector.UIString("JavaScript & Events"), WebInspector.TimelineSidebarPanel.ScriptIconStyleClass, WebInspector.TimelineRecord.Type.Script);
networkPathComponent.nextSibling = layoutPathComponent;
layoutPathComponent.previousSibling = networkPathComponent;
layoutPathComponent.nextSibling = scriptPathComponent;
scriptPathComponent.previousSibling = layoutPathComponent;
this._pathComponentMap = {
[WebInspector.TimelineRecord.Type.Network]: networkPathComponent,
[WebInspector.TimelineRecord.Type.Layout]: layoutPathComponent,