mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-23 21:01:08 +00:00
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:
parent
9ba5553f62
commit
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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user