зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1168198 - Avoid popups for view source tabs. r=Gijs
This commit is contained in:
Родитель
6067ccca2c
Коммит
8f9179fcab
|
@ -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;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче