Improve focus handling.
Pull request: https://github.com/WebKit/WebKit/pull/12743
<rdar://problem/108368505>
Committed 263527@main (c5c4b9c56181): <https://commits.webkit.org/263527@main> Reviewed commits have been landed. Closing PR #12743 and removing active labels.