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"
11 #include "nsIHTMLContentSink.h"
13 NS_IMPL_ISUPPORTS(CNavDTD
, nsIDTD
);
17 CNavDTD::~CNavDTD() {}
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
);
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
));
41 void CNavDTD::DidBuildModel() {}
44 CNavDTD::Terminate() {}