Issue #1603 - Part 1: Reorganize ScriptLoader/ScriptElement

- Moves scripting parts of DOM into 'dom/script'
- Renames nsScript{Loader/Element} to Script{Loader/Element}
- Adjusts all callers
This commit is contained in:
Moonchild 2020-06-30 11:32:07 +00:00 • committed by Roy Tam
commit f85b274e94
50 changed files with 554 additions and 514 deletions

View file

@ -7,7 +7,6 @@
#include "nsIDocument.h"
#include "nsIDocShell.h"
#include "nsScriptLoader.h"
#include "nsIDOMDocument.h"
#include "nsIDOMDocumentType.h"
#include "nsIScriptElement.h"
@ -31,6 +30,7 @@
#include "mozilla/css/Loader.h"
#include "mozilla/dom/Element.h"
#include "mozilla/dom/EncodingUtils.h"
#include "mozilla/dom/ScriptLoader.h"
#include "nsContentUtils.h"
#include "txXMLUtils.h"
#include "nsContentSink.h"
@ -230,7 +230,7 @@ txMozillaXMLOutput::endDocument(nsresult aResult)
MOZ_ASSERT(mDocument->GetReadyStateEnum() ==
nsIDocument::READYSTATE_LOADING, "Bad readyState");
mDocument->SetReadyStateInternal(nsIDocument::READYSTATE_INTERACTIVE);
nsScriptLoader* loader = mDocument->ScriptLoader();
ScriptLoader* loader = mDocument->ScriptLoader();
if (loader) {
loader->ParsingComplete(false);
}
@ -416,7 +416,7 @@ txMozillaXMLOutput::startDocument()
}
if (mCreatingNewDocument) {
nsScriptLoader* loader = mDocument->ScriptLoader();
ScriptLoader* loader = mDocument->ScriptLoader();
if (loader) {
loader->BeginDeferringScripts();
}
@ -857,7 +857,7 @@ txMozillaXMLOutput::createResultDocument(const nsSubstring& aName, int32_t aNsID
}
// Set up script loader of the result document.
nsScriptLoader *loader = mDocument->ScriptLoader();
ScriptLoader *loader = mDocument->ScriptLoader();
if (mNotifier) {
loader->AddObserver(mNotifier);
}