Bug 1193394 - Part 4: Wait for the next event tick before calling promiseDocumentFlushed in descriptionHeightWorkaround. r=bustage CLOSED TREE

This commit is contained in:
Tooru Fujisawa
2018-03-01 18:44:38 +09:00
parent 4c6f3d9726
commit b34b481966

View File

@@ -1318,6 +1318,10 @@ var PanelView = class extends this.AssociatedToNode {
if (allowSyncReflows) {
collectItems();
} else {
// FIXME: Need to wait for the next tick, due to the collision with
// bug 1193394
await new Promise(r => Services.tm.dispatchToMainThread(r));
await this.window.promiseDocumentFlushed(collectItems);
}
@@ -1337,6 +1341,10 @@ var PanelView = class extends this.AssociatedToNode {
if (allowSyncReflows) {
measureItems();
} else {
// FIXME: Need to wait for the next tick, due to the collision with
// bug 1193394
await new Promise(r => Services.tm.dispatchToMainThread(r));
await this.window.promiseDocumentFlushed(measureItems);
}