Bug 63558, we now store XML declaration in the document and can serialize it. There is fix for 158617 as well, newlines behave properly around doctype. r=bzbarsky, sr=jst.

This commit is contained in:
heikki@netscape.com
2002-08-13 18:41:16 +00:00
parent 122b672dd2
commit 20254caaf7
24 changed files with 339 additions and 10 deletions

View File

@@ -53,6 +53,11 @@ class nsIDOMNode;
class nsICSSLoader;
class nsIURI;
#define XML_DECLARATION_BITS_DECLARATION_EXISTS 1
#define XML_DECLARATION_BITS_ENCODING_EXISTS 2
#define XML_DECLARATION_BITS_STANDALONE_EXISTS 4
#define XML_DECLARATION_BITS_STANDALONE_YES 8
class nsXMLDocument : public nsMarkupDocument,
public nsIXMLDocument,
public nsIHTMLContentContainer,
@@ -107,6 +112,12 @@ public:
// nsIXMLDocument interface
NS_IMETHOD SetDefaultStylesheets(nsIURI* aUrl);
NS_IMETHOD SetXMLDeclaration(const nsAString& aVersion,
const nsAString& aEncoding,
const nsAString& Standalone);
NS_IMETHOD GetXMLDeclaration(nsAString& aVersion,
nsAString& aEncoding,
nsAString& Standalone);
// nsIHTMLContentContainer
NS_IMETHOD GetAttributeStyleSheet(nsIHTMLStyleSheet** aResult);
@@ -142,7 +153,9 @@ protected:
nsIParser *mParser;
nsCOMPtr<nsIScriptContext> mScriptContext;
PRBool mCrossSiteAccessEnabled;
PRPackedBool mCrossSiteAccessEnabled;
PRUint8 mXMLDeclarationBits;
};