Fix for bug 286300 (Clean up HTML tags enum and related code). r=mrbkap, sr=bz, a=asa.

git-svn-id: svn://10.0.0.236/trunk@174703 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
peterv%propagandism.org
2005-06-16 13:10:58 +00:00
parent 1670106ec8
commit aac2b47f2a
39 changed files with 281 additions and 550 deletions

View File

@@ -2834,14 +2834,14 @@ static PRBool IsSignificantChild(nsIContent* aChild, PRBool aTextIsSignificant,
NS_ASSERTION(!aWhitespaceIsSignificant || aTextIsSignificant,
"Nonsensical arguments");
nsIAtom *tag = aChild->Tag(); // skip text, comments, and PIs
if ((tag != nsLayoutAtoms::textTagName) &&
(tag != nsLayoutAtoms::commentTagName) &&
(tag != nsLayoutAtoms::processingInstructionTagName)) {
PRBool isText = aChild->IsContentOfType(nsIContent::eTEXT);
if (!isText && !aChild->IsContentOfType(nsIContent::eCOMMENT) &&
!aChild->IsContentOfType(nsIContent::ePROCESSING_INSTRUCTION)) {
return PR_TRUE;
}
if (aTextIsSignificant && tag == nsLayoutAtoms::textTagName) {
if (aTextIsSignificant && isText) {
if (!aWhitespaceIsSignificant) {
nsCOMPtr<nsITextContent> text = do_QueryInterface(aChild);