зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1181160 - Make print preview work in view source window when viewing source from a remote browser. r=jryans
We weren't making the print preview browser remote for the view source window if the view source browser was remote, causing us to fail to show the preview. --HG-- extra : commitid : Im9lcqBfT1f extra : rebase_source : ed98f41d50085cabd4b966aff959c852972823c1 extra : amend_source : d042e90a701ee0e51a9eb5b267f483ec2f556145
This commit is contained in:
Родитель
c5e7720606
Коммит
2f5564d292
|
@ -699,20 +699,26 @@ let viewSourceChrome = new ViewSourceChrome();
|
|||
* PrintUtils uses this to make Print Preview work.
|
||||
*/
|
||||
let PrintPreviewListener = {
|
||||
getPrintPreviewBrowser() {
|
||||
let browser = document.getElementById("ppBrowser");
|
||||
if (!browser) {
|
||||
browser = document.createElement("browser");
|
||||
browser.setAttribute("id", "ppBrowser");
|
||||
browser.setAttribute("flex", "1");
|
||||
browser.setAttribute("type", "content");
|
||||
_ppBrowser: null,
|
||||
|
||||
let findBar = document.getElementById("FindToolbar");
|
||||
document.getElementById("appcontent")
|
||||
.insertBefore(browser, findBar);
|
||||
getPrintPreviewBrowser() {
|
||||
if (!this._ppBrowser) {
|
||||
this._ppBrowser = document.createElement("browser");
|
||||
this._ppBrowser.setAttribute("flex", "1");
|
||||
this._ppBrowser.setAttribute("type", "content");
|
||||
}
|
||||
|
||||
return browser;
|
||||
if (gBrowser.isRemoteBrowser) {
|
||||
this._ppBrowser.setAttribute("remote", "true");
|
||||
} else {
|
||||
this._ppBrowser.removeAttribute("remote");
|
||||
}
|
||||
|
||||
let findBar = document.getElementById("FindToolbar");
|
||||
document.getElementById("appcontent")
|
||||
.insertBefore(this._ppBrowser, findBar);
|
||||
|
||||
return this._ppBrowser;
|
||||
},
|
||||
|
||||
getSourceBrowser() {
|
||||
|
@ -730,7 +736,7 @@ let PrintPreviewListener = {
|
|||
},
|
||||
|
||||
onExit() {
|
||||
document.getElementById("ppBrowser").collapsed = true;
|
||||
this._ppBrowser.remove();
|
||||
gBrowser.collapsed = false;
|
||||
document.getElementById("viewSource-toolbox").hidden = false;
|
||||
},
|
||||
|
|
Загрузка…
Ссылка в новой задаче