Bug
1825757 [wpt PR 39302] - Fix tests requiring non-standard MouseEvent.toElement/fromElement, a=testonly
Automatic update from web-platform-tests
Remove custom PointerEvent WebIDL checks
While this checks that actual pointer event instances, created in
response to UI input via testdriver.js, conform to the spec, it
doesn't really make sense to have these tests here: if we want to have
these, these should be generated by idlharness.
This patch doesn't however introduce such idlharness tests, as the
marginal value of doing this above and beyond our existing coverage
(of a constructed PointerEvent) seems minimal.
It's also worthwhile to note that this included some non-standard
attributes, at least toElement/fromElement: see
https://github.com/web-platform-tests/interop/issues/308.
--
Make toElement/fromElement null checks optional
These are intended to test this spec text:
> NOTE: Many user agents expose non-standard attributes fromElement
> and toElement in MouseEvents to support legacy content. We encourage
> those user agents to set the values of those (inherited) attributes
> in PointerEvents to null to transition authors to the use of
> standardized alternates (i.e. target and relatedTarget).
Given this is a note, it definitely doesn't make sense for the test to
assert that they are implemented and are set to null; this loosens the
test to allow for toElement/fromElement to not be implemented (as is
the case in Firefox), though it does still go above and beyond the
spec in requiring them to be null if they are supported.
--
wpt-commits:
ef6fc4906296cae9d34843ae0e156fed9454e559,
85f4fbdb47691e9037cde48f1f8d9c9c8c0e69f9
wpt-pr: 39302