Re: Sub-pixel coordinate granularity

We discussed this on a PEWG call at some point and agreed using floating
point co-ordinates is a good thing, and that it happens in IE not just for
browser zoom but also in high-dpi scenarios.

One thing we didn't discuss is what the right type for 'width' and 'height'
are (which our spec DOES define).  If the co-ordinates are doubles then I'd
argue 'width' and 'height' should be too, at least for consistency.  This
is probably most important when zoomed in (but overall probably not that
important for practical scenarios).  If we're making other normative
changes, should we change this as well?


On Tue, Mar 18, 2014 at 4:29 PM, Rick Byers <> wrote:

> Apparently IE returns sub-pixel co-ordinates for pointer events by default
> [1].  That blog post says that this only happens at browser zoom >100%, but
> shouldn't it also happen on high-DPI devices where 1 CSS pixel is larger
> than a screen pixel?  I don't have a high-DPI windows device to test
> currently.  Jacob/Asir, can you clarify IE's behavior here?
> Also (tangentially related), that blog post indicates that there's web
> compat issues with having APIs like Element.scrollTop return fractional
> values (and so IE has a proprietary switch "msCSSOMElementFloatMetrics" for
> enabling it).  Simon Pieters (CSS OM Spec editor) asked for details on the
> web compat impact here [2] but never got any response.  Jacob, can you help
> get us some details from the IE team?
> This is starting to become very important to us as in blink as we work to
> enable scroll-linked touch effects like pull-to-refresh on high-dpi devices.
> Thanks,
>    Rick
> [1]
> [2]
> On Wed, Dec 18, 2013 at 12:13 AM, Rick Byers <> wrote:
>> Hi,
>> The latest CSSOM view editors draft extends a number of APIs (including
>> MouseEvent) to use 'double' for co-ordinates instead of 'int' (
>>  Since PointerEvent extends MouseEvent, we'd get this improved definition
>> "for free".  I think this is valuable, for example, when implementing
>> javscript-driven touch dragging or scrolling which should be just as smooth
>> as native browser scrolling.
>> Thoughts?
>>    Rick

Received on Friday, 16 May 2014 17:10:19 UTC