[css3-ui] 'cursor' with an "out of range" hotspot - what behavior?

The 'cursor' property lets you specify the 'hotspot' for the cursor:
the offset into the image that the actual click emanates from
(defaulting to 0,0).

The spec makes no special mention of what to do if either offset is
negative, or larger than the corresponding dimension in the image.
It's technically okay to have either of these, it just means that the
"active" part of the cursor is outside the cursor image, which might
be confusing.

However, no browser implements this.  The behaviors they *do*
implement are wildly varying.  The list below gives the behavior in
several browsers of an explicit out-of-bounds hotspot (specified in
CSS) and an implicit one (specified in a .cur file):

Chrome pre r134149
  * In CSS: Clamped
  * In .cur: N/A
Chrome post r134149
  * In CSS: Ignored (hotspot set to 0,0)
  * In .cur: N/A
Chrome w/ patch from  bug 100059
  * In CSS: Ignored
  * In .cur: Ignored
FireFox 16.0.2
  * In CSS: Clamped
  * In .cur: Skipped image as bad
IE 10
  * In CSS: N/A
  * In .cur: Clamped
Safari (6.0)
  * In CSS: Ignored
  * In .cur: Ignored

(This list was taken from a webkit bug about Chrome behavior, thus the
Chrome focus.)

It appears obvious that we should change the spec, since nobody obeys
it currently and afaik no one plans to.  However, which behavior
should we switch to?

It seems good for the behavior of explicit and implicit hotspots to be
the same.  I don't have a strong opinion on whether it's better to
ignore or clamp.  I slightly lean towards clamping, because it seems
to preserve the authors intent better, and I presume the IE behavior
is the generic Windows behavior, so if there are badly-authored .cur
files in the wild, they likely depend on that behavior.

Thoughts?

~TJ

Received on Friday, 16 November 2012 19:23:30 UTC