summaryrefslogtreecommitdiffstats
path: root/WebCore/inspector/front-end/ProfileView.js
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/inspector/front-end/ProfileView.js')
-rw-r--r--WebCore/inspector/front-end/ProfileView.js28
1 files changed, 11 insertions, 17 deletions
diff --git a/WebCore/inspector/front-end/ProfileView.js b/WebCore/inspector/front-end/ProfileView.js
index 2517bd2..5c9fcda 100644
--- a/WebCore/inspector/front-end/ProfileView.js
+++ b/WebCore/inspector/front-end/ProfileView.js
@@ -56,25 +56,19 @@ WebInspector.ProfileView = function(profile)
this.viewSelectElement.appendChild(heavyViewOption);
this.viewSelectElement.appendChild(treeViewOption);
- this.percentButton = document.createElement("button");
- this.percentButton.className = "percent-time-status-bar-item status-bar-item";
+ this.percentButton = new WebInspector.StatusBarButton("", "percent-time-status-bar-item");
this.percentButton.addEventListener("click", this._percentClicked.bind(this), false);
- this.focusButton = document.createElement("button");
- this.focusButton.title = WebInspector.UIString("Focus selected function.");
- this.focusButton.className = "focus-profile-node-status-bar-item status-bar-item";
+ this.focusButton = new WebInspector.StatusBarButton(WebInspector.UIString("Focus selected function."), "focus-profile-node-status-bar-item");
this.focusButton.disabled = true;
this.focusButton.addEventListener("click", this._focusClicked.bind(this), false);
- this.excludeButton = document.createElement("button");
- this.excludeButton.title = WebInspector.UIString("Exclude selected function.");
- this.excludeButton.className = "exclude-profile-node-status-bar-item status-bar-item";
+ this.excludeButton = new WebInspector.StatusBarButton(WebInspector.UIString("Exclude selected function."), "exclude-profile-node-status-bar-item");
this.excludeButton.disabled = true;
this.excludeButton.addEventListener("click", this._excludeClicked.bind(this), false);
- this.resetButton = document.createElement("button");
- this.resetButton.title = WebInspector.UIString("Restore all functions.");
- this.resetButton.className = "reset-profile-status-bar-item status-bar-item hidden";
+ this.resetButton = new WebInspector.StatusBarButton(WebInspector.UIString("Restore all functions."), "reset-profile-status-bar-item");
+ this.resetButton.visible = false;
this.resetButton.addEventListener("click", this._resetClicked.bind(this), false);
this.profile = profile;
@@ -90,7 +84,7 @@ WebInspector.ProfileView = function(profile)
WebInspector.ProfileView.prototype = {
get statusBarItems()
{
- return [this.viewSelectElement, this.percentButton, this.focusButton, this.excludeButton, this.resetButton];
+ return [this.viewSelectElement, this.percentButton.element, this.focusButton.element, this.excludeButton.element, this.resetButton.element];
},
get profile()
@@ -439,10 +433,10 @@ WebInspector.ProfileView.prototype = {
{
if (this.showSelfTimeAsPercent && this.showTotalTimeAsPercent && this.showAverageTimeAsPercent) {
this.percentButton.title = WebInspector.UIString("Show absolute total and self times.");
- this.percentButton.addStyleClass("toggled-on");
+ this.percentButton.toggled = true;
} else {
this.percentButton.title = WebInspector.UIString("Show total and self times as percentages.");
- this.percentButton.removeStyleClass("toggled-on");
+ this.percentButton.toggled = false;
}
},
@@ -451,7 +445,7 @@ WebInspector.ProfileView.prototype = {
if (!this.dataGrid.selectedNode)
return;
- this.resetButton.removeStyleClass("hidden");
+ this.resetButton.visible = true;
this.profileDataGridTree.focus(this.dataGrid.selectedNode);
this.refresh();
this.refreshVisibleData();
@@ -466,7 +460,7 @@ WebInspector.ProfileView.prototype = {
selectedNode.deselect();
- this.resetButton.removeStyleClass("hidden");
+ this.resetButton.visible = true;
this.profileDataGridTree.exclude(selectedNode);
this.refresh();
this.refreshVisibleData();
@@ -474,7 +468,7 @@ WebInspector.ProfileView.prototype = {
_resetClicked: function(event)
{
- this.resetButton.addStyleClass("hidden");
+ this.resetButton.visible = false;
this.profileDataGridTree.restore();
this.refresh();
this.refreshVisibleData();