Bug 1466208 - part 45: Rename aFrame of HandleEvent() to aFrameForPresShell r=smaug
Now, other methods taking `aFrame` of `HandleEvent()` names the argument as `aFrameForPresShell`. So, `HandleEvent()`'s `aFrame` should also be renamed. This patch renames it and adds MOZ_CAN_RUN_SCRIPT and comment to `nsIPresShell::HandleEvent()`. This is the final patch for bug 1466208. Differential Revision: https://phabricator.services.mozilla.com/D22463
This commit is contained in:
@@ -6439,16 +6439,17 @@ PresShell* PresShell::GetShellForTouchEvent(WidgetGUIEvent* aEvent) {
|
||||
return shell;
|
||||
}
|
||||
|
||||
nsresult PresShell::HandleEvent(nsIFrame* aFrame, WidgetGUIEvent* aGUIEvent,
|
||||
nsresult PresShell::HandleEvent(nsIFrame* aFrameForPresShell,
|
||||
WidgetGUIEvent* aGUIEvent,
|
||||
bool aDontRetargetEvents,
|
||||
nsEventStatus* aEventStatus) {
|
||||
MOZ_ASSERT(aGUIEvent);
|
||||
EventHandler eventHandler(*this);
|
||||
return eventHandler.HandleEvent(aFrame, aGUIEvent, aDontRetargetEvents,
|
||||
aEventStatus);
|
||||
return eventHandler.HandleEvent(aFrameForPresShell, aGUIEvent,
|
||||
aDontRetargetEvents, aEventStatus);
|
||||
}
|
||||
|
||||
nsresult PresShell::EventHandler::HandleEvent(nsIFrame* aFrame,
|
||||
nsresult PresShell::EventHandler::HandleEvent(nsIFrame* aFrameForPresShell,
|
||||
WidgetGUIEvent* aGUIEvent,
|
||||
bool aDontRetargetEvents,
|
||||
nsEventStatus* aEventStatus) {
|
||||
@@ -6472,7 +6473,7 @@ nsresult PresShell::EventHandler::HandleEvent(nsIFrame* aFrame,
|
||||
}
|
||||
#endif
|
||||
|
||||
NS_ASSERTION(aFrame, "aFrame should be not null");
|
||||
NS_ASSERTION(aFrameForPresShell, "aFrameForPresShell should be not null");
|
||||
|
||||
// Update the latest focus sequence number with this new sequence number;
|
||||
// the next transasction that gets sent to the compositor will carry this over
|
||||
@@ -6503,8 +6504,8 @@ nsresult PresShell::EventHandler::HandleEvent(nsIFrame* aFrame,
|
||||
// If aGUIEvent should be handled in another PresShell, we should call its
|
||||
// HandleEvent() and do nothing here.
|
||||
nsresult rv = NS_OK;
|
||||
if (MaybeHandleEventWithAnotherPresShell(aFrame, aGUIEvent, aEventStatus,
|
||||
&rv)) {
|
||||
if (MaybeHandleEventWithAnotherPresShell(aFrameForPresShell, aGUIEvent,
|
||||
aEventStatus, &rv)) {
|
||||
// Handled by another PresShell or nobody can handle the event.
|
||||
return rv;
|
||||
}
|
||||
@@ -6516,13 +6517,13 @@ nsresult PresShell::EventHandler::HandleEvent(nsIFrame* aFrame,
|
||||
}
|
||||
|
||||
if (aGUIEvent->IsUsingCoordinates()) {
|
||||
return HandleEventUsingCoordinates(aFrame, aGUIEvent, aEventStatus,
|
||||
aDontRetargetEvents);
|
||||
return HandleEventUsingCoordinates(aFrameForPresShell, aGUIEvent,
|
||||
aEventStatus, aDontRetargetEvents);
|
||||
}
|
||||
|
||||
// Activation events need to be dispatched even if no frame was found, since
|
||||
// we don't want the focus to be out of sync.
|
||||
if (!aFrame) {
|
||||
if (!aFrameForPresShell) {
|
||||
if (!NS_EVENT_NEEDS_FRAME(aGUIEvent)) {
|
||||
mPresShell->mCurrentEventFrame = nullptr;
|
||||
// XXX Shouldn't we create AutoCurrentEventInfoSetter instance for this
|
||||
@@ -6543,7 +6544,8 @@ nsresult PresShell::EventHandler::HandleEvent(nsIFrame* aFrame,
|
||||
return HandleEventAtFocusedContent(aGUIEvent, aEventStatus);
|
||||
}
|
||||
|
||||
return HandleEventWithFrameForPresShell(aFrame, aGUIEvent, aEventStatus);
|
||||
return HandleEventWithFrameForPresShell(aFrameForPresShell, aGUIEvent,
|
||||
aEventStatus);
|
||||
}
|
||||
|
||||
nsresult PresShell::EventHandler::HandleEventUsingCoordinates(
|
||||
|
||||
Reference in New Issue
Block a user