Adds Focus, Exclude and Restore buttons to the Profile view
authortimothy@apple.com <timothy@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 23 May 2008 05:15:28 +0000 (05:15 +0000)
committertimothy@apple.com <timothy@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 23 May 2008 05:15:28 +0000 (05:15 +0000)
commitcbf17eda98dc277cf80ac49994cb6002d54a07a8
tree5b466a254ca735563d0815b1e507d7f6188d5359
parentc8807571d7503be6860c500aa56a6783e7726b59
Adds Focus, Exclude and Restore buttons to the Profile view
Status bar. Also adds a Record button to create new profiles.

<rdar://problem/5950867> JSProfiler: Allow the profiler to "Focus" a profile node.
<rdar://problem/5951529> JSProfiler: Allow the profiler to "Exclude" a profile node.

Reviewed by Adam Roben.

* English.lproj/localizedStrings.js: Added new strings.
* page/JavaScriptProfile.cpp:
(WebCore::restoreAll): Call Profile::restoreAll.
(WebCore::ProfileClass): Added restoreAll to the static functions.
* page/inspector/Images/excludeButtons.png: Added.
* page/inspector/Images/focusButtons.png: Added.
* page/inspector/Images/recordButtons.png: Added.
* page/inspector/Images/reloadButtons.png: Added.
* page/inspector/ProfileView.js:
(WebInspector.ProfileView): Create the buttons elements.
(WebInspector.ProfileView.prototype.get statusBarItems): Return the three
status bar buttons.
(WebInspector.ProfileView.prototype.refresh): Only create ProfileDataGridNodes
for ProfileNodes that are visible.
(WebInspector.ProfileView.prototype.refreshShowAsPercents): Just call
refresh on the children, now that they have access to the ProfileView's properties.
(WebInspector.ProfileView.prototype._focusClicked): Call focus
on the profile, refresh the ProfileView and show the reset button.
(WebInspector.ProfileView.prototype._excludeClicked): Call exclude
on the profile, refresh the ProfileView and show the reset button.
(WebInspector.ProfileView.prototype._resetClicked): Call restoreAll
on the profile, refresh the ProfileView and hide the reset button.
(WebInspector.ProfileView.prototype._dataGridNodeSelected): Enable the
focus and exclude buttons.
(WebInspector.ProfileView.prototype._dataGridNodeDeselected): Disable the
focus and exclude buttons.
(WebInspector.ProfileDataGridNode): Take a ProfileView, and remove the
showPercentAs* arguments.
* page/inspector/ProfilesPanel.js: Add a record status bar button and
th ability to have per-view status bar buttons.
* page/inspector/inspector.css: New styles.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@34051 268f45cc-cd09-0410-ab3c-d52691b4dbfc
13 files changed:
JavaScriptCore/ChangeLog
JavaScriptCore/JavaScriptCore.exp
JavaScriptCore/profiler/Profile.h
WebCore/ChangeLog
WebCore/English.lproj/localizedStrings.js
WebCore/page/JavaScriptProfile.cpp
WebCore/page/inspector/Images/excludeButtons.png [new file with mode: 0644]
WebCore/page/inspector/Images/focusButtons.png [new file with mode: 0644]
WebCore/page/inspector/Images/recordButtons.png [new file with mode: 0644]
WebCore/page/inspector/Images/reloadButtons.png [new file with mode: 0644]
WebCore/page/inspector/ProfileView.js
WebCore/page/inspector/ProfilesPanel.js
WebCore/page/inspector/inspector.css