Bug 214025 [@ nsHTMLCSSUtils::IsCSSEditableProperty]

r=glazou sr=bz
This commit is contained in:
timeless@mozdev.org
2003-07-29 14:48:44 +00:00
parent 0dc56ae92a
commit 1910947d1d
2 changed files with 33 additions and 26 deletions

View File

@@ -336,12 +336,16 @@ nsHTMLCSSUtils::IsCSSEditableProperty(nsIDOMNode * aNode,
nsIAtom * aProperty,
const nsAString * aAttribute)
{
NS_ASSERTION(aNode, "Shouldn't you pass aNode? - Bug 214025");
nsCOMPtr<nsIDOMNode> node = aNode;
// we need an element node here
if (mHTMLEditor->IsTextNode(aNode)) {
aNode->GetParentNode(getter_AddRefs(node));
}
nsCOMPtr<nsIContent> content = do_QueryInterface(node);
if (!content) return PR_FALSE;
nsCOMPtr<nsIAtom> tagName;
content->GetTag(getter_AddRefs(tagName));