summaryrefslogtreecommitdiff
path: root/dom/xslt
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2022-01-13 18:51:05 +0000
committerMoonchild <moonchild@palemoon.org>2022-01-13 18:51:05 +0000
commit6997c3326fc925d06ea8a7127bff837aa60f4327 (patch)
treee57eb74b4b7ef5b12a3134a037ed70114580aa63 /dom/xslt
parent623d7ec4fdb94666b20302a47adedb564af6c4cf (diff)
downloadaura-central-6997c3326fc925d06ea8a7127bff837aa60f4327.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.
Diffstat (limited to 'dom/xslt')
-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 21b3c228f..16163eca8 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 acdf9bd02..f58dbb118 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 {