Bug 1839316: part 5) Guard the "fetchpriority" attribute behind a pref. r=kershaw...
[gecko.git] / parser / htmlparser / CNavDTD.cpp
blobd18aacfcb2630178e94a9aa532048aa8afef39ca
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set sw=2 ts=2 et tw=78: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #include "nsISupports.h"
8 #include "nsISupportsImpl.h"
9 #include "nsIParser.h"
10 #include "CNavDTD.h"
11 #include "nsIHTMLContentSink.h"
13 NS_IMPL_ISUPPORTS(CNavDTD, nsIDTD);
15 CNavDTD::CNavDTD() {}
17 CNavDTD::~CNavDTD() {}
19 NS_IMETHODIMP
20 CNavDTD::BuildModel(nsIContentSink* aSink) {
21 // NB: It is important to throw STOPPARSING if the sink is the wrong type in
22 // order to make sure nsParser cleans up properly after itself.
23 nsCOMPtr<nsIHTMLContentSink> sink = do_QueryInterface(aSink);
24 if (!sink) {
25 return NS_ERROR_HTMLPARSER_STOPPARSING;
28 nsresult rv = sink->OpenContainer(nsIHTMLContentSink::eHTML);
29 NS_ENSURE_SUCCESS(rv, rv);
30 rv = sink->OpenContainer(nsIHTMLContentSink::eBody);
31 NS_ENSURE_SUCCESS(rv, rv);
33 rv = sink->CloseContainer(nsIHTMLContentSink::eBody);
34 MOZ_ASSERT(NS_SUCCEEDED(rv));
35 rv = sink->CloseContainer(nsIHTMLContentSink::eHTML);
36 MOZ_ASSERT(NS_SUCCEEDED(rv));
38 return NS_OK;
41 void CNavDTD::DidBuildModel() {}
43 NS_IMETHODIMP_(void)
44 CNavDTD::Terminate() {}