From da3fec2b4bfd9f2a6fd74f7b2677a259dc093b0f Mon Sep 17 00:00:00 2001 From: "brade%netscape.com" Date: Mon, 14 Jan 2002 20:35:08 +0000 Subject: [PATCH] remove DEAD_CODE (bug 115115) git-svn-id: svn://10.0.0.236/trunk@112094 18797224-902f-48f8-a5cc-f745e15eee43 --- .../editor/libeditor/html/nsHTMLEditUtils.cpp | 60 ------------------- .../editor/libeditor/html/nsHTMLEditUtils.h | 6 -- .../editor/libeditor/html/nsWSRunObject.cpp | 21 ------- mozilla/editor/libeditor/html/nsWSRunObject.h | 1 - .../editor/libeditor/text/nsTextEditRules.h | 2 - 5 files changed, 90 deletions(-) diff --git a/mozilla/editor/libeditor/html/nsHTMLEditUtils.cpp b/mozilla/editor/libeditor/html/nsHTMLEditUtils.cpp index fff9fb9b814..1af3fb04562 100644 --- a/mozilla/editor/libeditor/html/nsHTMLEditUtils.cpp +++ b/mozilla/editor/libeditor/html/nsHTMLEditUtils.cpp @@ -249,16 +249,6 @@ nsHTMLEditUtils::IsUnorderedList(nsIDOMNode *node) } -/////////////////////////////////////////////////////////////////////////// -// IsDefinitionList: true if node an html definition list -// -PRBool -nsHTMLEditUtils::IsDefinitionList(nsIDOMNode *node) -{ - return nsTextEditUtils::NodeIsType(node, NS_LITERAL_STRING("dl")); -} - - /////////////////////////////////////////////////////////////////////////// // IsBlockquote: true if node an html blockquote node // @@ -289,16 +279,6 @@ nsHTMLEditUtils::IsAddress(nsIDOMNode *node) } -/////////////////////////////////////////////////////////////////////////// -// IsAnchor: true if node an html anchor node -// -PRBool -nsHTMLEditUtils::IsAnchor(nsIDOMNode *node) -{ - return nsTextEditUtils::NodeIsType(node, NS_LITERAL_STRING("a")); -} - - /////////////////////////////////////////////////////////////////////////// // IsImage: true if node an html image node // @@ -347,17 +327,6 @@ nsHTMLEditUtils::IsDiv(nsIDOMNode *node) } -/////////////////////////////////////////////////////////////////////////// -// IsNormalDiv: true if node an html div node, without type = _moz -// -PRBool -nsHTMLEditUtils::IsNormalDiv(nsIDOMNode *node) -{ - if (IsDiv(node) && !nsTextEditUtils::HasMozAttr(node)) return PR_TRUE; - return PR_FALSE; -} - - /////////////////////////////////////////////////////////////////////////// // IsMozDiv: true if node an html div node with type = _moz // @@ -405,26 +374,6 @@ nsHTMLEditUtils::IsMailCite(nsIDOMNode *node) } -/////////////////////////////////////////////////////////////////////////// -// IsTextarea: true if node is an html textarea node -// -PRBool -nsHTMLEditUtils::IsTextarea(nsIDOMNode *node) -{ - return nsTextEditUtils::NodeIsType(node, NS_LITERAL_STRING("textarea")); -} - - -/////////////////////////////////////////////////////////////////////////// -// IsMap: true if node is an html map node -// -PRBool -nsHTMLEditUtils::IsMap(nsIDOMNode *node) -{ - return nsTextEditUtils::NodeIsType(node, NS_LITERAL_STRING("map")); -} - - /////////////////////////////////////////////////////////////////////////// // IsFormWidget: true if node is a form widget of some kind // @@ -478,15 +427,6 @@ nsHTMLEditUtils::IsDescendantOf(nsIDOMNode *aNode, nsIDOMNode *aParent, PRInt32 } -PRBool -nsHTMLEditUtils::IsLeafNode(nsIDOMNode *aNode) -{ - if (!aNode) return PR_FALSE; - PRBool hasChildren = PR_FALSE; - aNode->HasChildNodes(&hasChildren); - return !hasChildren; -} - PRBool nsHTMLEditUtils::SupportsAlignAttr(nsIDOMNode * aNode) { diff --git a/mozilla/editor/libeditor/html/nsHTMLEditUtils.h b/mozilla/editor/libeditor/html/nsHTMLEditUtils.h index 6ea2d2f55d2..2037dd93af6 100644 --- a/mozilla/editor/libeditor/html/nsHTMLEditUtils.h +++ b/mozilla/editor/libeditor/html/nsHTMLEditUtils.h @@ -64,7 +64,6 @@ public: static PRBool IsList(nsIDOMNode *aNode); static PRBool IsOrderedList(nsIDOMNode *aNode); static PRBool IsUnorderedList(nsIDOMNode *aNode); - static PRBool IsDefinitionList(nsIDOMNode *aNode); static PRBool IsBlockquote(nsIDOMNode *aNode); static PRBool IsPre(nsIDOMNode *aNode); static PRBool IsAddress(nsIDOMNode *aNode); @@ -73,15 +72,10 @@ public: static PRBool IsLink(nsIDOMNode *aNode); static PRBool IsNamedAnchor(nsIDOMNode *aNode); static PRBool IsDiv(nsIDOMNode *aNode); - static PRBool IsNormalDiv(nsIDOMNode *aNode); static PRBool IsMozDiv(nsIDOMNode *aNode); static PRBool IsMailCite(nsIDOMNode *aNode); - static PRBool IsTextarea(nsIDOMNode *aNode); - static PRBool IsMap(nsIDOMNode *aNode); static PRBool IsFormWidget(nsIDOMNode *aNode); static PRBool IsDescendantOf(nsIDOMNode *aNode, nsIDOMNode *aParent, PRInt32 *aOffset = 0); - - static PRBool IsLeafNode(nsIDOMNode *aNode); static PRBool SupportsAlignAttr(nsIDOMNode *aNode); }; diff --git a/mozilla/editor/libeditor/html/nsWSRunObject.cpp b/mozilla/editor/libeditor/html/nsWSRunObject.cpp index d450c2d8328..9ead1fe8da9 100644 --- a/mozilla/editor/libeditor/html/nsWSRunObject.cpp +++ b/mozilla/editor/libeditor/html/nsWSRunObject.cpp @@ -73,27 +73,6 @@ static PRBool IsInlineNode(nsIDOMNode* node) } //- constructor / destructor ----------------------------------------------- -nsWSRunObject::nsWSRunObject(nsHTMLEditor *aEd) : -mNode() -,mOffset(0) -,mStartNode() -,mStartOffset(0) -,mStartReason(0) -,mEndNode() -,mEndOffset(0) -,mEndReason(0) -,mFirstNBSPNode() -,mFirstNBSPOffset(0) -,mLastNBSPNode() -,mLastNBSPOffset(0) -,mNodeArray() -,mStartRun(nsnull) -,mEndRun(nsnull) -,mHTMLEditor(aEd) -{ - mNodeArray = do_CreateInstance(NS_SUPPORTSARRAY_CONTRACTID); -} - nsWSRunObject::nsWSRunObject(nsHTMLEditor *aEd, nsIDOMNode *aNode, PRInt32 aOffset) : mNode(aNode) ,mOffset(aOffset) diff --git a/mozilla/editor/libeditor/html/nsWSRunObject.h b/mozilla/editor/libeditor/html/nsWSRunObject.h index 6f13316ce60..5309fc029de 100644 --- a/mozilla/editor/libeditor/html/nsWSRunObject.h +++ b/mozilla/editor/libeditor/html/nsWSRunObject.h @@ -81,7 +81,6 @@ class nsWSRunObject }; // constructor / destructor ----------------------------------------------- - nsWSRunObject(nsHTMLEditor *aEd); nsWSRunObject(nsHTMLEditor *aEd, nsIDOMNode *aNode, PRInt32 aOffset); ~nsWSRunObject(); diff --git a/mozilla/editor/libeditor/text/nsTextEditRules.h b/mozilla/editor/libeditor/text/nsTextEditRules.h index 730b19e217f..67cdf9a7092 100644 --- a/mozilla/editor/libeditor/text/nsTextEditRules.h +++ b/mozilla/editor/libeditor/text/nsTextEditRules.h @@ -184,8 +184,6 @@ protected: nsresult CreateMozBR(nsIDOMNode *inParent, PRInt32 inOffset, nsCOMPtr *outBRNode); - PRBool DeleteEmptyTextNode(nsIDOMNode *aNode); - #ifdef IBMBIDI nsresult CheckBidiLevelForDeletion(nsIDOMNode *aSelNode, PRInt32 aSelOffset,