(In reply to Edgar Chen [:edgar] from comment #6) > https://treeherder.mozilla.org/#/jobs?repo=try&group_state=expanded&revision=66a6fe1b202d2790cfb914a57b83ecb9a512ff07 > > I have a WIP that could avoid additional pair of blur and focus events. > But almost all xorigin test on try gets timed out due to the lack of focus event. :( What I do in WIP is to check `mFocusedBrowsingContext` in [nsFocusManager::SetFocusInner](https://searchfox.org/mozilla-central/rev/35d927df97900a57ecb562ad13909e392440b0fb/dom/base/nsFocusManager.cpp#1376), if the `mFocusedBrowsingContext` already pointers to embeded browsing context that lives in a different process, then parent window don't need to to anything for the frame-focus-request given that the out-of-process iframe already has the focus. However, `mFocusedBrowsingContext` seems to not be accurate any more after process switching or navigate happens on focused browsing context.
Bug 1665752 Comment 7 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
(In reply to Edgar Chen [:edgar] from comment #6) > https://treeherder.mozilla.org/#/jobs?repo=try&group_state=expanded&revision=66a6fe1b202d2790cfb914a57b83ecb9a512ff07 > > I have a WIP that could avoid additional pair of blur and focus events. > But almost all xorigin test on try gets timed out due to the lack of focus event. :( What the WIP does is to check `mFocusedBrowsingContext` in [nsFocusManager::SetFocusInner](https://searchfox.org/mozilla-central/rev/35d927df97900a57ecb562ad13909e392440b0fb/dom/base/nsFocusManager.cpp#1376), if the `mFocusedBrowsingContext` already pointers to embeded browsing context that lives in a different process, then parent window don't need to to anything for the frame-focus-request given that the out-of-process iframe already has the focus. However, `mFocusedBrowsingContext` seems to not be accurate any more after process switching or navigate happens on focused browsing context.