Bug 1268320 - rename AccEvent::GetDocAccessible to AccEvent::Document, r=marcoz
authorAlexander Surkov <surkov.alexander@gmail.com>
Thu, 19 May 2016 13:56:58 -0400
changeset 298165 ca34a07172f67508bd75964c0b617e8a344d8397
parent 298164 39496abed3def6af2c5342a84263d3a03c457db7
child 298166 0fcaad4111c43ef3bbab08f66f5c3511a2af67a5
push id77051
push usersurkov.alexander@gmail.com
push dateThu, 19 May 2016 17:57:09 +0000
treeherdermozilla-inbound@ca34a07172f6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmarcoz
bugs1268320
milestone49.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1268320 - rename AccEvent::GetDocAccessible to AccEvent::Document, r=marcoz
accessible/base/AccEvent.cpp
accessible/base/AccEvent.h
accessible/base/EventQueue.cpp
accessible/base/EventTree.cpp
accessible/base/FocusManager.cpp
--- a/accessible/base/AccEvent.cpp
+++ b/accessible/base/AccEvent.cpp
@@ -175,17 +175,17 @@ AccVCChangeEvent::
     mOldAccessible(aOldAccessible), mOldStart(aOldStart), mOldEnd(aOldEnd),
     mReason(aReason)
 {
 }
 
 already_AddRefed<nsIAccessibleEvent>
 a11y::MakeXPCEvent(AccEvent* aEvent)
 {
-  DocAccessible* doc = aEvent->GetDocAccessible();
+  DocAccessible* doc = aEvent->Document();
   Accessible* acc = aEvent->GetAccessible();
   nsINode* node = acc->GetNode();
   nsIDOMNode* domNode = node ? node->AsDOMNode() : nullptr;
   bool fromUser = aEvent->IsFromUserInput();
   uint32_t type = aEvent->GetEventType();
   uint32_t eventGroup = aEvent->GetEventGroups();
   nsCOMPtr<nsIAccessibleEvent> xpEvent;
 
--- a/accessible/base/AccEvent.h
+++ b/accessible/base/AccEvent.h
@@ -83,17 +83,17 @@ public:
   // AccEvent
   uint32_t GetEventType() const { return mEventType; }
   EEventRule GetEventRule() const { return mEventRule; }
   bool IsFromUserInput() const { return mIsFromUserInput; }
   EIsFromUserInput FromUserInput() const
     { return static_cast<EIsFromUserInput>(mIsFromUserInput); }
 
   Accessible* GetAccessible() const { return mAccessible; }
-  DocAccessible* GetDocAccessible() const { return mAccessible->Document(); }
+  DocAccessible* Document() const { return mAccessible->Document(); }
 
   /**
    * Down casting.
    */
   enum EventGroup {
     eGenericEvent,
     eStateChangeEvent,
     eTextChangeEvent,
--- a/accessible/base/EventQueue.cpp
+++ b/accessible/base/EventQueue.cpp
@@ -25,17 +25,17 @@ const unsigned int kSelChangeCountToPack
 ////////////////////////////////////////////////////////////////////////////////
 // EventQueue
 ////////////////////////////////////////////////////////////////////////////////
 
 bool
 EventQueue::PushEvent(AccEvent* aEvent)
 {
   NS_ASSERTION((aEvent->mAccessible && aEvent->mAccessible->IsApplication()) ||
-               aEvent->GetDocAccessible() == mDocument,
+               aEvent->Document() == mDocument,
                "Queued event belongs to another document!");
 
   if (!mEvents.AppendElement(aEvent))
     return false;
 
   // Filter events.
   CoalesceEvents();
 
--- a/accessible/base/EventTree.cpp
+++ b/accessible/base/EventTree.cpp
@@ -220,17 +220,17 @@ EventTree::Process()
       // handling.
       if (mtEvent->mAccessible->ARIARole() == roles::MENUPOPUP) {
         nsEventShell::FireEvent(nsIAccessibleEvent::EVENT_MENUPOPUP_END,
                                 mtEvent->mAccessible);
       }
 
       AccHideEvent* hideEvent = downcast_accEvent(mtEvent);
       if (hideEvent->NeedsShutdown()) {
-        mtEvent->GetDocAccessible()->ShutdownChildrenInSubtree(mtEvent->mAccessible);
+        mtEvent->Document()->ShutdownChildrenInSubtree(mtEvent->mAccessible);
       }
     }
   }
 
   // Fire reorder event at last.
   if (mFireReorder) {
     MOZ_ASSERT(mContainer);
     nsEventShell::FireEvent(nsIAccessibleEvent::EVENT_REORDER, mContainer);
@@ -351,17 +351,17 @@ EventTree::Clear()
   mFirst = nullptr;
   mNext = nullptr;
   mContainer = nullptr;
 
   uint32_t eventsCount = mDependentEvents.Length();
   for (uint32_t jdx = 0; jdx < eventsCount; jdx++) {
     AccHideEvent* ev = downcast_accEvent(mDependentEvents[jdx]);
     if (ev && ev->NeedsShutdown()) {
-      ev->GetDocAccessible()->ShutdownChildrenInSubtree(ev->mAccessible);
+      ev->Document()->ShutdownChildrenInSubtree(ev->mAccessible);
     }
   }
   mDependentEvents.Clear();
 }
 
 const EventTree*
 EventTree::Find(const Accessible* aContainer) const
 {
--- a/accessible/base/FocusManager.cpp
+++ b/accessible/base/FocusManager.cpp
@@ -274,17 +274,17 @@ FocusManager::ProcessFocusEvent(AccEvent
 
   // Emit focus event if event target is the active item. Otherwise then check
   // if it's still focused and then update active item and emit focus event.
   Accessible* target = aEvent->GetAccessible();
   if (target != mActiveItem) {
 
     // Check if still focused. Otherwise we can end up with storing the active
     // item for control that isn't focused anymore.
-    DocAccessible* document = aEvent->GetDocAccessible();
+    DocAccessible* document = aEvent->Document();
     nsINode* focusedNode = FocusedDOMNode();
     if (!focusedNode)
       return;
 
     Accessible* DOMFocus =
       document->GetAccessibleEvenIfNotInMapOrContainer(focusedNode);
     if (target != DOMFocus)
       return;