Closed Bug 1713624 Opened 3 years ago Closed 3 years ago

Focusing parent when two sibling subframes have been focused results in inconsistent focus state

Categories

(Core :: DOM: UI Events & Focus Handling, defect, P2)

defect

Tracking

()

RESOLVED FIXED
91 Branch
Fission Milestone M7a
Tracking Status
firefox91 --- fixed

People

(Reporter: enndeakin, Assigned: hsivonen)

References

Details

Attachments

(2 files)

The test added by bug 1712900 uncovers a bug that occurs only in fission mode:

The frame structure is:
A1
-> B
-> A2

A and B are two processes. A2 is a sibling frame of B.

The frame A2 starts out focused.

When B is then focused, A1's focus is updated correctly, however if window.focus() is then called on A1, process A's focusedWindow is set to or remains at A2, yet its active focused element is the frame for B.

This causes the test to fail when enable-fission is used.

The best way to reproduce this bug is to apply the patch in bug 1712900 and run test test with --enable-fission.

Summary: Focus parent when → Focusing parent when two sibling subframes have been focused results in inconsistent focus state
Fission Milestone: --- → ?
Assignee: nobody → hsivonen
Severity: -- → S2
Status: NEW → ASSIGNED
Priority: -- → P2

(In reply to Neil Deakin from comment #0)

The best way to reproduce this bug is to apply the patch in bug 1712900 and run test test with --enable-fission.

Do you happen to have a test that's scoped only to this bug?

I wrote https://hsivonen.fi/fission-sibling.html but the permission check on window.focus() means the call is ignored.

Flags: needinfo?(enndeakin)

This is a version of the test that just shows the issue.

Flags: needinfo?(enndeakin)
Fission Milestone: ? → M7a

(In reply to Neil Deakin from comment #2)

This is a version of the test that just shows the issue.

To be clear, this test isn't expected to pass but to err out with the focused window being null during the assertion in the Fission case, right?

https://treeherder.mozilla.org/#/jobs?repo=try&revision=93686970ed4c00d1cce1c5e51154a2e9aa4f7aec

Flags: needinfo?(enndeakin)
Flags: needinfo?(enndeakin)
Pushed by hsivonen@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/4562a5404ff3
Null out mFocusedWindow when receiving OOP focused BrowsingContext. r=NeilDeakin
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 91 Branch
Regressions: 1757531
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: