зеркало из https://github.com/mozilla/pjs.git
Bug 253889: DeCOMtaminate nsIPresShell - Clean up unnecessary initialization in HandleEventWithTarget(). r=roc
--HG-- extra : rebase_source : 88fa8550cb112139008f04bee4ed6a0a5c7cb415
This commit is contained in:
Родитель
14722e7bf7
Коммит
a5e0d161b2
|
@ -127,8 +127,8 @@ typedef struct CapturingContentInfo {
|
||||||
} CapturingContentInfo;
|
} CapturingContentInfo;
|
||||||
|
|
||||||
#define NS_IPRESSHELL_IID \
|
#define NS_IPRESSHELL_IID \
|
||||||
{ 0x3c00dd85, 0xdc61, 0x4acc, \
|
{ 0x6736ae7e, 0x25f9, 0x4594, \
|
||||||
{ 0xa4, 0x0e, 0x9b, 0x91, 0xd2, 0xea, 0x4b, 0x27 } }
|
{ 0xb5, 0x26, 0x49, 0x39, 0x17, 0x63, 0x2f, 0x94 } }
|
||||||
|
|
||||||
// Constants for ScrollContentIntoView() function
|
// Constants for ScrollContentIntoView() function
|
||||||
#define NS_PRESSHELL_SCROLL_TOP 0
|
#define NS_PRESSHELL_SCROLL_TOP 0
|
||||||
|
@ -630,26 +630,26 @@ public:
|
||||||
* Interface to dispatch events via the presshell
|
* Interface to dispatch events via the presshell
|
||||||
* @note The caller must have a strong reference to the PresShell.
|
* @note The caller must have a strong reference to the PresShell.
|
||||||
*/
|
*/
|
||||||
NS_IMETHOD HandleEventWithTarget(nsEvent* aEvent,
|
virtual NS_HIDDEN_(nsresult) HandleEventWithTarget(nsEvent* aEvent,
|
||||||
nsIFrame* aFrame,
|
nsIFrame* aFrame,
|
||||||
nsIContent* aContent,
|
nsIContent* aContent,
|
||||||
nsEventStatus* aStatus) = 0;
|
nsEventStatus* aStatus) = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Dispatch event to content only (NOT full processing)
|
* Dispatch event to content only (NOT full processing)
|
||||||
* @note The caller must have a strong reference to the PresShell.
|
* @note The caller must have a strong reference to the PresShell.
|
||||||
*/
|
*/
|
||||||
NS_IMETHOD HandleDOMEventWithTarget(nsIContent* aTargetContent,
|
virtual NS_HIDDEN_(nsresult) HandleDOMEventWithTarget(nsIContent* aTargetContent,
|
||||||
nsEvent* aEvent,
|
nsEvent* aEvent,
|
||||||
nsEventStatus* aStatus) = 0;
|
nsEventStatus* aStatus) = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Dispatch event to content only (NOT full processing)
|
* Dispatch event to content only (NOT full processing)
|
||||||
* @note The caller must have a strong reference to the PresShell.
|
* @note The caller must have a strong reference to the PresShell.
|
||||||
*/
|
*/
|
||||||
NS_IMETHOD HandleDOMEventWithTarget(nsIContent* aTargetContent,
|
virtual NS_HIDDEN_(nsresult) HandleDOMEventWithTarget(nsIContent* aTargetContent,
|
||||||
nsIDOMEvent* aEvent,
|
nsIDOMEvent* aEvent,
|
||||||
nsEventStatus* aStatus) = 0;
|
nsEventStatus* aStatus) = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the current target event frame from the PresShell
|
* Gets the current target event frame from the PresShell
|
||||||
|
|
|
@ -752,9 +752,9 @@ public:
|
||||||
virtual nsresult AddOverrideStyleSheet(nsIStyleSheet *aSheet);
|
virtual nsresult AddOverrideStyleSheet(nsIStyleSheet *aSheet);
|
||||||
virtual nsresult RemoveOverrideStyleSheet(nsIStyleSheet *aSheet);
|
virtual nsresult RemoveOverrideStyleSheet(nsIStyleSheet *aSheet);
|
||||||
|
|
||||||
NS_IMETHOD HandleEventWithTarget(nsEvent* aEvent, nsIFrame* aFrame,
|
virtual NS_HIDDEN_(nsresult) HandleEventWithTarget(nsEvent* aEvent, nsIFrame* aFrame,
|
||||||
nsIContent* aContent,
|
nsIContent* aContent,
|
||||||
nsEventStatus* aStatus);
|
nsEventStatus* aStatus);
|
||||||
virtual NS_HIDDEN_(nsIFrame*) GetEventTargetFrame();
|
virtual NS_HIDDEN_(nsIFrame*) GetEventTargetFrame();
|
||||||
virtual NS_HIDDEN_(already_AddRefed<nsIContent>) GetEventTargetContent(nsEvent* aEvent);
|
virtual NS_HIDDEN_(already_AddRefed<nsIContent>) GetEventTargetContent(nsEvent* aEvent);
|
||||||
|
|
||||||
|
@ -795,12 +795,12 @@ public:
|
||||||
NS_IMETHOD HandleEvent(nsIView* aView,
|
NS_IMETHOD HandleEvent(nsIView* aView,
|
||||||
nsGUIEvent* aEvent,
|
nsGUIEvent* aEvent,
|
||||||
nsEventStatus* aEventStatus);
|
nsEventStatus* aEventStatus);
|
||||||
NS_IMETHOD HandleDOMEventWithTarget(nsIContent* aTargetContent,
|
virtual NS_HIDDEN_(nsresult) HandleDOMEventWithTarget(nsIContent* aTargetContent,
|
||||||
nsEvent* aEvent,
|
nsEvent* aEvent,
|
||||||
nsEventStatus* aStatus);
|
nsEventStatus* aStatus);
|
||||||
NS_IMETHOD HandleDOMEventWithTarget(nsIContent* aTargetContent,
|
virtual NS_HIDDEN_(nsresult) HandleDOMEventWithTarget(nsIContent* aTargetContent,
|
||||||
nsIDOMEvent* aEvent,
|
nsIDOMEvent* aEvent,
|
||||||
nsEventStatus* aStatus);
|
nsEventStatus* aStatus);
|
||||||
NS_IMETHOD ResizeReflow(nsIView *aView, nscoord aWidth, nscoord aHeight);
|
NS_IMETHOD ResizeReflow(nsIView *aView, nscoord aWidth, nscoord aHeight);
|
||||||
NS_IMETHOD_(PRBool) IsVisible();
|
NS_IMETHOD_(PRBool) IsVisible();
|
||||||
NS_IMETHOD_(void) WillPaint();
|
NS_IMETHOD_(void) WillPaint();
|
||||||
|
@ -6285,16 +6285,14 @@ PresShell::HandlePositionedEvent(nsIView* aView,
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
nsresult
|
||||||
PresShell::HandleEventWithTarget(nsEvent* aEvent, nsIFrame* aFrame,
|
PresShell::HandleEventWithTarget(nsEvent* aEvent, nsIFrame* aFrame,
|
||||||
nsIContent* aContent, nsEventStatus* aStatus)
|
nsIContent* aContent, nsEventStatus* aStatus)
|
||||||
{
|
{
|
||||||
nsresult ret;
|
|
||||||
|
|
||||||
PushCurrentEventInfo(aFrame, aContent);
|
PushCurrentEventInfo(aFrame, aContent);
|
||||||
ret = HandleEventInternal(aEvent, nsnull, aStatus);
|
nsresult rv = HandleEventInternal(aEvent, nsnull, aStatus);
|
||||||
PopCurrentEventInfo();
|
PopCurrentEventInfo();
|
||||||
return NS_OK;
|
return rv;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline PRBool
|
static inline PRBool
|
||||||
|
@ -6466,10 +6464,12 @@ PresShell::HandleEventInternal(nsEvent* aEvent, nsIView *aView,
|
||||||
|
|
||||||
// Dispatch event to content only (NOT full processing)
|
// Dispatch event to content only (NOT full processing)
|
||||||
// See also HandleEventWithTarget which does full event processing.
|
// See also HandleEventWithTarget which does full event processing.
|
||||||
NS_IMETHODIMP
|
nsresult
|
||||||
PresShell::HandleDOMEventWithTarget(nsIContent* aTargetContent, nsEvent* aEvent,
|
PresShell::HandleDOMEventWithTarget(nsIContent* aTargetContent, nsEvent* aEvent,
|
||||||
nsEventStatus* aStatus)
|
nsEventStatus* aStatus)
|
||||||
{
|
{
|
||||||
|
nsresult rv = NS_OK;
|
||||||
|
|
||||||
PushCurrentEventInfo(nsnull, aTargetContent);
|
PushCurrentEventInfo(nsnull, aTargetContent);
|
||||||
|
|
||||||
// Bug 41013: Check if the event should be dispatched to content.
|
// Bug 41013: Check if the event should be dispatched to content.
|
||||||
|
@ -6481,29 +6481,31 @@ PresShell::HandleDOMEventWithTarget(nsIContent* aTargetContent, nsEvent* aEvent,
|
||||||
if (container) {
|
if (container) {
|
||||||
|
|
||||||
// Dispatch event to content
|
// Dispatch event to content
|
||||||
nsEventDispatcher::Dispatch(aTargetContent, mPresContext, aEvent, nsnull,
|
rv = nsEventDispatcher::Dispatch(aTargetContent, mPresContext, aEvent, nsnull,
|
||||||
aStatus);
|
aStatus);
|
||||||
}
|
}
|
||||||
|
|
||||||
PopCurrentEventInfo();
|
PopCurrentEventInfo();
|
||||||
return NS_OK;
|
return rv;
|
||||||
}
|
}
|
||||||
|
|
||||||
// See the method above.
|
// See the method above.
|
||||||
NS_IMETHODIMP
|
nsresult
|
||||||
PresShell::HandleDOMEventWithTarget(nsIContent* aTargetContent,
|
PresShell::HandleDOMEventWithTarget(nsIContent* aTargetContent,
|
||||||
nsIDOMEvent* aEvent,
|
nsIDOMEvent* aEvent,
|
||||||
nsEventStatus* aStatus)
|
nsEventStatus* aStatus)
|
||||||
{
|
{
|
||||||
|
nsresult rv = NS_OK;
|
||||||
|
|
||||||
PushCurrentEventInfo(nsnull, aTargetContent);
|
PushCurrentEventInfo(nsnull, aTargetContent);
|
||||||
nsCOMPtr<nsISupports> container = mPresContext->GetContainer();
|
nsCOMPtr<nsISupports> container = mPresContext->GetContainer();
|
||||||
if (container) {
|
if (container) {
|
||||||
nsEventDispatcher::DispatchDOMEvent(aTargetContent, nsnull, aEvent,
|
rv = nsEventDispatcher::DispatchDOMEvent(aTargetContent, nsnull, aEvent,
|
||||||
mPresContext, aStatus);
|
mPresContext, aStatus);
|
||||||
}
|
}
|
||||||
|
|
||||||
PopCurrentEventInfo();
|
PopCurrentEventInfo();
|
||||||
return NS_OK;
|
return rv;
|
||||||
}
|
}
|
||||||
|
|
||||||
PRBool
|
PRBool
|
||||||
|
|
Загрузка…
Ссылка в новой задаче