txMozillaXMLOutput.cpp (basilisk-2021.12.14-source.tar.xz) | : | txMozillaXMLOutput.cpp (basilisk-2022.01.27-source.tar.xz) | ||
---|---|---|---|---|
skipping to change at line 239 | skipping to change at line 239 | |||
// This should really be handled by nsIDocument::EndLoad | // This should really be handled by nsIDocument::EndLoad | |||
MOZ_ASSERT(mDocument->GetReadyStateEnum() == | MOZ_ASSERT(mDocument->GetReadyStateEnum() == | |||
nsIDocument::READYSTATE_LOADING, "Bad readyState"); | nsIDocument::READYSTATE_LOADING, "Bad readyState"); | |||
mDocument->SetReadyStateInternal(nsIDocument::READYSTATE_INTERACTIVE); | mDocument->SetReadyStateInternal(nsIDocument::READYSTATE_INTERACTIVE); | |||
ScriptLoader* loader = mDocument->ScriptLoader(); | ScriptLoader* loader = mDocument->ScriptLoader(); | |||
if (loader) { | if (loader) { | |||
loader->ParsingComplete(false); | loader->ParsingComplete(false); | |||
} | } | |||
} | } | |||
if (!mRefreshString.IsEmpty()) { | ||||
nsPIDOMWindowOuter* win = mDocument->GetWindow(); | ||||
if (win) { | ||||
nsCOMPtr<nsIRefreshURI> refURI = | ||||
do_QueryInterface(win->GetDocShell()); | ||||
if (refURI) { | ||||
refURI->SetupRefreshURIFromHeader(mDocument->GetDocBaseURI(), | ||||
mDocument->NodePrincipal(), | ||||
mRefreshString); | ||||
} | ||||
} | ||||
} | ||||
if (mNotifier) { | if (mNotifier) { | |||
mNotifier->OnTransformEnd(); | mNotifier->OnTransformEnd(); | |||
} | } | |||
return NS_OK; | return NS_OK; | |||
} | } | |||
nsresult | nsresult | |||
txMozillaXMLOutput::endElement() | txMozillaXMLOutput::endElement() | |||
{ | { | |||
skipping to change at line 747 | skipping to change at line 734 | |||
if (mTableState == ADDED_TBODY) { | if (mTableState == ADDED_TBODY) { | |||
NS_ASSERTION(aElement->IsHTMLElement(nsGkAtoms::tbody), | NS_ASSERTION(aElement->IsHTMLElement(nsGkAtoms::tbody), | |||
"Element flagged as added tbody isn't a tbody"); | "Element flagged as added tbody isn't a tbody"); | |||
uint32_t last = mCurrentNodeStack.Count() - 1; | uint32_t last = mCurrentNodeStack.Count() - 1; | |||
NS_ASSERTION(last != (uint32_t)-1, "empty stack"); | NS_ASSERTION(last != (uint32_t)-1, "empty stack"); | |||
mCurrentNode = mCurrentNodeStack.SafeObjectAt(last); | mCurrentNode = mCurrentNodeStack.SafeObjectAt(last); | |||
mCurrentNodeStack.RemoveObjectAt(last); | mCurrentNodeStack.RemoveObjectAt(last); | |||
mTableState = static_cast<TableState> | mTableState = static_cast<TableState> | |||
(NS_PTR_TO_INT32(mTableStateStack.pop())); | (NS_PTR_TO_INT32(mTableStateStack.pop())); | |||
return NS_OK; | ||||
} | ||||
else if (mCreatingNewDocument && aElement->IsHTMLElement(nsGkAtoms::meta)) { | ||||
// handle HTTP-EQUIV data | ||||
nsAutoString httpEquiv; | ||||
aElement->GetAttr(kNameSpaceID_None, nsGkAtoms::httpEquiv, httpEquiv); | ||||
if (!httpEquiv.IsEmpty()) { | ||||
nsAutoString value; | ||||
aElement->GetAttr(kNameSpaceID_None, nsGkAtoms::content, value); | ||||
if (!value.IsEmpty()) { | ||||
nsContentUtils::ASCIIToLower(httpEquiv); | ||||
nsCOMPtr<nsIAtom> header = NS_Atomize(httpEquiv); | ||||
processHTTPEquiv(header, value); | ||||
} | ||||
} | ||||
} | } | |||
return NS_OK; | return NS_OK; | |||
} | } | |||
void txMozillaXMLOutput::processHTTPEquiv(nsIAtom* aHeader, const nsString& aVal | ||||
ue) | ||||
{ | ||||
// For now we only handle "refresh". There's a longer list in | ||||
// HTMLContentSink::ProcessHeaderData | ||||
if (aHeader == nsGkAtoms::refresh) | ||||
LossyCopyUTF16toASCII(aValue, mRefreshString); | ||||
} | ||||
nsresult | nsresult | |||
txMozillaXMLOutput::createResultDocument(const nsSubstring& aName, int32_t aNsID , | txMozillaXMLOutput::createResultDocument(const nsSubstring& aName, int32_t aNsID , | |||
nsIDOMDocument* aSourceDocument, | nsIDOMDocument* aSourceDocument, | |||
bool aLoadedAsData) | bool aLoadedAsData) | |||
{ | { | |||
nsresult rv; | nsresult rv; | |||
// Create the document | // Create the document | |||
if (mOutputFormat.mMethod == eHTMLOutput) { | if (mOutputFormat.mMethod == eHTMLOutput) { | |||
rv = NS_NewHTMLDocument(getter_AddRefs(mDocument), | rv = NS_NewHTMLDocument(getter_AddRefs(mDocument), | |||
End of changes. 3 change blocks. | ||||
38 lines changed or deleted | 0 lines changed or added |