Skip to content

Commit 1e17203

Browse files
committed
Backout 3c95dca80f3f (bug 790650) for causing the current #1 toporange, bug 782877
UltraBlame original commit: 74c6fc2c4ad1993020627a800cf5681707cf5222
1 parent 9a8c6b4 commit 1e17203

File tree

6 files changed

+34
-119
lines changed

6 files changed

+34
-119
lines changed

browser/devtools/debugger/debugger-controller.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,7 @@ let DebuggerController = {
6060
DebuggerView.StackFrames.initialize();
6161
DebuggerView.Breakpoints.initialize();
6262
DebuggerView.Properties.initialize();
63-
DebuggerView.toggleCloseButton(!this._isRemoteDebugger &&
64-
!this._isChromeDebugger);
63+
DebuggerView.showCloseButton(!this._isRemoteDebugger && !this._isChromeDebugger);
6564

6665
this.dispatchEvent("Debugger:Loaded");
6766
this._connect();

browser/devtools/debugger/debugger-view.js

Lines changed: 18 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
"use strict";
77

88
const BREAKPOINT_LINE_TOOLTIP_MAX_SIZE = 1000;
9-
const PANES_APPEARANCE_DELAY = 50;
109
const PROPERTY_VIEW_FLASH_DURATION = 400;
1110
const GLOBAL_SEARCH_MATCH_FLASH_DURATION = 100;
1211
const GLOBAL_SEARCH_URL_MAX_SIZE = 100;
@@ -104,8 +103,8 @@ let DebuggerView = {
104103
this._stackframesAndBreakpoints.setAttribute("width", Prefs.stackframesWidth);
105104
this._variables.setAttribute("width", Prefs.variablesWidth);
106105

107-
this.toggleStackframesAndBreakpointsPane({ silent: true });
108-
this.toggleVariablesPane({ silent: true });
106+
this.showStackframesAndBreakpointsPane(Prefs.stackframesPaneVisible);
107+
this.showVariablesPane(Prefs.variablesPaneVisible);
109108
},
110109

111110

@@ -174,22 +173,18 @@ let DebuggerView = {
174173

175174

176175
_onTogglePanesButtonPressed: function DV__onTogglePanesButtonPressed() {
177-
this.toggleStackframesAndBreakpointsPane({
178-
visible: !!this._togglePanesButton.getAttribute("stackframesAndBreakpointsHidden"),
179-
animated: true
180-
});
181-
this.toggleVariablesPane({
182-
visible: !!this._togglePanesButton.getAttribute("variablesHidden"),
183-
animated: true
184-
});
185-
this._onPanesToggle();
176+
this.showStackframesAndBreakpointsPane(
177+
this._togglePanesButton.getAttribute("stackframesAndBreakpointsHidden"), true);
178+
179+
this.showVariablesPane(
180+
this._togglePanesButton.getAttribute("variablesHidden"), true);
186181
},
187182

188183

189184

190185

191186

192-
toggleCloseButton: function DV_toggleCloseButton(aVisibleFlag) {
187+
showCloseButton: function DV_showCloseButton(aVisibleFlag) {
193188
document.getElementById("close").setAttribute("hidden", !aVisibleFlag);
194189
},
195190

@@ -198,18 +193,14 @@ let DebuggerView = {
198193

199194

200195

201-
202-
203-
204-
205-
toggleStackframesAndBreakpointsPane:
206-
function DV_toggleStackframesAndBreakpointsPane(aFlags = {}) {
207-
if (aFlags.animated) {
196+
showStackframesAndBreakpointsPane:
197+
function DV_showStackframesAndBreakpointsPane(aVisibleFlag, aAnimatedFlag) {
198+
if (aAnimatedFlag) {
208199
this._stackframesAndBreakpoints.setAttribute("animated", "");
209200
} else {
210201
this._stackframesAndBreakpoints.removeAttribute("animated");
211202
}
212-
if (aFlags.visible) {
203+
if (aVisibleFlag) {
213204
this._stackframesAndBreakpoints.style.marginLeft = "0";
214205
this._togglePanesButton.removeAttribute("stackframesAndBreakpointsHidden");
215206
this._togglePanesButton.setAttribute("tooltiptext", L10N.getStr("collapsePanes"));
@@ -219,28 +210,22 @@ let DebuggerView = {
219210
this._togglePanesButton.setAttribute("stackframesAndBreakpointsHidden", "true");
220211
this._togglePanesButton.setAttribute("tooltiptext", L10N.getStr("expandPanes"));
221212
}
222-
if (!aFlags.silent) {
223-
Prefs.stackframesPaneVisible = !!aFlags.visible;
224-
}
213+
Prefs.stackframesPaneVisible = aVisibleFlag;
225214
},
226215

227216

228217

229218

230219

231220

232-
233-
234-
235-
236-
toggleVariablesPane:
237-
function DV_toggleVariablesPane(aFlags = {}) {
238-
if (aFlags.animated) {
221+
showVariablesPane:
222+
function DV_showVariablesPane(aVisibleFlag, aAnimatedFlag) {
223+
if (aAnimatedFlag) {
239224
this._variables.setAttribute("animated", "");
240225
} else {
241226
this._variables.removeAttribute("animated");
242227
}
243-
if (aFlags.visible) {
228+
if (aVisibleFlag) {
244229
this._variables.style.marginRight = "0";
245230
this._togglePanesButton.removeAttribute("variablesHidden");
246231
this._togglePanesButton.setAttribute("tooltiptext", L10N.getStr("collapsePanes"));
@@ -250,54 +235,7 @@ let DebuggerView = {
250235
this._togglePanesButton.setAttribute("variablesHidden", "true");
251236
this._togglePanesButton.setAttribute("tooltiptext", L10N.getStr("expandPanes"));
252237
}
253-
if (!aFlags.silent) {
254-
Prefs.variablesPaneVisible = !!aFlags.visible;
255-
}
256-
},
257-
258-
259-
260-
261-
262-
showPanesIfAllowed: function DV_showPanesIfAllowed() {
263-
264-
window.setTimeout(function() {
265-
let shown;
266-
267-
if (Prefs.stackframesPaneVisible &&
268-
this._togglePanesButton.getAttribute("stackframesAndBreakpointsHidden")) {
269-
this.toggleStackframesAndBreakpointsPane({
270-
visible: true,
271-
animated: true,
272-
silent: true
273-
});
274-
shown = true;
275-
}
276-
if (Prefs.variablesPaneVisible &&
277-
this._togglePanesButton.getAttribute("variablesHidden")) {
278-
this.toggleVariablesPane({
279-
visible: true,
280-
animated: true,
281-
silent: true
282-
});
283-
shown = true;
284-
}
285-
if (shown) {
286-
this._onPanesToggle();
287-
}
288-
}.bind(this), PANES_APPEARANCE_DELAY);
289-
},
290-
291-
292-
293-
294-
295-
296-
_onPanesToggle: function DV__onPanesToggle() {
297-
document.addEventListener("transitionend", function onEvent() {
298-
document.removeEventListener("transitionend", onEvent);
299-
DebuggerController.StackFrames.updateEditorLocation();
300-
});
238+
Prefs.variablesPaneVisible = aVisibleFlag;
301239
},
302240

303241

@@ -1687,8 +1625,6 @@ StackFramesView.prototype = {
16871625
if (document.getElementById("stackframe-" + aDepth)) {
16881626
return null;
16891627
}
1690-
1691-
DebuggerView.showPanesIfAllowed();
16921628

16931629
let frame = document.createElement("box");
16941630
let frameName = document.createElement("label");

browser/devtools/debugger/test/browser_dbg_pane-collapse.js

Lines changed: 12 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -19,32 +19,12 @@ function test() {
1919
gDebugger = gPane.contentWindow;
2020
gView = gDebugger.DebuggerView;
2121

22-
testPanesState();
23-
24-
gView.toggleStackframesAndBreakpointsPane({ visible: true });
25-
gView.toggleVariablesPane({ visible: true });
2622
testPaneCollapse1();
2723
testPaneCollapse2();
28-
2924
closeDebuggerAndFinish();
3025
});
3126
}
3227

33-
function testPanesState() {
34-
let togglePanesButton =
35-
gDebugger.document.getElementById("toggle-panes");
36-
37-
ok(togglePanesButton.getAttribute("stackframesAndBreakpointsHidden"),
38-
"The stackframes and breakpoints pane should initially be invisible.");
39-
is(gDebugger.Prefs.stackframesPaneVisible, true,
40-
"The stackframes and breakpoints pane should initially be preffed as visible.");
41-
42-
ok(togglePanesButton.getAttribute("variablesHidden"),
43-
"The stackframes and breakpoints pane should initially be invisible.");
44-
is(gDebugger.Prefs.variablesPaneVisible, true,
45-
"The stackframes and breakpoints pane should initially be preffed as visible.");
46-
}
47-
4828
function testPaneCollapse1() {
4929
let stackframesAndBrekpoints =
5030
gDebugger.document.getElementById("stackframes+breakpoints");
@@ -55,16 +35,16 @@ function testPaneCollapse1() {
5535
is(width, gDebugger.Prefs.stackframesWidth,
5636
"The stackframes and breakpoints pane has an incorrect width.");
5737
is(stackframesAndBrekpoints.style.marginLeft, "0px",
58-
"The stackframes and breakpoints pane has an incorrect left margin.");
38+
"The stackframes and breakpoints pane has an incorrect initial left margin.");
5939
ok(!stackframesAndBrekpoints.hasAttribute("animated"),
60-
"The stackframes and breakpoints pane has an incorrect animated attribute.");
40+
"The stackframes and breakpoints pane has an incorrect initial animated attribute.");
6141
ok(!togglePanesButton.getAttribute("stackframesAndBreakpointsHidden"),
62-
"The stackframes and breakpoints pane should at this point be visible.");
42+
"The stackframes and breakpoints pane should initially be visible.");
6343

6444
is(gDebugger.Prefs.stackframesPaneVisible, true,
65-
"The stackframes and breakpoints pane should at this point be visible.");
45+
"The stackframes and breakpoints pane should initially be visible.");
6646

67-
gView.toggleStackframesAndBreakpointsPane({ visible: false, animated: true });
47+
gView.showStackframesAndBreakpointsPane(false, true);
6848

6949
is(gDebugger.Prefs.stackframesPaneVisible, false,
7050
"The stackframes and breakpoints pane should be hidden after collapsing.");
@@ -82,7 +62,7 @@ function testPaneCollapse1() {
8262
is(gDebugger.Prefs.stackframesPaneVisible, false,
8363
"The stackframes and breakpoints pane should be hidden before uncollapsing.");
8464

85-
gView.toggleStackframesAndBreakpointsPane({ visible: true, animated: false });
65+
gView.showStackframesAndBreakpointsPane(true, false);
8666

8767
is(gDebugger.Prefs.stackframesPaneVisible, true,
8868
"The stackframes and breakpoints pane should be visible after uncollapsing.");
@@ -107,16 +87,16 @@ function testPaneCollapse2() {
10787
is(width, gDebugger.Prefs.variablesWidth,
10888
"The variables pane has an incorrect width.");
10989
is(variables.style.marginRight, "0px",
110-
"The variables pane has an incorrect right margin.");
90+
"The variables pane has an incorrect initial right margin.");
11191
ok(!variables.hasAttribute("animated"),
112-
"The variables pane has an incorrect animated attribute.");
92+
"The variables pane has an incorrect initial animated attribute.");
11393
ok(!togglePanesButton.getAttribute("variablesHidden"),
114-
"The variables pane should at this point be visible.");
94+
"The variables pane should initially be visible.");
11595

11696
is(gDebugger.Prefs.variablesPaneVisible, true,
117-
"The variables pane should at this point be visible.");
97+
"The variables pane should initially be visible.");
11898

119-
gView.toggleVariablesPane({ visible: false, animated: true });
99+
gView.showVariablesPane(false, true);
120100

121101
is(gDebugger.Prefs.variablesPaneVisible, false,
122102
"The variables pane should be hidden after collapsing.");
@@ -134,7 +114,7 @@ function testPaneCollapse2() {
134114
is(gDebugger.Prefs.variablesPaneVisible, false,
135115
"The variables pane should be hidden before uncollapsing.");
136116

137-
gView.toggleVariablesPane({ visible: true, animated: false });
117+
gView.showVariablesPane(true, false);
138118

139119
is(gDebugger.Prefs.variablesPaneVisible, true,
140120
"The variables pane should be visible after uncollapsing.");

browser/themes/gnomestripe/devtools/debugger.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66

77
#body {
8-
background-color: white;
8+
background: -moz-dialog;
99
}
1010

1111

browser/themes/pinstripe/devtools/debugger.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
%include ../shared.inc
88

99
#body {
10-
background-color: white;
10+
background: -moz-dialog;
1111
}
1212

1313

browser/themes/winstripe/devtools/debugger.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66

77
#body {
8-
background-color: white;
8+
background: -moz-dialog;
99
}
1010

1111

0 commit comments

Comments
 (0)