2009-05-19 15:54:42 +00:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2006-01-24 01:25:14 +00:00
|
|
|
/* vim: set ts=2 sw=2 et tw=78: */
|
2001-09-26 00:40:45 +00:00
|
|
|
/* ***** BEGIN LICENSE BLOCK *****
|
2004-04-23 13:24:28 +00:00
|
|
|
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
1998-04-13 20:24:54 +00:00
|
|
|
*
|
2004-04-23 13:24:28 +00:00
|
|
|
* The contents of this file are subject to the Mozilla Public License Version
|
|
|
|
* 1.1 (the "License"); you may not use this file except in compliance with
|
|
|
|
* the License. You may obtain a copy of the License at
|
|
|
|
* http://www.mozilla.org/MPL/
|
2001-09-26 00:40:45 +00:00
|
|
|
*
|
|
|
|
* Software distributed under the License is distributed on an "AS IS" basis,
|
|
|
|
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
|
|
|
* for the specific language governing rights and limitations under the
|
|
|
|
* License.
|
1998-04-13 20:24:54 +00:00
|
|
|
*
|
1999-11-06 03:43:54 +00:00
|
|
|
* The Original Code is mozilla.org code.
|
|
|
|
*
|
2004-04-23 13:24:28 +00:00
|
|
|
* The Initial Developer of the Original Code is
|
2001-09-26 00:40:45 +00:00
|
|
|
* Netscape Communications Corporation.
|
|
|
|
* Portions created by the Initial Developer are Copyright (C) 1998
|
|
|
|
* the Initial Developer. All Rights Reserved.
|
|
|
|
*
|
|
|
|
* Contributor(s):
|
|
|
|
*
|
|
|
|
* Alternatively, the contents of this file may be used under the terms of
|
2004-04-23 13:24:28 +00:00
|
|
|
* either of the GNU General Public License Version 2 or later (the "GPL"),
|
|
|
|
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
2001-09-26 00:40:45 +00:00
|
|
|
* in which case the provisions of the GPL or the LGPL are applicable instead
|
|
|
|
* of those above. If you wish to allow use of your version of this file only
|
|
|
|
* under the terms of either the GPL or the LGPL, and not to allow others to
|
2004-04-23 13:24:28 +00:00
|
|
|
* use your version of this file under the terms of the MPL, indicate your
|
2001-09-26 00:40:45 +00:00
|
|
|
* decision by deleting the provisions above and replace them with the notice
|
|
|
|
* and other provisions required by the GPL or the LGPL. If you do not delete
|
|
|
|
* the provisions above, a recipient may use your version of this file under
|
2004-04-23 13:24:28 +00:00
|
|
|
* the terms of any one of the MPL, the GPL or the LGPL.
|
1999-11-06 03:43:54 +00:00
|
|
|
*
|
2001-09-26 00:40:45 +00:00
|
|
|
* ***** END LICENSE BLOCK ***** */
|
1998-04-13 20:24:54 +00:00
|
|
|
#ifndef NS_IPARSER___
|
|
|
|
#define NS_IPARSER___
|
|
|
|
|
|
|
|
|
1998-07-23 08:21:02 +00:00
|
|
|
/**
|
|
|
|
* MODULE NOTES:
|
|
|
|
*
|
|
|
|
* This class defines the iparser interface. This XPCOM
|
|
|
|
* inteface is all that parser clients ever need to see.
|
|
|
|
*
|
|
|
|
**/
|
|
|
|
|
1998-04-13 20:24:54 +00:00
|
|
|
#include "nsISupports.h"
|
1998-07-02 08:14:22 +00:00
|
|
|
#include "nsIStreamListener.h"
|
|
|
|
#include "nsIDTD.h"
|
2005-12-12 21:39:56 +00:00
|
|
|
#include "nsStringGlue.h"
|
2007-11-13 01:41:40 +00:00
|
|
|
#include "nsTArray.h"
|
2009-06-28 22:44:22 +00:00
|
|
|
#include "nsIAtom.h"
|
1999-01-09 01:09:02 +00:00
|
|
|
|
2006-01-24 01:25:14 +00:00
|
|
|
#define NS_IPARSER_IID \
|
2010-07-21 16:03:21 +00:00
|
|
|
{ 0xcbc0cbd8, 0xbbb7, 0x46d6, \
|
|
|
|
{ 0xa5, 0x51, 0x37, 0x8a, 0x69, 0x53, 0xa7, 0x14 } }
|
1998-04-13 20:24:54 +00:00
|
|
|
|
2000-05-26 19:45:26 +00:00
|
|
|
// {41421C60-310A-11d4-816F-000064657374}
|
|
|
|
#define NS_IDEBUG_DUMP_CONTENT_IID \
|
2005-01-27 19:28:22 +00:00
|
|
|
{ 0x41421c60, 0x310a, 0x11d4, \
|
2005-01-27 20:00:37 +00:00
|
|
|
{ 0x81, 0x6f, 0x0, 0x0, 0x64, 0x65, 0x73, 0x74 } }
|
1998-04-13 20:24:54 +00:00
|
|
|
|
|
|
|
class nsIContentSink;
|
2001-04-10 06:01:08 +00:00
|
|
|
class nsIRequestObserver;
|
1999-06-15 23:29:54 +00:00
|
|
|
class nsIParserFilter;
|
1998-05-14 22:19:08 +00:00
|
|
|
class nsString;
|
1999-06-23 03:29:44 +00:00
|
|
|
class nsIURI;
|
2001-08-22 00:38:46 +00:00
|
|
|
class nsIChannel;
|
2010-07-21 16:03:21 +00:00
|
|
|
class nsIContent;
|
1998-08-12 08:53:55 +00:00
|
|
|
|
2000-03-25 03:35:50 +00:00
|
|
|
enum eParserCommands {
|
|
|
|
eViewNormal,
|
|
|
|
eViewSource,
|
2002-08-29 08:17:41 +00:00
|
|
|
eViewFragment,
|
2000-03-25 05:38:11 +00:00
|
|
|
eViewErrors
|
2000-03-25 03:35:50 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
enum eParserDocType {
|
|
|
|
ePlainText = 0,
|
2001-09-08 18:37:19 +00:00
|
|
|
eXML,
|
|
|
|
eHTML_Quirks,
|
|
|
|
eHTML_Strict
|
2000-03-25 03:35:50 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2001-12-26 03:17:59 +00:00
|
|
|
// define Charset source constants
|
2005-03-05 03:35:54 +00:00
|
|
|
// note: the value order defines the priority; higher numbers take priority
|
2001-12-26 03:17:59 +00:00
|
|
|
#define kCharsetUninitialized 0
|
|
|
|
#define kCharsetFromWeakDocTypeDefault 1
|
|
|
|
#define kCharsetFromUserDefault 2
|
|
|
|
#define kCharsetFromDocTypeDefault 3
|
|
|
|
#define kCharsetFromCache 4
|
|
|
|
#define kCharsetFromParentFrame 5
|
2010-11-05 10:57:10 +00:00
|
|
|
#define kCharsetFromAutoDetection 6
|
|
|
|
#define kCharsetFromHintPrevDoc 7
|
|
|
|
#define kCharsetFromMetaPrescan 8 // this one and smaller: HTML5 Tentative
|
|
|
|
#define kCharsetFromMetaTag 9 // this one and greater: HTML5 Confident
|
2011-02-16 06:40:35 +00:00
|
|
|
#define kCharsetFromIrreversibleAutoDetection 10
|
|
|
|
#define kCharsetFromByteOrderMark 11
|
|
|
|
#define kCharsetFromChannel 12
|
|
|
|
#define kCharsetFromOtherComponent 13
|
2005-02-05 13:47:43 +00:00
|
|
|
// Levels below here will be forced onto childframes too
|
2011-02-16 06:40:35 +00:00
|
|
|
#define kCharsetFromParentForced 14
|
|
|
|
#define kCharsetFromUserForced 15
|
|
|
|
#define kCharsetFromPreviousLoading 16
|
1999-04-26 17:49:45 +00:00
|
|
|
|
1999-01-12 00:19:17 +00:00
|
|
|
enum eStreamState {eNone,eOnStart,eOnDataAvail,eOnStop};
|
|
|
|
|
2001-06-21 02:06:23 +00:00
|
|
|
/**
|
2000-05-26 19:45:26 +00:00
|
|
|
* FOR DEBUG PURPOSE ONLY
|
|
|
|
*
|
|
|
|
* Use this interface to query objects that contain content information.
|
|
|
|
* Ex. Parser can trigger dump content by querying the sink that has
|
|
|
|
* access to the content.
|
|
|
|
*
|
|
|
|
* @update harishd 05/25/00
|
|
|
|
*/
|
|
|
|
class nsIDebugDumpContent : public nsISupports {
|
|
|
|
public:
|
2005-11-11 14:36:26 +00:00
|
|
|
NS_DECLARE_STATIC_IID_ACCESSOR(NS_IDEBUG_DUMP_CONTENT_IID)
|
2000-05-26 19:45:26 +00:00
|
|
|
NS_IMETHOD DumpContentModel()=0;
|
|
|
|
};
|
1999-05-04 23:20:28 +00:00
|
|
|
|
2005-11-11 14:36:26 +00:00
|
|
|
NS_DEFINE_STATIC_IID_ACCESSOR(nsIDebugDumpContent, NS_IDEBUG_DUMP_CONTENT_IID)
|
|
|
|
|
1998-04-30 20:23:07 +00:00
|
|
|
/**
|
1998-04-15 17:27:56 +00:00
|
|
|
* This class defines the iparser interface. This XPCOM
|
|
|
|
* inteface is all that parser clients ever need to see.
|
1998-04-30 20:23:07 +00:00
|
|
|
*/
|
1999-09-30 22:01:48 +00:00
|
|
|
class nsIParser : public nsISupports {
|
1998-04-25 19:45:14 +00:00
|
|
|
public:
|
1998-04-13 20:24:54 +00:00
|
|
|
|
2005-11-11 14:36:26 +00:00
|
|
|
NS_DECLARE_STATIC_IID_ACCESSOR(NS_IPARSER_IID)
|
1999-06-30 19:12:21 +00:00
|
|
|
|
1998-07-23 08:21:02 +00:00
|
|
|
/**
|
1998-11-26 02:55:59 +00:00
|
|
|
* Select given content sink into parser for parser output
|
|
|
|
* @update gess5/11/98
|
|
|
|
* @param aSink is the new sink to be used by parser
|
2003-04-08 21:23:34 +00:00
|
|
|
* @return
|
1998-11-26 02:55:59 +00:00
|
|
|
*/
|
2003-04-08 21:23:34 +00:00
|
|
|
NS_IMETHOD_(void) SetContentSink(nsIContentSink* aSink)=0;
|
1998-11-26 02:55:59 +00:00
|
|
|
|
|
|
|
|
|
|
|
/**
|
2003-04-08 21:23:34 +00:00
|
|
|
* retrieve the sink set into the parser
|
1998-11-26 02:55:59 +00:00
|
|
|
* @update gess5/11/98
|
2003-04-08 21:23:34 +00:00
|
|
|
* @return current sink
|
1998-07-23 08:21:02 +00:00
|
|
|
*/
|
2003-04-08 21:23:34 +00:00
|
|
|
NS_IMETHOD_(nsIContentSink*) GetContentSink(void)=0;
|
1998-06-25 01:42:50 +00:00
|
|
|
|
1998-11-11 11:55:32 +00:00
|
|
|
/**
|
|
|
|
* Call this method once you've created a parser, and want to instruct it
|
|
|
|
* about the command which caused the parser to be constructed. For example,
|
|
|
|
* this allows us to select a DTD which can do, say, view-source.
|
|
|
|
*
|
|
|
|
* @update gess 3/25/98
|
1998-11-13 04:36:46 +00:00
|
|
|
* @param aCommand -- ptrs to string that contains command
|
|
|
|
* @return nada
|
1998-11-11 11:55:32 +00:00
|
|
|
*/
|
2004-07-17 21:45:37 +00:00
|
|
|
NS_IMETHOD_(void) GetCommand(nsCString& aCommand)=0;
|
2003-04-08 21:23:34 +00:00
|
|
|
NS_IMETHOD_(void) SetCommand(const char* aCommand)=0;
|
|
|
|
NS_IMETHOD_(void) SetCommand(eParserCommands aParserCommand)=0;
|
1998-11-11 11:55:32 +00:00
|
|
|
|
1999-04-26 17:49:45 +00:00
|
|
|
/**
|
|
|
|
* Call this method once you've created a parser, and want to instruct it
|
|
|
|
* about what charset to load
|
|
|
|
*
|
|
|
|
* @update ftang 4/23/99
|
|
|
|
* @param aCharset- the charest of a document
|
|
|
|
* @param aCharsetSource- the soure of the chares
|
|
|
|
* @return nada
|
|
|
|
*/
|
2003-06-17 16:40:34 +00:00
|
|
|
NS_IMETHOD_(void) SetDocumentCharset(const nsACString& aCharset, PRInt32 aSource)=0;
|
|
|
|
NS_IMETHOD_(void) GetDocumentCharset(nsACString& oCharset, PRInt32& oSource)=0;
|
1999-04-26 17:49:45 +00:00
|
|
|
|
2003-04-08 21:23:34 +00:00
|
|
|
NS_IMETHOD_(void) SetParserFilter(nsIParserFilter* aFilter) = 0;
|
1999-06-15 23:29:54 +00:00
|
|
|
|
2001-08-22 00:38:46 +00:00
|
|
|
/**
|
|
|
|
* Get the channel associated with this parser
|
|
|
|
* @update harishd,gagan 07/17/01
|
|
|
|
* @param aChannel out param that will contain the result
|
|
|
|
* @return NS_OK if successful
|
|
|
|
*/
|
|
|
|
NS_IMETHOD GetChannel(nsIChannel** aChannel) = 0;
|
1998-07-23 08:21:02 +00:00
|
|
|
|
1999-09-30 22:01:48 +00:00
|
|
|
/**
|
|
|
|
* Get the DTD associated with this parser
|
|
|
|
* @update vidur 9/29/99
|
|
|
|
* @param aDTD out param that will contain the result
|
|
|
|
* @return NS_OK if successful, NS_ERROR_FAILURE for runtime error
|
|
|
|
*/
|
|
|
|
NS_IMETHOD GetDTD(nsIDTD** aDTD) = 0;
|
2009-09-18 09:21:47 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Get the nsIStreamListener for this parser
|
|
|
|
* @param aDTD out param that will contain the result
|
|
|
|
* @return NS_OK if successful
|
|
|
|
*/
|
|
|
|
NS_IMETHOD GetStreamListener(nsIStreamListener** aListener) = 0;
|
1999-09-30 22:01:48 +00:00
|
|
|
|
2006-01-24 01:25:14 +00:00
|
|
|
/**************************************************************************
|
|
|
|
* Parse methods always begin with an input source, and perform
|
|
|
|
* conversions until you wind up being emitted to the given contentsink
|
|
|
|
* (which may or may not be a proxy for the NGLayout content model).
|
|
|
|
************************************************************************/
|
2001-02-06 23:35:29 +00:00
|
|
|
|
2005-01-27 19:28:22 +00:00
|
|
|
// Call this method to resume the parser from an unblocked state.
|
|
|
|
// This can happen, for example, if parsing was interrupted and then the
|
|
|
|
// consumer needed to restart the parser without waiting for more data.
|
|
|
|
// This also happens after loading scripts, which unblock the parser in
|
|
|
|
// order to process the output of document.write() and then need to
|
|
|
|
// continue on with the page load on an enabled parser.
|
|
|
|
NS_IMETHOD ContinueInterruptedParsing() = 0;
|
2001-02-06 23:35:29 +00:00
|
|
|
|
|
|
|
// Stops parsing temporarily.
|
2003-04-08 21:23:34 +00:00
|
|
|
NS_IMETHOD_(void) BlockParser() = 0;
|
2001-02-06 23:35:29 +00:00
|
|
|
|
|
|
|
// Open up the parser for tokenization, building up content
|
|
|
|
// model..etc. However, this method does not resume parsing
|
|
|
|
// automatically. It's the callers' responsibility to restart
|
|
|
|
// the parsing engine.
|
2003-04-08 21:23:34 +00:00
|
|
|
NS_IMETHOD_(void) UnblockParser() = 0;
|
2001-02-06 23:35:29 +00:00
|
|
|
|
2003-04-08 21:23:34 +00:00
|
|
|
NS_IMETHOD_(PRBool) IsParserEnabled() = 0;
|
|
|
|
NS_IMETHOD_(PRBool) IsComplete() = 0;
|
2000-03-25 03:35:50 +00:00
|
|
|
|
2003-04-08 21:23:34 +00:00
|
|
|
NS_IMETHOD Parse(nsIURI* aURL,
|
|
|
|
nsIRequestObserver* aListener = nsnull,
|
|
|
|
void* aKey = 0,
|
|
|
|
nsDTDMode aMode = eDTDMode_autodetect) = 0;
|
|
|
|
NS_IMETHOD Parse(const nsAString& aSourceBuffer,
|
|
|
|
void* aKey,
|
|
|
|
const nsACString& aMimeType,
|
|
|
|
PRBool aLastCall,
|
|
|
|
nsDTDMode aMode = eDTDMode_autodetect) = 0;
|
2006-01-24 01:25:14 +00:00
|
|
|
|
|
|
|
// Return a key, suitable for passing into one of the Parse methods above,
|
|
|
|
// that will cause this parser to use the root context.
|
|
|
|
NS_IMETHOD_(void *) GetRootContextKey() = 0;
|
2000-03-25 03:35:50 +00:00
|
|
|
|
2003-04-08 21:23:34 +00:00
|
|
|
NS_IMETHOD Terminate(void) = 0;
|
1998-05-14 22:19:08 +00:00
|
|
|
|
2005-02-18 19:18:39 +00:00
|
|
|
/**
|
|
|
|
* This method gets called when you want to parse a fragment of HTML or XML
|
|
|
|
* surrounded by the context |aTagStack|. It requires that the parser have
|
|
|
|
* been given a fragment content sink.
|
|
|
|
*
|
|
|
|
* @param aSourceBuffer The XML or HTML that hasn't been parsed yet.
|
|
|
|
* @param aTagStack The context of the source buffer.
|
|
|
|
* @return Success or failure.
|
|
|
|
*/
|
2003-04-08 21:23:34 +00:00
|
|
|
NS_IMETHOD ParseFragment(const nsAString& aSourceBuffer,
|
2011-08-01 07:48:24 +00:00
|
|
|
nsTArray<nsString>& aTagStack) = 0;
|
2009-06-28 22:44:22 +00:00
|
|
|
|
1998-06-17 23:13:28 +00:00
|
|
|
/**
|
|
|
|
* This method gets called when the tokens have been consumed, and it's time
|
|
|
|
* to build the model via the content sink.
|
|
|
|
* @update gess5/11/98
|
1998-07-23 08:21:02 +00:00
|
|
|
* @return error code -- 0 if model building went well .
|
1998-06-17 23:13:28 +00:00
|
|
|
*/
|
2003-04-08 21:23:34 +00:00
|
|
|
NS_IMETHOD BuildModel(void) = 0;
|
1998-06-01 19:51:52 +00:00
|
|
|
|
2001-06-21 02:06:23 +00:00
|
|
|
/**
|
|
|
|
* Call this method to cancel any pending parsing events.
|
|
|
|
* Parsing events may be pending if all of the document's content
|
|
|
|
* has been passed to the parser but the parser has been interrupted
|
|
|
|
* because processing the tokens took too long.
|
|
|
|
*
|
|
|
|
* @update kmcclusk 05/18/01
|
|
|
|
* @return NS_OK if succeeded else ERROR.
|
|
|
|
*/
|
|
|
|
|
2003-04-08 21:23:34 +00:00
|
|
|
NS_IMETHOD CancelParsingEvents() = 0;
|
2008-02-08 22:07:51 +00:00
|
|
|
|
|
|
|
virtual void Reset() = 0;
|
2009-05-19 15:54:42 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* True if the parser can currently be interrupted. Returns false when
|
|
|
|
* parsing for example document.write or innerHTML.
|
|
|
|
*/
|
|
|
|
virtual PRBool CanInterrupt() = 0;
|
2009-10-15 11:29:11 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* True if the insertion point (per HTML5) is defined.
|
|
|
|
*/
|
|
|
|
virtual PRBool IsInsertionPointDefined() = 0;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Call immediately before starting to evaluate a parser-inserted script.
|
|
|
|
*/
|
|
|
|
virtual void BeginEvaluatingParserInsertedScript() = 0;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Call immediately after having evaluated a parser-inserted script.
|
|
|
|
*/
|
|
|
|
virtual void EndEvaluatingParserInsertedScript() = 0;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Marks the HTML5 parser as not a script-created parser.
|
|
|
|
*/
|
|
|
|
virtual void MarkAsNotScriptCreated() = 0;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* True if this is a script-created HTML5 parser.
|
|
|
|
*/
|
|
|
|
virtual PRBool IsScriptCreated() = 0;
|
1998-04-13 20:24:54 +00:00
|
|
|
};
|
|
|
|
|
2005-11-11 14:36:26 +00:00
|
|
|
NS_DEFINE_STATIC_IID_ACCESSOR(nsIParser, NS_IPARSER_IID)
|
|
|
|
|
1999-01-09 01:09:02 +00:00
|
|
|
/* ===========================================================*
|
|
|
|
Some useful constants...
|
|
|
|
* ===========================================================*/
|
|
|
|
|
|
|
|
#include "prtypes.h"
|
|
|
|
#include "nsError.h"
|
|
|
|
|
Fix for
26583,2946, 22636 (partial),32782
33570,27136,24184,35125,
35806,36063,29456
r=rickg,waqar
34311 - Patch provided by Patrick ( Fix for MLK ).
r=me.
2000-04-21 21:22:03 +00:00
|
|
|
#define NS_ERROR_HTMLPARSER_EOF NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_HTMLPARSER,1000)
|
|
|
|
#define NS_ERROR_HTMLPARSER_UNKNOWN NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_HTMLPARSER,1001)
|
|
|
|
#define NS_ERROR_HTMLPARSER_CANTPROPAGATE NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_HTMLPARSER,1002)
|
|
|
|
#define NS_ERROR_HTMLPARSER_CONTEXTMISMATCH NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_HTMLPARSER,1003)
|
|
|
|
#define NS_ERROR_HTMLPARSER_BADFILENAME NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_HTMLPARSER,1004)
|
|
|
|
#define NS_ERROR_HTMLPARSER_BADURL NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_HTMLPARSER,1005)
|
|
|
|
#define NS_ERROR_HTMLPARSER_INVALIDPARSERCONTEXT NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_HTMLPARSER,1006)
|
|
|
|
#define NS_ERROR_HTMLPARSER_INTERRUPTED NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_HTMLPARSER,1007)
|
|
|
|
#define NS_ERROR_HTMLPARSER_BLOCK NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_HTMLPARSER,1008)
|
|
|
|
#define NS_ERROR_HTMLPARSER_BADTOKENIZER NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_HTMLPARSER,1009)
|
|
|
|
#define NS_ERROR_HTMLPARSER_BADATTRIBUTE NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_HTMLPARSER,1010)
|
|
|
|
#define NS_ERROR_HTMLPARSER_UNRESOLVEDDTD NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_HTMLPARSER,1011)
|
2001-01-04 22:15:06 +00:00
|
|
|
#define NS_ERROR_HTMLPARSER_MISPLACEDTABLECONTENT NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_HTMLPARSER,1012)
|
Fix for
26583,2946, 22636 (partial),32782
33570,27136,24184,35125,
35806,36063,29456
r=rickg,waqar
34311 - Patch provided by Patrick ( Fix for MLK ).
r=me.
2000-04-21 21:22:03 +00:00
|
|
|
#define NS_ERROR_HTMLPARSER_BADDTD NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_HTMLPARSER,1013)
|
|
|
|
#define NS_ERROR_HTMLPARSER_BADCONTEXT NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_HTMLPARSER,1014)
|
|
|
|
#define NS_ERROR_HTMLPARSER_STOPPARSING NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_HTMLPARSER,1015)
|
|
|
|
#define NS_ERROR_HTMLPARSER_UNTERMINATEDSTRINGLITERAL NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_HTMLPARSER,1016)
|
2000-09-08 23:06:13 +00:00
|
|
|
#define NS_ERROR_HTMLPARSER_HIERARCHYTOODEEP NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_HTMLPARSER,1017)
|
2004-12-01 04:37:36 +00:00
|
|
|
#define NS_ERROR_HTMLPARSER_FAKE_ENDTAG NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_HTMLPARSER,1018)
|
|
|
|
#define NS_ERROR_HTMLPARSER_INVALID_COMMENT NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_HTMLPARSER,1019)
|
2001-06-21 02:06:23 +00:00
|
|
|
|
1999-05-05 00:55:54 +00:00
|
|
|
#define NS_ERROR_HTMLPARSER_CONTINUE NS_OK
|
1999-01-09 01:09:02 +00:00
|
|
|
|
|
|
|
|
1999-07-16 17:31:38 +00:00
|
|
|
const PRUint32 kEOF = NS_ERROR_HTMLPARSER_EOF;
|
|
|
|
const PRUint32 kUnknownError = NS_ERROR_HTMLPARSER_UNKNOWN;
|
|
|
|
const PRUint32 kCantPropagate = NS_ERROR_HTMLPARSER_CANTPROPAGATE;
|
|
|
|
const PRUint32 kContextMismatch = NS_ERROR_HTMLPARSER_CONTEXTMISMATCH;
|
|
|
|
const PRUint32 kBadFilename = NS_ERROR_HTMLPARSER_BADFILENAME;
|
|
|
|
const PRUint32 kBadURL = NS_ERROR_HTMLPARSER_BADURL;
|
|
|
|
const PRUint32 kInvalidParserContext = NS_ERROR_HTMLPARSER_INVALIDPARSERCONTEXT;
|
|
|
|
const PRUint32 kBlocked = NS_ERROR_HTMLPARSER_BLOCK;
|
Fix for
26583,2946, 22636 (partial),32782
33570,27136,24184,35125,
35806,36063,29456
r=rickg,waqar
34311 - Patch provided by Patrick ( Fix for MLK ).
r=me.
2000-04-21 21:22:03 +00:00
|
|
|
const PRUint32 kBadStringLiteral = NS_ERROR_HTMLPARSER_UNTERMINATEDSTRINGLITERAL;
|
2000-09-08 23:06:13 +00:00
|
|
|
const PRUint32 kHierarchyTooDeep = NS_ERROR_HTMLPARSER_HIERARCHYTOODEEP;
|
2004-12-01 04:37:36 +00:00
|
|
|
const PRUint32 kFakeEndTag = NS_ERROR_HTMLPARSER_FAKE_ENDTAG;
|
|
|
|
const PRUint32 kNotAComment = NS_ERROR_HTMLPARSER_INVALID_COMMENT;
|
1999-01-09 01:09:02 +00:00
|
|
|
|
2001-05-15 22:32:26 +00:00
|
|
|
#define NS_IPARSER_FLAG_UNKNOWN_MODE 0x00000000
|
|
|
|
#define NS_IPARSER_FLAG_QUIRKS_MODE 0x00000002
|
|
|
|
#define NS_IPARSER_FLAG_STRICT_MODE 0x00000004
|
|
|
|
#define NS_IPARSER_FLAG_AUTO_DETECT_MODE 0x00000010
|
|
|
|
#define NS_IPARSER_FLAG_VIEW_NORMAL 0x00000020
|
|
|
|
#define NS_IPARSER_FLAG_VIEW_SOURCE 0x00000040
|
|
|
|
#define NS_IPARSER_FLAG_VIEW_ERRORS 0x00000080
|
2004-12-01 04:37:36 +00:00
|
|
|
#define NS_IPARSER_FLAG_PLAIN_TEXT 0x00000100
|
|
|
|
#define NS_IPARSER_FLAG_XML 0x00000200
|
|
|
|
#define NS_IPARSER_FLAG_HTML 0x00000400
|
|
|
|
#define NS_IPARSER_FLAG_SCRIPT_ENABLED 0x00000800
|
|
|
|
#define NS_IPARSER_FLAG_FRAMES_ENABLED 0x00001000
|
2001-05-15 22:32:26 +00:00
|
|
|
|
1998-04-13 20:24:54 +00:00
|
|
|
#endif
|