-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 1791079 - Implement User Activation API r=dom-core,webidl,saschan…
…az,edgar Rewrote internal user activation tree (spreading state to other elements) logic to match HTML spec: https://html.spec.whatwg.org/multipage/interaction.html#user-activation-processing-model Added navigator.userActivation API to expose internal user activation. Also fixed a WPT test to conform to spec (siblings are not activated), see also spec issue: whatwg/html#9831 Co-authored-by: Tom Schuster <[email protected]> Differential Revision: https://phabricator.services.mozilla.com/D185348
- Loading branch information
CanadaHonk
committed
Oct 7, 2023
1 parent
90b9ecb
commit 1e445f8
Showing
23 changed files
with
164 additions
and
121 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ | ||
/* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this file, | ||
* You can obtain one at http://mozilla.org/MPL/2.0/. | ||
* | ||
* The origin of this IDL file is | ||
* https://html.spec.whatwg.org/multipage/interaction.html#the-useractivation-interface | ||
*/ | ||
|
||
[Exposed=Window] | ||
interface UserActivation { | ||
readonly attribute boolean hasBeenActive; | ||
readonly attribute boolean isActive; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 0 additions & 5 deletions
5
...-platform/meta/fullscreen/api/element-request-fullscreen-consume-user-activation.html.ini
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 12 additions & 5 deletions
17
testing/web-platform/meta/html/user-activation/activation-trigger-pointerevent.html.ini
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,19 @@ | ||
[activation-trigger-pointerevent.html?touch] | ||
expected: TIMEOUT | ||
# A webdriver bug (Bug 1856991) does not emit touch click events internally as expected | ||
bug: 1856991 | ||
expected: | ||
if os == "android": [OK, TIMEOUT] | ||
if os == "linux": [OK, TIMEOUT] | ||
TIMEOUT | ||
|
||
[Activation through touch pointerevent click] | ||
expected: TIMEOUT | ||
expected: | ||
if os == "android": [FAIL, TIMEOUT] | ||
if os == "linux": [FAIL, TIMEOUT] | ||
TIMEOUT | ||
|
||
|
||
[activation-trigger-pointerevent.html?pen] | ||
# Pen touch type is not supported by webdriver | ||
[Activation through pen pointerevent click] | ||
expected: FAIL | ||
|
||
|
||
[activation-trigger-pointerevent.html?mouse] |
18 changes: 0 additions & 18 deletions
18
testing/web-platform/meta/html/user-activation/chained-setTimeout.html.ini
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
testing/web-platform/meta/html/user-activation/detached-iframe.html.ini
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,5 @@ | |
[MessageEventInit user activation not set] | ||
expected: FAIL | ||
|
||
[MessageEventInit user activation set] | ||
expected: FAIL |
6 changes: 3 additions & 3 deletions
6
...ng/web-platform/meta/html/user-activation/navigation-state-reset-crossorigin.sub.html.ini
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
[navigation-state-reset-crossorigin.sub.html] | ||
expected: TIMEOUT | ||
[Post-navigation state reset.] | ||
expected: TIMEOUT | ||
# There is a webdriver bug (Bug 1856989) which breaks cross-process iframe clicks | ||
expected: | ||
if fission: TIMEOUT |
4 changes: 0 additions & 4 deletions
4
testing/web-platform/meta/html/user-activation/navigation-state-reset-sameorigin.html.ini
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
testing/web-platform/meta/html/user-activation/no-activation-thru-escape-key.html.ini
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.