Bug 813019 - Get rid of AccMutationEvent::mNode. r=tbsaunde
authorIordache Catalin <catalinn.iordache@gmail.com>
Wed, 19 Dec 2012 20:10:12 -0500
changeset 116576 3dcf9f0a42d8738c1150dbeda142d934cd677a68
parent 116575 87ad27a8a7de8da408901f3772a2e1b0d1bc2d77
child 116577 52b5ac5877670aab08ef027055e8c4ff115b6e5b
push idunknown
push userunknown
push dateunknown
reviewerstbsaunde
bugs813019
milestone20.0a1
Bug 813019 - Get rid of AccMutationEvent::mNode. r=tbsaunde
accessible/src/base/AccEvent.h
accessible/src/base/NotificationController.cpp
--- a/accessible/src/base/AccEvent.h
+++ b/accessible/src/base/AccEvent.h
@@ -205,17 +205,16 @@ class AccMutationEvent: public AccEvent
 {
 public:
   AccMutationEvent(uint32_t aEventType, Accessible* aTarget,
                    nsINode* aTargetNode) :
     AccEvent(aEventType, aTarget, eAutoDetect, eCoalesceMutationTextChange)
   {
     // Don't coalesce these since they are coalesced by reorder event. Coalesce
     // contained text change events.
-    mNode = aTargetNode;
     mParent = mAccessible->Parent();
   }
   virtual ~AccMutationEvent() { }
 
   // Event
   static const EventGroup kEventGroup = eMutationEvent;
   virtual unsigned int GetEventGroups() const
   {
--- a/accessible/src/base/NotificationController.cpp
+++ b/accessible/src/base/NotificationController.cpp
@@ -633,17 +633,17 @@ NotificationController::CoalesceTextChan
 
   aTailEvent->mTextChangeEvent.swap(aThisEvent->mTextChangeEvent);
 }
 
 void
 NotificationController::CreateTextChangeEventFor(AccMutationEvent* aEvent)
 {
   DocAccessible* document = aEvent->GetDocAccessible();
-  Accessible* container = document->GetContainerAccessible(aEvent->mNode);
+  Accessible* container = aEvent->mAccessible->Parent();
   if (!container)
     return;
 
   HyperTextAccessible* textAccessible = container->AsHyperText();
   if (!textAccessible)
     return;
 
   // Don't fire event for the first html:br in an editor.