зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1368852: Avoid flushing frames from nsHideViewer if we know we're not going to get a frame. r=tnikkel
MozReview-Commit-ID: ATVMfQ8myC1 --HG-- extra : rebase_source : fb82003b9ce61644f0cdf4eac5245ef321dec8d5
This commit is contained in:
Родитель
355019fdec
Коммит
c04f22ad37
|
@ -930,7 +930,16 @@ public:
|
|||
// Flush frames, to ensure any pending display:none changes are made.
|
||||
// Note it can be unsafe to flush if we've destroyed the presentation
|
||||
// for some other reason, like if we're shutting down.
|
||||
if (!mPresShell->IsDestroying()) {
|
||||
//
|
||||
// But avoid the flush if we know for sure we're away, like when we're out
|
||||
// of the document already.
|
||||
//
|
||||
// FIXME(emilio): This could still be a perf footgun when removing lots of
|
||||
// siblings where each of them cause the reframe of an ancestor which happen
|
||||
// to contain a subdocument.
|
||||
//
|
||||
// We should find some way to avoid that!
|
||||
if (!mPresShell->IsDestroying() && mFrameElement->IsInComposedDoc()) {
|
||||
mPresShell->FlushPendingNotifications(FlushType::Frames);
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче