mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
merge m-c to fx-team
This commit is contained in:
commit
d12bd4710c
@ -611,7 +611,6 @@ WebConsole.prototype = {
|
||||
|
||||
let position = Services.prefs.getCharPref("devtools.webconsole.position");
|
||||
this.positionConsole(position);
|
||||
this._currentUIPosition = position;
|
||||
},
|
||||
|
||||
/**
|
||||
@ -622,8 +621,10 @@ WebConsole.prototype = {
|
||||
{
|
||||
this.iframe.removeEventListener("load", this._onIframeLoad, true);
|
||||
|
||||
let position = Services.prefs.getCharPref("devtools.webconsole.position");
|
||||
|
||||
this.iframeWindow = this.iframe.contentWindow.wrappedJSObject;
|
||||
this.ui = new this.iframeWindow.WebConsoleFrame(this, this._currentUIPosition);
|
||||
this.ui = new this.iframeWindow.WebConsoleFrame(this, position);
|
||||
this._setupMessageManager();
|
||||
},
|
||||
|
||||
@ -695,8 +696,6 @@ WebConsole.prototype = {
|
||||
this.iframe.flex = 1;
|
||||
|
||||
panel.setAttribute("height", height);
|
||||
|
||||
this._afterPositionConsole("window", lastIndex);
|
||||
}).bind(this);
|
||||
|
||||
panel.addEventListener("popupshown", onPopupShown,false);
|
||||
@ -736,6 +735,9 @@ WebConsole.prototype = {
|
||||
if (this.splitter.parentNode) {
|
||||
this.splitter.parentNode.removeChild(this.splitter);
|
||||
}
|
||||
|
||||
this._beforePositionConsole("window", lastIndex);
|
||||
|
||||
panel.appendChild(this.iframe);
|
||||
|
||||
let space = this.chromeDocument.createElement("spacer");
|
||||
@ -822,6 +824,8 @@ WebConsole.prototype = {
|
||||
this.splitter.parentNode.removeChild(this.splitter);
|
||||
}
|
||||
|
||||
this._beforePositionConsole(aPosition, lastIndex);
|
||||
|
||||
if (aPosition == "below") {
|
||||
nBox.appendChild(this.splitter);
|
||||
nBox.appendChild(this.iframe);
|
||||
@ -841,12 +845,10 @@ WebConsole.prototype = {
|
||||
this.iframe.removeAttribute("height");
|
||||
this.iframe.style.height = height + "px";
|
||||
}
|
||||
|
||||
this._afterPositionConsole(aPosition, lastIndex);
|
||||
},
|
||||
|
||||
/**
|
||||
* Common code that needs to execute after the Web Console is repositioned.
|
||||
* Common code that needs to execute before the Web Console is repositioned.
|
||||
* @private
|
||||
* @param string aPosition
|
||||
* The new position: "above", "below" or "window".
|
||||
@ -854,8 +856,8 @@ WebConsole.prototype = {
|
||||
* The last visible message in the console output before repositioning
|
||||
* occurred.
|
||||
*/
|
||||
_afterPositionConsole:
|
||||
function WC__afterPositionConsole(aPosition, aLastIndex)
|
||||
_beforePositionConsole:
|
||||
function WC__beforePositionConsole(aPosition, aLastIndex)
|
||||
{
|
||||
if (!this.ui) {
|
||||
return;
|
||||
|
@ -37,7 +37,7 @@ function waitForPosition(aPosition, aCallback) {
|
||||
{
|
||||
return hudRef._currentUIPosition == aPosition;
|
||||
},
|
||||
successFn: aCallback,
|
||||
successFn: executeSoon.bind(null, aCallback),
|
||||
failureFn: finishTest,
|
||||
});
|
||||
}
|
||||
@ -55,9 +55,10 @@ function consoleOpened(aHudRef) {
|
||||
"position menu checkbox is below");
|
||||
is(Services.prefs.getCharPref(POSITION_PREF), "below", "pref is below");
|
||||
|
||||
hudRef.positionConsole("above");
|
||||
|
||||
waitForPosition("above", onPositionAbove);
|
||||
executeSoon(function() {
|
||||
hudRef.positionConsole("above");
|
||||
waitForPosition("above", onPositionAbove);
|
||||
});
|
||||
}
|
||||
|
||||
function onPositionAbove() {
|
||||
@ -81,8 +82,10 @@ function onPositionAbove() {
|
||||
Services.prefs.setIntPref(TOP_PREF, 50);
|
||||
Services.prefs.setIntPref(LEFT_PREF, 51);
|
||||
|
||||
hudRef.positionConsole("window");
|
||||
waitForPosition("window", onPositionWindow);
|
||||
executeSoon(function() {
|
||||
hudRef.positionConsole("window");
|
||||
waitForPosition("window", onPositionWindow);
|
||||
});
|
||||
}
|
||||
|
||||
function onPositionWindow() {
|
||||
|
Loading…
Reference in New Issue
Block a user