PointerMove proposal: add an origin property

Hi,

After discussing this on the IRC channel with James, I'd like to make a
proposal for modifying pointerMove, but it'd be handy to have a discussion
here before I make edits to the spec.

Proposal:

Add an "origin" property to the pointerMove command. This could be one of
three values "absolute", "input state" or an element reference, and would
default to "absolute" if not specified. The x/y offsets are assumed to be
relative to the origin.

Rationale:
There are some cases where it's not possible to know the location of
element mid-way through performing a sequence of actions (for example, if
it has moved through JS or a CSS animation).

Since there's no way to get the absolute position of an element mid-way
through performing an action sequence, it is unsafe to assume that we can
know the absolute x/y coordinates that should be used for later move
operations after we use an offset relative to an element. For example "move
to this element, click, then move down 20px and to the right 150px" when
attempting to test a sucker-fish style menu becomes impossible to express
safely.

Fortunately, the input state is already tracking the x/y location of the
pointer input device. By allowing users to specify that moves are relative
to the existing input state we can side-step the whole problem.

Any existing implementations of the spec will default to the behaviour that
was agreed in Seattle (that x/y are absolute)

Simon

Received on Monday, 9 January 2017 11:20:08 UTC