diff --git a/editor/libeditor/nsHTMLCSSUtils.cpp b/editor/libeditor/nsHTMLCSSUtils.cpp
index 7fc80186d423..a1f84deadcad 100644
--- a/editor/libeditor/nsHTMLCSSUtils.cpp
+++ b/editor/libeditor/nsHTMLCSSUtils.cpp
@@ -575,12 +575,12 @@ nsHTMLCSSUtils::RemoveCSSInlineStyle(nsIDOMNode *aNode, nsIAtom *aProperty, cons
return mHTMLEditor->RemoveContainer(element);
}
-// Answers true is the property can be removed by setting a "none" CSS value
+// Answers true if the property can be removed by setting a "none" CSS value
// on a node
bool
-nsHTMLCSSUtils::IsCSSInvertable(nsIAtom *aProperty, const nsAString *aAttribute)
+nsHTMLCSSUtils::IsCSSInvertible(nsIAtom& aProperty, const nsAString* aAttribute)
{
- return nsGkAtoms::b == aProperty;
+ return nsGkAtoms::b == &aProperty;
}
// Get the default browser background color if we need it for GetCSSBackgroundColorState
diff --git a/editor/libeditor/nsHTMLCSSUtils.h b/editor/libeditor/nsHTMLCSSUtils.h
index 5c2e15dcb72a..77a32d3c0da2 100644
--- a/editor/libeditor/nsHTMLCSSUtils.h
+++ b/editor/libeditor/nsHTMLCSSUtils.h
@@ -146,7 +146,7 @@ public:
* @param aProperty [IN] an atom containing a CSS property
* @param aAttribute [IN] pointer to an attribute name or null if this information is irrelevant
*/
- bool IsCSSInvertable(nsIAtom * aProperty, const nsAString * aAttribute);
+ bool IsCSSInvertible(nsIAtom& aProperty, const nsAString* aAttribute);
/** Get the default browser background color if we need it for GetCSSBackgroundColorState
*
diff --git a/editor/libeditor/nsHTMLEditorStyle.cpp b/editor/libeditor/nsHTMLEditorStyle.cpp
index cd752004f754..af8bd880aa05 100644
--- a/editor/libeditor/nsHTMLEditorStyle.cpp
+++ b/editor/libeditor/nsHTMLEditorStyle.cpp
@@ -1374,7 +1374,7 @@ nsHTMLEditor::RemoveInlinePropertyImpl(nsIAtom* aProperty,
// HTML style to remove is applied; but we found no element in the
// ancestors of startNode carrying specified styles; assume it
// comes from a rule and try to insert a span "inverting" the style
- if (mHTMLCSSUtils->IsCSSInvertable(aProperty, aAttribute)) {
+ if (mHTMLCSSUtils->IsCSSInvertible(*aProperty, aAttribute)) {
NS_NAMED_LITERAL_STRING(value, "-moz-editor-invert-value");
SetInlinePropertyOnTextNode(*startNode->GetAsText(),
range->StartOffset(),
@@ -1414,7 +1414,7 @@ nsHTMLEditor::RemoveInlinePropertyImpl(nsIAtom* aProperty,
// in the ancestors of startNode carrying specified styles;
// assume it comes from a rule and let's try to insert a span
// "inverting" the style
- mHTMLCSSUtils->IsCSSInvertable(aProperty, aAttribute)) {
+ mHTMLCSSUtils->IsCSSInvertible(*aProperty, aAttribute)) {
NS_NAMED_LITERAL_STRING(value, "-moz-editor-invert-value");
SetInlinePropertyOnNode(node->AsContent(), aProperty,
aAttribute, &value);