зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1354532 - Part 3 - Ensure that the offscreen bounds check for panelviews does not cause temporary empty panels. r=Paolo
MozReview-Commit-ID: 8EACBXDekIW --HG-- extra : rebase_source : d53f3461db931733a7d1e7722d0fa23ad659fa06
This commit is contained in:
Родитель
d9febd9d56
Коммит
df2fab0b05
|
@ -11,6 +11,8 @@ const {classes: Cc, interfaces: Ci, utils: Cu} = Components;
|
|||
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "AppConstants",
|
||||
"resource://gre/modules/AppConstants.jsm");
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "BrowserUtils",
|
||||
"resource://gre/modules/BrowserUtils.jsm");
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "CustomizableUI",
|
||||
"resource:///modules/CustomizableUI.jsm");
|
||||
|
||||
|
@ -733,9 +735,9 @@ this.PanelMultiView = class {
|
|||
let oldSibling = viewNode.nextSibling || null;
|
||||
this._offscreenViewStack.appendChild(viewNode);
|
||||
|
||||
this.window.addEventListener("MozAfterPaint", () => {
|
||||
let viewRect = this._dwu.getBoundsWithoutFlushing(viewNode);
|
||||
|
||||
BrowserUtils.promiseLayoutFlushed(this.document, "layout", () => {
|
||||
return this._dwu.getBoundsWithoutFlushing(viewNode);
|
||||
}).then(viewRect => {
|
||||
try {
|
||||
this._viewStack.insertBefore(viewNode, oldSibling);
|
||||
} catch (ex) {
|
||||
|
@ -743,7 +745,7 @@ this.PanelMultiView = class {
|
|||
}
|
||||
|
||||
callback(viewRect);
|
||||
}, { once: true });
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Загрузка…
Ссылка в новой задаче