mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1184842. Add aNewValue to nsIMutationObserver::AttributeWillChange. r=peterv
This commit is contained in:
parent
9fb2247b78
commit
3e3003e4ce
@ -692,7 +692,8 @@ void
|
||||
DocAccessible::AttributeWillChange(nsIDocument* aDocument,
|
||||
dom::Element* aElement,
|
||||
int32_t aNameSpaceID,
|
||||
nsIAtom* aAttribute, int32_t aModType)
|
||||
nsIAtom* aAttribute, int32_t aModType,
|
||||
const nsAttrValue* aNewValue)
|
||||
{
|
||||
Accessible* accessible = GetAccessible(aElement);
|
||||
if (!accessible) {
|
||||
|
@ -327,7 +327,8 @@ nsSHEntryShared::AttributeWillChange(nsIDocument* aDocument,
|
||||
dom::Element* aContent,
|
||||
int32_t aNameSpaceID,
|
||||
nsIAtom* aAttribute,
|
||||
int32_t aModType)
|
||||
int32_t aModType,
|
||||
const nsAttrValue* aNewValue)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -117,7 +117,8 @@ nsMutationReceiver::AttributeWillChange(nsIDocument* aDocument,
|
||||
mozilla::dom::Element* aElement,
|
||||
int32_t aNameSpaceID,
|
||||
nsIAtom* aAttribute,
|
||||
int32_t aModType)
|
||||
int32_t aModType,
|
||||
const nsAttrValue* aNewValue)
|
||||
{
|
||||
if (nsAutoMutationBatch::IsBatching() ||
|
||||
!ObservesAttr(RegisterTarget(), aElement, aNameSpaceID, aAttribute)) {
|
||||
|
@ -374,7 +374,7 @@ public:
|
||||
{
|
||||
// We can reuse AttributeWillChange implementation.
|
||||
AttributeWillChange(aDocument, aElement, aNameSpaceID, aAttribute,
|
||||
nsIDOMMutationEvent::MODIFICATION);
|
||||
nsIDOMMutationEvent::MODIFICATION, nullptr);
|
||||
}
|
||||
|
||||
protected:
|
||||
|
@ -22,8 +22,9 @@ class Element;
|
||||
} // namespace mozilla
|
||||
|
||||
#define NS_IMUTATION_OBSERVER_IID \
|
||||
{ 0x51a4cec3, 0xb720, 0x4893, \
|
||||
{ 0xb1, 0x11, 0x33, 0xca, 0xbe, 0xae, 0xbf, 0x57 } }
|
||||
{ 0xdd74f0cc, 0x2849, 0x4d05, \
|
||||
{ 0x9c, 0xe3, 0xb0, 0x95, 0x3e, 0xc2, 0xfd, 0x44 } }
|
||||
|
||||
/**
|
||||
* Information details about a characterdata change. Basically, we
|
||||
* view all changes as replacements of a length of text at some offset
|
||||
@ -157,6 +158,8 @@ public:
|
||||
* @param aModType Whether or not the attribute will be added, changed, or
|
||||
* removed. The constants are defined in
|
||||
* nsIDOMMutationEvent.h.
|
||||
* @param aNewValue The new value, IF it has been preparsed by
|
||||
* BeforeSetAttr, otherwise null.
|
||||
*
|
||||
* @note Callers of this method might not hold a strong reference to the
|
||||
* observer. The observer is responsible for making sure it stays
|
||||
@ -168,7 +171,8 @@ public:
|
||||
mozilla::dom::Element* aElement,
|
||||
int32_t aNameSpaceID,
|
||||
nsIAtom* aAttribute,
|
||||
int32_t aModType) = 0;
|
||||
int32_t aModType,
|
||||
const nsAttrValue* aNewValue) = 0;
|
||||
|
||||
/**
|
||||
* Notification that an attribute of an element has changed.
|
||||
@ -339,7 +343,8 @@ NS_DEFINE_STATIC_IID_ACCESSOR(nsIMutationObserver, NS_IMUTATION_OBSERVER_IID)
|
||||
mozilla::dom::Element* aElement, \
|
||||
int32_t aNameSpaceID, \
|
||||
nsIAtom* aAttribute, \
|
||||
int32_t aModType) override;
|
||||
int32_t aModType, \
|
||||
const nsAttrValue* aNewValue) override;
|
||||
|
||||
#define NS_DECL_NSIMUTATIONOBSERVER_ATTRIBUTECHANGED \
|
||||
virtual void AttributeChanged(nsIDocument* aDocument, \
|
||||
@ -409,7 +414,8 @@ _class::AttributeWillChange(nsIDocument* aDocument, \
|
||||
mozilla::dom::Element* aElement, \
|
||||
int32_t aNameSpaceID, \
|
||||
nsIAtom* aAttribute, \
|
||||
int32_t aModType) \
|
||||
int32_t aModType, \
|
||||
const nsAttrValue* aNewValue) \
|
||||
{ \
|
||||
} \
|
||||
void \
|
||||
|
@ -129,7 +129,7 @@ nsNodeUtils::AttributeWillChange(Element* aElement,
|
||||
nsIDocument* doc = aElement->OwnerDoc();
|
||||
IMPL_MUTATION_NOTIFICATION(AttributeWillChange, aElement,
|
||||
(doc, aElement, aNameSpaceID, aAttribute,
|
||||
aModType));
|
||||
aModType, aNewValue));
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -744,7 +744,8 @@ IMEContentObserver::AttributeWillChange(nsIDocument* aDocument,
|
||||
dom::Element* aElement,
|
||||
int32_t aNameSpaceID,
|
||||
nsIAtom* aAttribute,
|
||||
int32_t aModType)
|
||||
int32_t aModType,
|
||||
const nsAttrValue* aNewValue)
|
||||
{
|
||||
nsIContent *content = GetContentBR(aElement);
|
||||
mPreAttrChangeLength = content ?
|
||||
|
@ -647,7 +647,8 @@ UndoMutationObserver::AttributeWillChange(nsIDocument* aDocument,
|
||||
mozilla::dom::Element* aElement,
|
||||
int32_t aNameSpaceID,
|
||||
nsIAtom* aAttribute,
|
||||
int32_t aModType)
|
||||
int32_t aModType,
|
||||
const nsAttrValue* aNewValue)
|
||||
{
|
||||
if (!IsManagerForMutation(aElement)) {
|
||||
return;
|
||||
|
@ -1439,7 +1439,8 @@ nsSVGElement::WillChangeValue(nsIAtom* aName)
|
||||
uint8_t modType = attrValue
|
||||
? static_cast<uint8_t>(nsIDOMMutationEvent::MODIFICATION)
|
||||
: static_cast<uint8_t>(nsIDOMMutationEvent::ADDITION);
|
||||
nsNodeUtils::AttributeWillChange(this, kNameSpaceID_None, aName, modType);
|
||||
nsNodeUtils::AttributeWillChange(this, kNameSpaceID_None, aName, modType,
|
||||
nullptr);
|
||||
|
||||
return emptyOrOldAttrValue;
|
||||
}
|
||||
|
@ -914,7 +914,8 @@ XULDocument::ExecuteOnBroadcastHandlerFor(Element* aBroadcaster,
|
||||
void
|
||||
XULDocument::AttributeWillChange(nsIDocument* aDocument,
|
||||
Element* aElement, int32_t aNameSpaceID,
|
||||
nsIAtom* aAttribute, int32_t aModType)
|
||||
nsIAtom* aAttribute, int32_t aModType,
|
||||
const nsAttrValue* aNewValue)
|
||||
{
|
||||
MOZ_ASSERT(aElement, "Null content!");
|
||||
NS_PRECONDITION(aAttribute, "Must have an attribute that's changing!");
|
||||
|
@ -4236,7 +4236,8 @@ PresShell::AttributeWillChange(nsIDocument* aDocument,
|
||||
Element* aElement,
|
||||
int32_t aNameSpaceID,
|
||||
nsIAtom* aAttribute,
|
||||
int32_t aModType)
|
||||
int32_t aModType,
|
||||
const nsAttrValue* aNewValue)
|
||||
{
|
||||
NS_PRECONDITION(!mIsDocumentGone, "Unexpected AttributeWillChange");
|
||||
NS_PRECONDITION(aDocument == mDocument, "Unexpected aDocument");
|
||||
|
@ -189,7 +189,8 @@ void
|
||||
nsFormFillController::AttributeWillChange(nsIDocument* aDocument,
|
||||
mozilla::dom::Element* aElement,
|
||||
int32_t aNameSpaceID,
|
||||
nsIAtom* aAttribute, int32_t aModType)
|
||||
nsIAtom* aAttribute, int32_t aModType,
|
||||
const nsAttrValue* aNewValue)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -91,7 +91,8 @@ void nsMenuGroupOwnerX::AttributeWillChange(nsIDocument* aDocument,
|
||||
dom::Element* aContent,
|
||||
int32_t aNameSpaceID,
|
||||
nsIAtom* aAttribute,
|
||||
int32_t aModType)
|
||||
int32_t aModType,
|
||||
const nsAttrValue* aNewValue)
|
||||
{
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user