зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
d24c99d63f
Коммит
8a1839feca
|
@ -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:
|
||||
|
|
Загрузка…
Ссылка в новой задаче