mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 704758, assertion with null frame, handle ime events that get retargeted by getting the right frame, r=smaug
This commit is contained in:
parent
c263d22263
commit
499a154f1d
@ -5818,7 +5818,28 @@ PresShell::HandleEvent(nsIFrame *aFrame,
|
||||
return NS_OK;
|
||||
|
||||
if (presShell != this) {
|
||||
return presShell->HandleEvent(presShell->GetRootFrame(), aEvent, true, aEventStatus);
|
||||
nsIFrame* frame = presShell->GetRootFrame();
|
||||
if (!frame) {
|
||||
if (aEvent->message == NS_QUERY_TEXT_CONTENT ||
|
||||
NS_IS_CONTENT_COMMAND_EVENT(aEvent)) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsIView* view = presShell->GetViewManager()->GetRootView();
|
||||
while (view && !view->GetFrame()) {
|
||||
view = view->GetParent();
|
||||
}
|
||||
|
||||
if (view) {
|
||||
frame = view->GetFrame();
|
||||
}
|
||||
}
|
||||
|
||||
if (!frame)
|
||||
return NS_OK;
|
||||
|
||||
nsCOMPtr<nsIPresShell> shell = frame->PresContext()->GetPresShell();
|
||||
return shell->HandleEvent(frame, aEvent, true, aEventStatus);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user