Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(709)

Unified Diff: Source/devtools/front_end/StatusBarButton.js

Issue 145583007: Revert of Make pause-on-exceptions toggle/tri-state button. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/devtools/front_end/SourcesPanel.js ('k') | Source/devtools/front_end/sourcesPanel.css » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/StatusBarButton.js
diff --git a/Source/devtools/front_end/StatusBarButton.js b/Source/devtools/front_end/StatusBarButton.js
index b3a1cfcb18a4b06e4ab4d42d1614dbd803db821f..fa0676f340806a5d7adff8bf3ba6d87592e7684e 100644
--- a/Source/devtools/front_end/StatusBarButton.js
+++ b/Source/devtools/front_end/StatusBarButton.js
@@ -101,7 +101,7 @@
{
WebInspector.StatusBarItem.call(this, document.createElement("button"));
this.element.className = className + " status-bar-item";
- this.element.addEventListener("click", this._clicked.bind(this, false), false);
+ this.element.addEventListener("click", this._clicked.bind(this), false);
this.glyph = document.createElement("div");
this.glyph.className = "glyph";
@@ -126,12 +126,9 @@
}
WebInspector.StatusBarButton.prototype = {
- /**
- * @param {boolean} optionClick
- */
- _clicked: function(optionClick)
- {
- this.dispatchEventToListeners("click", optionClick);
+ _clicked: function()
+ {
+ this.dispatchEventToListeners("click");
if (this._longClickInterval) {
clearInterval(this._longClickInterval);
delete this._longClickInterval;
@@ -322,9 +319,9 @@
{
var buttons = this._longClickOptionsData.buttonsProvider();
var mainButtonClone = new WebInspector.StatusBarButton(this.title, this.className, this.states);
- mainButtonClone.addEventListener("click", this._clicked.bind(this, true), this);
+ mainButtonClone.addEventListener("click", this._clicked, this);
mainButtonClone.state = this.state;
- buttons.unshift(mainButtonClone);
+ buttons.push(mainButtonClone);
var mouseUpListener = mouseUp.bind(this);
document.documentElement.addEventListener("mouseup", mouseUpListener, false);
@@ -337,7 +334,7 @@
var topNotBottom = hostButtonPosition.top + buttonHeight * buttons.length < document.documentElement.offsetHeight;
- if (!topNotBottom)
+ if (topNotBottom)
buttons = buttons.reverse();
optionsBarElement.style.height = (buttonHeight * buttons.length) + "px";
@@ -383,7 +380,7 @@
for (var i = 0; i < buttons.length; ++i) {
if (buttons[i].element.classList.contains("emulate-active")) {
buttons[i].element.classList.remove("emulate-active");
- buttons[i]._clicked(true);
+ buttons[i]._clicked();
break;
}
}
« no previous file with comments | « Source/devtools/front_end/SourcesPanel.js ('k') | Source/devtools/front_end/sourcesPanel.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698