зеркало из https://github.com/mozilla/gecko-dev.git
Bug 802881 - Use correct tab for getting background color. r=kats
This commit is contained in:
Родитель
276d8b0199
Коммит
1327a7e085
|
@ -2800,12 +2800,9 @@ Tab.prototype = {
|
|||
// event fires; it's not clear that doing so is worth the effort.
|
||||
var backgroundColor = null;
|
||||
try {
|
||||
let browser = BrowserApp.selectedBrowser;
|
||||
if (browser) {
|
||||
let { contentDocument, contentWindow } = browser;
|
||||
let computedStyle = contentWindow.getComputedStyle(contentDocument.body);
|
||||
backgroundColor = computedStyle.backgroundColor;
|
||||
}
|
||||
let { contentDocument, contentWindow } = this.browser;
|
||||
let computedStyle = contentWindow.getComputedStyle(contentDocument.body);
|
||||
backgroundColor = computedStyle.backgroundColor;
|
||||
} catch (e) {
|
||||
// Ignore. Catching and ignoring exceptions here ensures that Talos succeeds.
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче