зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1539714 - Trigger initial localization even if layout started. r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D34400 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
9ba5553f62
Коммит
963c84b982
|
@ -168,21 +168,22 @@ nsHtml5TreeOpExecutor::DidBuildModel(bool aTerminated) {
|
|||
// forced termination.
|
||||
DidBuildModelImpl(aTerminated || NS_FAILED(IsBroken()));
|
||||
|
||||
if (!mLayoutStarted) {
|
||||
// We never saw the body, and layout never got started. Force
|
||||
// layout *now*, to get an initial reflow.
|
||||
bool destroying = true;
|
||||
if (mDocShell) {
|
||||
mDocShell->IsBeingDestroyed(&destroying);
|
||||
}
|
||||
|
||||
// NOTE: only force the layout if we are NOT destroying the
|
||||
// docshell. If we are destroying it, then starting layout will
|
||||
// likely cause us to crash, or at best waste a lot of time as we
|
||||
// are just going to tear it down anyway.
|
||||
bool destroying = true;
|
||||
if (mDocShell) {
|
||||
mDocShell->IsBeingDestroyed(&destroying);
|
||||
}
|
||||
if (!destroying) {
|
||||
mDocument->TriggerInitialDocumentTranslation();
|
||||
|
||||
if (!destroying) {
|
||||
mDocument->TriggerInitialDocumentTranslation();
|
||||
if (!mLayoutStarted) {
|
||||
// We never saw the body, and layout never got started. Force
|
||||
// layout *now*, to get an initial reflow.
|
||||
|
||||
// NOTE: only force the layout if we are NOT destroying the
|
||||
// docshell. If we are destroying it, then starting layout will
|
||||
// likely cause us to crash, or at best waste a lot of time as we
|
||||
// are just going to tear it down anyway.
|
||||
nsContentSink::StartLayout(false);
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче