From 53b704d204e99b00e45dc2b0d3bab1afd4e0e245 Mon Sep 17 00:00:00 2001 From: Edgar Chen Date: Tue, 31 May 2022 20:03:46 +0000 Subject: [PATCH] Do not forward focus to child frame when calling window.focus() on parent frame Differential Revision: https://phabricator.services.mozilla.com/D146446 bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1757531 gecko-commit: c424ce3bbdf1f959575ad753feeceb97b97dd31b gecko-reviewers: hsivonen --- ...lement-after-calling-window-focus.sub.html | 88 +++++++++++++++++++ ...ment-after-calling-window-focus-inner.html | 38 ++++++++ ...after-calling-window-focus-middle.sub.html | 30 +++++++ ...ling-window-focus-outer-different.sub.html | 31 +++++++ ...r-calling-window-focus-outer-same.sub.html | 31 +++++++ 5 files changed, 218 insertions(+) create mode 100644 focus/activeelement-after-calling-window-focus.sub.html create mode 100644 focus/support/activeelement-after-calling-window-focus-inner.html create mode 100644 focus/support/activeelement-after-calling-window-focus-middle.sub.html create mode 100644 focus/support/activeelement-after-calling-window-focus-outer-different.sub.html create mode 100644 focus/support/activeelement-after-calling-window-focus-outer-same.sub.html diff --git a/focus/activeelement-after-calling-window-focus.sub.html b/focus/activeelement-after-calling-window-focus.sub.html new file mode 100644 index 00000000000000..f854ffb36ce462 --- /dev/null +++ b/focus/activeelement-after-calling-window-focus.sub.html @@ -0,0 +1,88 @@ + + +activeElement after calling window.focus() + + + + diff --git a/focus/support/activeelement-after-calling-window-focus-inner.html b/focus/support/activeelement-after-calling-window-focus-inner.html new file mode 100644 index 00000000000000..1fa14d4b8a24de --- /dev/null +++ b/focus/support/activeelement-after-calling-window-focus-inner.html @@ -0,0 +1,38 @@ + + + + + Focus test inner document + + +

Inner

+ + + + diff --git a/focus/support/activeelement-after-calling-window-focus-middle.sub.html b/focus/support/activeelement-after-calling-window-focus-middle.sub.html new file mode 100644 index 00000000000000..c5a0d60a71de37 --- /dev/null +++ b/focus/support/activeelement-after-calling-window-focus-middle.sub.html @@ -0,0 +1,30 @@ + + +Focus test middle document +

Middle


+ + diff --git a/focus/support/activeelement-after-calling-window-focus-outer-different.sub.html b/focus/support/activeelement-after-calling-window-focus-outer-different.sub.html new file mode 100644 index 00000000000000..0c2f8f792da461 --- /dev/null +++ b/focus/support/activeelement-after-calling-window-focus-outer-different.sub.html @@ -0,0 +1,31 @@ + + +Focus test outer document + + diff --git a/focus/support/activeelement-after-calling-window-focus-outer-same.sub.html b/focus/support/activeelement-after-calling-window-focus-outer-same.sub.html new file mode 100644 index 00000000000000..cabdb26b347e05 --- /dev/null +++ b/focus/support/activeelement-after-calling-window-focus-outer-same.sub.html @@ -0,0 +1,31 @@ + + +Focus test outer document + +