Skip to content

Improve inter-document focus handling - #36649

Merged
jdm merged 6 commits into
servo:mainfrom
kongbai1996:focus2
Apr 30, 2025
Merged

jdm merged 6 commits into
servo:mainfrom
kongbai1996:focus2

Conversation

@kongbai1996

@kongbai1996 kongbai1996 commented Apr 22, 2025 •

Copy link
Copy Markdown
Contributor

Describe the changes that this pull request makes here. This will be the commit message.
rewritten the PR #28571
Implement Window#focus, Window#blur
Testing: WPT
Fixes: #8981 #9421

@kongbai1996
kongbai1996 requested a review from gterzian as a code owner April 22, 2025 12:09
@kongbai1996
kongbai1996 marked this pull request as draft April 22, 2025 12:47
@mrobinson

Copy link
Copy Markdown
Member

@kongbai1996 Do you mind preserving the original PR title and message as well as adding @yvt as a co-author of this change? Thank you.

@servo-wpt-sync

Copy link
Copy Markdown
Collaborator

🤖 Opened new upstream WPT pull request (web-platform-tests/wpt#52124) with upstreamable changes.

@servo-wpt-sync

Copy link
Copy Markdown
Collaborator

🤖 This change no longer contains upstreamable changes to WPT; closed existing upstream pull request (web-platform-tests/wpt#52124).

@kongbai1996

Copy link
Copy Markdown
Contributor Author

Describe the changes that this pull request makes here. This will be the commit message. rewritten the PR #28571 Testing: WPT Fixes: #8981 #9421

@kongbai1996 kongbai1996 reopened this Apr 23, 2025
@kongbai1996
kongbai1996 force-pushed the focus2 branch 2 times, most recently from 7dc7b39 to 73fc849 Compare April 23, 2025 08:59
@kongbai1996
kongbai1996 marked this pull request as ready for review April 23, 2025 09:35
@kongbai1996

Copy link
Copy Markdown
Contributor Author

@kongbai1996 kongbai1996 changed the title rewritten the PR #28571 Implement Window#focus, Window#blur rewritten the PR #28571 Apr 24, 2025
@kongbai1996

Copy link
Copy Markdown
Contributor Author

@kongbai1996 Do you mind preserving the original PR title and message as well as adding @yvt as a co-author of this change? Thank you.

I added it. Please review it.

@mrobinson

Copy link
Copy Markdown
Member

I added it. Please review it.

The original PR title is "Improve inter-document focus handling"

@kongbai1996 kongbai1996 changed the title Implement Window#focus, Window#blur rewritten the PR #28571 Improve inter-document focus handling Apr 24, 2025
@kongbai1996

Copy link
Copy Markdown
Contributor Author

The original PR title is "Improve inter-document focus handling"

fixed, please review.

@kongbai1996
kongbai1996 force-pushed the focus2 branch 4 times, most recently from ff5a71c to 2eda894 Compare April 26, 2025 03:17
@kongbai1996

Copy link
Copy Markdown
Contributor Author

@mrobinson @jdm Please review. Thank you very much.

@jdm jdm left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thank you for rebasing this!

Comment thread components/script/dom/window.rs Resolved
Comment thread components/script/script_thread.rs Resolved
Comment thread components/script/script_thread.rs Resolved
Comment thread components/script/dom/document.rs Resolved
Comment thread components/script/dom/document.rs Resolved
Comment thread components/script/dom/document.rs Resolved
Comment thread components/script/dom/document.rs Resolved
Comment thread components/script/dom/document.rs Resolved
yvt and others added 3 commits April 30, 2025 10:23
Improve inter-document focus handling
feat(script): add Window#{focus, blur}
refactor(script): represent a focus transaction's existence by Option
feat: track the system focus states of top-level browsing contexts
feat(script): consider system focus when determining a focus chain
feat(script): consider system focus in Document::HasFocus
test: add /mozilla/tests/mozilla/focus_inter_documents.html
...
Co-authored-by: yvt <[email protected]>
Signed-off-by: kongbai1996 <[email protected]>
Signed-off-by: yvt <[email protected]>
Signed-off-by: kongbai1996 <[email protected]>
…onously. As a result, some WPT test cases fail.

Signed-off-by: kongbai1996 <[email protected]>
Signed-off-by: kongbai1996 <[email protected]>
Signed-off-by: kongbai1996 <[email protected]>
@kongbai1996
kongbai1996 force-pushed the focus2 branch 2 times, most recently from 4f0c96f to 3ebd96f Compare April 30, 2025 03:28
@kongbai1996
kongbai1996 requested a review from jdm April 30, 2025 04:13
@jdm
jdm added this pull request to the merge queue Apr 30, 2025
@jdm jdm mentioned this pull request Apr 30, 2025
4 of 5 tasks
Merged via the queue into servo:main with commit 0c0ee04 Apr 30, 2025
@kongbai1996
kongbai1996 deleted the focus2 branch November 18, 2025 07:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

window.focus/blur support

5 participants