Improve inter-document focus handling (#36649)

*Describe the changes that this pull request makes here. This will be
the commit message.*
rewritten the PR #28571
Implement
[Window#focus](https://html.spec.whatwg.org/multipage/#dom-window-focus),
[Window#blur](https://html.spec.whatwg.org/multipage/#dom-window-blur)
Testing: WPT
Fixes: #8981 #9421

---------

Signed-off-by: kongbai1996 <1782765876@qq.com>
Co-authored-by: yvt <i@yvt.jp>
This commit is contained in:
Fuguo 2025-04-30 12:37:53 +08:00 committed by GitHub
parent 27570987fd
commit 0c0ee04b8e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
33 changed files with 1123 additions and 242 deletions

View file

@ -1738,9 +1738,6 @@
[Document interface: attribute all]
expected: FAIL
[Window interface: operation focus()]
expected: FAIL
[Window interface: attribute scrollbars]
expected: FAIL
@ -1870,9 +1867,6 @@
[Document interface: new Document() must inherit property "dir" with the proper type]
expected: FAIL
[Window interface: window must inherit property "blur()" with the proper type]
expected: FAIL
[Document interface: operation execCommand(DOMString, optional boolean, optional DOMString)]
expected: FAIL
@ -1897,9 +1891,6 @@
[Document interface: iframe.contentDocument must inherit property "queryCommandEnabled(DOMString)" with the proper type]
expected: FAIL
[Window interface: operation blur()]
expected: FAIL
[Document interface: iframe.contentDocument must inherit property "onslotchange" with the proper type]
expected: FAIL
@ -1924,9 +1915,6 @@
[Document interface: documentWithHandlers must inherit property "onauxclick" with the proper type]
expected: FAIL
[Window interface: window must inherit property "focus()" with the proper type]
expected: FAIL
[Document interface: documentWithHandlers must inherit property "onwebkitanimationend" with the proper type]
expected: FAIL