From c1e4733c3b1ccd00961f7a2e8e062c02f43c34d0 Mon Sep 17 00:00:00 2001 From: "peterl%netscape.com" Date: Wed, 2 Sep 1998 02:07:42 +0000 Subject: [PATCH] added DTD mode git-svn-id: svn://10.0.0.236/trunk@9092 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/content/html/document/src/nsHTMLDocument.h | 8 +++++++- mozilla/content/html/document/src/nsIHTMLDocument.h | 13 +++++++++++++ mozilla/layout/html/document/src/nsHTMLDocument.h | 8 +++++++- mozilla/layout/html/document/src/nsIHTMLDocument.h | 13 +++++++++++++ 4 files changed, 40 insertions(+), 2 deletions(-) diff --git a/mozilla/content/html/document/src/nsHTMLDocument.h b/mozilla/content/html/document/src/nsHTMLDocument.h index 8d26f6c140d..1891bb0ee28 100644 --- a/mozilla/content/html/document/src/nsHTMLDocument.h +++ b/mozilla/content/html/document/src/nsHTMLDocument.h @@ -26,6 +26,7 @@ #include "plhash.h" class nsIHTMLStyleSheet; +class nsIHTMLCSSStyleSheet; class nsContentList; class nsIContentViewerContainer; class nsIParser; @@ -64,6 +65,9 @@ public: NS_IMETHOD GetAttributeStyleSheet(nsIHTMLStyleSheet** aStyleSheet); + NS_IMETHOD GetDTDMode(nsDTDMode& aMode); + NS_IMETHOD SetDTDMode(nsDTDMode aMode); + // nsIDOMDocument interface NS_IMETHOD GetMasterDoc(nsIDOMDocument **aDocument) { return nsDocument::GetMasterDoc(aDocument); } @@ -150,7 +154,9 @@ protected: static PRBool MatchLinks(nsIContent *aContent); static PRBool MatchAnchors(nsIContent *aContent); - nsIHTMLStyleSheet* mAttrStyleSheet; + nsIHTMLStyleSheet* mAttrStyleSheet; + nsIHTMLCSSStyleSheet* mStyleAttrStyleSheet; + nsDTDMode mDTDMode; nsVoidArray mImageMaps; nsVoidArray mTempForms; // XXX Temporary diff --git a/mozilla/content/html/document/src/nsIHTMLDocument.h b/mozilla/content/html/document/src/nsIHTMLDocument.h index 0fd6da7bef5..6035c3c5c45 100644 --- a/mozilla/content/html/document/src/nsIHTMLDocument.h +++ b/mozilla/content/html/document/src/nsIHTMLDocument.h @@ -28,6 +28,12 @@ class nsIHTMLStyleSheet; #define NS_IHTMLDOCUMENT_IID \ {0xb2a848b0, 0xd0a9, 0x11d1, {0x89, 0xb1, 0x00, 0x60, 0x08, 0x91, 0x1b, 0x81}} +enum nsDTDMode { + eDTDMode_NoQuirks = 0, + eDTDMode_Nav = 1, + eDTDMode_Other = 2 +}; + /** * HTML document extensions to nsIDocument. */ @@ -51,6 +57,13 @@ public: // XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX NS_IMETHOD GetAttributeStyleSheet(nsIHTMLStyleSheet** aStyleSheet) = 0; + + /** + * Access DTD compatibility mode for this document + */ + NS_IMETHOD GetDTDMode(nsDTDMode& aMode) = 0; + NS_IMETHOD SetDTDMode(nsDTDMode aMode) = 0; + }; #endif /* nsIHTMLDocument_h___ */ diff --git a/mozilla/layout/html/document/src/nsHTMLDocument.h b/mozilla/layout/html/document/src/nsHTMLDocument.h index 8d26f6c140d..1891bb0ee28 100644 --- a/mozilla/layout/html/document/src/nsHTMLDocument.h +++ b/mozilla/layout/html/document/src/nsHTMLDocument.h @@ -26,6 +26,7 @@ #include "plhash.h" class nsIHTMLStyleSheet; +class nsIHTMLCSSStyleSheet; class nsContentList; class nsIContentViewerContainer; class nsIParser; @@ -64,6 +65,9 @@ public: NS_IMETHOD GetAttributeStyleSheet(nsIHTMLStyleSheet** aStyleSheet); + NS_IMETHOD GetDTDMode(nsDTDMode& aMode); + NS_IMETHOD SetDTDMode(nsDTDMode aMode); + // nsIDOMDocument interface NS_IMETHOD GetMasterDoc(nsIDOMDocument **aDocument) { return nsDocument::GetMasterDoc(aDocument); } @@ -150,7 +154,9 @@ protected: static PRBool MatchLinks(nsIContent *aContent); static PRBool MatchAnchors(nsIContent *aContent); - nsIHTMLStyleSheet* mAttrStyleSheet; + nsIHTMLStyleSheet* mAttrStyleSheet; + nsIHTMLCSSStyleSheet* mStyleAttrStyleSheet; + nsDTDMode mDTDMode; nsVoidArray mImageMaps; nsVoidArray mTempForms; // XXX Temporary diff --git a/mozilla/layout/html/document/src/nsIHTMLDocument.h b/mozilla/layout/html/document/src/nsIHTMLDocument.h index 0fd6da7bef5..6035c3c5c45 100644 --- a/mozilla/layout/html/document/src/nsIHTMLDocument.h +++ b/mozilla/layout/html/document/src/nsIHTMLDocument.h @@ -28,6 +28,12 @@ class nsIHTMLStyleSheet; #define NS_IHTMLDOCUMENT_IID \ {0xb2a848b0, 0xd0a9, 0x11d1, {0x89, 0xb1, 0x00, 0x60, 0x08, 0x91, 0x1b, 0x81}} +enum nsDTDMode { + eDTDMode_NoQuirks = 0, + eDTDMode_Nav = 1, + eDTDMode_Other = 2 +}; + /** * HTML document extensions to nsIDocument. */ @@ -51,6 +57,13 @@ public: // XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX NS_IMETHOD GetAttributeStyleSheet(nsIHTMLStyleSheet** aStyleSheet) = 0; + + /** + * Access DTD compatibility mode for this document + */ + NS_IMETHOD GetDTDMode(nsDTDMode& aMode) = 0; + NS_IMETHOD SetDTDMode(nsDTDMode aMode) = 0; + }; #endif /* nsIHTMLDocument_h___ */