Bug 1802897 - Part 12: Make gray unmarking work with parallel marking r=sfink
[gecko.git] / parser / htmlparser / CParserContext.h
blobb32436795b82cf7bf56fe05f31779e51ca4bb6a3
1 /* -*- Mode: C++; tab-width: 2; 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 /**
7 * MODULE NOTES:
8 * @update gess 4/1/98
12 #ifndef __CParserContext
13 #define __CParserContext
15 #include "mozilla/UniquePtr.h"
16 #include "nsIParser.h"
17 #include "nsIDTD.h"
18 #include "nsIRequest.h"
19 #include "nsScanner.h"
20 #include "nsString.h"
21 #include "nsCOMPtr.h"
23 class nsITokenizer;
25 /**
26 * Note that the parser is given FULL access to all
27 * data in a parsercontext. Hey, that what it's for!
30 class CParserContext {
31 public:
32 enum eContextType { eCTURL, eCTString };
34 CParserContext(nsIURI* aURI, eParserCommands aCommand);
35 CParserContext(const nsAString& aBuffer, eParserCommands aCommand,
36 bool aLastBuffer);
38 ~CParserContext();
40 void SetMimeType(const nsACString& aMimeType);
42 nsCOMPtr<nsIRequest>
43 mRequest; // provided by necko to differnciate different input streams
44 // why is mRequest strongly referenced? see bug 102376.
45 nsScanner mScanner;
47 nsCString mMimeType;
48 nsDTDMode mDTDMode;
50 eParserDocType mDocType;
51 eStreamState mStreamListenerState;
52 eContextType mContextType;
53 eAutoDetectResult mAutoDetectStatus = eUnknownDetect;
54 eParserCommands mParserCommand;
56 bool mMultipart;
57 bool mCopyUnused;
60 #endif