diff --git a/accessible/generic/DocAccessible.cpp b/accessible/generic/DocAccessible.cpp index eed85dee4b03..580acb5c2b95 100644 --- a/accessible/generic/DocAccessible.cpp +++ b/accessible/generic/DocAccessible.cpp @@ -641,8 +641,7 @@ NS_IMPL_NSIDOCUMENTOBSERVER_LOAD_STUB(DocAccessible) void DocAccessible::AttributeWillChange(dom::Element* aElement, int32_t aNameSpaceID, - nsAtom* aAttribute, int32_t aModType, - const nsAttrValue* aNewValue) { + nsAtom* aAttribute, int32_t aModType) { Accessible* accessible = GetAccessible(aElement); if (!accessible) { if (aElement != mContent) return; diff --git a/dom/base/Element.cpp b/dom/base/Element.cpp index 8f049ce5fd80..bb05332fa85f 100644 --- a/dom/base/Element.cpp +++ b/dom/base/Element.cpp @@ -2355,8 +2355,7 @@ nsresult Element::SetAttr(int32_t aNamespaceID, nsAtom* aName, nsAtom* aPrefix, } if (aNotify) { - nsNodeUtils::AttributeWillChange(this, aNamespaceID, aName, modType, - nullptr); + nsNodeUtils::AttributeWillChange(this, aNamespaceID, aName, modType); } // Hold a script blocker while calling ParseAttribute since that can call @@ -2402,8 +2401,7 @@ nsresult Element::SetParsedAttr(int32_t aNamespaceID, nsAtom* aName, } if (aNotify) { - nsNodeUtils::AttributeWillChange(this, aNamespaceID, aName, modType, - &aParsedValue); + nsNodeUtils::AttributeWillChange(this, aNamespaceID, aName, modType); } nsresult rv = BeforeSetAttr(aNamespaceID, aName, &value, aNotify); @@ -2708,7 +2706,7 @@ nsresult Element::UnsetAttr(int32_t aNameSpaceID, nsAtom* aName, bool aNotify) { if (aNotify) { nsNodeUtils::AttributeWillChange(this, aNameSpaceID, aName, - MutationEvent_Binding::REMOVAL, nullptr); + MutationEvent_Binding::REMOVAL); } nsresult rv = BeforeSetAttr(aNameSpaceID, aName, nullptr, aNotify); diff --git a/dom/base/nsDOMMutationObserver.cpp b/dom/base/nsDOMMutationObserver.cpp index ab51e777d46b..2d5e06729122 100644 --- a/dom/base/nsDOMMutationObserver.cpp +++ b/dom/base/nsDOMMutationObserver.cpp @@ -139,8 +139,7 @@ void nsMutationReceiver::NativeAnonymousChildListChange(nsIContent* aContent, void nsMutationReceiver::AttributeWillChange(mozilla::dom::Element* aElement, int32_t aNameSpaceID, nsAtom* aAttribute, - int32_t aModType, - const nsAttrValue* aNewValue) { + int32_t aModType) { if (nsAutoMutationBatch::IsBatching() || !ObservesAttr(RegisterTarget(), aElement, aNameSpaceID, aAttribute)) { return; diff --git a/dom/base/nsDOMMutationObserver.h b/dom/base/nsDOMMutationObserver.h index dc4f37cc6b57..0095e2413989 100644 --- a/dom/base/nsDOMMutationObserver.h +++ b/dom/base/nsDOMMutationObserver.h @@ -359,8 +359,7 @@ class nsMutationReceiver : public nsMutationReceiverBase { nsAtom* aAttribute) override { // We can reuse AttributeWillChange implementation. AttributeWillChange(aElement, aNameSpaceID, aAttribute, - mozilla::dom::MutationEvent_Binding::MODIFICATION, - nullptr); + mozilla::dom::MutationEvent_Binding::MODIFICATION); } protected: diff --git a/dom/base/nsIMutationObserver.h b/dom/base/nsIMutationObserver.h index 315669bcc46b..db169414c27b 100644 --- a/dom/base/nsIMutationObserver.h +++ b/dom/base/nsIMutationObserver.h @@ -164,8 +164,7 @@ class nsIMutationObserver : public nsISupports { */ virtual void AttributeWillChange(mozilla::dom::Element* aElement, int32_t aNameSpaceID, nsAtom* aAttribute, - int32_t aModType, - const nsAttrValue* aNewValue) = 0; + int32_t aModType) = 0; /** * Notification that an attribute of an element has changed. @@ -308,8 +307,7 @@ NS_DEFINE_STATIC_IID_ACCESSOR(nsIMutationObserver, NS_IMUTATION_OBSERVER_IID) #define NS_DECL_NSIMUTATIONOBSERVER_ATTRIBUTEWILLCHANGE \ virtual void AttributeWillChange(mozilla::dom::Element* aElement, \ int32_t aNameSpaceID, nsAtom* aAttribute, \ - int32_t aModType, \ - const nsAttrValue* aNewValue) override; + int32_t aModType) override; #define NS_DECL_NSIMUTATIONOBSERVER_NATIVEANONYMOUSCHILDLISTCHANGE \ virtual void NativeAnonymousChildListChange(nsIContent* aContent, \ @@ -357,9 +355,9 @@ NS_DEFINE_STATIC_IID_ACCESSOR(nsIMutationObserver, NS_IMUTATION_OBSERVER_IID) nsIContent* aContent, const CharacterDataChangeInfo& aInfo) {} \ void _class::CharacterDataChanged(nsIContent* aContent, \ const CharacterDataChangeInfo& aInfo) {} \ - void _class::AttributeWillChange( \ - mozilla::dom::Element* aElement, int32_t aNameSpaceID, \ - nsAtom* aAttribute, int32_t aModType, const nsAttrValue* aNewValue) {} \ + void _class::AttributeWillChange(mozilla::dom::Element* aElement, \ + int32_t aNameSpaceID, nsAtom* aAttribute, \ + int32_t aModType) {} \ void _class::NativeAnonymousChildListChange(nsIContent* aContent, \ bool aIsRemove) {} \ void _class::AttributeChanged( \ diff --git a/dom/base/nsNodeUtils.cpp b/dom/base/nsNodeUtils.cpp index 29c671936452..ddc87e572628 100644 --- a/dom/base/nsNodeUtils.cpp +++ b/dom/base/nsNodeUtils.cpp @@ -141,13 +141,11 @@ void nsNodeUtils::CharacterDataChanged(nsIContent* aContent, } void nsNodeUtils::AttributeWillChange(Element* aElement, int32_t aNameSpaceID, - nsAtom* aAttribute, int32_t aModType, - const nsAttrValue* aNewValue) { + nsAtom* aAttribute, int32_t aModType) { Document* doc = aElement->OwnerDoc(); - IMPL_MUTATION_NOTIFICATION( - AttributeWillChange, aElement, - (aElement, aNameSpaceID, aAttribute, aModType, aNewValue), - IsRemoveNotification::No); + IMPL_MUTATION_NOTIFICATION(AttributeWillChange, aElement, + (aElement, aNameSpaceID, aAttribute, aModType), + IsRemoveNotification::No); } void nsNodeUtils::AttributeChanged(Element* aElement, int32_t aNameSpaceID, diff --git a/dom/base/nsNodeUtils.h b/dom/base/nsNodeUtils.h index 31c63a3327eb..b5bace3d1a39 100644 --- a/dom/base/nsNodeUtils.h +++ b/dom/base/nsNodeUtils.h @@ -57,8 +57,7 @@ class nsNodeUtils { */ static void AttributeWillChange(mozilla::dom::Element* aElement, int32_t aNameSpaceID, nsAtom* aAttribute, - int32_t aModType, - const nsAttrValue* aNewValue); + int32_t aModType); /** * Send AttributeChanged notifications to nsIMutationObservers. diff --git a/dom/base/nsStyledElement.cpp b/dom/base/nsStyledElement.cpp index ae19990727d5..5c094208e1ee 100644 --- a/dom/base/nsStyledElement.cpp +++ b/dom/base/nsStyledElement.cpp @@ -97,7 +97,7 @@ void nsStyledElement::InlineStyleDeclarationWillChange( modification ? static_cast(MutationEvent_Binding::MODIFICATION) : static_cast(MutationEvent_Binding::ADDITION); nsNodeUtils::AttributeWillChange(this, kNameSpaceID_None, nsGkAtoms::style, - aData.mModType, nullptr); + aData.mModType); // XXXsmaug In order to make attribute handling more consistent, consider to // call BeforeSetAttr and pass kCallAfterSetAttr to diff --git a/dom/events/IMEContentObserver.cpp b/dom/events/IMEContentObserver.cpp index 6e0b38891b3d..0683d9791689 100644 --- a/dom/events/IMEContentObserver.cpp +++ b/dom/events/IMEContentObserver.cpp @@ -1088,8 +1088,7 @@ void IMEContentObserver::ContentRemoved(nsIContent* aChild, void IMEContentObserver::AttributeWillChange(dom::Element* aElement, int32_t aNameSpaceID, nsAtom* aAttribute, - int32_t aModType, - const nsAttrValue* aNewValue) { + int32_t aModType) { if (!NeedsTextChangeNotification()) { return; } diff --git a/dom/svg/SVGElement.cpp b/dom/svg/SVGElement.cpp index e26a0992ac65..02de5dee2821 100644 --- a/dom/svg/SVGElement.cpp +++ b/dom/svg/SVGElement.cpp @@ -1252,8 +1252,7 @@ nsAttrValue SVGElement::WillChangeValue(nsAtom* aName) { uint8_t modType = attrValue ? static_cast(MutationEvent_Binding::MODIFICATION) : static_cast(MutationEvent_Binding::ADDITION); - nsNodeUtils::AttributeWillChange(this, kNameSpaceID_None, aName, modType, - nullptr); + nsNodeUtils::AttributeWillChange(this, kNameSpaceID_None, aName, modType); // This is not strictly correct--the attribute value parameter for // BeforeSetAttr should reflect the value that *will* be set but that implies diff --git a/layout/base/PresShell.cpp b/layout/base/PresShell.cpp index f243b4016c7f..2fd0c87f026a 100644 --- a/layout/base/PresShell.cpp +++ b/layout/base/PresShell.cpp @@ -4262,8 +4262,7 @@ void PresShell::DocumentStatesChanged(Document* aDocument, } void PresShell::AttributeWillChange(Element* aElement, int32_t aNameSpaceID, - nsAtom* aAttribute, int32_t aModType, - const nsAttrValue* aNewValue) { + nsAtom* aAttribute, int32_t aModType) { MOZ_ASSERT(!mIsDocumentGone, "Unexpected AttributeWillChange"); MOZ_ASSERT(aElement->OwnerDoc() == mDocument, "Unexpected document"); @@ -4272,8 +4271,8 @@ void PresShell::AttributeWillChange(Element* aElement, int32_t aNameSpaceID, // squelch any other inappropriate notifications as well. if (mDidInitialize) { nsAutoCauseReflowNotifier crNotifier(this); - mPresContext->RestyleManager()->AttributeWillChange( - aElement, aNameSpaceID, aAttribute, aModType, aNewValue); + mPresContext->RestyleManager()->AttributeWillChange(aElement, aNameSpaceID, + aAttribute, aModType); } } diff --git a/layout/base/RestyleManager.cpp b/layout/base/RestyleManager.cpp index 07c372be3849..1c4c759930f4 100644 --- a/layout/base/RestyleManager.cpp +++ b/layout/base/RestyleManager.cpp @@ -3279,8 +3279,7 @@ static inline bool NeedToRecordAttrChange( void RestyleManager::AttributeWillChange(Element* aElement, int32_t aNameSpaceID, - nsAtom* aAttribute, int32_t aModType, - const nsAttrValue* aNewValue) { + nsAtom* aAttribute, int32_t aModType) { TakeSnapshotForAttributeChange(*aElement, aNameSpaceID, aAttribute); } diff --git a/layout/base/RestyleManager.h b/layout/base/RestyleManager.h index b93a628b7200..41784088b643 100644 --- a/layout/base/RestyleManager.h +++ b/layout/base/RestyleManager.h @@ -341,8 +341,7 @@ class RestyleManager { void ContentStateChanged(nsIContent* aContent, EventStates aStateMask); void AttributeWillChange(Element* aElement, int32_t aNameSpaceID, - nsAtom* aAttribute, int32_t aModType, - const nsAttrValue* aNewValue); + nsAtom* aAttribute, int32_t aModType); void ClassAttributeWillBeChangedBySMIL(dom::Element* aElement); void AttributeChanged(dom::Element* aElement, int32_t aNameSpaceID, nsAtom* aAttribute, int32_t aModType, diff --git a/toolkit/components/satchel/nsFormFillController.cpp b/toolkit/components/satchel/nsFormFillController.cpp index 29032ec08d3b..1c0a4ea4a884 100644 --- a/toolkit/components/satchel/nsFormFillController.cpp +++ b/toolkit/components/satchel/nsFormFillController.cpp @@ -180,8 +180,7 @@ void nsFormFillController::CharacterDataChanged( void nsFormFillController::AttributeWillChange(mozilla::dom::Element* aElement, int32_t aNameSpaceID, nsAtom* aAttribute, - int32_t aModType, - const nsAttrValue* aNewValue) {} + int32_t aModType) {} void nsFormFillController::NativeAnonymousChildListChange(nsIContent* aContent, bool aIsRemove) {} diff --git a/widget/cocoa/nsMenuGroupOwnerX.mm b/widget/cocoa/nsMenuGroupOwnerX.mm index 3f313db423c1..9b5a222319ac 100644 --- a/widget/cocoa/nsMenuGroupOwnerX.mm +++ b/widget/cocoa/nsMenuGroupOwnerX.mm @@ -70,8 +70,7 @@ void nsMenuGroupOwnerX::ContentAppended(nsIContent* aFirstNewContent) { void nsMenuGroupOwnerX::NodeWillBeDestroyed(const nsINode* aNode) {} void nsMenuGroupOwnerX::AttributeWillChange(dom::Element* aContent, int32_t aNameSpaceID, - nsAtom* aAttribute, int32_t aModType, - const nsAttrValue* aNewValue) {} + nsAtom* aAttribute, int32_t aModType) {} void nsMenuGroupOwnerX::NativeAnonymousChildListChange(nsIContent* aContent, bool aIsRemove) {}