Bug 1675484 - iframe.onfocus should not be invoked when focus moves to out-of-process iframes; r=hsivonen

Differential Revision: https://phabricator.services.mozilla.com/D110098
This commit is contained in:
Edgar Chen
2021-03-31 08:53:19 +00:00
parent 23952a5114
commit 725c2acd2f
5 changed files with 186 additions and 4 deletions

View File

@@ -2560,10 +2560,7 @@ void nsFocusManager::Focus(
aWindow->UpdateCommands(u"focus"_ns, nullptr, 0);
}
// XXX Bug 1675484, We should consider the possibility that something
// expects the event to fire on iframe element as in Blink compat-wise by
// now.
if (aFocusChanged || !focusInOtherContentProcess) {
if (!focusInOtherContentProcess) {
SendFocusOrBlurEvent(
eFocus, presShell, aElement->GetComposedDoc(), aElement,
aFlags & FOCUSMETHOD_MASK, aWindowRaised, isRefocus,