Re: Intent to ship: MouseEvent.offsetX/Y
On Tue, Mar 3, 2015 at 8:49 AM, Mike Taylor mi...@mozilla.com wrote: On 3/1/15 17:58, smaug wrote: Haven't changes from integer to doubles caused issues in some cases. Boris might recall some examples. IE just reverted from using doubles on MouseEvent for compat reasons: https://www.w3.org/Bugs/Public/show_bug.cgi?id=28029#c6 Ah, that's good to know! I'll change offsetX/Y to long then. Rob -- oIo otoeololo oyooouo otohoaoto oaonoyooonoeo owohooo oioso oaonogoroyo owoiotoho oao oboroootohoeoro oooro osoiosotoeoro owoiololo oboeo osouobojoeocoto otooo ojouodogomoeonoto.o oAogoaoiono,o oaonoyooonoeo owohooo osoaoyoso otooo oao oboroootohoeoro oooro osoiosotoeoro,o o‘oRoaocoao,o’o oioso oaonosowoeoroaoboloeo otooo otohoeo ocooouoroto.o oAonodo oaonoyooonoeo owohooo osoaoyoso,o o‘oYooouo ofolo!o’o owoiololo oboeo oiono odoaonogoeoro ooofo otohoeo ofoioroeo ooofo ohoeololo. ___ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform
Re: Intent to ship: MouseEvent.offsetX/Y
On 3/1/15 17:58, smaug wrote: Haven't changes from integer to doubles caused issues in some cases. Boris might recall some examples. IE just reverted from using doubles on MouseEvent for compat reasons: https://www.w3.org/Bugs/Public/show_bug.cgi?id=28029#c6 -- Mike Taylor Web Compat, Mozilla ___ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform
Re: Intent to ship: MouseEvent.offsetX/Y
On Mon, Mar 2, 2015 at 7:00 PM, Chris Peterson cpeter...@mozilla.com wrote: Gecko's offsetX/Y could return doubles, for compatibility with the spec, that are always snapped to whole numbers, for compatibility with other browsers. Or Gecko could add random noise to the low bits of offsetX/Y so they are *never* whole numbers. Web developers would need to handle fuzzy results today, thus preparing for more precise results in the future. :) Let's not overthink this :-) Rob -- oIo otoeololo oyooouo otohoaoto oaonoyooonoeo owohooo oioso oaonogoroyo owoiotoho oao oboroootohoeoro oooro osoiosotoeoro owoiololo oboeo osouobojoeocoto otooo ojouodogomoeonoto.o oAogoaoiono,o oaonoyooonoeo owohooo osoaoyoso otooo oao oboroootohoeoro oooro osoiosotoeoro,o o‘oRoaocoao,o’o oioso oaonosowoeoroaoboloeo otooo otohoeo ocooouoroto.o oAonodo oaonoyooonoeo owohooo osoaoyoso,o o‘oYooouo ofolo!o’o owoiololo oboeo oiono odoaonogoeoro ooofo otohoeo ofoioroeo ooofo ohoeololo. ___ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform
Re: Intent to ship: MouseEvent.offsetX/Y
On 02/28/2015 05:25 AM, Robert O'Callahan wrote: On Sat, Feb 28, 2015 at 8:30 AM, Jeff Muizelaar jmuizel...@mozilla.com wrote: On Fri, Feb 27, 2015 at 2:21 PM, Robert O'Callahan rob...@ocallahan.org wrote: Oh, another issue is that I've followed the spec and made offsetX/Y doubles, whereas Blink is integers, which introduces a small amount compat risk. IE also uses integers. Wouldn't it be better to change the spec to follow the existing browser's behaviour? In some ways, yes, although the extra accuracy given by doubles could be useful in practice. Haven't changes from integer to doubles caused issues in some cases. Boris might recall some examples. Rob ___ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform
Re: Intent to ship: MouseEvent.offsetX/Y
On 2/27/15 7:25 PM, Robert O'Callahan wrote: On Sat, Feb 28, 2015 at 8:30 AM, Jeff Muizelaarjmuizel...@mozilla.com wrote: On Fri, Feb 27, 2015 at 2:21 PM, Robert O'Callahanrob...@ocallahan.org wrote: Oh, another issue is that I've followed the spec and made offsetX/Y doubles, whereas Blink is integers, which introduces a small amount compat risk. IE also uses integers. Wouldn't it be better to change the spec to follow the existing browser's behaviour? In some ways, yes, although the extra accuracy given by doubles could be useful in practice. Gecko's offsetX/Y could return doubles, for compatibility with the spec, that are always snapped to whole numbers, for compatibility with other browsers. Or Gecko could add random noise to the low bits of offsetX/Y so they are *never* whole numbers. Web developers would need to handle fuzzy results today, thus preparing for more precise results in the future. :) ___ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform
Re: Intent to ship: MouseEvent.offsetX/Y
On 3/2/15 1:00 AM, Chris Peterson wrote: Gecko's offsetX/Y could return doubles, for compatibility with the spec, that are always snapped to whole numbers, for compatibility with other browsers. How, precisely, is this different from returning integers? Remember, this is JS we're talking about: there is only one Number type. -Boris ___ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform
Re: Intent to ship: MouseEvent.offsetX/Y
On Sat, Feb 28, 2015 at 8:30 AM, Jeff Muizelaar jmuizel...@mozilla.com wrote: On Fri, Feb 27, 2015 at 2:21 PM, Robert O'Callahan rob...@ocallahan.org wrote: Oh, another issue is that I've followed the spec and made offsetX/Y doubles, whereas Blink is integers, which introduces a small amount compat risk. IE also uses integers. Wouldn't it be better to change the spec to follow the existing browser's behaviour? In some ways, yes, although the extra accuracy given by doubles could be useful in practice. Rob -- oIo otoeololo oyooouo otohoaoto oaonoyooonoeo owohooo oioso oaonogoroyo owoiotoho oao oboroootohoeoro oooro osoiosotoeoro owoiololo oboeo osouobojoeocoto otooo ojouodogomoeonoto.o oAogoaoiono,o oaonoyooonoeo owohooo osoaoyoso otooo oao oboroootohoeoro oooro osoiosotoeoro,o o‘oRoaocoao,o’o oioso oaonosowoeoroaoboloeo otooo otohoeo ocooouoroto.o oAonodo oaonoyooonoeo owohooo osoaoyoso,o o‘oYooouo ofolo!o’o owoiololo oboeo oiono odoaonogoeoro ooofo otohoeo ofoioroeo ooofo ohoeololo. ___ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform
Re: Intent to ship: MouseEvent.offsetX/Y
On Sat, Feb 28, 2015 at 8:15 AM, Robert O'Callahan rob...@ocallahan.org wrote: Summary: CSSOM Views specify offsetX/Y properties on MouseEvent. Other browsers implement them. Many sites use it with a fallback for Firefox, but I've found at least one site that doesn't have a fallback. It's trivial to implement. Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=69787 Spec: http://www.w3.org/TR/cssom-view/#dom-mouseevent-offsetx The spec has a few issues; I've posted to www-style about those, but I don't think they'll have much effect in the wild. Platform coverage: All Target release: Gecko 39 Preference behind which this will be implemented: I don't think this needs one. Other browsers already have this. There is a bit of risk due to sites taking a new path in Firefox, but I think it's low since this path is already taken in IE and Blink so they won't be checking offsetX/Y and switching on some Webkit-specific stuff, probably. Oh, another issue is that I've followed the spec and made offsetX/Y doubles, whereas Blink is integers, which introduces a small amount compat risk. Rob -- oIo otoeololo oyooouo otohoaoto oaonoyooonoeo owohooo oioso oaonogoroyo owoiotoho oao oboroootohoeoro oooro osoiosotoeoro owoiololo oboeo osouobojoeocoto otooo ojouodogomoeonoto.o oAogoaoiono,o oaonoyooonoeo owohooo osoaoyoso otooo oao oboroootohoeoro oooro osoiosotoeoro,o o‘oRoaocoao,o’o oioso oaonosowoeoroaoboloeo otooo otohoeo ocooouoroto.o oAonodo oaonoyooonoeo owohooo osoaoyoso,o o‘oYooouo ofolo!o’o owoiololo oboeo oiono odoaonogoeoro ooofo otohoeo ofoioroeo ooofo ohoeololo. ___ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform
Re: Intent to ship: MouseEvent.offsetX/Y
On Fri, Feb 27, 2015 at 2:21 PM, Robert O'Callahan rob...@ocallahan.org wrote: Oh, another issue is that I've followed the spec and made offsetX/Y doubles, whereas Blink is integers, which introduces a small amount compat risk. IE also uses integers. Wouldn't it be better to change the spec to follow the existing browser's behaviour? -Jeff ___ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform
Intent to ship: MouseEvent.offsetX/Y
Summary: CSSOM Views specify offsetX/Y properties on MouseEvent. Other browsers implement them. Many sites use it with a fallback for Firefox, but I've found at least one site that doesn't have a fallback. It's trivial to implement. Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=69787 Spec: http://www.w3.org/TR/cssom-view/#dom-mouseevent-offsetx The spec has a few issues; I've posted to www-style about those, but I don't think they'll have much effect in the wild. Platform coverage: All Target release: Gecko 39 Preference behind which this will be implemented: I don't think this needs one. Other browsers already have this. There is a bit of risk due to sites taking a new path in Firefox, but I think it's low since this path is already taken in IE and Blink so they won't be checking offsetX/Y and switching on some Webkit-specific stuff, probably. Rob -- oIo otoeololo oyooouo otohoaoto oaonoyooonoeo owohooo oioso oaonogoroyo owoiotoho oao oboroootohoeoro oooro osoiosotoeoro owoiololo oboeo osouobojoeocoto otooo ojouodogomoeonoto.o oAogoaoiono,o oaonoyooonoeo owohooo osoaoyoso otooo oao oboroootohoeoro oooro osoiosotoeoro,o o‘oRoaocoao,o’o oioso oaonosowoeoroaoboloeo otooo otohoeo ocooouoroto.o oAonodo oaonoyooonoeo owohooo osoaoyoso,o o‘oYooouo ofolo!o’o owoiololo oboeo oiono odoaonogoeoro ooofo otohoeo ofoioroeo ooofo ohoeololo. ___ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform