зеркало из https://github.com/mozilla/gecko-dev.git
Bug 687441 - Make iframes not cause a FOUC on parent document. r=bzbarsky
This makes subframes not start layout on the parent document when flushing, which fixes the FOUC issue. It does mean that some resource loads triggered by viewport-dependent media queries might not block onload of the frame, but other style-triggered loads, fonts, and such would. This makes same-origin frames act the same way as cross-origin iframes in this regard if there are stylesheet loads present. I think the trade-off is worth it here, and this is green on try. Differential Revision: https://phabricator.services.mozilla.com/D55860 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
c00bdd9fed
Коммит
afc4a66d0c
|
@ -9793,7 +9793,7 @@ void Document::FlushPendingNotifications(mozilla::ChangesToFlush aFlush) {
|
|||
// layout flush on our parent, since we need our container to be the
|
||||
// correct size to determine the correct style.
|
||||
if (StyleOrLayoutObservablyDependsOnParentDocumentLayout() &&
|
||||
IsSafeToFlush()) {
|
||||
mParentDocument->MayStartLayout() && IsSafeToFlush()) {
|
||||
mozilla::ChangesToFlush parentFlush = aFlush;
|
||||
if (flushType >= FlushType::Style) {
|
||||
parentFlush.mFlushType = std::max(FlushType::Layout, flushType);
|
||||
|
|
Загрузка…
Ссылка в новой задаче