summaryrefslogtreecommitdiffstats
path: root/WebCore/inspector/front-end/ProfilesPanel.js
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/inspector/front-end/ProfilesPanel.js')
-rw-r--r--WebCore/inspector/front-end/ProfilesPanel.js22
1 files changed, 13 insertions, 9 deletions
diff --git a/WebCore/inspector/front-end/ProfilesPanel.js b/WebCore/inspector/front-end/ProfilesPanel.js
index e7ee064..c8b948a 100644
--- a/WebCore/inspector/front-end/ProfilesPanel.js
+++ b/WebCore/inspector/front-end/ProfilesPanel.js
@@ -59,10 +59,14 @@ WebInspector.ProfilesPanel = function()
this.profileViews.id = "profile-views";
this.element.appendChild(this.profileViews);
- this.enableToggleButton = new WebInspector.StatusBarButton("", "enable-toggle-status-bar-item");
+ this.enableToggleButton = this.createStatusBarButton();
+ this.enableToggleButton.className = "enable-toggle-status-bar-item status-bar-item";
this.enableToggleButton.addEventListener("click", this._toggleProfiling.bind(this), false);
- this.recordButton = new WebInspector.StatusBarButton(WebInspector.UIString("Start profiling."), "record-profile-status-bar-item");
+ this.recordButton = this.createStatusBarButton();
+ this.recordButton.title = WebInspector.UIString("Start profiling.");
+ this.recordButton.id = "record-profile-status-bar-item";
+ this.recordButton.className = "status-bar-item";
this.recordButton.addEventListener("click", this._recordClicked.bind(this), false);
this.recording = false;
@@ -83,7 +87,7 @@ WebInspector.ProfilesPanel.prototype = {
get statusBarItems()
{
- return [this.enableToggleButton.element, this.recordButton.element, this.profileViewStatusBarItemsContainer];
+ return [this.enableToggleButton, this.recordButton, this.profileViewStatusBarItemsContainer];
},
show: function()
@@ -313,10 +317,10 @@ WebInspector.ProfilesPanel.prototype = {
this.recording = isProfiling;
if (isProfiling) {
- this.recordButton.toggled = true;
+ this.recordButton.addStyleClass("toggled-on");
this.recordButton.title = WebInspector.UIString("Stop profiling.");
} else {
- this.recordButton.toggled = false;
+ this.recordButton.removeStyleClass("toggled-on");
this.recordButton.title = WebInspector.UIString("Start profiling.");
}
},
@@ -332,14 +336,14 @@ WebInspector.ProfilesPanel.prototype = {
{
if (InspectorController.profilerEnabled()) {
this.enableToggleButton.title = WebInspector.UIString("Profiling enabled. Click to disable.");
- this.enableToggleButton.toggled = true;
- this.recordButton.visible = true;
+ this.enableToggleButton.addStyleClass("toggled-on");
+ this.recordButton.removeStyleClass("hidden");
this.profileViewStatusBarItemsContainer.removeStyleClass("hidden");
this.panelEnablerView.visible = false;
} else {
this.enableToggleButton.title = WebInspector.UIString("Profiling disabled. Click to enable.");
- this.enableToggleButton.toggled = false;
- this.recordButton.visible = false;
+ this.enableToggleButton.removeStyleClass("toggled-on");
+ this.recordButton.addStyleClass("hidden");
this.profileViewStatusBarItemsContainer.addStyleClass("hidden");
this.panelEnablerView.visible = true;
}