Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Gecko Bug 1604140] Part 1: Fix focus trap within shadow DOM when host is scrollable #21775

Merged
merged 2 commits into from Feb 18, 2020

Conversation

moz-wptsync-bot
Copy link
Collaborator

The checks for *TopLevelScopeOwner are to skip the scope that we have already checked.
But when the shadow host is scrollable, we will traverse anonymous children for the scroll frame first in frame traversal and oldTopLevelScopeOwner will be reset.
Then we don't realize that we have already checked the host's scope.

Differential Revision: https://phabricator.services.mozilla.com/D60923

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1604140
gecko-commit: 8897a2187a9537310df8b283f65844fe46ad075d
gecko-integration-branch: autoland
gecko-reviewers: smaug

Copy link
Collaborator

@wpt-pr-bot wpt-pr-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The review process for this patch is being conducted in the Firefox project.

The checks for `*TopLevelScopeOwner` are to skip the scope that we have already checked.
But when the shadow host is scrollable, we will traverse anonymous children for the scroll frame first in frame traversal and `oldTopLevelScopeOwner` will be reset.
Then we don't realize that we have already checked the host's scope.

Differential Revision: https://phabricator.services.mozilla.com/D60923

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1604140
gecko-commit: 241851c7036fd3d3680e35f04a4b93a7faca1a69
gecko-integration-branch: autoland
gecko-reviewers: smaug
The original check, `currentContent != startContent`, is to skip the element we started on in frame traversal.
This would happen for instance on a scrollable element, where frame traversal could return the element again.

However, in shadow dom case, the frame traversal may start on a redirected shadow host, where `startContent` is still the original start element.

Differential Revision: https://phabricator.services.mozilla.com/D61566

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1604140
gecko-commit: 0af4f0491ba35d349497b7e539118edc3d040eef
gecko-integration-branch: autoland
gecko-reviewers: smaug
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants