mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Only assert that we have a non-null frame if this event requires a frame. b=374229 r=emaijala sr=roc
This commit is contained in:
parent
42d130d286
commit
a8f510b62f
@ -2026,14 +2026,22 @@ nsEventStateManager::PostHandleEvent(nsPresContext* aPresContext,
|
||||
{
|
||||
NS_ENSURE_ARG(aPresContext);
|
||||
NS_ENSURE_ARG_POINTER(aStatus);
|
||||
|
||||
mCurrentTarget = aTargetFrame;
|
||||
mCurrentTargetContent = nsnull;
|
||||
nsresult ret = NS_OK;
|
||||
|
||||
// All the events we handle below requires a frame.
|
||||
if (!mCurrentTarget) {
|
||||
if (NS_EVENT_NEEDS_FRAME(aEvent)) {
|
||||
NS_ERROR("Null frame for an event that requires a frame");
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
//Keep the prescontext alive, we might need it after event dispatch
|
||||
nsRefPtr<nsPresContext> presContext = aPresContext;
|
||||
|
||||
NS_ASSERTION(mCurrentTarget, "mCurrentTarget is null");
|
||||
if (!mCurrentTarget) return NS_ERROR_NULL_POINTER;
|
||||
nsresult ret = NS_OK;
|
||||
|
||||
switch (aEvent->message) {
|
||||
case NS_MOUSE_BUTTON_DOWN:
|
||||
|
Loading…
Reference in New Issue
Block a user