Bug 982602 Rename ns(LoadBlocking)AsyncDOMEvent to mozilla::(LoadBlocking)AsyncEventDispatcher r=smaug

This commit is contained in:
Masayuki Nakano
2014-03-17 15:56:54 +09:00
parent 7d68458899
commit d9b6788894
27 changed files with 270 additions and 237 deletions

View File

@@ -3,6 +3,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "mozilla/AsyncEventDispatcher.h"
#include "nsCOMPtr.h"
#include "nsTreeSelection.h"
#include "nsIBoxObject.h"
@@ -14,11 +15,12 @@
#include "nsIContent.h"
#include "nsNameSpaceManager.h"
#include "nsGkAtoms.h"
#include "nsAsyncDOMEvent.h"
#include "nsEventDispatcher.h"
#include "nsAutoPtr.h"
#include "nsComponentManagerUtils.h"
using namespace mozilla;
// A helper class for managing our ranges of selection.
struct nsTreeRange
{
@@ -650,11 +652,12 @@ NS_IMETHODIMP nsTreeSelection::SetCurrentIndex(int32_t aIndex)
NS_NAMED_LITERAL_STRING(DOMMenuItemActive, "DOMMenuItemActive");
NS_NAMED_LITERAL_STRING(DOMMenuItemInactive, "DOMMenuItemInactive");
nsRefPtr<nsAsyncDOMEvent> event =
new nsAsyncDOMEvent(treeDOMNode,
(aIndex != -1 ? DOMMenuItemActive : DOMMenuItemInactive),
true, false);
return event->PostDOMEvent();
nsRefPtr<AsyncEventDispatcher> asyncDispatcher =
new AsyncEventDispatcher(treeDOMNode,
(aIndex != -1 ? DOMMenuItemActive :
DOMMenuItemInactive),
true, false);
return asyncDispatcher->PostDOMEvent();
}
NS_IMETHODIMP nsTreeSelection::GetCurrentColumn(nsITreeColumn** aCurrentColumn)
@@ -838,9 +841,9 @@ nsTreeSelection::FireOnSelectHandler()
nsCOMPtr<nsINode> node(do_QueryInterface(elt));
NS_ENSURE_STATE(node);
nsRefPtr<nsAsyncDOMEvent> event =
new nsAsyncDOMEvent(node, NS_LITERAL_STRING("select"), true, false);
event->RunDOMEventWhenSafe();
nsRefPtr<AsyncEventDispatcher> asyncDispatcher =
new AsyncEventDispatcher(node, NS_LITERAL_STRING("select"), true, false);
asyncDispatcher->RunDOMEventWhenSafe();
return NS_OK;
}