Bug 720124 - Remove dead code from HTMLContentSink: AddProcessingInstruction; r=hsivonen
authorMs2ger <ms2ger@gmail.com>
Wed, 25 Jan 2012 08:50:04 +0100
changeset 85204 86377c75fbca7e0e40f7a2165041931150230c38
parent 85203 ffa1adda4c4ff548c0d99fa437c9c1913d70cea3
child 85205 048568c7684f7e0381cdddbe091bbc58216194b4
push id21912
push userMs2ger@gmail.com
push dateWed, 25 Jan 2012 07:51:01 +0000
treeherdermozilla-central@005488525c43 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewershsivonen
bugs720124
milestone12.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 720124 - Remove dead code from HTMLContentSink: AddProcessingInstruction; r=hsivonen
content/base/src/mozSanitizingSerializer.h
content/base/src/nsPlainTextSerializer.h
content/html/document/src/nsHTMLContentSink.cpp
parser/htmlparser/public/nsIHTMLContentSink.h
parser/htmlparser/src/CNavDTD.cpp
parser/htmlparser/src/nsLoggingSink.cpp
parser/htmlparser/src/nsLoggingSink.h
toolkit/components/places/nsPlacesImportExportService.cpp
--- a/content/base/src/mozSanitizingSerializer.h
+++ b/content/base/src/mozSanitizingSerializer.h
@@ -103,18 +103,16 @@ public:
   NS_IMETHOD WillParse(void) { return NS_OK; }
   NS_IMETHOD WillInterrupt(void) { return NS_OK; }
   NS_IMETHOD WillResume(void) { return NS_OK; }
   NS_IMETHOD SetParser(nsParserBase* aParser) { return NS_OK; }
   NS_IMETHOD OpenContainer(const nsIParserNode& aNode);
   NS_IMETHOD CloseContainer(const nsHTMLTag aTag);
   NS_IMETHOD AddLeaf(const nsIParserNode& aNode);
   NS_IMETHOD AddComment(const nsIParserNode& aNode) { return NS_OK; }
-  NS_IMETHOD AddProcessingInstruction(const nsIParserNode& aNode)
-                                                    { return NS_OK; }
   virtual void FlushPendingNotifications(mozFlushType aType) { }
   NS_IMETHOD SetDocumentCharset(nsACString& aCharset);
   virtual nsISupports *GetTarget() { return nsnull; }
 
   // nsIHTMLContentSink
   NS_IMETHOD OpenHead();
   NS_IMETHOD IsEnabled(PRInt32 aTag, bool* aReturn);
   NS_IMETHOD NotifyTagObservers(nsIParserNode* aNode) { return NS_OK; }
--- a/content/base/src/nsPlainTextSerializer.h
+++ b/content/base/src/nsPlainTextSerializer.h
@@ -104,17 +104,16 @@ public:
   NS_IMETHOD WillParse(void) { return NS_OK; }
   NS_IMETHOD WillInterrupt(void) { return NS_OK; }
   NS_IMETHOD WillResume(void) { return NS_OK; }
   NS_IMETHOD SetParser(nsParserBase* aParser) { return NS_OK; }
   NS_IMETHOD OpenContainer(const nsIParserNode& aNode);
   NS_IMETHOD CloseContainer(const nsHTMLTag aTag);
   NS_IMETHOD AddLeaf(const nsIParserNode& aNode);
   NS_IMETHOD AddComment(const nsIParserNode& aNode) { return NS_OK; }
-  NS_IMETHOD AddProcessingInstruction(const nsIParserNode& aNode) { return NS_OK; }
   virtual void FlushPendingNotifications(mozFlushType aType) { }
   NS_IMETHOD SetDocumentCharset(nsACString& aCharset) { return NS_OK; }
   virtual nsISupports *GetTarget() { return nsnull; }
 
   // nsIHTMLContentSink
   NS_IMETHOD OpenHead();
   NS_IMETHOD IsEnabled(PRInt32 aTag, bool* aReturn);
   NS_IMETHOD NotifyTagObservers(nsIParserNode* aNode) { return NS_OK; }
