Bug 1627809 - Rename Document::TriggerInitialTranslation to Document::OnParsingCompleted. r=smaug

Differential Revision: https://phabricator.services.mozilla.com/D70974
This commit is contained in:
Zibi Braniecki 2020-04-30 17:56:11 +00:00
Родитель 1427870732
Коммит 9a24b61c50
5 изменённых файлов: 5 добавлений и 8 удалений

Просмотреть файл

@ -3946,7 +3946,7 @@ void Document::OnL10nResourceContainerParsed() {
}
}
void Document::TriggerInitialTranslation() {
void Document::OnParsingCompleted() {
// Let's call it again, in case the resource
// container has not been closed, and only
// now we're closing the document.

Просмотреть файл

@ -3715,11 +3715,8 @@ class Document : public nsINode,
* the document element.
* In XUL it happens at `DoneWalking`, during
* `MozBeforeInitialXULLayout`.
*
* It triggers the initial translation of the
* document.
*/
void TriggerInitialTranslation();
void OnParsingCompleted();
/**
* This method is called when the initial translation

Просмотреть файл

@ -596,7 +596,7 @@ nsresult PrototypeDocumentContentSink::MaybeDoneWalking() {
}
if (mDocument->HasPendingInitialTranslation()) {
mDocument->TriggerInitialTranslation();
mDocument->OnParsingCompleted();
return NS_OK;
}

Просмотреть файл

@ -1060,7 +1060,7 @@ nsresult nsXMLContentSink::HandleEndElement(const char16_t* aName,
// probably need to deal here.... (and stop appending them on open).
mState = eXMLContentSinkState_InEpilog;
mDocument->TriggerInitialTranslation();
mDocument->OnParsingCompleted();
// We might have had no occasion to start layout yet. Do so now.
MaybeStartLayout(false);

Просмотреть файл

@ -176,7 +176,7 @@ nsHtml5TreeOpExecutor::DidBuildModel(bool aTerminated) {
}
if (!destroying) {
mDocument->TriggerInitialTranslation();
mDocument->OnParsingCompleted();
if (!mLayoutStarted) {
// We never saw the body, and layout never got started. Force