summaryrefslogtreecommitdiffstats
path: root/editor/libeditor/HTMLEditRules.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/libeditor/HTMLEditRules.cpp')
-rw-r--r--editor/libeditor/HTMLEditRules.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/editor/libeditor/HTMLEditRules.cpp b/editor/libeditor/HTMLEditRules.cpp
index af4a43ab9..14f6cfe11 100644
--- a/editor/libeditor/HTMLEditRules.cpp
+++ b/editor/libeditor/HTMLEditRules.cpp
@@ -840,19 +840,18 @@ HTMLEditRules::GetAlignment(bool* aMixed,
NS_ENSURE_TRUE(nodeToExamine, NS_ERROR_NULL_POINTER);
- NS_NAMED_LITERAL_STRING(typeAttrName, "align");
nsCOMPtr<Element> blockParent = htmlEditor->GetBlock(*nodeToExamine);
NS_ENSURE_TRUE(blockParent, NS_ERROR_FAILURE);
if (htmlEditor->IsCSSEnabled() &&
htmlEditor->mCSSEditUtils->IsCSSEditableProperty(blockParent, nullptr,
- &typeAttrName)) {
+ nsGkAtoms::align)) {
// We are in CSS mode and we know how to align this element with CSS
nsAutoString value;
// Let's get the value(s) of text-align or margin-left/margin-right
htmlEditor->mCSSEditUtils->GetCSSEquivalentToHTMLInlineStyleSet(
- blockParent, nullptr, &typeAttrName, value, CSSEditUtils::eComputed);
+ blockParent, nullptr, nsGkAtoms::align, value, CSSEditUtils::eComputed);
if (value.EqualsLiteral("center") ||
value.EqualsLiteral("-moz-center") ||
value.EqualsLiteral("auto auto")) {
@@ -4756,7 +4755,7 @@ HTMLEditRules::WillAlign(Selection& aSelection,
NS_ENSURE_SUCCESS(rv, rv);
if (useCSS) {
htmlEditor->mCSSEditUtils->SetCSSEquivalentToHTMLStyle(
- curNode->AsElement(), nullptr, &NS_LITERAL_STRING("align"),
+ curNode->AsElement(), nullptr, nsGkAtoms::align,
&aAlignType, false);
curDiv = nullptr;
continue;
@@ -7143,9 +7142,9 @@ HTMLEditRules::CacheInlineStyles(nsIDOMNode* aNode)
isSet, &outValue);
} else {
NS_ENSURE_STATE(mHTMLEditor);
- mHTMLEditor->mCSSEditUtils->IsCSSEquivalentToHTMLInlineStyleSet(aNode,
- mCachedStyles[j].tag, &(mCachedStyles[j].attr), isSet, outValue,
- CSSEditUtils::eComputed);
+ isSet = mHTMLEditor->mCSSEditUtils->IsCSSEquivalentToHTMLInlineStyleSet(
+ aNode, mCachedStyles[j].tag, &(mCachedStyles[j].attr), outValue,
+ CSSEditUtils::eComputed);
}
if (isSet) {
mCachedStyles[j].mPresent = true;