--- a/content/html/document/src/nsHTMLContentSink.cpp
+++ b/content/html/document/src/nsHTMLContentSink.cpp
@@ -191,17 +191,16 @@ public:
   virtual bool IsScriptExecuting();
 
   // nsIHTMLContentSink
   NS_IMETHOD OpenContainer(const nsIParserNode& aNode);
   NS_IMETHOD CloseContainer(const nsHTMLTag aTag);
   NS_IMETHOD CloseMalformedContainer(const nsHTMLTag aTag);
   NS_IMETHOD AddLeaf(const nsIParserNode& aNode);
   NS_IMETHOD AddComment(const nsIParserNode& aNode);
-  NS_IMETHOD AddProcessingInstruction(const nsIParserNode& aNode);
   NS_IMETHOD DidProcessTokens(void);
   NS_IMETHOD WillProcessAToken(void);
   NS_IMETHOD DidProcessAToken(void);
   NS_IMETHOD BeginContext(PRInt32 aID);
   NS_IMETHOD EndContext(PRInt32 aID);
   NS_IMETHOD OpenHead();
   NS_IMETHOD IsEnabled(PRInt32 aTag, bool* aReturn);
 
@@ -1938,31 +1937,16 @@ HTMLContentSink::AddLeaf(const nsIParser
 nsresult
 HTMLContentSink::AddComment(const nsIParserNode& aNode)
 {
   nsresult rv = mCurrentContext->AddComment(aNode);
 
   return rv;
 }
 
-/**
- * This gets called by the parsing system when we find a PI
- * @update	gess11/9/98
- * @param   aNode contains a comment token
- * @return  error code
- */
-nsresult
-HTMLContentSink::AddProcessingInstruction(const nsIParserNode& aNode)
-{
-  nsresult result = NS_OK;
-  // Implementation of AddProcessingInstruction() should start here
-
-  return result;
-}
-
 NS_IMETHODIMP
 HTMLContentSink::DidProcessTokens(void)
 {
   return NS_OK;
 }
 
 NS_IMETHODIMP
 HTMLContentSink::WillProcessAToken(void)
--- a/parser/htmlparser/public/nsIHTMLContentSink.h
+++ b/parser/htmlparser/public/nsIHTMLContentSink.h
@@ -189,24 +189,14 @@ public:
    * This gets called by the parser when you want to add
    * a leaf node to the current container in the content
    * model.
    *
    * @update 4/1/98 gess
    * @param  nsIParserNode reference to parser node interface
    */     
   NS_IMETHOD AddComment(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
-   * model.
-   *
-   * @update 4/1/98 gess
-   * @param  nsIParserNode reference to parser node interface
-   */     
-  NS_IMETHOD AddProcessingInstruction(const nsIParserNode& aNode) = 0;
 };
 
 NS_DEFINE_STATIC_IID_ACCESSOR(nsIHTMLContentSink, NS_IHTML_CONTENT_SINK_IID)
 
 #endif /* nsIHTMLContentSink_h___ */
 
--- a/parser/htmlparser/src/CNavDTD.cpp
+++ b/parser/htmlparser/src/CNavDTD.cpp
@@ -1925,25 +1925,17 @@ CNavDTD::HandleAttributeToken(CToken* aT
  *  @update  gess 3/25/98
  *  @param   aToken -- next (start) token to be handled
  *  @return  true if all went well; false if error occurred
  */
 nsresult
 CNavDTD::HandleProcessingInstructionToken(CToken* aToken)
 {
   NS_PRECONDITION(nsnull != aToken, kNullToken);
-
-  nsCParserNode* theNode = mNodeAllocator.CreateNode(aToken, mTokenAllocator);
-  NS_ENSURE_TRUE(theNode, NS_ERROR_OUT_OF_MEMORY);
-
-  nsresult result = mSink ? mSink->AddProcessingInstruction(*theNode) : NS_OK;
-
-  IF_FREE(theNode, &mNodeAllocator);
-
-  return result;
+  return NS_OK;
 }
 
 /**
  *  This method gets called when a DOCTYPE token has been 
  *  encountered in the parse process. 
  *  
  *  @update  harishd 09/02/99
  *  @param   aToken -- The very first token to be handled
--- a/parser/htmlparser/src/nsLoggingSink.cpp
+++ b/parser/htmlparser/src/nsLoggingSink.cpp
@@ -212,42 +212,16 @@ nsLoggingSink::AddLeaf(const nsIParserNo
   }
   
   return theResult;
 
 } 
 
 /**
  *  This gets called by the parser when you want to add
- *  a PI node to the current container in the content
- *  model.
- *  
- *  @updated gess 3/25/98
- *  @param   
- *  @return  
- */
-NS_IMETHODIMP
-nsLoggingSink::AddProcessingInstruction(const nsIParserNode& aNode){
-
-#ifdef VERBOSE_DEBUG
-  DebugDump("<",aNode.GetText(),(mNodeStackPos)*2);
-#endif
-
-  nsresult theResult=NS_OK;
-
-  //then proxy the call to the real sink if you have one.
-  if(mSink) {
-    theResult=mSink->AddProcessingInstruction(aNode);
-  }
-  
-  return theResult;
-}
-
-/**
- *  This gets called by the parser when you want to add
  *  a comment node to the current container in the content
  *  model.
  *  
  *  @updated gess 3/25/98
  *  @param   
  *  @return  
  */
 NS_IMETHODIMP
--- a/parser/htmlparser/src/nsLoggingSink.h
+++ b/parser/htmlparser/src/nsLoggingSink.h
@@ -65,17 +65,16 @@ public:
   NS_IMETHOD DidBuildModel(bool aTerminated);
   NS_IMETHOD WillInterrupt();
   NS_IMETHOD WillResume();
   NS_IMETHOD SetParser(nsParserBase* aParser);
   NS_IMETHOD OpenContainer(const nsIParserNode& aNode);
   NS_IMETHOD CloseContainer(const nsHTMLTag aTag);
   NS_IMETHOD AddLeaf(const nsIParserNode& aNode);
   NS_IMETHOD AddComment(const nsIParserNode& aNode);
-  NS_IMETHOD AddProcessingInstruction(const nsIParserNode& aNode);
   virtual void FlushPendingNotifications(mozFlushType aType) { }
   NS_IMETHOD SetDocumentCharset(nsACString& aCharset) { return NS_OK; }
   virtual nsISupports *GetTarget() { return nsnull; }
 
   // nsIHTMLContentSink
   NS_IMETHOD OpenHead();
   NS_IMETHOD IsEnabled(PRInt32 aTag, bool* aReturn) 
   /* Take the largest possible feature set. */
--- a/toolkit/components/places/nsPlacesImportExportService.cpp
+++ b/toolkit/components/places/nsPlacesImportExportService.cpp
@@ -368,17 +368,16 @@ public:
     { *aReturn = true; return NS_OK; }
   NS_IMETHOD DidProcessTokens() { return NS_OK; }
   NS_IMETHOD WillProcessAToken() { return NS_OK; }
   NS_IMETHOD DidProcessAToken() { return NS_OK; }
   NS_IMETHOD OpenContainer(const nsIParserNode& aNode);
   NS_IMETHOD CloseContainer(const nsHTMLTag aTag);
   NS_IMETHOD AddLeaf(const nsIParserNode& aNode);
   NS_IMETHOD AddComment(const nsIParserNode& aNode) { return NS_OK; }
-  NS_IMETHOD AddProcessingInstruction(const nsIParserNode& aNode) { return NS_OK; }
   NS_IMETHOD NotifyTagObservers(nsIParserNode* aNode) { return NS_OK; }
 
 protected:
   nsCOMPtr<nsINavBookmarksService> mBookmarksService;
   nsCOMPtr<nsINavHistoryService> mHistoryService;
   nsCOMPtr<nsIAnnotationService> mAnnotationService;
   nsCOMPtr<nsILivemarkService> mLivemarkService;