From 81ef53dfec59ec7547d6f18417c68f9312856e75 Mon Sep 17 00:00:00 2001 From: Alexey Novak Date: Thu, 9 Jan 2014 10:11:54 +0200 Subject: [PATCH] Bug 947143 - Replaced debugger resumption order panel with an easier to maintain Tooltip.js instance; r=vporof --- browser/devtools/debugger/debugger-toolbar.js | 11 +++++------ browser/devtools/debugger/debugger-view.js | 1 + browser/devtools/debugger/debugger.xul | 11 ----------- browser/themes/shared/devtools/debugger.inc.css | 8 -------- 4 files changed, 6 insertions(+), 25 deletions(-) diff --git a/browser/devtools/debugger/debugger-toolbar.js b/browser/devtools/debugger/debugger-toolbar.js index a1f72ae39151..7769be9ce084 100644 --- a/browser/devtools/debugger/debugger-toolbar.js +++ b/browser/devtools/debugger/debugger-toolbar.js @@ -31,11 +31,12 @@ ToolbarView.prototype = { dumpn("Initializing the ToolbarView"); this._instrumentsPaneToggleButton = document.getElementById("instruments-pane-toggle"); - this._resumeOrderPanel = document.getElementById("resumption-order-panel"); this._resumeButton = document.getElementById("resume"); this._stepOverButton = document.getElementById("step-over"); this._stepInButton = document.getElementById("step-in"); this._stepOutButton = document.getElementById("step-out"); + this._resumeOrderTooltip = new Tooltip(document); + this._resumeOrderTooltip.defaultPosition = TOOLBAR_ORDER_POPUP_POSITION; let resumeKey = ShortcutUtils.prettifyShortcut(document.getElementById("resumeKey")); let stepOverKey = ShortcutUtils.prettifyShortcut(document.getElementById("stepOverKey")); @@ -80,10 +81,8 @@ ToolbarView.prototype = { */ showResumeWarning: function(aPausedUrl) { let label = L10N.getFormatStr("resumptionOrderPanelTitle", aPausedUrl); - let descriptionNode = document.getElementById("resumption-panel-desc"); - descriptionNode.setAttribute("value", label); - - this._resumeOrderPanel.openPopup(this._resumeButton); + this._resumeOrderTooltip.setTextContent([label]); + this._resumeOrderTooltip.show(this._resumeButton); }, /** @@ -163,11 +162,11 @@ ToolbarView.prototype = { }, _instrumentsPaneToggleButton: null, - _resumeOrderPanel: null, _resumeButton: null, _stepOverButton: null, _stepInButton: null, _stepOutButton: null, + _resumeOrderTooltip: null, _resumeTooltip: "", _pauseTooltip: "", _stepOverTooltip: "", diff --git a/browser/devtools/debugger/debugger-view.js b/browser/devtools/debugger/debugger-view.js index c5d2a8e8ea46..b500e45fe26f 100644 --- a/browser/devtools/debugger/debugger-view.js +++ b/browser/devtools/debugger/debugger-view.js @@ -28,6 +28,7 @@ const SEARCH_LINE_FLAG = ":"; const SEARCH_VARIABLE_FLAG = "*"; const EDITOR_VARIABLE_HOVER_DELAY = 350; // ms const EDITOR_VARIABLE_POPUP_POSITION = "topcenter bottomleft"; +const TOOLBAR_ORDER_POPUP_POSITION = "topcenter bottomleft"; /** * Object defining the debugger view components. diff --git a/browser/devtools/debugger/debugger.xul b/browser/devtools/debugger/debugger.xul index faef6ca896c5..807ffbc2c2f1 100644 --- a/browser/devtools/debugger/debugger.xul +++ b/browser/devtools/debugger/debugger.xul @@ -513,15 +513,4 @@ - - - - - - diff --git a/browser/themes/shared/devtools/debugger.inc.css b/browser/themes/shared/devtools/debugger.inc.css index c5483a366bda..be9a3146e150 100644 --- a/browser/themes/shared/devtools/debugger.inc.css +++ b/browser/themes/shared/devtools/debugger.inc.css @@ -511,14 +511,6 @@ padding: 0 !important; } -#resumption-panel-desc { - width: 200px; -} - -#resumption-order-panel { - -moz-margin-start: -8px; -} - #resume { list-style-image: url(debugger-pause.png); -moz-image-region: rect(0px,16px,16px,0px);