зеркало из https://github.com/mozilla/pjs.git
Bug 737417 part 1 - Split charset source constants out of nsIParser.h. r=smaug.
This commit is contained in:
Родитель
3fe589db66
Коммит
2783a8258e
|
@ -58,7 +58,6 @@
|
||||||
#include "nsIHttpChannel.h"
|
#include "nsIHttpChannel.h"
|
||||||
#include "nsIContent.h"
|
#include "nsIContent.h"
|
||||||
#include "nsIScriptElement.h"
|
#include "nsIScriptElement.h"
|
||||||
#include "nsIParser.h"
|
|
||||||
#include "nsContentErrors.h"
|
#include "nsContentErrors.h"
|
||||||
#include "nsIPresShell.h"
|
#include "nsIPresShell.h"
|
||||||
#include "nsPresContext.h"
|
#include "nsPresContext.h"
|
||||||
|
|
|
@ -42,8 +42,6 @@
|
||||||
#include "nsContentUtils.h"
|
#include "nsContentUtils.h"
|
||||||
#include "nsIScriptSecurityManager.h"
|
#include "nsIScriptSecurityManager.h"
|
||||||
#include "nsNetUtil.h"
|
#include "nsNetUtil.h"
|
||||||
#include "nsIParser.h"
|
|
||||||
#include "nsParserCIID.h"
|
|
||||||
#include "nsMimeTypes.h"
|
#include "nsMimeTypes.h"
|
||||||
#include "nsIStreamConverterService.h"
|
#include "nsIStreamConverterService.h"
|
||||||
#include "nsStringStream.h"
|
#include "nsStringStream.h"
|
||||||
|
|
|
@ -148,6 +148,7 @@
|
||||||
#include "nsBlobProtocolHandler.h"
|
#include "nsBlobProtocolHandler.h"
|
||||||
|
|
||||||
#include "nsCharsetAlias.h"
|
#include "nsCharsetAlias.h"
|
||||||
|
#include "nsCharsetSource.h"
|
||||||
#include "nsIParser.h"
|
#include "nsIParser.h"
|
||||||
#include "nsIContentSink.h"
|
#include "nsIContentSink.h"
|
||||||
|
|
||||||
|
|
|
@ -65,7 +65,6 @@
|
||||||
#include "nsAutoPtr.h"
|
#include "nsAutoPtr.h"
|
||||||
#include "nsIXPConnect.h"
|
#include "nsIXPConnect.h"
|
||||||
#include "nsContentErrors.h"
|
#include "nsContentErrors.h"
|
||||||
#include "nsIParser.h"
|
|
||||||
#include "nsThreadUtils.h"
|
#include "nsThreadUtils.h"
|
||||||
#include "nsDocShellCID.h"
|
#include "nsDocShellCID.h"
|
||||||
#include "nsIContentSecurityPolicy.h"
|
#include "nsIContentSecurityPolicy.h"
|
||||||
|
|
|
@ -51,7 +51,6 @@
|
||||||
#include "nsCOMPtr.h"
|
#include "nsCOMPtr.h"
|
||||||
#include "nsTArray.h"
|
#include "nsTArray.h"
|
||||||
#include "nsString.h"
|
#include "nsString.h"
|
||||||
#include "nsIParser.h"
|
|
||||||
|
|
||||||
#define kIndentStr NS_LITERAL_STRING(" ")
|
#define kIndentStr NS_LITERAL_STRING(" ")
|
||||||
#define kEndTag NS_LITERAL_STRING("</")
|
#define kEndTag NS_LITERAL_STRING("</")
|
||||||
|
|
|
@ -48,7 +48,7 @@
|
||||||
#include "nsIContentViewer.h"
|
#include "nsIContentViewer.h"
|
||||||
#include "nsIMarkupDocumentViewer.h"
|
#include "nsIMarkupDocumentViewer.h"
|
||||||
#include "nsIDocShell.h"
|
#include "nsIDocShell.h"
|
||||||
#include "nsIParser.h" // kCharsetFrom* macro definition
|
#include "nsCharsetSource.h" // kCharsetFrom* macro definition
|
||||||
#include "nsNodeInfoManager.h"
|
#include "nsNodeInfoManager.h"
|
||||||
#include "nsContentUtils.h"
|
#include "nsContentUtils.h"
|
||||||
|
|
||||||
|
|
|
@ -55,7 +55,6 @@
|
||||||
#include "nsIHTMLContentSink.h"
|
#include "nsIHTMLContentSink.h"
|
||||||
#include "nsIInterfaceRequestor.h"
|
#include "nsIInterfaceRequestor.h"
|
||||||
#include "nsIInterfaceRequestorUtils.h"
|
#include "nsIInterfaceRequestorUtils.h"
|
||||||
#include "nsIParser.h"
|
|
||||||
#include "nsScriptLoader.h"
|
#include "nsScriptLoader.h"
|
||||||
#include "nsIURI.h"
|
#include "nsIURI.h"
|
||||||
#include "nsNetUtil.h"
|
#include "nsNetUtil.h"
|
||||||
|
|
|
@ -45,8 +45,6 @@
|
||||||
#include "nsIURL.h"
|
#include "nsIURL.h"
|
||||||
#include "nsIChannel.h"
|
#include "nsIChannel.h"
|
||||||
#include "nsXPIDLString.h"
|
#include "nsXPIDLString.h"
|
||||||
#include "nsIParser.h"
|
|
||||||
#include "nsParserCIID.h"
|
|
||||||
#include "nsNetUtil.h"
|
#include "nsNetUtil.h"
|
||||||
#include "plstr.h"
|
#include "plstr.h"
|
||||||
#include "nsIContent.h"
|
#include "nsIContent.h"
|
||||||
|
|
|
@ -49,8 +49,6 @@
|
||||||
#include "nsIChannel.h"
|
#include "nsIChannel.h"
|
||||||
#include "nsXPIDLString.h"
|
#include "nsXPIDLString.h"
|
||||||
#include "nsReadableUtils.h"
|
#include "nsReadableUtils.h"
|
||||||
#include "nsIParser.h"
|
|
||||||
#include "nsParserCIID.h"
|
|
||||||
#include "nsNetUtil.h"
|
#include "nsNetUtil.h"
|
||||||
#include "plstr.h"
|
#include "plstr.h"
|
||||||
#include "nsIContent.h"
|
#include "nsIContent.h"
|
||||||
|
|
|
@ -42,7 +42,6 @@
|
||||||
#include "nsIDocument.h"
|
#include "nsIDocument.h"
|
||||||
#include "nsBindingManager.h"
|
#include "nsBindingManager.h"
|
||||||
#include "nsIDOMNode.h"
|
#include "nsIDOMNode.h"
|
||||||
#include "nsIParser.h"
|
|
||||||
#include "nsGkAtoms.h"
|
#include "nsGkAtoms.h"
|
||||||
#include "nsINameSpaceManager.h"
|
#include "nsINameSpaceManager.h"
|
||||||
#include "nsHTMLTokens.h"
|
#include "nsHTMLTokens.h"
|
||||||
|
|
|
@ -48,8 +48,6 @@
|
||||||
#include "nsIChannel.h"
|
#include "nsIChannel.h"
|
||||||
#include "nsXPIDLString.h"
|
#include "nsXPIDLString.h"
|
||||||
#include "nsReadableUtils.h"
|
#include "nsReadableUtils.h"
|
||||||
#include "nsIParser.h"
|
|
||||||
#include "nsParserCIID.h"
|
|
||||||
#include "nsNetUtil.h"
|
#include "nsNetUtil.h"
|
||||||
#include "plstr.h"
|
#include "plstr.h"
|
||||||
#include "nsContentCreatorFunctions.h"
|
#include "nsContentCreatorFunctions.h"
|
||||||
|
|
|
@ -53,8 +53,6 @@
|
||||||
#include "nsIURL.h"
|
#include "nsIURL.h"
|
||||||
#include "nsIChannel.h"
|
#include "nsIChannel.h"
|
||||||
#include "nsXPIDLString.h"
|
#include "nsXPIDLString.h"
|
||||||
#include "nsIParser.h"
|
|
||||||
#include "nsParserCIID.h"
|
|
||||||
#include "plstr.h"
|
#include "plstr.h"
|
||||||
#include "nsIContent.h"
|
#include "nsIContent.h"
|
||||||
#include "nsIDocument.h"
|
#include "nsIDocument.h"
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
|
|
||||||
#include "nsXMLDocument.h"
|
#include "nsXMLDocument.h"
|
||||||
#include "nsParserCIID.h"
|
#include "nsParserCIID.h"
|
||||||
#include "nsIParser.h"
|
#include "nsCharsetSource.h"
|
||||||
#include "nsIXMLContentSink.h"
|
#include "nsIXMLContentSink.h"
|
||||||
#include "nsPresContext.h"
|
#include "nsPresContext.h"
|
||||||
#include "nsIContent.h"
|
#include "nsIContent.h"
|
||||||
|
|
|
@ -43,7 +43,6 @@
|
||||||
#include "nsContentSink.h"
|
#include "nsContentSink.h"
|
||||||
#include "nsIExpatSink.h"
|
#include "nsIExpatSink.h"
|
||||||
#include "nsIDTD.h"
|
#include "nsIDTD.h"
|
||||||
#include "nsIParser.h"
|
|
||||||
#include "nsIDocument.h"
|
#include "nsIDocument.h"
|
||||||
#include "nsIDOMDocumentFragment.h"
|
#include "nsIDOMDocumentFragment.h"
|
||||||
#include "nsIContent.h"
|
#include "nsIContent.h"
|
||||||
|
|
|
@ -50,6 +50,7 @@
|
||||||
#include "nsINameSpaceManager.h"
|
#include "nsINameSpaceManager.h"
|
||||||
#include "nsINodeInfo.h"
|
#include "nsINodeInfo.h"
|
||||||
#include "nsIParser.h"
|
#include "nsIParser.h"
|
||||||
|
#include "nsCharsetSource.h"
|
||||||
#include "nsIRequestObserver.h"
|
#include "nsIRequestObserver.h"
|
||||||
#include "nsIScriptSecurityManager.h"
|
#include "nsIScriptSecurityManager.h"
|
||||||
#include "nsContentPolicyUtils.h"
|
#include "nsContentPolicyUtils.h"
|
||||||
|
|
|
@ -44,7 +44,7 @@
|
||||||
#include "nsIDOMDocumentFragment.h"
|
#include "nsIDOMDocumentFragment.h"
|
||||||
#include "nsIDocumentTransformer.h"
|
#include "nsIDocumentTransformer.h"
|
||||||
#include "nsNetUtil.h"
|
#include "nsNetUtil.h"
|
||||||
#include "nsIParser.h"
|
#include "nsCharsetSource.h"
|
||||||
#include "nsCharsetAlias.h"
|
#include "nsCharsetAlias.h"
|
||||||
#include "nsIPrincipal.h"
|
#include "nsIPrincipal.h"
|
||||||
#include "txURIUtils.h"
|
#include "txURIUtils.h"
|
||||||
|
|
|
@ -44,7 +44,7 @@
|
||||||
#include "nsIDOMDocument.h"
|
#include "nsIDOMDocument.h"
|
||||||
#include "nsIDOMDocumentType.h"
|
#include "nsIDOMDocumentType.h"
|
||||||
#include "nsIScriptElement.h"
|
#include "nsIScriptElement.h"
|
||||||
#include "nsIParser.h"
|
#include "nsCharsetSource.h"
|
||||||
#include "nsIRefreshURI.h"
|
#include "nsIRefreshURI.h"
|
||||||
#include "nsPIDOMWindow.h"
|
#include "nsPIDOMWindow.h"
|
||||||
#include "nsIContent.h"
|
#include "nsIContent.h"
|
||||||
|
|
|
@ -62,7 +62,6 @@
|
||||||
#include "nsHTMLStyleSheet.h"
|
#include "nsHTMLStyleSheet.h"
|
||||||
#include "nsINameSpaceManager.h"
|
#include "nsINameSpaceManager.h"
|
||||||
#include "nsINodeInfo.h"
|
#include "nsINodeInfo.h"
|
||||||
#include "nsIParser.h"
|
|
||||||
#include "nsIScriptContext.h"
|
#include "nsIScriptContext.h"
|
||||||
#include "nsIScriptRuntime.h"
|
#include "nsIScriptRuntime.h"
|
||||||
#include "nsIScriptGlobalObject.h"
|
#include "nsIScriptGlobalObject.h"
|
||||||
|
|
|
@ -111,6 +111,7 @@
|
||||||
#include "nsContentCreatorFunctions.h"
|
#include "nsContentCreatorFunctions.h"
|
||||||
#include "nsContentUtils.h"
|
#include "nsContentUtils.h"
|
||||||
#include "nsIParser.h"
|
#include "nsIParser.h"
|
||||||
|
#include "nsCharsetSource.h"
|
||||||
#include "nsIParserService.h"
|
#include "nsIParserService.h"
|
||||||
#include "nsCSSStyleSheet.h"
|
#include "nsCSSStyleSheet.h"
|
||||||
#include "mozilla/css/Loader.h"
|
#include "mozilla/css/Loader.h"
|
||||||
|
|
|
@ -38,7 +38,7 @@
|
||||||
#define nsIWebShellServices_h___
|
#define nsIWebShellServices_h___
|
||||||
|
|
||||||
#include "nsISupports.h"
|
#include "nsISupports.h"
|
||||||
#include "nsIParser.h"
|
#include "nsCharsetSource.h"
|
||||||
|
|
||||||
// Interface ID for nsIWebShellServices
|
// Interface ID for nsIWebShellServices
|
||||||
|
|
||||||
|
|
|
@ -60,7 +60,7 @@
|
||||||
#include "nsIFrame.h"
|
#include "nsIFrame.h"
|
||||||
#include "nsIWidget.h"
|
#include "nsIWidget.h"
|
||||||
#include "nsGUIEvent.h"
|
#include "nsGUIEvent.h"
|
||||||
#include "nsIParser.h"
|
#include "nsCharsetSource.h"
|
||||||
#include "nsJSEnvironment.h"
|
#include "nsJSEnvironment.h"
|
||||||
#include "nsJSUtils.h"
|
#include "nsJSUtils.h"
|
||||||
|
|
||||||
|
|
|
@ -76,8 +76,6 @@
|
||||||
#include "nsIDOMDocumentFragment.h"
|
#include "nsIDOMDocumentFragment.h"
|
||||||
#include "nsIPresShell.h"
|
#include "nsIPresShell.h"
|
||||||
#include "nsPresContext.h"
|
#include "nsPresContext.h"
|
||||||
#include "nsIParser.h"
|
|
||||||
#include "nsParserCIID.h"
|
|
||||||
#include "nsXPCOM.h"
|
#include "nsXPCOM.h"
|
||||||
#include "nsISupportsPrimitives.h"
|
#include "nsISupportsPrimitives.h"
|
||||||
#include "nsLinebreakConverter.h"
|
#include "nsLinebreakConverter.h"
|
||||||
|
@ -133,8 +131,6 @@ using namespace mozilla;
|
||||||
|
|
||||||
const PRUnichar nbsp = 160;
|
const PRUnichar nbsp = 160;
|
||||||
|
|
||||||
static NS_DEFINE_CID(kCParserCID, NS_PARSER_CID);
|
|
||||||
|
|
||||||
#define kInsertCookie "_moz_Insert Here_moz_"
|
#define kInsertCookie "_moz_Insert Here_moz_"
|
||||||
|
|
||||||
#define NS_FOUND_TARGET NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_EDITOR, 3)
|
#define NS_FOUND_TARGET NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_EDITOR, 3)
|
||||||
|
|
|
@ -97,7 +97,7 @@
|
||||||
#include "nsIDocShell.h"
|
#include "nsIDocShell.h"
|
||||||
#include "nsIBaseWindow.h"
|
#include "nsIBaseWindow.h"
|
||||||
#include "nsILayoutHistoryState.h"
|
#include "nsILayoutHistoryState.h"
|
||||||
#include "nsIParser.h"
|
#include "nsCharsetSource.h"
|
||||||
#include "nsGUIEvent.h"
|
#include "nsGUIEvent.h"
|
||||||
#include "nsHTMLReflowState.h"
|
#include "nsHTMLReflowState.h"
|
||||||
#include "nsIDOMHTMLAnchorElement.h"
|
#include "nsIDOMHTMLAnchorElement.h"
|
||||||
|
|
|
@ -108,8 +108,6 @@
|
||||||
#include "nsCaret.h"
|
#include "nsCaret.h"
|
||||||
#include "nsIDOMHTMLDocument.h"
|
#include "nsIDOMHTMLDocument.h"
|
||||||
#include "nsIDOMXMLDocument.h"
|
#include "nsIDOMXMLDocument.h"
|
||||||
#include "nsIParser.h"
|
|
||||||
#include "nsParserCIID.h"
|
|
||||||
#include "nsViewsCID.h"
|
#include "nsViewsCID.h"
|
||||||
#include "nsFrameManager.h"
|
#include "nsFrameManager.h"
|
||||||
#include "nsEventStateManager.h"
|
#include "nsEventStateManager.h"
|
||||||
|
|
|
@ -60,7 +60,7 @@
|
||||||
#endif
|
#endif
|
||||||
#include "nsContentUtils.h"
|
#include "nsContentUtils.h"
|
||||||
#include "imgILoader.h"
|
#include "imgILoader.h"
|
||||||
#include "nsIParser.h"
|
#include "nsCharsetSource.h"
|
||||||
#include "nsMimeTypes.h"
|
#include "nsMimeTypes.h"
|
||||||
|
|
||||||
#include "mozilla/FunctionTimer.h"
|
#include "mozilla/FunctionTimer.h"
|
||||||
|
|
|
@ -142,7 +142,6 @@ static const char kPrintingPromptService[] = "@mozilla.org/embedcomp/printingpro
|
||||||
#include "nsIBaseWindow.h"
|
#include "nsIBaseWindow.h"
|
||||||
#include "nsILayoutHistoryState.h"
|
#include "nsILayoutHistoryState.h"
|
||||||
#include "nsFrameManager.h"
|
#include "nsFrameManager.h"
|
||||||
#include "nsIParser.h"
|
|
||||||
#include "nsGUIEvent.h"
|
#include "nsGUIEvent.h"
|
||||||
#include "nsHTMLReflowState.h"
|
#include "nsHTMLReflowState.h"
|
||||||
#include "nsIDOMHTMLAnchorElement.h"
|
#include "nsIDOMHTMLAnchorElement.h"
|
||||||
|
|
|
@ -40,7 +40,7 @@
|
||||||
#include "mozilla/net/NeckoChild.h"
|
#include "mozilla/net/NeckoChild.h"
|
||||||
#include "WyciwygChannelChild.h"
|
#include "WyciwygChannelChild.h"
|
||||||
|
|
||||||
#include "nsIParser.h"
|
#include "nsCharsetSource.h"
|
||||||
#include "nsStringStream.h"
|
#include "nsStringStream.h"
|
||||||
#include "nsMimeTypes.h"
|
#include "nsMimeTypes.h"
|
||||||
#include "nsNetUtil.h"
|
#include "nsNetUtil.h"
|
||||||
|
|
|
@ -41,7 +41,7 @@
|
||||||
#include "nsWyciwygChannel.h"
|
#include "nsWyciwygChannel.h"
|
||||||
#include "nsNetUtil.h"
|
#include "nsNetUtil.h"
|
||||||
#include "nsISupportsPriority.h"
|
#include "nsISupportsPriority.h"
|
||||||
#include "nsIParser.h"
|
#include "nsCharsetSource.h"
|
||||||
#include "nsISerializable.h"
|
#include "nsISerializable.h"
|
||||||
#include "nsSerializationHelper.h"
|
#include "nsSerializationHelper.h"
|
||||||
|
|
||||||
|
|
|
@ -47,7 +47,7 @@
|
||||||
#include "nsContentUtils.h"
|
#include "nsContentUtils.h"
|
||||||
#include "nsICacheService.h"
|
#include "nsICacheService.h"
|
||||||
#include "nsICacheSession.h"
|
#include "nsICacheSession.h"
|
||||||
#include "nsIParser.h"
|
#include "nsCharsetSource.h"
|
||||||
#include "nsThreadUtils.h"
|
#include "nsThreadUtils.h"
|
||||||
#include "nsProxyRelease.h"
|
#include "nsProxyRelease.h"
|
||||||
|
|
||||||
|
|
|
@ -45,4 +45,8 @@ include $(DEPTH)/config/autoconf.mk
|
||||||
MODULE = parser
|
MODULE = parser
|
||||||
DIRS = expat xml htmlparser html
|
DIRS = expat xml htmlparser html
|
||||||
|
|
||||||
|
EXPORTS = \
|
||||||
|
nsCharsetSource.h \
|
||||||
|
$(NULL)
|
||||||
|
|
||||||
include $(topsrcdir)/config/rules.mk
|
include $(topsrcdir)/config/rules.mk
|
||||||
|
|
|
@ -57,6 +57,7 @@
|
||||||
#include "expat_config.h"
|
#include "expat_config.h"
|
||||||
#include "expat.h"
|
#include "expat.h"
|
||||||
#include "nsINestedURI.h"
|
#include "nsINestedURI.h"
|
||||||
|
#include "nsCharsetSource.h"
|
||||||
|
|
||||||
using namespace mozilla;
|
using namespace mozilla;
|
||||||
|
|
||||||
|
|
|
@ -39,13 +39,16 @@
|
||||||
#define NS_IPARSER___
|
#define NS_IPARSER___
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* MODULE NOTES:
|
* This GECKO-INTERNAL interface is on track to being REMOVED (or refactored
|
||||||
*
|
* to the point of being near-unrecognizable).
|
||||||
* This class defines the iparser interface. This XPCOM
|
|
||||||
* inteface is all that parser clients ever need to see.
|
|
||||||
*
|
*
|
||||||
**/
|
* Please DO NOT #include this file in comm-central code, in your XULRunner
|
||||||
|
* app or binary extensions.
|
||||||
|
*
|
||||||
|
* Please DO NOT #include this into new files even inside Gecko. It is more
|
||||||
|
* likely than not that #including this header is the wrong thing to do.
|
||||||
|
*/
|
||||||
|
|
||||||
#include "nsISupports.h"
|
#include "nsISupports.h"
|
||||||
#include "nsIStreamListener.h"
|
#include "nsIStreamListener.h"
|
||||||
|
@ -54,6 +57,7 @@
|
||||||
#include "nsTArray.h"
|
#include "nsTArray.h"
|
||||||
#include "nsIAtom.h"
|
#include "nsIAtom.h"
|
||||||
#include "nsParserBase.h"
|
#include "nsParserBase.h"
|
||||||
|
#include "nsCharsetSource.h" // avoid burning comm-central
|
||||||
|
|
||||||
#define NS_IPARSER_IID \
|
#define NS_IPARSER_IID \
|
||||||
{ 0xd064f0d6, 0x44e3, 0x4366, \
|
{ 0xd064f0d6, 0x44e3, 0x4366, \
|
||||||
|
@ -85,28 +89,6 @@ enum eParserDocType {
|
||||||
eHTML_Strict
|
eHTML_Strict
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
// define Charset source constants
|
|
||||||
// note: the value order defines the priority; higher numbers take priority
|
|
||||||
#define kCharsetUninitialized 0
|
|
||||||
#define kCharsetFromWeakDocTypeDefault 1
|
|
||||||
#define kCharsetFromUserDefault 2
|
|
||||||
#define kCharsetFromDocTypeDefault 3 // This and up confident for XHR
|
|
||||||
#define kCharsetFromCache 4
|
|
||||||
#define kCharsetFromParentFrame 5
|
|
||||||
#define kCharsetFromAutoDetection 6
|
|
||||||
#define kCharsetFromHintPrevDoc 7
|
|
||||||
#define kCharsetFromMetaPrescan 8 // this one and smaller: HTML5 Tentative
|
|
||||||
#define kCharsetFromMetaTag 9 // this one and greater: HTML5 Confident
|
|
||||||
#define kCharsetFromIrreversibleAutoDetection 10
|
|
||||||
#define kCharsetFromByteOrderMark 11
|
|
||||||
#define kCharsetFromChannel 12
|
|
||||||
#define kCharsetFromOtherComponent 13
|
|
||||||
// Levels below here will be forced onto childframes too
|
|
||||||
#define kCharsetFromParentForced 14
|
|
||||||
#define kCharsetFromUserForced 15
|
|
||||||
#define kCharsetFromPreviousLoading 16
|
|
||||||
|
|
||||||
enum eStreamState {eNone,eOnStart,eOnDataAvail,eOnStop};
|
enum eStreamState {eNone,eOnStart,eOnDataAvail,eOnStop};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -127,8 +109,14 @@ public:
|
||||||
NS_DEFINE_STATIC_IID_ACCESSOR(nsIDebugDumpContent, NS_IDEBUG_DUMP_CONTENT_IID)
|
NS_DEFINE_STATIC_IID_ACCESSOR(nsIDebugDumpContent, NS_IDEBUG_DUMP_CONTENT_IID)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class defines the iparser interface. This XPCOM
|
* This GECKO-INTERNAL interface is on track to being REMOVED (or refactored
|
||||||
* inteface is all that parser clients ever need to see.
|
* to the point of being near-unrecognizable).
|
||||||
|
*
|
||||||
|
* Please DO NOT #include this file in comm-central code, in your XULRunner
|
||||||
|
* app or binary extensions.
|
||||||
|
*
|
||||||
|
* Please DO NOT #include this into new files even inside Gecko. It is more
|
||||||
|
* likely than not that #including this header is the wrong thing to do.
|
||||||
*/
|
*/
|
||||||
class nsIParser : public nsParserBase {
|
class nsIParser : public nsParserBase {
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -98,7 +98,6 @@
|
||||||
|
|
||||||
#include "nsIDTD.h"
|
#include "nsIDTD.h"
|
||||||
#include "nsISupports.h"
|
#include "nsISupports.h"
|
||||||
#include "nsIParser.h"
|
|
||||||
#include "nsHTMLTags.h"
|
#include "nsHTMLTags.h"
|
||||||
#include "nsDeque.h"
|
#include "nsDeque.h"
|
||||||
#include "nsParserCIID.h"
|
#include "nsParserCIID.h"
|
||||||
|
|
|
@ -74,6 +74,7 @@
|
||||||
#include "mozilla/CondVar.h"
|
#include "mozilla/CondVar.h"
|
||||||
#include "mozilla/Mutex.h"
|
#include "mozilla/Mutex.h"
|
||||||
#include "nsParserConstants.h"
|
#include "nsParserConstants.h"
|
||||||
|
#include "nsCharsetSource.h"
|
||||||
|
|
||||||
using namespace mozilla;
|
using namespace mozilla;
|
||||||
|
|
||||||
|
|
|
@ -50,6 +50,7 @@
|
||||||
#include "nsUTF8Utils.h" // for LossyConvertEncoding
|
#include "nsUTF8Utils.h" // for LossyConvertEncoding
|
||||||
#include "nsCRT.h"
|
#include "nsCRT.h"
|
||||||
#include "nsParser.h"
|
#include "nsParser.h"
|
||||||
|
#include "nsCharsetSource.h"
|
||||||
|
|
||||||
// We replace NUL characters with this character.
|
// We replace NUL characters with this character.
|
||||||
static PRUnichar sInvalid = UCS2_REPLACEMENT_CHAR;
|
static PRUnichar sInvalid = UCS2_REPLACEMENT_CHAR;
|
||||||
|
|
|
@ -0,0 +1,28 @@
|
||||||
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||||
|
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
|
#ifndef nsCharsetSource_h_
|
||||||
|
#define nsCharsetSource_h_
|
||||||
|
|
||||||
|
// note: the value order defines the priority; higher numbers take priority
|
||||||
|
#define kCharsetUninitialized 0
|
||||||
|
#define kCharsetFromWeakDocTypeDefault 1
|
||||||
|
#define kCharsetFromUserDefault 2
|
||||||
|
#define kCharsetFromDocTypeDefault 3 // This and up confident for XHR
|
||||||
|
#define kCharsetFromCache 4
|
||||||
|
#define kCharsetFromParentFrame 5
|
||||||
|
#define kCharsetFromAutoDetection 6
|
||||||
|
#define kCharsetFromHintPrevDoc 7
|
||||||
|
#define kCharsetFromMetaPrescan 8 // this one and smaller: HTML5 Tentative
|
||||||
|
#define kCharsetFromMetaTag 9 // this one and greater: HTML5 Confident
|
||||||
|
#define kCharsetFromIrreversibleAutoDetection 10
|
||||||
|
#define kCharsetFromByteOrderMark 11
|
||||||
|
#define kCharsetFromChannel 12
|
||||||
|
#define kCharsetFromOtherComponent 13
|
||||||
|
// Levels below here will be forced onto childframes too
|
||||||
|
#define kCharsetFromParentForced 14
|
||||||
|
#define kCharsetFromUserForced 15
|
||||||
|
#define kCharsetFromPreviousLoading 16
|
||||||
|
|
||||||
|
#endif /* nsCharsetSource_h_ */
|
|
@ -40,6 +40,7 @@
|
||||||
#include "nsNetCID.h"
|
#include "nsNetCID.h"
|
||||||
#include "nsNetUtil.h"
|
#include "nsNetUtil.h"
|
||||||
#include "nsCharsetAlias.h"
|
#include "nsCharsetAlias.h"
|
||||||
|
#include "nsIParser.h"
|
||||||
#include "nsParserCIID.h"
|
#include "nsParserCIID.h"
|
||||||
#include "nsStreamUtils.h"
|
#include "nsStreamUtils.h"
|
||||||
#include "nsStringStream.h"
|
#include "nsStringStream.h"
|
||||||
|
@ -47,6 +48,7 @@
|
||||||
#include "nsSAXAttributes.h"
|
#include "nsSAXAttributes.h"
|
||||||
#include "nsSAXLocator.h"
|
#include "nsSAXLocator.h"
|
||||||
#include "nsSAXXMLReader.h"
|
#include "nsSAXXMLReader.h"
|
||||||
|
#include "nsCharsetSource.h"
|
||||||
|
|
||||||
#define XMLNS_URI "http://www.w3.org/2000/xmlns/"
|
#define XMLNS_URI "http://www.w3.org/2000/xmlns/"
|
||||||
|
|
||||||
|
|
|
@ -41,6 +41,7 @@
|
||||||
|
|
||||||
#include "nsIComponentManager.h"
|
#include "nsIComponentManager.h"
|
||||||
#include "nsIParser.h"
|
#include "nsIParser.h"
|
||||||
|
#include "nsCharsetSource.h"
|
||||||
#include "nsIRDFContentSink.h"
|
#include "nsIRDFContentSink.h"
|
||||||
#include "nsParserCIID.h"
|
#include "nsParserCIID.h"
|
||||||
#include "nsStringStream.h"
|
#include "nsStringStream.h"
|
||||||
|
|
Загрузка…
Ссылка в новой задаче