Bug 1653160 - Avoid re-raising the PuppetWidget of an already-focused OOP iframe upon click. r=nika

Differential Revision: https://phabricator.services.mozilla.com/D87859
This commit is contained in:
Henri Sivonen 2020-08-26 15:53:31 +00:00
Родитель 812f93262d
Коммит 38bcf98586
1 изменённых файлов: 7 добавлений и 5 удалений

Просмотреть файл

@ -2727,11 +2727,13 @@ void nsFocusManager::RaiseWindow(nsPIDOMWindowOuter* aWindow,
return;
}
} else {
// We can only test for top-level Web content. We can't return
// early for out-of-process iframes, because when they need to
// to be "raised", their top-level Web content may already be
// "raised".
if (aWindow->GetBrowsingContext() == GetActiveBrowsingContext()) {
BrowsingContext* bc = aWindow->GetBrowsingContext();
// TODO: Deeper OOP frame hierarchies are
// https://bugzilla.mozilla.org/show_bug.cgi?id=1661227
if (bc == GetActiveBrowsingContext()) {
return;
}
if (bc == GetFocusedBrowsingContext()) {
return;
}
}