Bug 1168198 - Avoid popups for view source tabs. r=Gijs

This commit is contained in:
J. Ryan Stinnett 2015-05-28 09:15:23 -05:00
Родитель 6067ccca2c
Коммит 8f9179fcab
2 изменённых файлов: 6 добавлений и 2 удалений

Просмотреть файл

@ -2367,7 +2367,9 @@ function BrowserViewSourceOfDocument(aArgsOrDocument) {
// In the case of sidebars and chat windows, gBrowser is defined but null,
// because no #content element exists. For these cases, we need to find
// the most recent browser window.
if (!tabBrowser) {
// In the case of popups, we need to find a non-popup browser window.
if (!tabBrowser || !window.toolbar.visible) {
// This returns only non-popup browser windows by default.
let browserWindow = RecentWindow.getMostRecentBrowserWindow();
tabBrowser = browserWindow.gBrowser;
}

Просмотреть файл

@ -1011,7 +1011,9 @@ nsContextMenu.prototype = {
// In the case of sidebars and chat windows, gBrowser is defined but null,
// because no #content element exists. For these cases, we need to find
// the most recent browser window.
if (!tabBrowser) {
// In the case of popups, we need to find a non-popup browser window.
if (!tabBrowser || !window.toolbar.visible) {
// This returns only non-popup browser windows by default.
let browserWindow = RecentWindow.getMostRecentBrowserWindow();
tabBrowser = browserWindow.gBrowser;
}