Closed jrandolf closed 2 months ago
LGTM (to only validate properties that can be set on the particular event type, and to set the default values based on other specs instead of defining WebDriver-specific defaults). Are there any WPT changes needed?
Yes, several WPT tests need to be changed.
The Browser Testing and Tools Working Group just discussed Better pointer events
, and agreed to the following:
ACTION: Raise issue against HTML for Support for unloaded tabs [1]
I wonder if @gsnedders should look at this? I think Safaridriver's implementation is nonstandard in that touch inputs will fall back to mouse inputs if there isn't touch support. If the opposite is also true (i.e. mouse becomes touch on devices with only touch input) this might cause problems.
This is true, both ways around:
I don't think we can inject mouse events in any way on iOS, because I don't believe iOS has any support for a mouse. (Assistive Touch, as the name implies, still just dispatches touch events based on a physical mouse.) With the level we're injecting events at, we basically can't dispatch anything the OS cannot. And it turns out most existing WebDriver usage assumes there is a mouse—thus aliasing is practically a necessity for existing usage to work on a touch-only device.
AIUI, we fallback from touch to mouse because it turns out web developers ended up expecting this to work, but I don't know if it originally working was deliberate.
@gsnedders Then would this PR cause of a problem? It seems like a non-issue for webkit.
For specific pointer types, some properties are not supported and should not be configurable. Since WebDriver already specifies properties not exposed by WebDriver must have their default set to the hardware-unsupported default recommended in https://w3c.github.io/pointerevents/#pointerevent-interface (look at each property; the interface defaults are for something else), this PR splits up validation by pointer type and removes properties for pointer types that don't support them.
Preview | Diff