Bug 1879109 [wpt PR 44441] - Add tests for animation of CSS calc-size()., a=testonly
[gecko.git] / parser / htmlparser / nsIDTD.h
blob67f7af4ec2a260224d51a644dd3f22c6a4bc1a82
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #ifndef nsIDTD_h___
7 #define nsIDTD_h___
9 /**
10 * MODULE NOTES:
11 * @update gess 7/20/98
13 * This interface defines standard interface for DTD's. Note that this
14 * isn't HTML specific. DTD's have several functions within the parser
15 * system:
16 * 1) To coordinate the consumption of an input stream via the
17 * parser
18 * 2) To serve as proxy to represent the containment rules of the
19 * underlying document
20 * 3) To offer autodetection services to the parser (mainly for doc
21 * conversion)
22 * */
24 #include "nsISupports.h"
25 #include "nsString.h"
27 #define NS_IDTD_IID \
28 { \
29 0x3de05873, 0xefa7, 0x410d, { \
30 0xa4, 0x61, 0x80, 0x33, 0xaf, 0xd9, 0xe3, 0x26 \
31 } \
34 enum eAutoDetectResult {
35 eUnknownDetect,
36 ePrimaryDetect,
39 enum nsDTDMode {
40 eDTDMode_quirks, // pre 4.0 versions
41 eDTDMode_full_standards,
42 eDTDMode_autodetect
45 class nsIContentSink;
46 class CParserContext;
48 class nsIDTD : public nsISupports {
49 public:
50 NS_DECLARE_STATIC_IID_ACCESSOR(NS_IDTD_IID)
52 /**
53 * Called by the parser after the parsing process has concluded
55 virtual void DidBuildModel() = 0;
57 /**
58 * Called (possibly repeatedly) by the parser to parse tokens and construct
59 * the document model via the sink provided to WillBuildModel.
61 * @param aCountLines - informs the DTD whether to count newlines
62 * (not wanted, e.g., when handling document.write)
63 * @param aCharsetPtr - address of an nsCString containing the charset
64 * that the DTD should use (pointer in case the DTD
65 * opts to ignore this parameter)
67 NS_IMETHOD BuildModel(nsIContentSink* aSink) = 0;
69 /**
70 * Use this id you want to stop the building content model
71 * --------------[ Sets DTD to STOP mode ]----------------
72 * It's recommended to use this method in accordance with
73 * the parser's terminate() method.
75 * @update harishd 07/22/99
76 * @param
77 * @return
79 NS_IMETHOD_(void) Terminate() = 0;
82 NS_DEFINE_STATIC_IID_ACCESSOR(nsIDTD, NS_IDTD_IID)
84 #define NS_DECL_NSIDTD \
85 void DidBuildModel() override; \
86 NS_IMETHOD BuildModel(nsIContentSink* aSink) override; \
87 NS_IMETHOD_(void) Terminate() override;
88 #endif /* nsIDTD_h___ */