diff --git a/dom/base/Element.cpp b/dom/base/Element.cpp index 9bc888f45666..85a9478dba26 100644 --- a/dom/base/Element.cpp +++ b/dom/base/Element.cpp @@ -11573,6 +11573,451 @@ void Element : : +SetAttribute +( +const +nsAString +& +aName +const +TrustedHTMLOrTrustedScriptOrTrustedScriptURLOrString +& +aValue +nsIPrincipal +* +aTriggeringPrincipal +ErrorResult +& +aError +) +{ +aError += +nsContentUtils +: +: +CheckQName +( +aName +false +) +; +if +( +aError +. +Failed +( +) +) +{ +return +; +} +nsAutoString +nameToUse +; +const +nsAttrName +* +name += +InternalGetAttrNameFromQName +( +aName +& +nameToUse +) +; +if +( +! +name +) +{ +RefPtr +< +nsAtom +> +nameAtom += +NS_AtomizeMainThread +( +nameToUse +) +; +Maybe +< +nsAutoString +> +compliantStringHolder +; +const +nsAString +* +compliantString += +TrustedTypeUtils +: +: +GetTrustedTypesCompliantAttributeValue +( +* +this +nameAtom +kNameSpaceID_None +aValue +compliantStringHolder +aError +) +; +if +( +aError +. +Failed +( +) +) +{ +return +; +} +aError += +SetAttr +( +kNameSpaceID_None +nameAtom +* +compliantString +aTriggeringPrincipal +true +) +; +return +; +} +Maybe +< +nsAutoString +> +compliantStringHolder +; +RefPtr +< +nsAtom +> +attributeName += +name +- +> +LocalName +( +) +; +nsMutationGuard +guard +; +const +nsAString +* +compliantString += +TrustedTypeUtils +: +: +GetTrustedTypesCompliantAttributeValue +( +* +this +attributeName +name +- +> +NamespaceID +( +) +aValue +compliantStringHolder +aError +) +; +if +( +aError +. +Failed +( +) +) +{ +return +; +} +if +( +! +guard +. +Mutated +( +0 +) +) +{ +aError += +SetAttr +( +name +- +> +NamespaceID +( +) +name +- +> +LocalName +( +) +name +- +> +GetPrefix +( +) +* +compliantString +aTriggeringPrincipal +true +) +; +return +; +} +/ +/ +GetTrustedTypesCompliantAttributeValue +may +have +modified +mAttrs +and +made +/ +/ +the +result +of +InternalGetAttrNameFromQName +above +invalid +. +It +may +now +return +/ +/ +a +different +value +perhaps +a +nullptr +. +To +be +safe +just +call +the +version +of +/ +/ +Element +: +: +SetAttribute +accepting +a +string +value +. +SetAttribute +( +aName +* +compliantString +aTriggeringPrincipal +aError +) +; +} +void +Element +: +: +SetAttributeNS +( +const +nsAString +& +aNamespaceURI +const +nsAString +& +aQualifiedName +const +TrustedHTMLOrTrustedScriptOrTrustedScriptURLOrString +& +aValue +nsIPrincipal +* +aTriggeringPrincipal +ErrorResult +& +aError +) +{ +RefPtr +< +mozilla +: +: +dom +: +: +NodeInfo +> +ni +; +aError += +nsContentUtils +: +: +GetNodeInfoFromQName +( +aNamespaceURI +aQualifiedName +mNodeInfo +- +> +NodeInfoManager +( +) +ATTRIBUTE_NODE +getter_AddRefs +( +ni +) +) +; +if +( +aError +. +Failed +( +) +) +{ +return +; +} +Maybe +< +nsAutoString +> +compliantStringHolder +; +RefPtr +< +nsAtom +> +attributeName += +ni +- +> +NameAtom +( +) +; +const +nsAString +* +compliantString += +TrustedTypeUtils +: +: +GetTrustedTypesCompliantAttributeValue +( +* +this +attributeName +ni +- +> +NamespaceID +( +) +aValue +compliantStringHolder +aError +) +; +if +( +aError +. +Failed +( +) +) +{ +return +; +} +aError += +SetAttr +( +ni +- +> +NamespaceID +( +) +ni +- +> +NameAtom +( +) +ni +- +> +GetPrefixAtom +( +) +* +compliantString +aTriggeringPrincipal +true +) +; +} +void +Element +: +: SetAttributeDevtools ( const diff --git a/dom/base/Element.h b/dom/base/Element.h index a53e4932151e..e2d47ab8076c 100644 --- a/dom/base/Element.h +++ b/dom/base/Element.h @@ -1327,6 +1327,9 @@ TrustedHTML class TrustedHTMLOrNullIsEmptyString ; +class +TrustedHTMLOrTrustedScriptOrTrustedScriptURLOrString +; / / IID @@ -7695,6 +7698,76 @@ aError ) ; } +MOZ_CAN_RUN_SCRIPT +void +SetAttribute +( +const +nsAString +& +aName +const +TrustedHTMLOrTrustedScriptOrTrustedScriptURLOrString +& +aValue +nsIPrincipal +* +aTriggeringPrincipal +ErrorResult +& +aError +) +; +MOZ_CAN_RUN_SCRIPT +void +SetAttributeNS +( +const +nsAString +& +aNamespaceURI +const +nsAString +& +aLocalName +const +TrustedHTMLOrTrustedScriptOrTrustedScriptURLOrString +& +aValue +nsIPrincipal +* +aTriggeringPrincipal +ErrorResult +& +aError +) +; +MOZ_CAN_RUN_SCRIPT +void +SetAttribute +( +const +nsAString +& +aName +const +TrustedHTMLOrTrustedScriptOrTrustedScriptURLOrString +& +aValue +ErrorResult +& +aError +) +{ +SetAttribute +( +aName +aValue +nullptr +aError +) +; +} / * * diff --git a/dom/security/trusted-types/TrustedTypeUtils.cpp b/dom/security/trusted-types/TrustedTypeUtils.cpp index 4d69d29f73c0..5860b32bd006 100644 --- a/dom/security/trusted-types/TrustedTypeUtils.cpp +++ b/dom/security/trusted-types/TrustedTypeUtils.cpp @@ -230,6 +230,17 @@ h # include " +mozilla +/ +dom +/ +TrustedTypesConstants +. +h +" +# +include +" nsGlobalWindowInner . h @@ -1580,6 +1591,30 @@ IsNullIsEmptyString ) ; } +if +constexpr +( +std +: +: +is_same_v +< +TrustedTypeOrStringArg +const +nsAString +* +> +) +{ +Unused +< +< +aInput +; +return +true +; +} MOZ_ASSERT_UNREACHABLE ( ) @@ -1671,6 +1706,25 @@ GetAsNullIsEmptyString ) ; } +if +constexpr +( +std +: +: +is_same_v +< +TrustedTypeOrStringArg +const +nsAString +* +> +) +{ +return +aInput +; +} MOZ_ASSERT_UNREACHABLE ( ) @@ -1782,6 +1836,30 @@ IsTrustedScriptURL ) ; } +if +constexpr +( +std +: +: +is_same_v +< +TrustedTypeOrStringArg +const +nsAString +* +> +) +{ +Unused +< +< +aInput +; +return +false +; +} MOZ_ASSERT_UNREACHABLE ( ) @@ -1891,6 +1969,11 @@ GetAsTrustedScriptURL mData ; } +Unused +< +< +aInput +; MOZ_ASSERT_UNREACHABLE ( ) @@ -2526,6 +2609,17 @@ TrustedType : TrustedHTML ; +aSink +. +AssignLiteral +( +u +" +HTMLIFrameElement +srcdoc +" +) +; return true ; @@ -2570,6 +2664,17 @@ TrustedType : TrustedScriptURL ; +aSink +. +AssignLiteral +( +u +" +HTMLScriptElement +src +" +) +; return true ; @@ -2631,6 +2736,17 @@ TrustedType : TrustedScriptURL ; +aSink +. +AssignLiteral +( +u +" +SVGScriptElement +href +" +) +; return true ; @@ -2641,6 +2757,450 @@ return false ; } +MOZ_CAN_RUN_SCRIPT +const +nsAString +* +GetTrustedTypesCompliantAttributeValue +( +const +nsINode +& +aElement +nsAtom +* +aAttributeName +int32_t +aAttributeNamespaceID +const +TrustedHTMLOrTrustedScriptOrTrustedScriptURLOrString +& +aNewValue +Maybe +< +nsAutoString +> +& +aResultHolder +ErrorResult +& +aError +) +{ +auto +getAsTrustedType += +[ +& +aNewValue +] +{ +if +( +aNewValue +. +IsTrustedHTML +( +) +) +{ +return +& +aNewValue +. +GetAsTrustedHTML +( +) +. +mData +; +} +if +( +aNewValue +. +IsTrustedScript +( +) +) +{ +return +& +aNewValue +. +GetAsTrustedScript +( +) +. +mData +; +} +MOZ_ASSERT +( +aNewValue +. +IsTrustedScriptURL +( +) +) +; +return +& +aNewValue +. +GetAsTrustedScriptURL +( +) +. +mData +; +} +; +auto +getContent += +[ +& +aNewValue +& +getAsTrustedType +] +{ +return +aNewValue +. +IsString +( +) +? +& +aNewValue +. +GetAsString +( +) +: +getAsTrustedType +( +) +; +} +; +if +( +! +StaticPrefs +: +: +dom_security_trusted_types_enabled +( +) +) +{ +/ +/ +A +trusted +type +might +' +ve +been +created +before +the +pref +was +set +to +false +/ +/ +so +we +cannot +assume +aNewValue +. +IsString +( +) +. +return +getContent +( +) +; +} +/ +/ +In +the +common +situation +of +non +- +data +document +without +any +/ +/ +require +- +trusted +- +types +- +for +directive +we +just +return +immediately +. +const +NodeInfo +* +nodeInfo += +aElement +. +NodeInfo +( +) +; +Document +* +ownerDoc += +nodeInfo +- +> +GetDocument +( +) +; +const +bool +ownerDocLoadedAsData += +ownerDoc +- +> +IsLoadedAsData +( +) +; +if +( +! +ownerDoc +- +> +HasPolicyWithRequireTrustedTypesForDirective +( +) +& +& +! +ownerDocLoadedAsData +) +{ +return +getContent +( +) +; +} +TrustedType +expectedType +; +nsAutoString +sink +; +if +( +! +GetTrustedTypeDataForAttribute +( +nodeInfo +- +> +NameAtom +( +) +nodeInfo +- +> +NamespaceID +( +) +aAttributeName +aAttributeNamespaceID +expectedType +sink +) +) +{ +return +getContent +( +) +; +} +if +( +( +expectedType += += +TrustedType +: +: +TrustedHTML +& +& +aNewValue +. +IsTrustedHTML +( +) +) +| +| +( +expectedType += += +TrustedType +: +: +TrustedScript +& +& +aNewValue +. +IsTrustedScript +( +) +) +| +| +( +expectedType += += +TrustedType +: +: +TrustedScriptURL +& +& +aNewValue +. +IsTrustedScriptURL +( +) +) +) +{ +return +getAsTrustedType +( +) +; +} +const +nsAString +* +input += +aNewValue +. +IsString +( +) +? +& +aNewValue +. +GetAsString +( +) +: +getAsTrustedType +( +) +; +switch +( +expectedType +) +{ +case +TrustedType +: +: +TrustedHTML +: +return +GetTrustedTypesCompliantString +< +TrustedHTML +> +( +input +sink +kTrustedTypesOnlySinkGroup +aElement +aResultHolder +aError +) +; +case +TrustedType +: +: +TrustedScript +: +return +GetTrustedTypesCompliantString +< +TrustedScript +> +( +input +sink +kTrustedTypesOnlySinkGroup +aElement +aResultHolder +aError +) +; +case +TrustedType +: +: +TrustedScriptURL +: +return +GetTrustedTypesCompliantString +< +TrustedScriptURL +> +( +input +sink +kTrustedTypesOnlySinkGroup +aElement +aResultHolder +aError +) +; +} +} } / / diff --git a/dom/security/trusted-types/TrustedTypeUtils.h b/dom/security/trusted-types/TrustedTypeUtils.h index 57d5052ad5ff..55b6a3ce7784 100644 --- a/dom/security/trusted-types/TrustedTypeUtils.h +++ b/dom/security/trusted-types/TrustedTypeUtils.h @@ -230,6 +230,9 @@ TrustedScriptURL class TrustedScriptURLOrString ; +class +TrustedHTMLOrTrustedScriptOrTrustedScriptURLOrString +; namespace TrustedTypeUtils { @@ -705,6 +708,72 @@ nsAString aSink ) ; +/ +/ +https +: +/ +/ +w3c +. +github +. +io +/ +trusted +- +types +/ +dist +/ +spec +/ +# +abstract +- +opdef +- +get +- +trusted +- +types +- +compliant +- +attribute +- +value +MOZ_CAN_RUN_SCRIPT +const +nsAString +* +GetTrustedTypesCompliantAttributeValue +( +const +nsINode +& +aElement +nsAtom +* +aAttributeName +int32_t +aAttributeNamespaceID +const +TrustedHTMLOrTrustedScriptOrTrustedScriptURLOrString +& +aNewValue +Maybe +< +nsAutoString +> +& +aResultHolder +ErrorResult +& +aError +) +; } / / diff --git a/dom/webidl/Element.webidl b/dom/webidl/Element.webidl index 686987eb7a0e..97de1f5147ed 100644 --- a/dom/webidl/Element.webidl +++ b/dom/webidl/Element.webidl @@ -370,7 +370,11 @@ setAttribute ( DOMString name +( +TrustedType +or DOMString +) value ) ; @@ -389,7 +393,11 @@ DOMString namespace DOMString name +( +TrustedType +or DOMString +) value ) ; @@ -2736,3 +2744,35 @@ options ; } ; +/ +/ +https +: +/ +/ +w3c +. +github +. +io +/ +trusted +- +types +/ +dist +/ +spec +/ +# +integrations +typedef +( +TrustedHTML +or +TrustedScript +or +TrustedScriptURL +) +TrustedType +; diff --git a/testing/web-platform/meta/trusted-types/GlobalEventHandlers-onclick.html.ini b/testing/web-platform/meta/trusted-types/GlobalEventHandlers-onclick.html.ini deleted file mode 100644 index d56c5d08c62a..000000000000 --- a/testing/web-platform/meta/trusted-types/GlobalEventHandlers-onclick.html.ini +++ /dev/null @@ -1,44 +0,0 @@ -[ -GlobalEventHandlers -- -onclick -. -html -] -[ -a -. -setAttribute -( -' -onclick -' -) -sets -an -unsuitable -trusted -type -. -] -expected -: -FAIL -[ -a -. -setAttribute -( -' -click -' -) -sets -a -test -string -. -] -expected -: -FAIL diff --git a/testing/web-platform/meta/trusted-types/TrustedTypePolicyFactory-metadata.tentative.html.ini b/testing/web-platform/meta/trusted-types/TrustedTypePolicyFactory-metadata.tentative.html.ini deleted file mode 100644 index a4cb7750d415..000000000000 --- a/testing/web-platform/meta/trusted-types/TrustedTypePolicyFactory-metadata.tentative.html.ini +++ /dev/null @@ -1,225 +0,0 @@ -[ -TrustedTypePolicyFactory -- -metadata -. -tentative -. -html -] -[ -Test -assignment -of -string -on -madeup -. -setAttribute -( -onerror -. -. -) -] -expected -: -FAIL -[ -Test -assignment -of -TrustedHTML -on -madeup -. -setAttribute -( -onerror -. -. -) -] -expected -: -FAIL -[ -Test -assignment -of -TrustedScriptURL -on -madeup -. -setAttribute -( -onerror -. -. -) -] -expected -: -FAIL -[ -Test -assignment -of -string -on -madeup -. -setAttribute -( -onclick -. -. -) -] -expected -: -FAIL -[ -Test -assignment -of -TrustedHTML -on -madeup -. -setAttribute -( -onclick -. -. -) -] -expected -: -FAIL -[ -Test -assignment -of -TrustedScriptURL -on -madeup -. -setAttribute -( -onclick -. -. -) -] -expected -: -FAIL -[ -Test -assignment -of -string -on -b -. -setAttribute -( -onerror -. -. -) -] -expected -: -FAIL -[ -Test -assignment -of -TrustedHTML -on -b -. -setAttribute -( -onerror -. -. -) -] -expected -: -FAIL -[ -Test -assignment -of -TrustedScriptURL -on -b -. -setAttribute -( -onerror -. -. -) -] -expected -: -FAIL -[ -Test -assignment -of -string -on -b -. -setAttribute -( -onclick -. -. -) -] -expected -: -FAIL -[ -Test -assignment -of -TrustedHTML -on -b -. -setAttribute -( -onclick -. -. -) -] -expected -: -FAIL -[ -Test -assignment -of -TrustedScriptURL -on -b -. -setAttribute -( -onclick -. -. -) -] -expected -: -FAIL diff --git a/testing/web-platform/meta/trusted-types/block-string-assignment-to-Element-setAttribute.html.ini b/testing/web-platform/meta/trusted-types/block-string-assignment-to-Element-setAttribute.html.ini index 81b3eaf8392b..8c610fee13c8 100644 --- a/testing/web-platform/meta/trusted-types/block-string-assignment-to-Element-setAttribute.html.ini +++ b/testing/web-platform/meta/trusted-types/block-string-assignment-to-Element-setAttribute.html.ini @@ -17,130 +17,6 @@ html script . src -accepts -only -TrustedScriptURL -] -expected -: -FAIL -[ -iframe -. -srcdoc -accepts -only -TrustedHTML -] -expected -: -FAIL -[ -div -. -onclick -accepts -only -TrustedScript -] -expected -: -FAIL -[ -Script -. -prototype -. -setAttribute -. -SrC -= -string -throws -. -] -expected -: -FAIL -[ -script -. -src -' -s -mutationobservers -receive -the -default -policy -' -s -value -. -] -expected -: -FAIL -[ -iframe -. -srcdoc -' -s -mutationobservers -receive -the -default -policy -' -s -value -. -] -expected -: -FAIL -[ -div -. -onclick -' -s -mutationobservers -receive -the -default -policy -' -s -value -. -] -expected -: -FAIL -[ -div -. -onclick -accepts -string -and -null -after -default -policy -was -created -. -] -expected -: -FAIL -[ -script -. -src = setAttributeNode ( diff --git a/testing/web-platform/meta/trusted-types/block-string-assignment-to-Element-setAttributeNS.html.ini b/testing/web-platform/meta/trusted-types/block-string-assignment-to-Element-setAttributeNS.html.ini deleted file mode 100644 index eb95faaf2f49..000000000000 --- a/testing/web-platform/meta/trusted-types/block-string-assignment-to-Element-setAttributeNS.html.ini +++ /dev/null @@ -1,39 +0,0 @@ -[ -block -- -string -- -assignment -- -to -- -Element -- -setAttributeNS -. -html -] -[ -Blocking -non -- -TrustedScriptURL -assignment -to -< -svg -: -script -xlink -: -href -= -. -. -. -> -works -] -expected -: -FAIL diff --git a/testing/web-platform/meta/trusted-types/trusted-types-event-handlers.html.ini b/testing/web-platform/meta/trusted-types/trusted-types-event-handlers.html.ini index 2adbf12bc566..671764385984 100644 --- a/testing/web-platform/meta/trusted-types/trusted-types-event-handlers.html.ini +++ b/testing/web-platform/meta/trusted-types/trusted-types-event-handlers.html.ini @@ -12,1444 +12,9 @@ html [ Event handler -onclick -should -be -blocked -. -] -expected -: -FAIL -[ -Event -handler -onchange -should -be -blocked -. -] -expected -: -FAIL -[ -Event -handler -onfocus -should -be -blocked -. -] -expected -: -FAIL -[ -Event -handler -oNclick -should -be -blocked -. -] -expected -: -FAIL -[ -Event -handler -OnClIcK -should -be -blocked -. -] -expected -: -FAIL -[ -Event -handler -div -. -onabort -should -be -blocked -. -] -expected -: -FAIL -[ -Event -handler -div -. -onblur -should -be -blocked -. -] -expected -: -FAIL -[ -Event -handler -div -. -onfocus -should -be -blocked -. -] -expected -: -FAIL -[ -Event -handler -div -. -oncancel -should -be -blocked -. -] -expected -: -FAIL -[ -Event -handler -div -. -onauxclick -should -be -blocked -. -] -expected -: -FAIL -[ -Event -handler -div -. -onbeforeinput -should -be -blocked -. -] -expected -: -FAIL -[ -Event -handler -div -. -onbeforetoggle -should -be -blocked -. -] -expected -: -FAIL -[ -Event -handler -div -. -oncanplay -should -be -blocked -. -] -expected -: -FAIL -[ -Event -handler -div -. -oncanplaythrough -should -be -blocked -. -] -expected -: -FAIL -[ -Event -handler -div -. -onchange -should -be -blocked -. -] -expected -: -FAIL -[ -Event -handler -div -. -onclick -should -be -blocked -. -] -expected -: -FAIL -[ -Event -handler -div -. -onclose -should -be -blocked -. -] -expected -: -FAIL -[ -Event -handler -div -. -oncontentvisibilityautostatechange -should -be -blocked -. -] -expected -: -FAIL -[ -Event -handler -div -. -oncontextmenu -should -be -blocked -. -] -expected -: -FAIL -[ -Event -handler -div -. -oncopy -should -be -blocked -. -] -expected -: -FAIL -[ -Event -handler -div -. -oncuechange -should -be -blocked -. -] -expected -: -FAIL -[ -Event -handler -div -. -oncut -should -be -blocked -. -] -expected -: -FAIL -[ -Event -handler -div -. -ondblclick -should -be -blocked -. -] -expected -: -FAIL -[ -Event -handler -div -. -ondrag -should -be -blocked -. -] -expected -: -FAIL -[ -Event -handler -div -. -ondragend -should -be -blocked -. -] -expected -: -FAIL -[ -Event -handler -div -. -ondragenter -should -be -blocked -. -] -expected -: -FAIL -[ -Event -handler -div -. -ondragexit -should -be -blocked -. -] -expected -: -if -release_or_beta -: -FAIL -[ -Event -handler -div -. -ondragleave -should -be -blocked -. -] -expected -: -FAIL -[ -Event -handler -div -. -ondragover -should -be -blocked -. -] -expected -: -FAIL -[ -Event -handler -div -. -ondragstart -should -be -blocked -. -] -expected -: -FAIL -[ -Event -handler -div -. -ondrop -should -be -blocked -. -] -expected -: -FAIL -[ -Event -handler -div -. -ondurationchange -should -be -blocked -. -] -expected -: -FAIL -[ -Event -handler -div -. -onemptied -should -be -blocked -. -] -expected -: -FAIL -[ -Event -handler -div -. -onended -should -be -blocked -. -] -expected -: -FAIL -[ -Event -handler -div -. -onformdata -should -be -blocked -. -] -expected -: -FAIL -[ -Event -handler -div -. -oninput -should -be -blocked -. -] -expected -: -FAIL -[ -Event -handler -div -. -oninvalid -should -be -blocked -. -] -expected -: -FAIL -[ -Event -handler -div -. -onkeydown -should -be -blocked -. -] -expected -: -FAIL -[ -Event -handler -div -. -onkeypress -should -be -blocked -. -] -expected -: -FAIL -[ -Event -handler -div -. -onkeyup -should -be -blocked -. -] -expected -: -FAIL -[ -Event -handler -div -. -onload -should -be -blocked -. -] -expected -: -FAIL -[ -Event -handler -div -. -onloadeddata -should -be -blocked -. -] -expected -: -FAIL -[ -Event -handler -div -. -onloadedmetadata -should -be -blocked -. -] -expected -: -FAIL -[ -Event -handler -div -. -onloadstart -should -be -blocked -. -] -expected -: -FAIL -[ -Event -handler -div -. -onmousedown -should -be -blocked -. -] -expected -: -FAIL -[ -Event -handler -div -. -onmouseenter -should -be -blocked -. -] -expected -: -FAIL -[ -Event -handler -div -. -onmouseleave -should -be -blocked -. -] -expected -: -FAIL -[ -Event -handler -div -. -onmousemove -should -be -blocked -. -] -expected -: -FAIL -[ -Event -handler -div -. -onmouseout -should -be -blocked -. -] -expected -: -FAIL -[ -Event -handler -div -. -onmouseover -should -be -blocked -. -] -expected -: -FAIL -[ -Event -handler -div -. -onmouseup -should -be -blocked -. -] -expected -: -FAIL -[ -Event -handler -div -. -onwheel -should -be -blocked -. -] -expected -: -FAIL -[ -Event -handler -div -. -onpaste -should -be -blocked -. -] -expected -: -FAIL -[ -Event -handler -div -. -onpause -should -be -blocked -. -] -expected -: -FAIL -[ -Event -handler -div -. -onplay -should -be -blocked -. -] -expected -: -FAIL -[ -Event -handler -div -. -onplaying -should -be -blocked -. -] -expected -: -FAIL -[ -Event -handler -div -. -onprogress -should -be -blocked -. -] -expected -: -FAIL -[ -Event -handler -div -. -onratechange -should -be -blocked -. -] -expected -: -FAIL -[ -Event -handler -div -. -onreset -should -be -blocked -. -] -expected -: -FAIL -[ -Event -handler -div -. -onresize -should -be -blocked -. -] -expected -: -FAIL -[ -Event -handler -div -. -onscroll -should -be -blocked -. -] -expected -: -FAIL -[ -Event -handler -div -. -onscrollend -should -be -blocked -. -] -expected -: -FAIL -[ -Event -handler -div -. -onsecuritypolicyviolation -should -be -blocked -. -] -expected -: -FAIL -[ -Event -handler -div -. -onseeked -should -be -blocked -. -] -expected -: -FAIL -[ -Event -handler -div -. -onseeking -should -be -blocked -. -] -expected -: -FAIL -[ -Event -handler -div -. -onselect -should -be -blocked -. -] -expected -: -FAIL -[ -Event -handler -div -. -onslotchange -should -be -blocked -. -] -expected -: -FAIL -[ -Event -handler -div -. -onstalled -should -be -blocked -. -] -expected -: -FAIL -[ -Event -handler -div -. -onsubmit -should -be -blocked -. -] -expected -: -FAIL -[ -Event -handler -div -. -onsuspend -should -be -blocked -. -] -expected -: -FAIL -[ -Event -handler -div -. -ontimeupdate -should -be -blocked -. -] -expected -: -FAIL -[ -Event -handler -div -. -onvolumechange -should -be -blocked -. -] -expected -: -FAIL -[ -Event -handler -div -. -onwaiting -should -be -blocked -. -] -expected -: -FAIL -[ -Event -handler -div -. -onselectstart -should -be -blocked -. -] -expected -: -FAIL -[ -Event -handler -div -. -onselectionchange -should -be -blocked -. -] -expected -: -FAIL -[ -Event -handler -div -. -ontoggle -should -be -blocked -. -] -expected -: -FAIL -[ -Event -handler -div -. -onpointercancel -should -be -blocked -. -] -expected -: -FAIL -[ -Event -handler -div -. -onpointerdown -should -be -blocked -. -] -expected -: -FAIL -[ -Event -handler -div -. -onpointerup -should -be -blocked -. -] -expected -: -FAIL -[ -Event -handler -div -. -onpointermove -should -be -blocked -. -] -expected -: -FAIL -[ -Event -handler -div -. -onpointerout -should -be -blocked -. -] -expected -: -FAIL -[ -Event -handler -div -. -onpointerover -should -be -blocked -. -] -expected -: -FAIL -[ -Event -handler -div -. -onpointerenter -should -be -blocked -. -] -expected -: -FAIL -[ -Event -handler -div -. -onpointerleave -should -be -blocked -. -] -expected -: -FAIL -[ -Event -handler -div -. -ongotpointercapture -should -be -blocked -. -] -expected -: -FAIL -[ -Event -handler -div -. -onlostpointercapture -should -be -blocked -. -] -expected -: -FAIL -[ -Event -handler -div -. -onmozfullscreenchange -should -be -blocked -. -] -expected -: -FAIL -[ -Event -handler -div -. -onmozfullscreenerror -should -be -blocked -. -] -expected -: -FAIL -[ -Event -handler -div -. -onanimationcancel -should -be -blocked -. -] -expected -: -FAIL -[ -Event -handler -div -. -onanimationend -should -be -blocked -. -] -expected -: -FAIL -[ -Event -handler -div -. -onanimationiteration -should -be -blocked -. -] -expected -: -FAIL -[ -Event -handler -div -. -onanimationstart -should -be -blocked -. -] -expected -: -FAIL -[ -Event -handler -div -. -ontransitioncancel -should -be -blocked -. -] -expected -: -FAIL -[ -Event -handler -div -. -ontransitionend -should -be -blocked -. -] -expected -: -FAIL -[ -Event -handler -div -. -ontransitionrun -should -be -blocked -. -] -expected -: -FAIL -[ -Event -handler -div -. -ontransitionstart -should -be -blocked -. -] -expected -: -FAIL -[ -Event -handler -div -. -onwebkitanimationend -should -be -blocked -. -] -expected -: -FAIL -[ -Event -handler -div -. -onwebkitanimationiteration -should -be -blocked -. -] -expected -: -FAIL -[ -Event -handler -div -. -onwebkitanimationstart -should -be -blocked -. -] -expected -: -FAIL -[ -Event -handler -div -. -onwebkittransitionend -should -be -blocked -. -] -expected -: -FAIL -[ -Event -handler -div -. -onerror -should -be -blocked -. -] -expected -: -FAIL -[ -Event -handler -div -. -onfullscreenchange -should -be -blocked -. -] -expected -: -FAIL -[ -Event -handler -div -. -onfullscreenerror -should -be -blocked -. -] -expected -: -FAIL -[ -Event -handler div . -oncontextrestored +ondragexit should be blocked @@ -1457,19 +22,8 @@ blocked ] expected : -FAIL -[ -Event -handler -div -. -oncontextlost -should -be -blocked -. -] -expected +if +release_or_beta : FAIL [ @@ -1528,17 +82,3 @@ blocked expected : FAIL -[ -Event -handler -div -. -oncontentvisibilityautostatechange -should -be -blocked -. -] -expected -: -FAIL diff --git a/testing/web-platform/meta/trusted-types/trusted-types-svg-script-set-href.html.ini b/testing/web-platform/meta/trusted-types/trusted-types-svg-script-set-href.html.ini index ccde55f38270..52cad6005d95 100644 --- a/testing/web-platform/meta/trusted-types/trusted-types-svg-script-set-href.html.ini +++ b/testing/web-platform/meta/trusted-types/trusted-types-svg-script-set-href.html.ini @@ -27,35 +27,3 @@ baseVal expected : FAIL -[ -Assign -string -to -non -- -attached -SVGScriptElement -. -href -via -setAttribute -. -] -expected -: -FAIL -[ -Assign -string -to -attached -SVGScriptElement -. -href -via -setAttribute -. -] -expected -: -FAIL