summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2022-01-13 18:51:05 +0000
committerMoonchild <moonchild@palemoon.org>2022-04-08 15:03:02 +0200
commit1e1a1e5c711565e4d1abea0951432d6539c629b7 (patch)
tree7548005f6afb4950e2be0617bc1341f93471eb8d
parent55d1aa0748bcded0a2bdb2e2fea1f26e130d1176 (diff)
downloaduxp-1e1a1e5c711565e4d1abea0951432d6539c629b7.tar.gz
[DOM] Stop treating XSLT meta refresh as a special snowflake thing.
It's just not healthy. It'll get delusions of self-importance and go rogue. Next thing you know it'll start identifying as other elements.
-rw-r--r--dom/xslt/xslt/txMozillaXMLOutput.cpp37
-rw-r--r--dom/xslt/xslt/txMozillaXMLOutput.h2
2 files changed, 0 insertions, 39 deletions
diff --git a/dom/xslt/xslt/txMozillaXMLOutput.cpp b/dom/xslt/xslt/txMozillaXMLOutput.cpp
index 21b3c228f2..16163eca86 100644
--- a/dom/xslt/xslt/txMozillaXMLOutput.cpp
+++ b/dom/xslt/xslt/txMozillaXMLOutput.cpp
@@ -236,19 +236,6 @@ txMozillaXMLOutput::endDocument(nsresult aResult)
}
}
- 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) {
mNotifier->OnTransformEnd();
}
@@ -744,35 +731,11 @@ txMozillaXMLOutput::endHTMLElement(nsIContent* aElement)
mCurrentNodeStack.RemoveObjectAt(last);
mTableState = static_cast<TableState>
(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;
}
-void txMozillaXMLOutput::processHTTPEquiv(nsIAtom* aHeader, const nsString& aValue)
-{
- // For now we only handle "refresh". There's a longer list in
- // HTMLContentSink::ProcessHeaderData
- if (aHeader == nsGkAtoms::refresh)
- LossyCopyUTF16toASCII(aValue, mRefreshString);
-}
-
nsresult
txMozillaXMLOutput::createResultDocument(const nsSubstring& aName, int32_t aNsID,
nsIDOMDocument* aSourceDocument,
diff --git a/dom/xslt/xslt/txMozillaXMLOutput.h b/dom/xslt/xslt/txMozillaXMLOutput.h
index acdf9bd02e..f58dbb118c 100644
--- a/dom/xslt/xslt/txMozillaXMLOutput.h
+++ b/dom/xslt/xslt/txMozillaXMLOutput.h
@@ -80,7 +80,6 @@ private:
nsresult createTxWrapper();
nsresult startHTMLElement(nsIContent* aElement, bool aXHTML);
nsresult endHTMLElement(nsIContent* aElement);
- void processHTTPEquiv(nsIAtom* aHeader, const nsString& aValue);
nsresult createHTMLElement(nsIAtom* aName,
nsIContent** aResult);
@@ -105,7 +104,6 @@ private:
RefPtr<txTransformNotifier> mNotifier;
uint32_t mTreeDepth, mBadChildLevel;
- nsCString mRefreshString;
txStack mTableStateStack;
enum TableState {