Loading dom/xslt/xslt/txMozillaStylesheetCompiler.cpp +11 −15 Original line number Diff line number Diff line Loading @@ -199,11 +199,9 @@ txStylesheetSink::OnDataAvailable(nsIRequest* aRequest, nsIInputStream* aInputStream, uint64_t aOffset, uint32_t aCount) { if (!mCheckedForXML) { nsCOMPtr<nsIDTD> dtd; mParser->GetDTD(getter_AddRefs(dtd)); if (dtd) { mCheckedForXML = true; if (!(dtd->GetType() & NS_IPARSER_FLAG_XML)) { Maybe<bool> isForXML = mParser->IsForParsingXML(); mCheckedForXML = isForXML.isSome(); if (mCheckedForXML && !isForXML.value()) { nsCOMPtr<nsIChannel> channel = do_QueryInterface(aRequest); nsAutoString spec; getSpec(channel, spec); Loading @@ -212,7 +210,6 @@ txStylesheetSink::OnDataAvailable(nsIRequest* aRequest, return NS_ERROR_XSLT_WRONG_MIME_TYPE; } } } return mListener->OnDataAvailable(aRequest, aInputStream, aOffset, aCount); } Loading Loading @@ -281,9 +278,8 @@ txStylesheetSink::OnStopRequest(nsIRequest* aRequest, nsresult aStatusCode) { // nsIHTMLContentSink. result = NS_ERROR_XSLT_NETWORK_ERROR; } else if (!mCheckedForXML) { nsCOMPtr<nsIDTD> dtd; mParser->GetDTD(getter_AddRefs(dtd)); if (dtd && !(dtd->GetType() & NS_IPARSER_FLAG_XML)) { Maybe<bool> isForXML = mParser->IsForParsingXML(); if (isForXML.isSome() && !isForXML.value()) { result = NS_ERROR_XSLT_WRONG_MIME_TYPE; } } Loading parser/html/nsHtml5Parser.cpp +0 −6 Original line number Diff line number Diff line Loading @@ -112,12 +112,6 @@ nsresult nsHtml5Parser::GetChannel(nsIChannel** aChannel) { } } NS_IMETHODIMP nsHtml5Parser::GetDTD(nsIDTD** aDTD) { *aDTD = nullptr; return NS_OK; } nsIStreamListener* nsHtml5Parser::GetStreamListener() { return mStreamListener; } Loading parser/html/nsHtml5Parser.h +0 −5 Original line number Diff line number Diff line Loading @@ -75,11 +75,6 @@ class nsHtml5Parser final : public nsIParser, public nsSupportsWeakReference { */ nsresult GetChannel(nsIChannel** aChannel); /** * Return |this| for backwards compat. */ NS_IMETHOD GetDTD(nsIDTD** aDTD) override; /** * Get the stream parser for this parser */ Loading parser/htmlparser/CNavDTD.cpp +0 −3 Original line number Diff line number Diff line Loading @@ -42,6 +42,3 @@ void CNavDTD::DidBuildModel() {} NS_IMETHODIMP_(void) CNavDTD::Terminate() {} NS_IMETHODIMP_(int32_t) CNavDTD::GetType() { return NS_IPARSER_FLAG_HTML; } parser/htmlparser/nsExpatDriver.cpp +0 −3 Original line number Diff line number Diff line Loading @@ -1627,9 +1627,6 @@ nsExpatDriver::Terminate() { mInternalState = NS_ERROR_HTMLPARSER_STOPPARSING; } NS_IMETHODIMP_(int32_t) nsExpatDriver::GetType() { return NS_IPARSER_FLAG_XML; } /*************************** Unused methods **********************************/ void nsExpatDriver::MaybeStopParser(nsresult aState) { Loading Loading
dom/xslt/xslt/txMozillaStylesheetCompiler.cpp +11 −15 Original line number Diff line number Diff line Loading @@ -199,11 +199,9 @@ txStylesheetSink::OnDataAvailable(nsIRequest* aRequest, nsIInputStream* aInputStream, uint64_t aOffset, uint32_t aCount) { if (!mCheckedForXML) { nsCOMPtr<nsIDTD> dtd; mParser->GetDTD(getter_AddRefs(dtd)); if (dtd) { mCheckedForXML = true; if (!(dtd->GetType() & NS_IPARSER_FLAG_XML)) { Maybe<bool> isForXML = mParser->IsForParsingXML(); mCheckedForXML = isForXML.isSome(); if (mCheckedForXML && !isForXML.value()) { nsCOMPtr<nsIChannel> channel = do_QueryInterface(aRequest); nsAutoString spec; getSpec(channel, spec); Loading @@ -212,7 +210,6 @@ txStylesheetSink::OnDataAvailable(nsIRequest* aRequest, return NS_ERROR_XSLT_WRONG_MIME_TYPE; } } } return mListener->OnDataAvailable(aRequest, aInputStream, aOffset, aCount); } Loading Loading @@ -281,9 +278,8 @@ txStylesheetSink::OnStopRequest(nsIRequest* aRequest, nsresult aStatusCode) { // nsIHTMLContentSink. result = NS_ERROR_XSLT_NETWORK_ERROR; } else if (!mCheckedForXML) { nsCOMPtr<nsIDTD> dtd; mParser->GetDTD(getter_AddRefs(dtd)); if (dtd && !(dtd->GetType() & NS_IPARSER_FLAG_XML)) { Maybe<bool> isForXML = mParser->IsForParsingXML(); if (isForXML.isSome() && !isForXML.value()) { result = NS_ERROR_XSLT_WRONG_MIME_TYPE; } } Loading
parser/html/nsHtml5Parser.cpp +0 −6 Original line number Diff line number Diff line Loading @@ -112,12 +112,6 @@ nsresult nsHtml5Parser::GetChannel(nsIChannel** aChannel) { } } NS_IMETHODIMP nsHtml5Parser::GetDTD(nsIDTD** aDTD) { *aDTD = nullptr; return NS_OK; } nsIStreamListener* nsHtml5Parser::GetStreamListener() { return mStreamListener; } Loading
parser/html/nsHtml5Parser.h +0 −5 Original line number Diff line number Diff line Loading @@ -75,11 +75,6 @@ class nsHtml5Parser final : public nsIParser, public nsSupportsWeakReference { */ nsresult GetChannel(nsIChannel** aChannel); /** * Return |this| for backwards compat. */ NS_IMETHOD GetDTD(nsIDTD** aDTD) override; /** * Get the stream parser for this parser */ Loading
parser/htmlparser/CNavDTD.cpp +0 −3 Original line number Diff line number Diff line Loading @@ -42,6 +42,3 @@ void CNavDTD::DidBuildModel() {} NS_IMETHODIMP_(void) CNavDTD::Terminate() {} NS_IMETHODIMP_(int32_t) CNavDTD::GetType() { return NS_IPARSER_FLAG_HTML; }
parser/htmlparser/nsExpatDriver.cpp +0 −3 Original line number Diff line number Diff line Loading @@ -1627,9 +1627,6 @@ nsExpatDriver::Terminate() { mInternalState = NS_ERROR_HTMLPARSER_STOPPARSING; } NS_IMETHODIMP_(int32_t) nsExpatDriver::GetType() { return NS_IPARSER_FLAG_XML; } /*************************** Unused methods **********************************/ void nsExpatDriver::MaybeStopParser(nsresult aState) { Loading