зеркало из https://github.com/mozilla/gecko-dev.git
Bug 334573 - Renamed all references of nsPLDOMEvent to nsAsyncDOMEvent. r=sicking
--HG-- rename : content/events/public/nsPLDOMEvent.h => content/events/public/nsAsyncDOMEvent.h rename : content/events/src/nsPLDOMEvent.cpp => content/events/src/nsAsyncDOMEvent.cpp
This commit is contained in:
Родитель
64127191a0
Коммит
3a92e01012
|
@ -59,7 +59,7 @@
|
|||
#include "nsTextNode.h"
|
||||
#include "mozAutoDocUpdate.h"
|
||||
#include "nsMutationEvent.h"
|
||||
#include "nsPLDOMEvent.h"
|
||||
#include "nsAsyncDOMEvent.h"
|
||||
#include "nsWrapperCacheInlines.h"
|
||||
|
||||
using namespace mozilla::dom;
|
||||
|
|
|
@ -72,7 +72,7 @@
|
|||
#include "nsCOMArray.h"
|
||||
|
||||
#include "nsGUIEvent.h"
|
||||
#include "nsPLDOMEvent.h"
|
||||
#include "nsAsyncDOMEvent.h"
|
||||
|
||||
#include "nsIDOMStyleSheet.h"
|
||||
#include "nsDOMAttribute.h"
|
||||
|
@ -7451,7 +7451,7 @@ nsDocument::MutationEventDispatched(nsINode* aTarget)
|
|||
PRInt32 realTargetCount = realTargets.Count();
|
||||
for (PRInt32 k = 0; k < realTargetCount; ++k) {
|
||||
nsMutationEvent mutation(true, NS_MUTATION_SUBTREEMODIFIED);
|
||||
(new nsPLDOMEvent(realTargets[k], mutation))->RunDOMEventWhenSafe();
|
||||
(new nsAsyncDOMEvent(realTargets[k], mutation))->RunDOMEventWhenSafe();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -7598,8 +7598,8 @@ nsDocument::SetReadyStateInternal(ReadyState rs)
|
|||
mLoadingTimeStamp = mozilla::TimeStamp::Now();
|
||||
}
|
||||
|
||||
nsRefPtr<nsPLDOMEvent> plevent =
|
||||
new nsPLDOMEvent(this, NS_LITERAL_STRING("readystatechange"), false, false);
|
||||
nsRefPtr<nsAsyncDOMEvent> plevent =
|
||||
new nsAsyncDOMEvent(this, NS_LITERAL_STRING("readystatechange"), false, false);
|
||||
if (plevent) {
|
||||
plevent->RunDOMEventWhenSafe();
|
||||
}
|
||||
|
@ -8453,11 +8453,11 @@ nsIDocument::SizeOf() const
|
|||
static void
|
||||
DispatchFullScreenChange(nsIDocument* aTarget)
|
||||
{
|
||||
nsRefPtr<nsPLDOMEvent> e =
|
||||
new nsPLDOMEvent(aTarget,
|
||||
NS_LITERAL_STRING("mozfullscreenchange"),
|
||||
true,
|
||||
false);
|
||||
nsRefPtr<nsAsyncDOMEvent> e =
|
||||
new nsAsyncDOMEvent(aTarget,
|
||||
NS_LITERAL_STRING("mozfullscreenchange"),
|
||||
true,
|
||||
false);
|
||||
e->PostDOMEvent();
|
||||
}
|
||||
|
||||
|
@ -8702,11 +8702,11 @@ LogFullScreenDenied(bool aLogFailure, const char* aMessage, nsIDocument* aDoc)
|
|||
if (!aLogFailure) {
|
||||
return;
|
||||
}
|
||||
nsRefPtr<nsPLDOMEvent> e =
|
||||
new nsPLDOMEvent(aDoc,
|
||||
NS_LITERAL_STRING("mozfullscreenerror"),
|
||||
true,
|
||||
false);
|
||||
nsRefPtr<nsAsyncDOMEvent> e =
|
||||
new nsAsyncDOMEvent(aDoc,
|
||||
NS_LITERAL_STRING("mozfullscreenerror"),
|
||||
true,
|
||||
false);
|
||||
e->PostDOMEvent();
|
||||
nsContentUtils::ReportToConsole(nsIScriptError::warningFlag,
|
||||
"DOM", aDoc,
|
||||
|
|
|
@ -90,7 +90,7 @@
|
|||
|
||||
#include "nsLayoutUtils.h"
|
||||
#include "nsIView.h"
|
||||
#include "nsPLDOMEvent.h"
|
||||
#include "nsAsyncDOMEvent.h"
|
||||
|
||||
#include "nsIURI.h"
|
||||
#include "nsIURL.h"
|
||||
|
@ -399,7 +399,7 @@ void
|
|||
nsFrameLoader::FireErrorEvent()
|
||||
{
|
||||
if (mOwnerContent) {
|
||||
nsRefPtr<nsPLDOMEvent> event =
|
||||
nsRefPtr<nsAsyncDOMEvent> event =
|
||||
new nsLoadBlockingPLDOMEvent(mOwnerContent, NS_LITERAL_STRING("error"),
|
||||
false, false);
|
||||
event->PostDOMEvent();
|
||||
|
|
|
@ -62,7 +62,7 @@
|
|||
#include "nsBindingManager.h"
|
||||
#include "nsCCUncollectableMarker.h"
|
||||
#include "mozAutoDocUpdate.h"
|
||||
#include "nsPLDOMEvent.h"
|
||||
#include "nsAsyncDOMEvent.h"
|
||||
|
||||
#include "pldhash.h"
|
||||
#include "prprf.h"
|
||||
|
@ -387,7 +387,7 @@ nsGenericDOMDataNode::SetTextInternal(PRUint32 aOffset, PRUint32 aCount,
|
|||
}
|
||||
|
||||
mozAutoSubtreeModified subtree(OwnerDoc(), this);
|
||||
(new nsPLDOMEvent(this, mutation))->RunDOMEventWhenSafe();
|
||||
(new nsAsyncDOMEvent(this, mutation))->RunDOMEventWhenSafe();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -132,7 +132,7 @@
|
|||
#include "mozilla/css/StyleRule.h" /* For nsCSSSelectorList */
|
||||
#include "nsCSSRuleProcessor.h"
|
||||
#include "nsRuleProcessorData.h"
|
||||
#include "nsPLDOMEvent.h"
|
||||
#include "nsAsyncDOMEvent.h"
|
||||
#include "nsTextNode.h"
|
||||
#include "dombindings.h"
|
||||
|
||||
|
@ -3650,7 +3650,7 @@ nsINode::doInsertChildAt(nsIContent* aKid, PRUint32 aIndex,
|
|||
mutation.mRelatedNode = do_QueryInterface(this);
|
||||
|
||||
mozAutoSubtreeModified subtree(OwnerDoc(), this);
|
||||
(new nsPLDOMEvent(aKid, mutation))->RunDOMEventWhenSafe();
|
||||
(new nsAsyncDOMEvent(aKid, mutation))->RunDOMEventWhenSafe();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3995,7 +3995,7 @@ nsGenericElement::FireNodeInserted(nsIDocument* aDoc,
|
|||
mutation.mRelatedNode = do_QueryInterface(aParent);
|
||||
|
||||
mozAutoSubtreeModified subtree(aDoc, aParent);
|
||||
(new nsPLDOMEvent(childContent, mutation))->RunDOMEventWhenSafe();
|
||||
(new nsAsyncDOMEvent(childContent, mutation))->RunDOMEventWhenSafe();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -4670,7 +4670,7 @@ nsGenericElement::SetAttrAndNotify(PRInt32 aNamespaceID,
|
|||
mutation.mAttrChange = aModType;
|
||||
|
||||
mozAutoSubtreeModified subtree(OwnerDoc(), this);
|
||||
(new nsPLDOMEvent(this, mutation))->RunDOMEventWhenSafe();
|
||||
(new nsAsyncDOMEvent(this, mutation))->RunDOMEventWhenSafe();
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
|
@ -4884,7 +4884,7 @@ nsGenericElement::UnsetAttr(PRInt32 aNameSpaceID, nsIAtom* aName,
|
|||
mutation.mAttrChange = nsIDOMMutationEvent::REMOVAL;
|
||||
|
||||
mozAutoSubtreeModified subtree(OwnerDoc(), this);
|
||||
(new nsPLDOMEvent(this, mutation))->RunDOMEventWhenSafe();
|
||||
(new nsAsyncDOMEvent(this, mutation))->RunDOMEventWhenSafe();
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
|
|
|
@ -59,7 +59,7 @@
|
|||
#include "imgILoader.h"
|
||||
#include "nsThreadUtils.h"
|
||||
#include "nsNetUtil.h"
|
||||
#include "nsPLDOMEvent.h"
|
||||
#include "nsAsyncDOMEvent.h"
|
||||
|
||||
#include "nsIPresShell.h"
|
||||
#include "nsEventStates.h"
|
||||
|
@ -969,7 +969,7 @@ nsImageLoadingContent::FireEvent(const nsAString& aEventType)
|
|||
|
||||
nsCOMPtr<nsINode> thisNode = do_QueryInterface(this);
|
||||
|
||||
nsRefPtr<nsPLDOMEvent> event =
|
||||
nsRefPtr<nsAsyncDOMEvent> event =
|
||||
new nsLoadBlockingPLDOMEvent(thisNode, aEventType, false, false);
|
||||
event->PostDOMEvent();
|
||||
|
||||
|
|
|
@ -50,7 +50,7 @@ EXPORTS = \
|
|||
nsIPrivateDOMEvent.h \
|
||||
nsIPrivateTextEvent.h \
|
||||
nsIPrivateTextRange.h \
|
||||
nsPLDOMEvent.h \
|
||||
nsAsyncDOMEvent.h \
|
||||
nsEventDispatcher.h \
|
||||
nsEventStates.h \
|
||||
nsEventNameList.h \
|
||||
|
|
|
@ -35,8 +35,8 @@
|
|||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifndef nsPLDOMEvent_h___
|
||||
#define nsPLDOMEvent_h___
|
||||
#ifndef nsAsyncDOMEvent_h___
|
||||
#define nsAsyncDOMEvent_h___
|
||||
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsThreadUtils.h"
|
||||
|
@ -46,30 +46,26 @@
|
|||
#include "nsIDocument.h"
|
||||
|
||||
/**
|
||||
* Use nsPLDOMEvent to fire a DOM event that requires safe a stable DOM.
|
||||
* Use nsAsyncDOMEvent to fire a DOM event that requires safe a stable DOM.
|
||||
* For example, you may need to fire an event from within layout, but
|
||||
* want to ensure that the event handler doesn't mutate the DOM at
|
||||
* the wrong time, in order to avoid resulting instability.
|
||||
*
|
||||
* TODO: This should be renamed nsAsyncDOMEvent or something that does
|
||||
* not include the substring "PL" that refers to the old PLEvent
|
||||
* structure used with the old eventing system. See bug 334573.
|
||||
*/
|
||||
|
||||
class nsPLDOMEvent : public nsRunnable {
|
||||
class nsAsyncDOMEvent : public nsRunnable {
|
||||
public:
|
||||
nsPLDOMEvent(nsINode *aEventNode, const nsAString& aEventType,
|
||||
bool aBubbles, bool aDispatchChromeOnly)
|
||||
nsAsyncDOMEvent(nsINode *aEventNode, const nsAString& aEventType,
|
||||
bool aBubbles, bool aDispatchChromeOnly)
|
||||
: mEventNode(aEventNode), mEventType(aEventType),
|
||||
mBubbles(aBubbles),
|
||||
mDispatchChromeOnly(aDispatchChromeOnly)
|
||||
{ }
|
||||
|
||||
nsPLDOMEvent(nsINode *aEventNode, nsIDOMEvent *aEvent)
|
||||
nsAsyncDOMEvent(nsINode *aEventNode, nsIDOMEvent *aEvent)
|
||||
: mEventNode(aEventNode), mEvent(aEvent), mDispatchChromeOnly(false)
|
||||
{ }
|
||||
|
||||
nsPLDOMEvent(nsINode *aEventNode, nsEvent &aEvent);
|
||||
nsAsyncDOMEvent(nsINode *aEventNode, nsEvent &aEvent);
|
||||
|
||||
NS_IMETHOD Run();
|
||||
nsresult PostDOMEvent();
|
||||
|
@ -82,11 +78,11 @@ public:
|
|||
bool mDispatchChromeOnly;
|
||||
};
|
||||
|
||||
class nsLoadBlockingPLDOMEvent : public nsPLDOMEvent {
|
||||
class nsLoadBlockingPLDOMEvent : public nsAsyncDOMEvent {
|
||||
public:
|
||||
nsLoadBlockingPLDOMEvent(nsINode *aEventNode, const nsAString& aEventType,
|
||||
bool aBubbles, bool aDispatchChromeOnly)
|
||||
: nsPLDOMEvent(aEventNode, aEventType, aBubbles, aDispatchChromeOnly),
|
||||
: nsAsyncDOMEvent(aEventNode, aEventType, aBubbles, aDispatchChromeOnly),
|
||||
mBlockedDoc(aEventNode->OwnerDoc())
|
||||
{
|
||||
if (mBlockedDoc) {
|
||||
|
@ -95,7 +91,7 @@ public:
|
|||
}
|
||||
|
||||
nsLoadBlockingPLDOMEvent(nsINode *aEventNode, nsIDOMEvent *aEvent)
|
||||
: nsPLDOMEvent(aEventNode, aEvent),
|
||||
: nsAsyncDOMEvent(aEventNode, aEvent),
|
||||
mBlockedDoc(aEventNode->OwnerDoc())
|
||||
{
|
||||
if (mBlockedDoc) {
|
|
@ -76,7 +76,7 @@ CPPSRCS = \
|
|||
nsPrivateTextRange.cpp \
|
||||
nsXMLEventsManager.cpp \
|
||||
nsXMLEventsElement.cpp \
|
||||
nsPLDOMEvent.cpp \
|
||||
nsAsyncDOMEvent.cpp \
|
||||
nsEventDispatcher.cpp \
|
||||
nsIMEStateManager.cpp \
|
||||
nsContentEventHandler.cpp \
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "nsPLDOMEvent.h"
|
||||
#include "nsAsyncDOMEvent.h"
|
||||
#include "nsIDOMEvent.h"
|
||||
#include "nsIPrivateDOMEvent.h"
|
||||
#include "nsIDOMDocument.h"
|
||||
|
@ -44,7 +44,7 @@
|
|||
#include "nsEventDispatcher.h"
|
||||
#include "nsGUIEvent.h"
|
||||
|
||||
nsPLDOMEvent::nsPLDOMEvent(nsINode *aEventNode, nsEvent &aEvent)
|
||||
nsAsyncDOMEvent::nsAsyncDOMEvent(nsINode *aEventNode, nsEvent &aEvent)
|
||||
: mEventNode(aEventNode), mDispatchChromeOnly(false)
|
||||
{
|
||||
bool trusted = NS_IS_TRUSTED_EVENT(&aEvent);
|
||||
|
@ -57,7 +57,7 @@ nsPLDOMEvent::nsPLDOMEvent(nsINode *aEventNode, nsEvent &aEvent)
|
|||
priv->SetTrusted(trusted);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsPLDOMEvent::Run()
|
||||
NS_IMETHODIMP nsAsyncDOMEvent::Run()
|
||||
{
|
||||
if (!mEventNode) {
|
||||
return NS_OK;
|
||||
|
@ -82,12 +82,12 @@ NS_IMETHODIMP nsPLDOMEvent::Run()
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult nsPLDOMEvent::PostDOMEvent()
|
||||
nsresult nsAsyncDOMEvent::PostDOMEvent()
|
||||
{
|
||||
return NS_DispatchToCurrentThread(this);
|
||||
}
|
||||
|
||||
void nsPLDOMEvent::RunDOMEventWhenSafe()
|
||||
void nsAsyncDOMEvent::RunDOMEventWhenSafe()
|
||||
{
|
||||
nsContentUtils::AddScriptRunner(this);
|
||||
}
|
|
@ -118,7 +118,7 @@
|
|||
#include "mozilla/dom/Element.h"
|
||||
#include "nsHTMLFieldSetElement.h"
|
||||
#include "nsHTMLMenuElement.h"
|
||||
#include "nsPLDOMEvent.h"
|
||||
#include "nsAsyncDOMEvent.h"
|
||||
#include "nsIScriptError.h"
|
||||
|
||||
#include "mozilla/Preferences.h"
|
||||
|
@ -3474,11 +3474,11 @@ nsresult nsGenericHTMLElement::MozRequestFullScreen()
|
|||
"DOM", OwnerDoc(),
|
||||
nsContentUtils::eDOM_PROPERTIES,
|
||||
"FullScreenDeniedNotInputDriven");
|
||||
nsRefPtr<nsPLDOMEvent> e =
|
||||
new nsPLDOMEvent(OwnerDoc(),
|
||||
NS_LITERAL_STRING("mozfullscreenerror"),
|
||||
true,
|
||||
false);
|
||||
nsRefPtr<nsAsyncDOMEvent> e =
|
||||
new nsAsyncDOMEvent(OwnerDoc(),
|
||||
NS_LITERAL_STRING("mozfullscreenerror"),
|
||||
true,
|
||||
false);
|
||||
e->PostDOMEvent();
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
|
@ -55,7 +55,7 @@
|
|||
#include "nsParserUtils.h"
|
||||
#include "nsContentUtils.h"
|
||||
#include "nsPIDOMWindow.h"
|
||||
#include "nsPLDOMEvent.h"
|
||||
#include "nsAsyncDOMEvent.h"
|
||||
|
||||
#include "Link.h"
|
||||
using namespace mozilla::dom;
|
||||
|
@ -279,8 +279,8 @@ nsHTMLLinkElement::CreateAndDispatchEvent(nsIDocument* aDoc,
|
|||
strings, eIgnoreCase) != ATTR_VALUE_NO_MATCH)
|
||||
return;
|
||||
|
||||
nsRefPtr<nsPLDOMEvent> event = new nsPLDOMEvent(this, aEventName, true,
|
||||
true);
|
||||
nsRefPtr<nsAsyncDOMEvent> event = new nsAsyncDOMEvent(this, aEventName, true,
|
||||
true);
|
||||
// Always run async in order to avoid running script when the content
|
||||
// sink isn't expecting it.
|
||||
event->PostDOMEvent();
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
#include "nsGenericHTMLElement.h"
|
||||
#include "nsGkAtoms.h"
|
||||
#include "nsStyleConsts.h"
|
||||
#include "nsPLDOMEvent.h"
|
||||
#include "nsAsyncDOMEvent.h"
|
||||
#include "nsContentUtils.h"
|
||||
|
||||
|
||||
|
@ -148,7 +148,7 @@ nsHTMLMetaElement::CreateAndDispatchEvent(nsIDocument* aDoc,
|
|||
if (!aDoc)
|
||||
return;
|
||||
|
||||
nsRefPtr<nsPLDOMEvent> event = new nsPLDOMEvent(this, aEventName, true,
|
||||
true);
|
||||
nsRefPtr<nsAsyncDOMEvent> event = new nsAsyncDOMEvent(this, aEventName, true,
|
||||
true);
|
||||
event->PostDOMEvent();
|
||||
}
|
||||
|
|
|
@ -115,7 +115,7 @@
|
|||
#include "nsContentUtils.h"
|
||||
#include "nsContentList.h"
|
||||
#include "nsMutationEvent.h"
|
||||
#include "nsPLDOMEvent.h"
|
||||
#include "nsAsyncDOMEvent.h"
|
||||
#include "nsIDOMMutationEvent.h"
|
||||
#include "nsPIDOMWindow.h"
|
||||
#include "nsDOMAttributeMap.h"
|
||||
|
@ -1458,7 +1458,7 @@ nsXULElement::UnsetAttr(PRInt32 aNameSpaceID, nsIAtom* aName, bool aNotify)
|
|||
mutation.mAttrChange = nsIDOMMutationEvent::REMOVAL;
|
||||
|
||||
mozAutoSubtreeModified subtree(OwnerDoc(), this);
|
||||
(new nsPLDOMEvent(this, mutation))->RunDOMEventWhenSafe();
|
||||
(new nsAsyncDOMEvent(this, mutation))->RunDOMEventWhenSafe();
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
|
|
|
@ -206,7 +206,7 @@
|
|||
#include "sampler.h"
|
||||
|
||||
#include "Layers.h"
|
||||
#include "nsPLDOMEvent.h"
|
||||
#include "nsAsyncDOMEvent.h"
|
||||
|
||||
#ifdef NS_FUNCTION_TIMER
|
||||
#define NS_TIME_FUNCTION_DECLARE_DOCURL \
|
||||
|
@ -6364,9 +6364,9 @@ PresShell::HandleEventInternal(nsEvent* aEvent, nsEventStatus* aStatus)
|
|||
// Restricted key press while in DOM full-screen mode. Dispatch
|
||||
// an event to chrome so it knows to show a warning message
|
||||
// informing the user how to exit full-screen.
|
||||
nsRefPtr<nsPLDOMEvent> e =
|
||||
new nsPLDOMEvent(doc, NS_LITERAL_STRING("MozShowFullScreenWarning"),
|
||||
true, true);
|
||||
nsRefPtr<nsAsyncDOMEvent> e =
|
||||
new nsAsyncDOMEvent(doc, NS_LITERAL_STRING("MozShowFullScreenWarning"),
|
||||
true, true);
|
||||
e->PostDOMEvent();
|
||||
}
|
||||
// Else not full-screen mode or key code is unrestricted, fall
|
||||
|
|
|
@ -87,7 +87,7 @@
|
|||
#include "nsDisplayList.h"
|
||||
#include "nsITheme.h"
|
||||
#include "nsThemeConstants.h"
|
||||
#include "nsPLDOMEvent.h"
|
||||
#include "nsAsyncDOMEvent.h"
|
||||
#include "nsRenderingContext.h"
|
||||
#include "mozilla/Preferences.h"
|
||||
|
||||
|
@ -1542,8 +1542,8 @@ void nsComboboxControlFrame::FireValueChangeEvent()
|
|||
{
|
||||
// Fire ValueChange event to indicate data value of combo box has changed
|
||||
nsContentUtils::AddScriptRunner(
|
||||
new nsPLDOMEvent(mContent, NS_LITERAL_STRING("ValueChange"), true,
|
||||
false));
|
||||
new nsAsyncDOMEvent(mContent, NS_LITERAL_STRING("ValueChange"), true,
|
||||
false));
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -62,7 +62,7 @@
|
|||
#include "nsCRT.h"
|
||||
#include "nsGUIEvent.h"
|
||||
#include "nsIDOMEvent.h"
|
||||
#include "nsPLDOMEvent.h"
|
||||
#include "nsAsyncDOMEvent.h"
|
||||
#include "nsStyleConsts.h"
|
||||
#include "nsIPresShell.h"
|
||||
#include "prlog.h"
|
||||
|
@ -2128,10 +2128,10 @@ nsFrame::FireDOMEvent(const nsAString& aDOMEventName, nsIContent *aContent)
|
|||
nsIContent* target = aContent ? aContent : mContent;
|
||||
|
||||
if (target) {
|
||||
nsRefPtr<nsPLDOMEvent> event =
|
||||
new nsPLDOMEvent(target, aDOMEventName, true, false);
|
||||
nsRefPtr<nsAsyncDOMEvent> event =
|
||||
new nsAsyncDOMEvent(target, aDOMEventName, true, false);
|
||||
if (NS_FAILED(event->PostDOMEvent()))
|
||||
NS_WARNING("Failed to dispatch nsPLDOMEvent");
|
||||
NS_WARNING("Failed to dispatch nsAsyncDOMEvent");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -63,7 +63,7 @@
|
|||
#include "nsStyleContext.h"
|
||||
#include "nsIBoxObject.h"
|
||||
#include "nsGUIEvent.h"
|
||||
#include "nsPLDOMEvent.h"
|
||||
#include "nsAsyncDOMEvent.h"
|
||||
#include "nsIDOMDataContainerEvent.h"
|
||||
#include "nsIDOMMouseEvent.h"
|
||||
#include "nsIPrivateDOMEvent.h"
|
||||
|
@ -4548,7 +4548,7 @@ nsTreeBodyFrame::FireRowCountChangedEvent(PRInt32 aIndex, PRInt32 aCount)
|
|||
|
||||
privateEvent->SetTrusted(true);
|
||||
|
||||
nsRefPtr<nsPLDOMEvent> plevent = new nsPLDOMEvent(content, event);
|
||||
nsRefPtr<nsAsyncDOMEvent> plevent = new nsAsyncDOMEvent(content, event);
|
||||
if (!plevent)
|
||||
return;
|
||||
|
||||
|
@ -4635,7 +4635,7 @@ nsTreeBodyFrame::FireInvalidateEvent(PRInt32 aStartRowIdx, PRInt32 aEndRowIdx,
|
|||
|
||||
privateEvent->SetTrusted(true);
|
||||
|
||||
nsRefPtr<nsPLDOMEvent> plevent = new nsPLDOMEvent(content, event);
|
||||
nsRefPtr<nsAsyncDOMEvent> plevent = new nsAsyncDOMEvent(content, event);
|
||||
if (plevent)
|
||||
plevent->PostDOMEvent();
|
||||
}
|
||||
|
|
|
@ -51,7 +51,7 @@
|
|||
#include "nsGUIEvent.h"
|
||||
#include "nsINameSpaceManager.h"
|
||||
#include "nsGkAtoms.h"
|
||||
#include "nsPLDOMEvent.h"
|
||||
#include "nsAsyncDOMEvent.h"
|
||||
#include "nsEventDispatcher.h"
|
||||
#include "nsAutoPtr.h"
|
||||
|
||||
|
@ -686,10 +686,10 @@ NS_IMETHODIMP nsTreeSelection::SetCurrentIndex(PRInt32 aIndex)
|
|||
NS_NAMED_LITERAL_STRING(DOMMenuItemActive, "DOMMenuItemActive");
|
||||
NS_NAMED_LITERAL_STRING(DOMMenuItemInactive, "DOMMenuItemInactive");
|
||||
|
||||
nsRefPtr<nsPLDOMEvent> event =
|
||||
new nsPLDOMEvent(treeDOMNode,
|
||||
nsRefPtr<nsAsyncDOMEvent> event =
|
||||
new nsAsyncDOMEvent(treeDOMNode,
|
||||
(aIndex != -1 ? DOMMenuItemActive : DOMMenuItemInactive),
|
||||
true, false);
|
||||
true, false);
|
||||
return event->PostDOMEvent();
|
||||
}
|
||||
|
||||
|
@ -874,8 +874,8 @@ nsTreeSelection::FireOnSelectHandler()
|
|||
nsCOMPtr<nsINode> node(do_QueryInterface(elt));
|
||||
NS_ENSURE_STATE(node);
|
||||
|
||||
nsRefPtr<nsPLDOMEvent> event =
|
||||
new nsPLDOMEvent(node, NS_LITERAL_STRING("select"), true, false);
|
||||
nsRefPtr<nsAsyncDOMEvent> event =
|
||||
new nsAsyncDOMEvent(node, NS_LITERAL_STRING("select"), true, false);
|
||||
event->RunDOMEventWhenSafe();
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче