diff --git a/mozilla/layout/base/nsPresShell.cpp b/mozilla/layout/base/nsPresShell.cpp index ff6b8fc4855..b7824182755 100644 --- a/mozilla/layout/base/nsPresShell.cpp +++ b/mozilla/layout/base/nsPresShell.cpp @@ -6098,22 +6098,14 @@ PresShell::HandleEventInternal(nsEvent* aEvent, nsIView *aView, } } + // Continue with second dispatch to system event handlers. + // Stopping propagation in the default group does not affect // propagation in the system event group. // (see also section 1.2.2.6 of the DOM3 Events Working Draft) aEvent->flags &= ~NS_EVENT_FLAG_STOP_DISPATCH; - // 3. Give event to the Frames for browser default processing. - // XXX The event isn't translated into the local coordinate space - // of the frame... - if (aEvent->eventStructType != NS_EVENT && GetCurrentEventFrame()) { - rv = mCurrentEventFrame->HandleEvent(mPresContext, (nsGUIEvent*)aEvent, - aStatus); - } - - // Continue with second dispatch to system event handlers. - // Need to null check mCurrentEventContent and mCurrentEventFrame // since the previous dispatch could have nuked them. if (mCurrentEventContent) { @@ -6132,6 +6124,15 @@ PresShell::HandleEventInternal(nsEvent* aEvent, nsIView *aView, } } + // 3. Give event to the Frames for browser default processing. + // XXX The event isn't translated into the local coordinate space + // of the frame... + if (GetCurrentEventFrame() && NS_SUCCEEDED (rv) && + aEvent->eventStructType != NS_EVENT) { + rv = mCurrentEventFrame->HandleEvent(mPresContext, (nsGUIEvent*)aEvent, + aStatus); + } + // 4. Give event to event manager for post event state changes and // generation of synthetic events. if (NS_SUCCEEDED (rv) && diff --git a/mozilla/layout/html/base/src/nsPresShell.cpp b/mozilla/layout/html/base/src/nsPresShell.cpp index ff6b8fc4855..b7824182755 100644 --- a/mozilla/layout/html/base/src/nsPresShell.cpp +++ b/mozilla/layout/html/base/src/nsPresShell.cpp @@ -6098,22 +6098,14 @@ PresShell::HandleEventInternal(nsEvent* aEvent, nsIView *aView, } } + // Continue with second dispatch to system event handlers. + // Stopping propagation in the default group does not affect // propagation in the system event group. // (see also section 1.2.2.6 of the DOM3 Events Working Draft) aEvent->flags &= ~NS_EVENT_FLAG_STOP_DISPATCH; - // 3. Give event to the Frames for browser default processing. - // XXX The event isn't translated into the local coordinate space - // of the frame... - if (aEvent->eventStructType != NS_EVENT && GetCurrentEventFrame()) { - rv = mCurrentEventFrame->HandleEvent(mPresContext, (nsGUIEvent*)aEvent, - aStatus); - } - - // Continue with second dispatch to system event handlers. - // Need to null check mCurrentEventContent and mCurrentEventFrame // since the previous dispatch could have nuked them. if (mCurrentEventContent) { @@ -6132,6 +6124,15 @@ PresShell::HandleEventInternal(nsEvent* aEvent, nsIView *aView, } } + // 3. Give event to the Frames for browser default processing. + // XXX The event isn't translated into the local coordinate space + // of the frame... + if (GetCurrentEventFrame() && NS_SUCCEEDED (rv) && + aEvent->eventStructType != NS_EVENT) { + rv = mCurrentEventFrame->HandleEvent(mPresContext, (nsGUIEvent*)aEvent, + aStatus); + } + // 4. Give event to event manager for post event state changes and // generation of synthetic events. if (NS_SUCCEEDED (rv) &&