diff --git a/content/html/content/src/nsGenericHTMLElement.cpp b/content/html/content/src/nsGenericHTMLElement.cpp
index 0d290bc153ef..80d987276543 100644
--- a/content/html/content/src/nsGenericHTMLElement.cpp
+++ b/content/html/content/src/nsGenericHTMLElement.cpp
@@ -800,7 +800,6 @@ nsGenericHTMLElement::AfterSetAttr(int32_t aNamespaceID, nsIAtom* aName,
dir = dirValue;
SetDirectionality(dir, aNotify);
ClearHasDirAuto();
- ClearHasDirAutoSet();
SetHasFixedDir();
}
} else {
@@ -810,7 +809,6 @@ nsGenericHTMLElement::AfterSetAttr(int32_t aNamespaceID, nsIAtom* aName,
SetHasDirAuto();
} else {
ClearHasDirAuto();
- ClearHasDirAutoSet();
dir = RecomputeDirectionality(this, aNotify);
}
}