Bug 1469108: Fix some pre-existing style issues / unnecessary default arguments. r?smaug
MozReview-Commit-ID: 3oogRy66cwx
--- a/dom/base/DirectionalityUtils.cpp
+++ b/dom/base/DirectionalityUtils.cpp
@@ -366,17 +366,17 @@ GetDirectionFromText(const nsTextFragmen
* http://www.whatwg.org/specs/web-apps/current-work/multipage/elements.html#the-directionality
*
* @param[in] changedNode If we call this method because the content of a text
* node is about to change, pass in the changed node, so that we
* know not to return it
* @return the text node containing the character that determined the direction
*/
static nsTextNode*
-WalkDescendantsSetDirectionFromText(Element* aElement, bool aNotify = true,
+WalkDescendantsSetDirectionFromText(Element* aElement, bool aNotify,
nsINode* aChangedNode = nullptr)
{
MOZ_ASSERT(aElement, "Must have an element");
MOZ_ASSERT(aElement->HasDirAuto(), "Element must have dir=auto");
if (DoesNotParticipateInAutoDirection(aElement)) {
return nullptr;
}
@@ -777,18 +777,19 @@ WalkDescendantsClearAncestorDirAuto(Elem
continue;
}
child->ClearAncestorHasDirAuto();
child = child->GetNextNode(aElement);
}
}
-void SetAncestorDirectionIfAuto(nsTextNode* aTextNode, Directionality aDir,
- bool aNotify = true)
+void
+SetAncestorDirectionIfAuto(nsTextNode* aTextNode, Directionality aDir,
+ bool aNotify = true)
{
MOZ_ASSERT(aTextNode->NodeType() == nsINode::TEXT_NODE,
"Must be a text node");
Element* parent = aTextNode->GetParentElement();
while (parent && parent->NodeOrAncestorHasDirAuto()) {
if (DoesNotParticipateInAutoDirection(parent) || parent->HasFixedDir()) {
break;
@@ -991,17 +992,17 @@ OnSetDirAttr(Element* aElement, const ns
}
SetDirectionalityOnDescendants(aElement,
RecomputeDirectionality(aElement, aNotify),
aNotify);
}
}
void
-SetDirOnBind(mozilla::dom::Element* aElement, nsIContent* aParent)
+SetDirOnBind(Element* aElement, nsIContent* aParent)
{
// Set the AncestorHasDirAuto flag, unless this element shouldn't affect
// ancestors that have dir=auto
if (!DoesNotParticipateInAutoDirection(aElement) &&
!aElement->IsHTMLElement(nsGkAtoms::bdi) &&
aParent && aParent->NodeOrAncestorHasDirAuto()) {
aElement->SetAncestorHasDirAuto();
@@ -1029,17 +1030,18 @@ SetDirOnBind(mozilla::dom::Element* aEle
if (!aElement->HasDirAuto()) {
// if the element doesn't have dir=auto, set its own directionality from
// the dir attribute or by inheriting from its ancestors.
RecomputeDirectionality(aElement, false);
}
}
-void ResetDir(mozilla::dom::Element* aElement)
+void
+ResetDir(Element* aElement)
{
if (aElement->HasDirAutoSet()) {
nsTextNode* setByNode =
static_cast<nsTextNode*>(aElement->GetProperty(nsGkAtoms::dirAutoSetBy));
nsTextNodeDirectionalityMap::RemoveElementFromMap(setByNode, aElement);
}
if (!aElement->HasDirAuto()) {