Bug 1392993 - Change nsIAccessibleObjectAttributeChangedEvent.changedAttribute from an nsIAtom to an AString. r=MarcoZ.

This removes one use of nsIAtom within scripts, which is good (see bug
1392883). All the uses of this attribute within scripts just converted it to a
string anyway.

--HG--
extra : rebase_source : 080c12506722df5d18e78659bbb922421baa5b80
This commit is contained in:
Nicholas Nethercote 2017-08-24 17:19:09 +10:00
Родитель bbc0805e28
Коммит eb53891d73
4 изменённых файлов: 7 добавлений и 7 удалений

Просмотреть файл

@ -258,11 +258,13 @@ a11y::MakeXPCEvent(AccEvent* aEvent)
if (eventGroup & (1 << AccEvent::eObjectAttrChangedEvent)) {
AccObjectAttrChangedEvent* oac = downcast_accEvent(aEvent);
nsString attribute;
oac->GetAttribute()->ToString(attribute);
xpEvent = new xpcAccObjectAttributeChangedEvent(type,
ToXPC(acc),
ToXPCDocument(doc), domNode,
fromUser,
oac->GetAttribute());
attribute);
return xpEvent.forget();
}

Просмотреть файл

@ -6,8 +6,6 @@
#include "nsIAccessibleEvent.idl"
interface nsIAtom;
/**
* Fired when an attribute of an accessible changes.
*/
@ -17,5 +15,5 @@ interface nsIAccessibleObjectAttributeChangedEvent : nsIAccessibleEvent
/**
* Return the accessible attribute that changed.
*/
readonly attribute nsIAtom changedAttribute;
readonly attribute AString changedAttribute;
};

Просмотреть файл

@ -232,7 +232,7 @@ this.EventManager.prototype = {
{
let evt = aEvent.QueryInterface(
Ci.nsIAccessibleObjectAttributeChangedEvent);
if (evt.changedAttribute.toString() !== "aria-hidden") {
if (evt.changedAttribute !== "aria-hidden") {
// Only handle aria-hidden attribute change.
break;
}

Просмотреть файл

@ -1745,7 +1745,7 @@ function objAttrChangedChecker(aID, aAttr) {
return;
}
is(event.changedAttribute.toString(), aAttr,
is(event.changedAttribute, aAttr,
"Wrong attribute name of the object attribute changed event.");
};
@ -1754,7 +1754,7 @@ function objAttrChangedChecker(aID, aAttr) {
var scEvent = aEvent.QueryInterface(
nsIAccessibleObjectAttributeChangedEvent);
return (aEvent.accessible == getAccessible(this.target)) &&
(scEvent.changedAttribute.toString() == aAttr);
(scEvent.changedAttribute == aAttr);
}
return false;
};