Thanks! I'll review this (moving Philip to cc). https://codereview.chromium.org/1170703003/diff/40001/Source/core/dom/Touch.h File Source/core/dom/Touch.h (right): https://codereview.chromium.org/1170703003/diff/40001/Source/core/dom/Touch.h#newcode48 Source/core/dom/Touch.h:48: long ...
4 years, 10 months ago
(2015-06-09 16:04:37 UTC)
#5
Thanks! I'll review this (moving Philip to cc).
https://codereview.chromium.org/1170703003/diff/40001/Source/core/dom/Touch.h
File Source/core/dom/Touch.h (right):
https://codereview.chromium.org/1170703003/diff/40001/Source/core/dom/Touch.h...
Source/core/dom/Touch.h:48: long identifier, const FloatPoint& screenPos, const
FloatPoint& pagePos,
On some platforms (64-bit linux I think) C++ 'long' is 64-bits. But in IDL
'long' is always 32 bits. So when using 'long' in IDL, please use 'int' in C++.
https://codereview.chromium.org/1170703003/diff/40001/Source/core/dom/Touch.h...
Source/core/dom/Touch.h:48: long identifier, const FloatPoint& screenPos, const
FloatPoint& pagePos,
Please check all callers of this method for signed/unsigned mismatch too. Eg.
the main place in EventHandler::handleTouchEvent passes an unsigned here (I
think that should generate a warning - at least in some build configs?).
Happily it looks like we can also just change PlatformTouchPoint::id to be 'int'
as well. The API from Chromium (WebTouchPoint) is already using 'int' so this
will also fix the signed->unsigned conversion that was happening from there.
Rick Byers
BTW this would have potential compat implications if we ever actually used large values. But ...
4 years, 10 months ago
(2015-06-09 16:06:04 UTC)
#6
BTW this would have potential compat implications if we ever actually used large
values. But unlike Safari (IIRC), chromium always uses small integers on all
platforms - so I don't think we need to worry about getting negative values in
practice.
Rick Byers
Also /cc mustaq since this should be (at least very slightly) helpful for pointer events. ...
4 years, 10 months ago
(2015-06-09 16:07:56 UTC)
#7
Also /cc mustaq since this should be (at least very slightly) helpful for
pointer events. PointerEvent.pointerId is also defined to be a 'long', so we
can directly copy the PlatformTouchPoint ID without a signed/unsigned mismatch.
ramya.v
Updated as per review comments. PTAL! https://codereview.chromium.org/1170703003/diff/40001/Source/core/dom/Touch.h File Source/core/dom/Touch.h (right): https://codereview.chromium.org/1170703003/diff/40001/Source/core/dom/Touch.h#newcode48 Source/core/dom/Touch.h:48: long identifier, const ...
4 years, 10 months ago
(2015-06-10 07:13:45 UTC)
#8
Updated as per review comments.
PTAL!
https://codereview.chromium.org/1170703003/diff/40001/Source/core/dom/Touch.h
File Source/core/dom/Touch.h (right):
https://codereview.chromium.org/1170703003/diff/40001/Source/core/dom/Touch.h...
Source/core/dom/Touch.h:48: long identifier, const FloatPoint& screenPos, const
FloatPoint& pagePos,
On 2015/06/09 16:04:37, Rick Byers wrote:
> On some platforms (64-bit linux I think) C++ 'long' is 64-bits. But in IDL
> 'long' is always 32 bits. So when using 'long' in IDL, please use 'int' in
C++.
Done.
https://codereview.chromium.org/1170703003/diff/40001/Source/core/dom/Touch.h...
Source/core/dom/Touch.h:48: long identifier, const FloatPoint& screenPos, const
FloatPoint& pagePos,
On 2015/06/09 16:04:37, Rick Byers wrote:
> Please check all callers of this method for signed/unsigned mismatch too. Eg.
> the main place in EventHandler::handleTouchEvent passes an unsigned here (I
> think that should generate a warning - at least in some build configs?).
> Happily it looks like we can also just change PlatformTouchPoint::id to be
'int'
> as well. The API from Chromium (WebTouchPoint) is already using 'int' so this
> will also fix the signed->unsigned conversion that was happening from there.
Done.
Issue 1170703003: Touch.identifier should be long, not unsigned long
(Closed)
Created 4 years, 10 months ago by ramya.v
Modified 4 years, 10 months ago
Reviewers: Rick Byers, pdr.
Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Comments: 5