Backed out changeset ecaae0733ca1 (bug 1383367)

MozReview-Commit-ID: 2lnZ8OUnXnG
This commit is contained in:
Sebastian Hengst 2017-07-30 12:54:02 +02:00
Родитель bbe32b6bed
Коммит 3625be87df
2 изменённых файлов: 19 добавлений и 27 удалений

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

@ -8717,7 +8717,7 @@ var ToolbarIconColor = {
// to avoid unnecessary calls to getComputedStyle
_toolbarLuminanceCache: new Map(),
async inferFromText(reason, reasonValue) {
inferFromText(reason, reasonValue) {
if (!this._initialized)
return;
function parseRGB(aColorString) {
@ -8754,7 +8754,6 @@ var ToolbarIconColor = {
// two loops to avoid flushing layout and making it dirty repeatedly.
let cachedLuminances = this._toolbarLuminanceCache;
let luminances = new Map();
await BrowserUtils.promiseLayoutFlushed(document, "style", () => {
for (let toolbar of document.querySelectorAll(toolbarSelector)) {
// toolbars *should* all have ids, but guard anyway to avoid blowing up
let cacheKey = toolbar.id && toolbar.id + JSON.stringify(this._windowState);
@ -8769,7 +8768,6 @@ var ToolbarIconColor = {
}
luminances.set(toolbar, luminance);
}
});
for (let [toolbar, luminance] of luminances) {
if (luminance <= 110)

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

@ -32,10 +32,8 @@ if (Services.appinfo.OS == "Linux") {
EXPECTED_REFLOWS.push(
[
"handleEvent@chrome://browser/content/tabbrowser.xml",
"inferFromText/<@chrome://browser/content/browser.js",
"promiseReflowed/</<@resource://gre/modules/BrowserUtils.jsm",
"_onReflow@resource://gre/modules/BrowserUtils.jsm",
"reflowInterruptible@resource://gre/modules/BrowserUtils.jsm",
"inferFromText@chrome://browser/content/browser.js",
"handleEvent@chrome://browser/content/browser.js",
],
);
}
@ -45,10 +43,8 @@ if (Services.appinfo.OS == "Darwin") {
EXPECTED_REFLOWS.push(
[
"handleEvent@chrome://browser/content/tabbrowser.xml",
"inferFromText/<@chrome://browser/content/browser.js",
"promiseReflowed/</<@resource://gre/modules/BrowserUtils.jsm",
"_onReflow@resource://gre/modules/BrowserUtils.jsm",
"reflowInterruptible@resource://gre/modules/BrowserUtils.jsm",
"inferFromText@chrome://browser/content/browser.js",
"handleEvent@chrome://browser/content/browser.js",
],
);
}
@ -71,10 +67,8 @@ if (Services.appinfo.OS == "WINNT") {
[
"handleEvent@chrome://browser/content/tabbrowser.xml",
"inferFromText/<@chrome://browser/content/browser.js",
"promiseReflowed/</<@resource://gre/modules/BrowserUtils.jsm",
"_onReflow@resource://gre/modules/BrowserUtils.jsm",
"reflowInterruptible@resource://gre/modules/BrowserUtils.jsm",
"inferFromText@chrome://browser/content/browser.js",
"handleEvent@chrome://browser/content/browser.js",
],
[