From 661e8baa28b8871ec66be8fd29732a36233b378d Mon Sep 17 00:00:00 2001 From: Marco Castelluccio Date: Fri, 13 Oct 2023 16:49:35 +0000 Subject: [PATCH] Bug 1791079 - Implement User Activation API r=dom-core,webidl,saschanaz,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: https://github.com/whatwg/html/issues/9831 Co-authored-by: Tom Schuster Differential Revision: https://phabricator.services.mozilla.com/D185348 UltraBlame original commit: 7c84c5fc7d0002a8bee64ebc66899437638331c6 --- dom/base/Document.cpp | 159 +++++++--------- dom/base/Navigator.cpp | 57 ++++++ dom/base/Navigator.h | 20 +++ dom/base/UserActivation.cpp | 170 ++++++++++++++++++ dom/base/UserActivation.h | 100 ++++++++++- .../mochitest/general/test_interfaces.js | 10 ++ dom/webidl/Navigator.webidl | 39 ++++ dom/webidl/UserActivation.webidl | 146 +++++++++++++++ dom/webidl/moz.build | 5 + ...ent-ready-check-containing-iframe.html.ini | 42 ----- ...ullscreen-consume-user-activation.html.ini | 46 ----- .../meta/html/dom/idlharness.https.html.ini | 138 -------------- .../activation-trigger-pointerevent.html.ini | 40 +++-- .../chained-setTimeout.html.ini | 109 ----------- .../user-activation/detached-iframe.html.ini | 22 --- .../message-event-init.tentative.html.ini | 9 + ...ation-state-reset-crossorigin.sub.html.ini | 29 +-- ...navigation-state-reset-sameorigin.html.ini | 25 --- .../no-activation-thru-escape-key.html.ini | 29 --- .../propagation-crossorigin.sub.html.ini | 27 ++- ...agation-same-and-cross-origin.sub.html.ini | 67 ++----- .../propagation-sameorigin.html.ini | 17 -- .../user-activation-interface.html.ini | 25 --- .../propagation-sameorigin.html | 40 ++++- 24 files changed, 745 insertions(+), 626 deletions(-) create mode 100644 dom/webidl/UserActivation.webidl delete mode 100644 testing/web-platform/meta/fullscreen/api/element-ready-check-containing-iframe.html.ini delete mode 100644 testing/web-platform/meta/fullscreen/api/element-request-fullscreen-consume-user-activation.html.ini delete mode 100644 testing/web-platform/meta/html/user-activation/chained-setTimeout.html.ini delete mode 100644 testing/web-platform/meta/html/user-activation/detached-iframe.html.ini delete mode 100644 testing/web-platform/meta/html/user-activation/navigation-state-reset-sameorigin.html.ini delete mode 100644 testing/web-platform/meta/html/user-activation/no-activation-thru-escape-key.html.ini delete mode 100644 testing/web-platform/meta/html/user-activation/propagation-sameorigin.html.ini delete mode 100644 testing/web-platform/meta/html/user-activation/user-activation-interface.html.ini diff --git a/dom/base/Document.cpp b/dom/base/Document.cpp index 80d588d602d50..726599aae7bcd 100644 --- a/dom/base/Document.cpp +++ b/dom/base/Document.cpp @@ -79614,112 +79614,63 @@ NotifyUserGestureActivation ( ) { -if -( RefPtr < BrowsingContext > -bc +currentBC = GetBrowsingContext ( ) -) -{ -bc -- -> -PreOrderWalk -( -[ -& -] -( -BrowsingContext -* -aBC -) -{ -WindowContext -* -windowContext -= -aBC -- -> -GetCurrentWindowContext -( -) ; if ( ! -windowContext +currentBC ) { return ; } -nsIDocShell -* -docShell -= -aBC -- +RefPtr +< +WindowContext > -GetDocShell +currentWC += +GetWindowContext ( ) ; -if -( -! -docShell -) -{ -return -; -} -Document -* -document -= -docShell +currentWC - > -GetDocument +NotifyUserGestureActivation ( ) ; -if +for ( -! -document -) -{ -return +WindowContext +* +wc += +currentWC ; -} -if -( -NodePrincipal -( -) +wc +; +wc += +wc - > -Equals +GetParentWindowContext ( -document -- -> -NodePrincipal -( -) ) ) { -windowContext +wc - > NotifyUserGestureActivation @@ -79727,47 +79678,71 @@ NotifyUserGestureActivation ) ; } -} -) -; -for +currentBC +- +> +PreOrderWalk +( +[ +& +] ( +BrowsingContext +* bc +) +{ +WindowContext +* +wc = bc - > -GetParent +GetCurrentWindowContext ( ) ; -bc +if +( +! +wc +) +{ +return ; -bc +} +WindowGlobalChild +* +wgc = -bc +wc - > -GetParent +GetWindowGlobalChild ( ) -) -{ +; if ( -WindowContext -* -windowContext -= -bc +! +wgc +| +| +! +wgc - > -GetCurrentWindowContext +IsSameOriginWith ( +currentWC ) ) { -windowContext +return +; +} +wc - > NotifyUserGestureActivation @@ -79775,8 +79750,8 @@ NotifyUserGestureActivation ) ; } -} -} +) +; } bool Document diff --git a/dom/base/Navigator.cpp b/dom/base/Navigator.cpp index f3a2a96f100c3..577fb76b2f34d 100644 --- a/dom/base/Navigator.cpp +++ b/dom/base/Navigator.cpp @@ -432,6 +432,17 @@ mozilla / dom / +UserActivation +. +h +" +# +include +" +mozilla +/ +dom +/ VRDisplay . h @@ -1021,6 +1032,10 @@ mLocks ) NS_IMPL_CYCLE_COLLECTION_TRAVERSE ( +mUserActivation +) +NS_IMPL_CYCLE_COLLECTION_TRAVERSE +( mWindow ) NS_IMPL_CYCLE_COLLECTION_TRAVERSE @@ -1264,6 +1279,10 @@ mLocks nullptr ; } +mUserActivation += +nullptr +; mSharePromise = nullptr @@ -11117,4 +11136,42 @@ aContext ) ; } +already_AddRefed +< +UserActivation +> +Navigator +: +: +UserActivation +( +) +{ +if +( +! +mUserActivation +) +{ +mUserActivation += +new +dom +: +: +UserActivation +( +GetWindow +( +) +) +; +} +return +do_AddRef +( +mUserActivation +) +; +} } diff --git a/dom/base/Navigator.h b/dom/base/Navigator.h index 05ea5cd0c3fd8..813d504a6d884 100644 --- a/dom/base/Navigator.h +++ b/dom/base/Navigator.h @@ -269,6 +269,9 @@ MediaCapabilities class MediaSession ; +class +UserActivation +; struct ShareData ; @@ -1159,6 +1162,14 @@ AudioContext aContext ) ; +already_AddRefed +< +UserActivation +> +UserActivation +( +) +; private : void @@ -1416,6 +1427,15 @@ LockManager > mLocks ; +RefPtr +< +dom +: +: +UserActivation +> +mUserActivation +; } ; } diff --git a/dom/base/UserActivation.cpp b/dom/base/UserActivation.cpp index d741a4cfb2ec5..37647b16eb3ca 100644 --- a/dom/base/UserActivation.cpp +++ b/dom/base/UserActivation.cpp @@ -5,6 +5,17 @@ mozilla / dom / +BrowsingContext +. +h +" +# +include +" +mozilla +/ +dom +/ UserActivation . h @@ -14,6 +25,28 @@ include " mozilla / +dom +/ +UserActivationBinding +. +h +" +# +include +" +mozilla +/ +dom +/ +WindowGlobalChild +. +h +" +# +include +" +mozilla +/ TextEvents . h @@ -24,6 +57,143 @@ mozilla : dom { +NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE +( +UserActivation +mWindow +) +NS_IMPL_CYCLE_COLLECTING_ADDREF +( +UserActivation +) +NS_IMPL_CYCLE_COLLECTING_RELEASE +( +UserActivation +) +NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION +( +UserActivation +) +NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY +NS_INTERFACE_MAP_ENTRY +( +nsISupports +) +NS_INTERFACE_MAP_END +UserActivation +: +: +UserActivation +( +nsPIDOMWindowInner +* +aWindow +) +: +mWindow +( +aWindow +) +{ +} +JSObject +* +UserActivation +: +: +WrapObject +( +JSContext +* +aCx +JS +: +: +Handle +< +JSObject +* +> +aGivenProto +) +{ +return +UserActivation_Binding +: +: +Wrap +( +aCx +this +aGivenProto +) +; +} +; +bool +UserActivation +: +: +HasBeenActive +( +) +const +{ +WindowContext +* +wc += +mWindow +- +> +GetWindowContext +( +) +; +return +wc +& +& +wc +- +> +HasBeenUserGestureActivated +( +) +; +} +bool +UserActivation +: +: +IsActive +( +) +const +{ +WindowContext +* +wc += +mWindow +- +> +GetWindowContext +( +) +; +return +wc +& +& +wc +- +> +HasValidTransientUserGestureActivation +( +) +; +} namespace { static diff --git a/dom/base/UserActivation.h b/dom/base/UserActivation.h index e5deeb943927b..705135906d75d 100644 --- a/dom/base/UserActivation.h +++ b/dom/base/UserActivation.h @@ -1,9 +1,9 @@ # ifndef -mozilla_dom_UserAcitvation_h +mozilla_dom_UserActivation_h # define -mozilla_dom_UserAcitvation_h +mozilla_dom_UserActivation_h # include " @@ -22,6 +22,27 @@ TimeStamp . h " +# +include +" +nsCycleCollectionParticipant +. +h +" +# +include +" +nsWrapperCache +. +h +" +# +include +" +nsPIDOMWindow +. +h +" namespace mozilla : @@ -31,9 +52,69 @@ dom class UserActivation final +: +public +nsISupports +public +nsWrapperCache { public : +NS_DECL_CYCLE_COLLECTING_ISUPPORTS +NS_DECL_CYCLE_COLLECTION_WRAPPERCACHE_CLASS +( +UserActivation +) +explicit +UserActivation +( +nsPIDOMWindowInner +* +aWindow +) +; +nsPIDOMWindowInner +* +GetParentObject +( +) +const +{ +return +mWindow +; +} +JSObject +* +WrapObject +( +JSContext +* +aCx +JS +: +: +Handle +< +JSObject +* +> +aGivenProto +) +final +; +bool +HasBeenActive +( +) +const +; +bool +IsActive +( +) +const +; enum class State @@ -96,6 +177,21 @@ LatestUserInputStart ( ) ; +private +: +~ +UserActivation +( +) += +default +; +nsCOMPtr +< +nsPIDOMWindowInner +> +mWindow +; } ; class diff --git a/dom/tests/mochitest/general/test_interfaces.js b/dom/tests/mochitest/general/test_interfaces.js index ec96060361f73..7e4ebb10e4fee 100644 --- a/dom/tests/mochitest/general/test_interfaces.js +++ b/dom/tests/mochitest/general/test_interfaces.js @@ -7001,6 +7001,16 @@ true name : " +UserActivation +" +insecureContext +: +true +} +{ +name +: +" UserProximityEvent " insecureContext diff --git a/dom/webidl/Navigator.webidl b/dom/webidl/Navigator.webidl index fcd9adbca6b3b..e1fa49df0a1ca 100644 --- a/dom/webidl/Navigator.webidl +++ b/dom/webidl/Navigator.webidl @@ -2560,3 +2560,42 @@ context ; } ; +/ +/ +https +: +/ +/ +html +. +spec +. +whatwg +. +org +/ +multipage +/ +interaction +. +html +# +the +- +useractivation +- +interface +partial +interface +Navigator +{ +[ +SameObject +] +readonly +attribute +UserActivation +userActivation +; +} +; diff --git a/dom/webidl/UserActivation.webidl b/dom/webidl/UserActivation.webidl new file mode 100644 index 0000000000000..9f4db0b448a8b --- /dev/null +++ b/dom/webidl/UserActivation.webidl @@ -0,0 +1,146 @@ +/ +* +- +* +- +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 +; +} +; diff --git a/dom/webidl/moz.build b/dom/webidl/moz.build index 7f1af3d1150f9..2d17a4d90d59f 100644 --- a/dom/webidl/moz.build +++ b/dom/webidl/moz.build @@ -5761,6 +5761,11 @@ URLSearchParams webidl " " +UserActivation +. +webidl +" +" ValidityState . webidl diff --git a/testing/web-platform/meta/fullscreen/api/element-ready-check-containing-iframe.html.ini b/testing/web-platform/meta/fullscreen/api/element-ready-check-containing-iframe.html.ini deleted file mode 100644 index 02d6073ea99b4..0000000000000 --- a/testing/web-platform/meta/fullscreen/api/element-ready-check-containing-iframe.html.ini +++ /dev/null @@ -1,42 +0,0 @@ -[ -element -- -ready -- -check -- -containing -- -iframe -. -html -] -expected -: -if -( -os -= -= -" -android -" -) -and -fission -: -[ -OK -TIMEOUT -] -[ -Element -ready -check -for -containing -iframe -] -expected -: -FAIL diff --git a/testing/web-platform/meta/fullscreen/api/element-request-fullscreen-consume-user-activation.html.ini b/testing/web-platform/meta/fullscreen/api/element-request-fullscreen-consume-user-activation.html.ini deleted file mode 100644 index 971c504497223..0000000000000 --- a/testing/web-platform/meta/fullscreen/api/element-request-fullscreen-consume-user-activation.html.ini +++ /dev/null @@ -1,46 +0,0 @@ -[ -element -- -request -- -fullscreen -- -consume -- -user -- -activation -. -html -] -expected -: -if -( -os -= -= -" -android -" -) -and -fission -: -[ -OK -TIMEOUT -] -[ -Element -# -requestFullscreen -( -) -consumes -user -activation -] -expected -: -FAIL diff --git a/testing/web-platform/meta/html/dom/idlharness.https.html.ini b/testing/web-platform/meta/html/dom/idlharness.https.html.ini index f3afabbc8cfe3..d94f30630797d 100644 --- a/testing/web-platform/meta/html/dom/idlharness.https.html.ini +++ b/testing/web-platform/meta/html/dom/idlharness.https.html.ini @@ -1465,144 +1465,6 @@ expected : FAIL [ -UserActivation -interface -: -existence -and -properties -of -interface -object -] -expected -: -FAIL -[ -UserActivation -interface -object -length -] -expected -: -FAIL -[ -UserActivation -interface -object -name -] -expected -: -FAIL -[ -UserActivation -interface -: -existence -and -properties -of -interface -prototype -object -] -expected -: -FAIL -[ -UserActivation -interface -: -existence -and -properties -of -interface -prototype -object -' -s -" -constructor -" -property -] -expected -: -FAIL -[ -UserActivation -interface -: -existence -and -properties -of -interface -prototype -object -' -s -unscopables -property -] -expected -: -FAIL -[ -UserActivation -interface -: -attribute -hasBeenActive -] -expected -: -FAIL -[ -UserActivation -interface -: -attribute -isActive -] -expected -: -FAIL -[ -Navigator -interface -: -attribute -userActivation -] -expected -: -FAIL -[ -Navigator -interface -: -window -. -navigator -must -inherit -property -" -userActivation -" -with -the -proper -type -] -expected -: -FAIL -[ SVGElement interface : diff --git a/testing/web-platform/meta/html/user-activation/activation-trigger-pointerevent.html.ini b/testing/web-platform/meta/html/user-activation/activation-trigger-pointerevent.html.ini index 1d6e910841436..8b411f84f50dc 100644 --- a/testing/web-platform/meta/html/user-activation/activation-trigger-pointerevent.html.ini +++ b/testing/web-platform/meta/html/user-activation/activation-trigger-pointerevent.html.ini @@ -9,6 +9,26 @@ html ? touch ] +# +A +webdriver +bug +( +Bug +1856991 +) +does +not +emit +touch +click +events +internally +as +expected +bug +: +1856991 expected : TIMEOUT @@ -33,6 +53,15 @@ html ? pen ] +# +Pen +touch +type +is +not +supported +by +webdriver [ Activation through @@ -43,14 +72,3 @@ click expected : FAIL -[ -activation -- -trigger -- -pointerevent -. -html -? -mouse -] diff --git a/testing/web-platform/meta/html/user-activation/chained-setTimeout.html.ini b/testing/web-platform/meta/html/user-activation/chained-setTimeout.html.ini deleted file mode 100644 index 87c148fc71286..0000000000000 --- a/testing/web-platform/meta/html/user-activation/chained-setTimeout.html.ini +++ /dev/null @@ -1,109 +0,0 @@ -[ -chained -- -setTimeout -. -html -] -[ -Call -- -depth -= -1 -: -initial -activation -states -are -false -] -expected -: -FAIL -[ -Call -- -depth -= -2 -: -initial -activation -states -are -false -] -expected -: -FAIL -[ -Call -- -depth -= -3 -: -initial -activation -states -are -false -] -expected -: -FAIL -[ -Call -- -depth -= -1 -: -after -- -click -activation -states -are -true -] -expected -: -FAIL -[ -Call -- -depth -= -2 -: -after -- -click -activation -states -are -true -] -expected -: -FAIL -[ -Call -- -depth -= -3 -: -after -- -click -activation -states -are -true -] -expected -: -FAIL diff --git a/testing/web-platform/meta/html/user-activation/detached-iframe.html.ini b/testing/web-platform/meta/html/user-activation/detached-iframe.html.ini deleted file mode 100644 index dec6c00f37723..0000000000000 --- a/testing/web-platform/meta/html/user-activation/detached-iframe.html.ini +++ /dev/null @@ -1,22 +0,0 @@ -[ -detached -- -iframe -. -html -] -[ -navigator -. -userActivation -retains -state -even -if -global -is -removed -] -expected -: -FAIL diff --git a/testing/web-platform/meta/html/user-activation/message-event-init.tentative.html.ini b/testing/web-platform/meta/html/user-activation/message-event-init.tentative.html.ini index b9a0543e3c74e..7068af593c513 100644 --- a/testing/web-platform/meta/html/user-activation/message-event-init.tentative.html.ini +++ b/testing/web-platform/meta/html/user-activation/message-event-init.tentative.html.ini @@ -19,3 +19,12 @@ set expected : FAIL +[ +MessageEventInit +user +activation +set +] +expected +: +FAIL diff --git a/testing/web-platform/meta/html/user-activation/navigation-state-reset-crossorigin.sub.html.ini b/testing/web-platform/meta/html/user-activation/navigation-state-reset-crossorigin.sub.html.ini index c53b50606173d..ed235884159bc 100644 --- a/testing/web-platform/meta/html/user-activation/navigation-state-reset-crossorigin.sub.html.ini +++ b/testing/web-platform/meta/html/user-activation/navigation-state-reset-crossorigin.sub.html.ini @@ -11,17 +11,26 @@ sub . html ] -expected -: -TIMEOUT -[ -Post +# +There +is +a +webdriver +bug +( +Bug +1856989 +) +which +breaks +cross - -navigation -state -reset -. -] +process +iframe +clicks expected : +if +fission +: TIMEOUT diff --git a/testing/web-platform/meta/html/user-activation/navigation-state-reset-sameorigin.html.ini b/testing/web-platform/meta/html/user-activation/navigation-state-reset-sameorigin.html.ini deleted file mode 100644 index 1e5d00926c925..0000000000000 --- a/testing/web-platform/meta/html/user-activation/navigation-state-reset-sameorigin.html.ini +++ /dev/null @@ -1,25 +0,0 @@ -[ -navigation -- -state -- -reset -- -sameorigin -. -html -] -expected -: -TIMEOUT -[ -Post -- -navigation -state -reset -. -] -expected -: -TIMEOUT diff --git a/testing/web-platform/meta/html/user-activation/no-activation-thru-escape-key.html.ini b/testing/web-platform/meta/html/user-activation/no-activation-thru-escape-key.html.ini deleted file mode 100644 index 26f0049409453..0000000000000 --- a/testing/web-platform/meta/html/user-activation/no-activation-thru-escape-key.html.ini +++ /dev/null @@ -1,29 +0,0 @@ -[ -no -- -activation -- -thru -- -escape -- -key -. -html -] -[ -' -Escape -' -key -doesn -' -t -activate -a -page -. -] -expected -: -FAIL diff --git a/testing/web-platform/meta/html/user-activation/propagation-crossorigin.sub.html.ini b/testing/web-platform/meta/html/user-activation/propagation-crossorigin.sub.html.ini index fa75eb8ad3d5e..8ec61e22a9893 100644 --- a/testing/web-platform/meta/html/user-activation/propagation-crossorigin.sub.html.ini +++ b/testing/web-platform/meta/html/user-activation/propagation-crossorigin.sub.html.ini @@ -7,13 +7,26 @@ sub . html ] +# +There +is +a +webdriver +bug +( +Bug +1856989 +) +which +breaks +cross +- +process +iframe +clicks expected : -TIMEOUT -[ -Propagation -test -] -expected +if +fission : -NOTRUN +TIMEOUT diff --git a/testing/web-platform/meta/html/user-activation/propagation-same-and-cross-origin.sub.html.ini b/testing/web-platform/meta/html/user-activation/propagation-same-and-cross-origin.sub.html.ini index 6d1f4c889c658..7889085b25282 100644 --- a/testing/web-platform/meta/html/user-activation/propagation-same-and-cross-origin.sub.html.ini +++ b/testing/web-platform/meta/html/user-activation/propagation-same-and-cross-origin.sub.html.ini @@ -13,57 +13,26 @@ sub . html ] -expected -: -TIMEOUT -[ -Check -Initial -states -of -user -activation -are -all -false -] -expected -: -NOTRUN -[ -Check -that -activating -a -same -- -origin -navigable -doesn -' -t -activate +# +There +is a -cross -origin -navigable -] -expected -: -NOTRUN -[ -Clicking -on -the +webdriver +bug +( +Bug +1856989 +) +which +breaks cross - -origin -navigable -activates -parent -navigable -. -] +process +iframe +clicks expected : -NOTRUN +if +fission +: +TIMEOUT diff --git a/testing/web-platform/meta/html/user-activation/propagation-sameorigin.html.ini b/testing/web-platform/meta/html/user-activation/propagation-sameorigin.html.ini deleted file mode 100644 index fee23d44b1e63..0000000000000 --- a/testing/web-platform/meta/html/user-activation/propagation-sameorigin.html.ini +++ /dev/null @@ -1,17 +0,0 @@ -[ -propagation -- -sameorigin -. -html -] -expected -: -TIMEOUT -[ -Propagation -test -] -expected -: -NOTRUN diff --git a/testing/web-platform/meta/html/user-activation/user-activation-interface.html.ini b/testing/web-platform/meta/html/user-activation/user-activation-interface.html.ini deleted file mode 100644 index a0548144790f1..0000000000000 --- a/testing/web-platform/meta/html/user-activation/user-activation-interface.html.ini +++ /dev/null @@ -1,25 +0,0 @@ -[ -user -- -activation -- -interface -. -html -] -[ -navigator -. -userActivation -shows -correct -states -before -/ -after -a -click -] -expected -: -FAIL diff --git a/testing/web-platform/tests/html/user-activation/propagation-sameorigin.html b/testing/web-platform/tests/html/user-activation/propagation-sameorigin.html index 3ed6721593f4e..1eb49b11dd9c5 100644 --- a/testing/web-platform/tests/html/user-activation/propagation-sameorigin.html +++ b/testing/web-platform/tests/html/user-activation/propagation-sameorigin.html @@ -477,6 +477,42 @@ ' ) { +/ +/ +Siblings +( +same +or +cross +origin +) +should +not +be +activated +per +spec +/ +/ +Spec +issue +discussing +: +https +: +/ +/ +github +. +com +/ +whatwg +/ +html +/ +issues +/ +9831 test ( ( @@ -484,14 +520,14 @@ = > { -assert_true +assert_false ( msg . isActive ) ; -assert_true +assert_false ( msg .