bug 272702: Remove skipped content. This simplifies the code handling <script>, <style> and related tags and makes the nsIHTMLContentSink interface just that much easier to implement. This also allows <object> tags to appear in the head with children. r=sicking sr=jst
git-svn-id: svn://10.0.0.236/trunk@179916 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -59,7 +59,9 @@
|
||||
#include "nsITokenizer.h"
|
||||
|
||||
#define NS_IDTD_IID \
|
||||
{ 0xa6cf9053, 0x15b3, 0x11d2,{0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32}}
|
||||
{ 0xab54d8ec, 0xc31c, 0x434b, \
|
||||
{ 0xa7, 0x64, 0xb4, 0xe9, 0xcd, 0x60, 0xc5, 0xc1 } }
|
||||
|
||||
|
||||
enum eAutoDetectResult {
|
||||
eUnknownDetect,
|
||||
@@ -200,8 +202,6 @@ public:
|
||||
NS_IMETHOD_(void) Terminate() = 0;
|
||||
|
||||
NS_IMETHOD_(PRInt32) GetType() = 0;
|
||||
|
||||
NS_IMETHOD CollectSkippedContent(PRInt32 aTag, nsAString& aContent, PRInt32 &aLineNo) = 0;
|
||||
};
|
||||
|
||||
#define NS_DECL_NSIDTD \
|
||||
@@ -216,7 +216,6 @@ public:
|
||||
NS_IMETHOD WillInterruptParse(nsIContentSink* aSink = 0);\
|
||||
NS_IMETHOD_(PRBool) CanContain(PRInt32 aParent,PRInt32 aChild) const;\
|
||||
NS_IMETHOD_(PRBool) IsContainer(PRInt32 aTag) const;\
|
||||
NS_IMETHOD CollectSkippedContent(PRInt32 aTag, nsAString& aContent, PRInt32 &aLineNo);\
|
||||
NS_IMETHOD_(void) Terminate();\
|
||||
NS_IMETHOD_(PRInt32) GetType();
|
||||
#endif /* nsIDTD_h___ */
|
||||
|
||||
@@ -38,9 +38,6 @@
|
||||
#define nsIHTMLContentSink_h___
|
||||
|
||||
/**
|
||||
* MODULE NOTES:
|
||||
* @update gess 4/1/98
|
||||
*
|
||||
* This file declares the concrete HTMLContentSink class.
|
||||
* This class is used during the parsing process as the
|
||||
* primary interface between the parser and the content
|
||||
@@ -86,7 +83,9 @@
|
||||
#include "nsHTMLTags.h"
|
||||
|
||||
#define NS_IHTML_CONTENT_SINK_IID \
|
||||
{ 0x59929de5, 0xe60b, 0x48b1,{0x81, 0x69, 0x48, 0x47, 0xb5, 0xc9, 0x44, 0x29}}
|
||||
{ 0x73b5a072, 0x0f87, 0x4d07, \
|
||||
{ 0xa8, 0x16, 0xe6, 0xac, 0x73, 0xa7, 0x04, 0x3c } }
|
||||
|
||||
|
||||
#if defined(XP_MAC) || defined(WINCE)
|
||||
#define MAX_REFLOW_DEPTH 75 //setting to 75 to prevent layout from crashing on mac. Bug 55095.
|
||||
@@ -102,15 +101,6 @@ public:
|
||||
|
||||
NS_DEFINE_STATIC_IID_ACCESSOR(NS_IHTML_CONTENT_SINK_IID)
|
||||
|
||||
/**
|
||||
* This method gets called by the parser when it encounters
|
||||
* a title tag and wants to set the document title in the sink.
|
||||
*
|
||||
* @update 4/1/98 gess
|
||||
* @param nsString reference to new title value
|
||||
*/
|
||||
NS_IMETHOD SetTitle(const nsString& aValue) = 0;
|
||||
|
||||
/**
|
||||
* This method is used to open the outer HTML container.
|
||||
*
|
||||
@@ -133,6 +123,13 @@ public:
|
||||
*/
|
||||
NS_IMETHOD OpenHead(const nsIParserNode& aNode) = 0;
|
||||
|
||||
/**
|
||||
* This method is used to open the HEAD container. It is useful if a tag
|
||||
* is forcing us to open the head (probably again), like if we find a <meta>
|
||||
* tag in the body.
|
||||
*/
|
||||
NS_IMETHOD OpenHead() = 0;
|
||||
|
||||
/**
|
||||
* This method is used to close the only HEAD container.
|
||||
*/
|
||||
@@ -262,13 +259,6 @@ public:
|
||||
*/
|
||||
NS_IMETHOD CloseContainer(const nsHTMLTag aTag) = 0;
|
||||
|
||||
/**
|
||||
* This gets called by the parser to contents to
|
||||
* the head container
|
||||
*
|
||||
*/
|
||||
NS_IMETHOD AddHeadContent(const nsIParserNode& aNode) = 0;
|
||||
|
||||
/**
|
||||
* This gets called by the parser when you want to add
|
||||
* a leaf node to the current container in the content
|
||||
@@ -303,7 +293,7 @@ public:
|
||||
* This method is called by the parser when it encounters
|
||||
* a document type declaration.
|
||||
*
|
||||
* XXX Should the parser also part the internal subset?
|
||||
* XXX Should the parser also parse the internal subset?
|
||||
*
|
||||
* @param nsIParserNode reference to parser node interface
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user