|
|
Created:
3 years, 7 months ago by lanwei Modified:
3 years, 7 months ago CC:
chromium-reviews, dtapuska+blinkwatch_chromium.org, eae+blinkwatch, jam, dtapuska+chromiumwatch_chromium.org, blink-reviews-events_chromium.org, dglazkov+blink, darin-cc_chromium.org, blink-reviews, kinuko+watch, blink-reviews-api_chromium.org Target Ref:
refs/heads/master Project:
chromium Visibility:
Public. |
DescriptionAdd pointer id to the WebMouseEvent's constructors
In order to make the WebMouseEvent's pointer id consistent with ui::MouseEvent, we
add pointer id to the WebMouseEvent's constructors. Then we can enable the DCHECK
of pointer id in PointerEventFactory.
BUG=694742
Review-Url: https://codereview.chromium.org/2849083002
Cr-Commit-Position: refs/heads/master@{#472106}
Committed: https://chromium.googlesource.com/chromium/src/+/2db36b51a5de1d110a0d9dbe6969ab9603df9ad8
Patch Set 1 : webmouseidd #
Total comments: 8
Patch Set 2 : webmouseevent id #
Total comments: 1
Patch Set 3 : webmouseid #
Total comments: 1
Patch Set 4 : Use KMousePointerId #
Total comments: 1
Patch Set 5 : webmouseid #
Total comments: 2
Patch Set 6 : webmouseid #Messages
Total messages: 104 (72 generated)
The CQ bit was checked by lanwei@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: cast_shell_android on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/cast_shell_a...)
The CQ bit was checked by lanwei@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
Patchset #1 (id:1) has been deleted
Patchset #1 (id:20001) has been deleted
The CQ bit was checked by lanwei@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was checked by lanwei@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Patchset #2 (id:60001) has been deleted
Description was changed from ========== webmouseid webmouseid webmouseid BUG= ========== to ========== Add pointer id to the WebMouseEvent's constructors In order to make the WebMouseEvent's pointer id consistent with ui::MouseEvent, we add pointer id to the WebMouseEvent's constructors. Then we can enable the DCHECK of pointer id in PointerEventFactory. BUG=694742 ==========
lanwei@chromium.org changed reviewers: + sadrul@chromium.org
lanwei@chromium.org changed reviewers: + dtapuska@chromium.org
Patchset #1 (id:40001) has been deleted
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
ui lgtm https://codereview.chromium.org/2849083002/diff/80001/third_party/WebKit/publ... File third_party/WebKit/public/platform/WebMouseWheelEvent.h (right): https://codereview.chromium.org/2849083002/diff/80001/third_party/WebKit/publ... third_party/WebKit/public/platform/WebMouseWheelEvent.h:61: 0), Shouldn't this be the default mouse-pointer-id? https://codereview.chromium.org/2849083002/diff/80001/third_party/WebKit/publ... File third_party/WebKit/public/platform/WebPointerProperties.h (right): https://codereview.chromium.org/2849083002/diff/80001/third_party/WebKit/publ... third_party/WebKit/public/platform/WebPointerProperties.h:49: WebPointerProperties(int id_param) explicit
https://codereview.chromium.org/2849083002/diff/80001/third_party/WebKit/publ... File third_party/WebKit/public/platform/WebInputEvent.h (right): https://codereview.chromium.org/2849083002/diff/80001/third_party/WebKit/publ... third_party/WebKit/public/platform/WebInputEvent.h:281: static const int32_t kMousePointerId = std::numeric_limits<int32_t>::max(); Use constexpr. Should this be in WebMouseEvent.h? https://codereview.chromium.org/2849083002/diff/80001/third_party/WebKit/publ... File third_party/WebKit/public/platform/WebMouseEvent.h (right): https://codereview.chromium.org/2849083002/diff/80001/third_party/WebKit/publ... third_party/WebKit/public/platform/WebMouseEvent.h:33: int id_param = kMousePointerId) Why do you use an int here and an int32_t for the definition?
The CQ bit was checked by lanwei@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: linux_chromium_tsan_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...) mac_chromium_rel_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_...)
The CQ bit was checked by lanwei@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Patchset #2 (id:100001) has been deleted
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
lanwei@chromium.org changed reviewers: + haraken@chromium.org
haraken@chromium.org: Please review changes in third_party/Webkit/*, thank you. https://codereview.chromium.org/2849083002/diff/80001/third_party/WebKit/publ... File third_party/WebKit/public/platform/WebInputEvent.h (right): https://codereview.chromium.org/2849083002/diff/80001/third_party/WebKit/publ... third_party/WebKit/public/platform/WebInputEvent.h:281: static const int32_t kMousePointerId = std::numeric_limits<int32_t>::max(); On 2017/05/01 15:49:05, dtapuska wrote: > Use constexpr. > > Should this be in WebMouseEvent.h? Done. https://codereview.chromium.org/2849083002/diff/80001/third_party/WebKit/publ... File third_party/WebKit/public/platform/WebMouseEvent.h (right): https://codereview.chromium.org/2849083002/diff/80001/third_party/WebKit/publ... third_party/WebKit/public/platform/WebMouseEvent.h:33: int id_param = kMousePointerId) On 2017/05/01 15:49:05, dtapuska wrote: > Why do you use an int here and an int32_t for the definition? Done. https://codereview.chromium.org/2849083002/diff/80001/third_party/WebKit/publ... File third_party/WebKit/public/platform/WebMouseWheelEvent.h (right): https://codereview.chromium.org/2849083002/diff/80001/third_party/WebKit/publ... third_party/WebKit/public/platform/WebMouseWheelEvent.h:61: 0), On 2017/05/01 15:42:11, sadrul wrote: > Shouldn't this be the default mouse-pointer-id? Done. https://codereview.chromium.org/2849083002/diff/80001/third_party/WebKit/publ... File third_party/WebKit/public/platform/WebPointerProperties.h (right): https://codereview.chromium.org/2849083002/diff/80001/third_party/WebKit/publ... third_party/WebKit/public/platform/WebPointerProperties.h:49: WebPointerProperties(int id_param) On 2017/05/01 15:42:11, sadrul wrote: > explicit Done.
WebKit LGTM https://codereview.chromium.org/2849083002/diff/120001/third_party/WebKit/pub... File third_party/WebKit/public/platform/WebMouseEvent.h (right): https://codereview.chromium.org/2849083002/diff/120001/third_party/WebKit/pub... third_party/WebKit/public/platform/WebMouseEvent.h:24: static constexpr int kMousePointerId = std::numeric_limits<int>::max(); kMousePointerId => kUndefinedMousePointerID or something?
lanwei@chromium.org changed reviewers: + nzolghadr@chromium.org
The CQ bit was checked by lanwei@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
lanwei@chromium.org changed reviewers: + mbarbella@chromium.org, sky@chromium.org
lanwei@chromium.org changed reviewers: + dcheng@chromium.org - mbarbella@chromium.org
sky@ could you please take a look at content/* and services/* dcheng@ could you please take a look at ui/events/mojo/event_struct_traits.cc Thank you.
rs lgtm for struct traits changes
https://codereview.chromium.org/2849083002/diff/140001/ui/events/event.h File ui/events/event.h (right): https://codereview.chromium.org/2849083002/diff/140001/ui/events/event.h#newc... ui/events/event.h:484: static const int kDefaultMousePointerId; Could you clarify why you are changing this? Isn't there only one mouse pointer, in which case kMousePointerId is a better name?
On 2017/05/04 15:26:03, sky wrote: > https://codereview.chromium.org/2849083002/diff/140001/ui/events/event.h > File ui/events/event.h (right): > > https://codereview.chromium.org/2849083002/diff/140001/ui/events/event.h#newc... > ui/events/event.h:484: static const int kDefaultMousePointerId; > Could you clarify why you are changing this? Isn't there only one mouse pointer, > in which case kMousePointerId is a better name? Yes, there is only one mouse pointer, but this pointer id is not a real id, that is why I change the name to kDefaultMousePointerId, to distinguish if later we use the real id from the OS event.
Could you elaborate on why we would want to do that? By that I mean why would we want to use the system one as well as having a define that doesn't map to what events are actually using? -Scott On Thu, May 4, 2017 at 8:30 AM, <lanwei@chromium.org> wrote: > On 2017/05/04 15:26:03, sky wrote: > > https://codereview.chromium.org/2849083002/diff/140001/ui/events/event.h > > File ui/events/event.h (right): > > > > > https://codereview.chromium.org/2849083002/diff/140001/ui/ > events/event.h#newcode484 > > ui/events/event.h:484: static const int kDefaultMousePointerId; > > Could you clarify why you are changing this? Isn't there only one mouse > pointer, > > in which case kMousePointerId is a better name? > > Yes, there is only one mouse pointer, but this pointer id is not a real > id, that > is why I change the name to kDefaultMousePointerId, to distinguish if > later we > use the real id from the OS event. > > https://codereview.chromium.org/2849083002/ > -- You received this message because you are subscribed to the Google Groups "Blink Reviews" group. To unsubscribe from this group and stop receiving emails from it, send an email to blink-reviews+unsubscribe@chromium.org.
Could you elaborate on why we would want to do that? By that I mean why would we want to use the system one as well as having a define that doesn't map to what events are actually using? -Scott On Thu, May 4, 2017 at 8:30 AM, <lanwei@chromium.org> wrote: > On 2017/05/04 15:26:03, sky wrote: > > https://codereview.chromium.org/2849083002/diff/140001/ui/events/event.h > > File ui/events/event.h (right): > > > > > https://codereview.chromium.org/2849083002/diff/140001/ui/ > events/event.h#newcode484 > > ui/events/event.h:484: static const int kDefaultMousePointerId; > > Could you clarify why you are changing this? Isn't there only one mouse > pointer, > > in which case kMousePointerId is a better name? > > Yes, there is only one mouse pointer, but this pointer id is not a real > id, that > is why I change the name to kDefaultMousePointerId, to distinguish if > later we > use the real id from the OS event. > > https://codereview.chromium.org/2849083002/ > -- You received this message because you are subscribed to the Google Groups "Chromium-reviews" group. To unsubscribe from this group and stop receiving emails from it, send an email to chromium-reviews+unsubscribe@chromium.org.
On 2017/05/04 17:34:16, sky wrote: > Could you elaborate on why we would want to do that? By that I mean why > would we want to use the system one as well as having a define that doesn't > map to what events are actually using? > > -Scott > I know that right now we only support one moue device, so it does not really matter what value we use for mouse pointer id. In the future, we will support multiple mouse devices, it does make sense to use the real id from OS event. Right now, The dom pointer event for mouse type does not use the pointer id from WebMouseEvent, it is always 1 like what Edge sets for its mouse pointers. However, we would like to change this later to use the real id from OS events, like what we did for pointer events of pen type. Even though we only support one pen at this time, we are using the id from OS event. We are slowly replacing the default values with real values. > On Thu, May 4, 2017 at 8:30 AM, <mailto:lanwei@chromium.org> wrote: > > > On 2017/05/04 15:26:03, sky wrote: > > > https://codereview.chromium.org/2849083002/diff/140001/ui/events/event.h > > > File ui/events/event.h (right): > > > > > > > > https://codereview.chromium.org/2849083002/diff/140001/ui/ > > events/event.h#newcode484 > > > ui/events/event.h:484: static const int kDefaultMousePointerId; > > > Could you clarify why you are changing this? Isn't there only one mouse > > pointer, > > > in which case kMousePointerId is a better name? > > > > Yes, there is only one mouse pointer, but this pointer id is not a real > > id, that > > is why I change the name to kDefaultMousePointerId, to distinguish if > > later we > > use the real id from the OS event. > > > > https://codereview.chromium.org/2849083002/ > > > > -- > You received this message because you are subscribed to the Google Groups > "Chromium-reviews" group. > To unsubscribe from this group and stop receiving emails from it, send an email > to mailto:chromium-reviews+unsubscribe@chromium.org.
I'm concerned that having a constant that says 'the mouse id' when we may use a different id is a recipe for bugs. If you are saying we want to use the system one, then we should get rid of the constant. On Thu, May 4, 2017 at 11:08 AM, <lanwei@chromium.org> wrote: > On 2017/05/04 17:34:16, sky wrote: > > Could you elaborate on why we would want to do that? By that I mean why > > would we want to use the system one as well as having a define that > doesn't > > map to what events are actually using? > > > > -Scott > > > > I know that right now we only support one moue device, so it does not > really > matter what value we use for mouse pointer id. > In the future, we will support multiple mouse devices, it does make sense > to use > the real id from OS event. > > Right now, The dom pointer event for mouse type does not use the pointer > id from > WebMouseEvent, it is always 1 like what Edge sets for its mouse pointers. > However, we would like to change this later to use the real id from OS > events, > like what we did for pointer events of pen type. > Even though we only support one pen at this time, we are using the id from > OS > event. We are slowly replacing the default values with real values. > > > > > > On Thu, May 4, 2017 at 8:30 AM, <mailto:lanwei@chromium.org> wrote: > > > > > On 2017/05/04 15:26:03, sky wrote: > > > > https://codereview.chromium.org/2849083002/diff/140001/ui/ > events/event.h > > > > File ui/events/event.h (right): > > > > > > > > > > > https://codereview.chromium.org/2849083002/diff/140001/ui/ > > > events/event.h#newcode484 > > > > ui/events/event.h:484: static const int kDefaultMousePointerId; > > > > Could you clarify why you are changing this? Isn't there only one > mouse > > > pointer, > > > > in which case kMousePointerId is a better name? > > > > > > Yes, there is only one mouse pointer, but this pointer id is not a real > > > id, that > > > is why I change the name to kDefaultMousePointerId, to distinguish if > > > later we > > > use the real id from the OS event. > > > > > > https://codereview.chromium.org/2849083002/ > > > > > > > -- > > You received this message because you are subscribed to the Google Groups > > "Chromium-reviews" group. > > To unsubscribe from this group and stop receiving emails from it, send an > email > > to mailto:chromium-reviews+unsubscribe@chromium.org. > > > > https://codereview.chromium.org/2849083002/ > -- You received this message because you are subscribed to the Google Groups "Blink Reviews" group. To unsubscribe from this group and stop receiving emails from it, send an email to blink-reviews+unsubscribe@chromium.org.
I'm concerned that having a constant that says 'the mouse id' when we may use a different id is a recipe for bugs. If you are saying we want to use the system one, then we should get rid of the constant. On Thu, May 4, 2017 at 11:08 AM, <lanwei@chromium.org> wrote: > On 2017/05/04 17:34:16, sky wrote: > > Could you elaborate on why we would want to do that? By that I mean why > > would we want to use the system one as well as having a define that > doesn't > > map to what events are actually using? > > > > -Scott > > > > I know that right now we only support one moue device, so it does not > really > matter what value we use for mouse pointer id. > In the future, we will support multiple mouse devices, it does make sense > to use > the real id from OS event. > > Right now, The dom pointer event for mouse type does not use the pointer > id from > WebMouseEvent, it is always 1 like what Edge sets for its mouse pointers. > However, we would like to change this later to use the real id from OS > events, > like what we did for pointer events of pen type. > Even though we only support one pen at this time, we are using the id from > OS > event. We are slowly replacing the default values with real values. > > > > > > On Thu, May 4, 2017 at 8:30 AM, <mailto:lanwei@chromium.org> wrote: > > > > > On 2017/05/04 15:26:03, sky wrote: > > > > https://codereview.chromium.org/2849083002/diff/140001/ui/ > events/event.h > > > > File ui/events/event.h (right): > > > > > > > > > > > https://codereview.chromium.org/2849083002/diff/140001/ui/ > > > events/event.h#newcode484 > > > > ui/events/event.h:484: static const int kDefaultMousePointerId; > > > > Could you clarify why you are changing this? Isn't there only one > mouse > > > pointer, > > > > in which case kMousePointerId is a better name? > > > > > > Yes, there is only one mouse pointer, but this pointer id is not a real > > > id, that > > > is why I change the name to kDefaultMousePointerId, to distinguish if > > > later we > > > use the real id from the OS event. > > > > > > https://codereview.chromium.org/2849083002/ > > > > > > > -- > > You received this message because you are subscribed to the Google Groups > > "Chromium-reviews" group. > > To unsubscribe from this group and stop receiving emails from it, send an > email > > to mailto:chromium-reviews+unsubscribe@chromium.org. > > > > https://codereview.chromium.org/2849083002/ > -- You received this message because you are subscribed to the Google Groups "Chromium-reviews" group. To unsubscribe from this group and stop receiving emails from it, send an email to chromium-reviews+unsubscribe@chromium.org.
On 2017/05/04 19:34:37, sky wrote: > I'm concerned that having a constant that says 'the mouse id' when we may > use a different id is a recipe for bugs. If you are saying we want to use > the system one, then we should get rid of the constant. You are right. Using the real ID right now may bring some inconsistent issue, and we are not sure every platforms has the id information. We decide to use the kMousePointerId as the pointer id for all mouse events, so if we change the name back to kMousePointerId, do you think it should be good? > On Thu, May 4, 2017 at 11:08 AM, <mailto:lanwei@chromium.org> wrote: > > > On 2017/05/04 17:34:16, sky wrote: > > > Could you elaborate on why we would want to do that? By that I mean why > > > would we want to use the system one as well as having a define that > > doesn't > > > map to what events are actually using? > > > > > > -Scott > > > > > > > I know that right now we only support one moue device, so it does not > > really > > matter what value we use for mouse pointer id. > > In the future, we will support multiple mouse devices, it does make sense > > to use > > the real id from OS event. > > > > Right now, The dom pointer event for mouse type does not use the pointer > > id from > > WebMouseEvent, it is always 1 like what Edge sets for its mouse pointers. > > However, we would like to change this later to use the real id from OS > > events, > > like what we did for pointer events of pen type. > > Even though we only support one pen at this time, we are using the id from > > OS > > event. We are slowly replacing the default values with real values. > > > > > > > > > > > On Thu, May 4, 2017 at 8:30 AM, <mailto:lanwei@chromium.org> wrote: > > > > > > > On 2017/05/04 15:26:03, sky wrote: > > > > > https://codereview.chromium.org/2849083002/diff/140001/ui/ > > events/event.h > > > > > File ui/events/event.h (right): > > > > > > > > > > > > > > https://codereview.chromium.org/2849083002/diff/140001/ui/ > > > > events/event.h#newcode484 > > > > > ui/events/event.h:484: static const int kDefaultMousePointerId; > > > > > Could you clarify why you are changing this? Isn't there only one > > mouse > > > > pointer, > > > > > in which case kMousePointerId is a better name? > > > > > > > > Yes, there is only one mouse pointer, but this pointer id is not a real > > > > id, that > > > > is why I change the name to kDefaultMousePointerId, to distinguish if > > > > later we > > > > use the real id from the OS event. > > > > > > > > https://codereview.chromium.org/2849083002/ > > > > > > > > > > -- > > > You received this message because you are subscribed to the Google Groups > > > "Chromium-reviews" group. > > > To unsubscribe from this group and stop receiving emails from it, send an > > email > > > to mailto:chromium-reviews+unsubscribe@chromium.org. > > > > > > > > https://codereview.chromium.org/2849083002/ > > > > -- > You received this message because you are subscribed to the Google Groups > "Chromium-reviews" group. > To unsubscribe from this group and stop receiving emails from it, send an email > to mailto:chromium-reviews+unsubscribe@chromium.org.
SGTM. Thanks! On Thu, May 4, 2017 at 1:07 PM, <lanwei@chromium.org> wrote: > On 2017/05/04 19:34:37, sky wrote: > > I'm concerned that having a constant that says 'the mouse id' when we may > > use a different id is a recipe for bugs. If you are saying we want to use > > the system one, then we should get rid of the constant. > > > You are right. Using the real ID right now may bring some inconsistent > issue, > and we are not sure every platforms has the id information. > We decide to use the kMousePointerId as the pointer id for all mouse > events, so > if we change the name back to kMousePointerId, do you think it should be > good? > > > > > > > On Thu, May 4, 2017 at 11:08 AM, <mailto:lanwei@chromium.org> wrote: > > > > > On 2017/05/04 17:34:16, sky wrote: > > > > Could you elaborate on why we would want to do that? By that I mean > why > > > > would we want to use the system one as well as having a define that > > > doesn't > > > > map to what events are actually using? > > > > > > > > -Scott > > > > > > > > > > I know that right now we only support one moue device, so it does not > > > really > > > matter what value we use for mouse pointer id. > > > In the future, we will support multiple mouse devices, it does make > sense > > > to use > > > the real id from OS event. > > > > > > Right now, The dom pointer event for mouse type does not use the > pointer > > > id from > > > WebMouseEvent, it is always 1 like what Edge sets for its mouse > pointers. > > > However, we would like to change this later to use the real id from OS > > > events, > > > like what we did for pointer events of pen type. > > > Even though we only support one pen at this time, we are using the id > from > > > OS > > > event. We are slowly replacing the default values with real values. > > > > > > > > > > > > > > > > On Thu, May 4, 2017 at 8:30 AM, <mailto:lanwei@chromium.org> wrote: > > > > > > > > > On 2017/05/04 15:26:03, sky wrote: > > > > > > https://codereview.chromium.org/2849083002/diff/140001/ui/ > > > events/event.h > > > > > > File ui/events/event.h (right): > > > > > > > > > > > > > > > > > https://codereview.chromium.org/2849083002/diff/140001/ui/ > > > > > events/event.h#newcode484 > > > > > > ui/events/event.h:484: static const int kDefaultMousePointerId; > > > > > > Could you clarify why you are changing this? Isn't there only one > > > mouse > > > > > pointer, > > > > > > in which case kMousePointerId is a better name? > > > > > > > > > > Yes, there is only one mouse pointer, but this pointer id is not a > real > > > > > id, that > > > > > is why I change the name to kDefaultMousePointerId, to distinguish > if > > > > > later we > > > > > use the real id from the OS event. > > > > > > > > > > https://codereview.chromium.org/2849083002/ > > > > > > > > > > > > > -- > > > > You received this message because you are subscribed to the Google > Groups > > > > "Chromium-reviews" group. > > > > To unsubscribe from this group and stop receiving emails from it, > send an > > > email > > > > to mailto:chromium-reviews+unsubscribe@chromium.org. > > > > > > > > > > > > https://codereview.chromium.org/2849083002/ > > > > > > > -- > > You received this message because you are subscribed to the Google Groups > > "Chromium-reviews" group. > > To unsubscribe from this group and stop receiving emails from it, send an > email > > to mailto:chromium-reviews+unsubscribe@chromium.org. > > > > https://codereview.chromium.org/2849083002/ > -- You received this message because you are subscribed to the Google Groups "Blink Reviews" group. To unsubscribe from this group and stop receiving emails from it, send an email to blink-reviews+unsubscribe@chromium.org.
SGTM. Thanks! On Thu, May 4, 2017 at 1:07 PM, <lanwei@chromium.org> wrote: > On 2017/05/04 19:34:37, sky wrote: > > I'm concerned that having a constant that says 'the mouse id' when we may > > use a different id is a recipe for bugs. If you are saying we want to use > > the system one, then we should get rid of the constant. > > > You are right. Using the real ID right now may bring some inconsistent > issue, > and we are not sure every platforms has the id information. > We decide to use the kMousePointerId as the pointer id for all mouse > events, so > if we change the name back to kMousePointerId, do you think it should be > good? > > > > > > > On Thu, May 4, 2017 at 11:08 AM, <mailto:lanwei@chromium.org> wrote: > > > > > On 2017/05/04 17:34:16, sky wrote: > > > > Could you elaborate on why we would want to do that? By that I mean > why > > > > would we want to use the system one as well as having a define that > > > doesn't > > > > map to what events are actually using? > > > > > > > > -Scott > > > > > > > > > > I know that right now we only support one moue device, so it does not > > > really > > > matter what value we use for mouse pointer id. > > > In the future, we will support multiple mouse devices, it does make > sense > > > to use > > > the real id from OS event. > > > > > > Right now, The dom pointer event for mouse type does not use the > pointer > > > id from > > > WebMouseEvent, it is always 1 like what Edge sets for its mouse > pointers. > > > However, we would like to change this later to use the real id from OS > > > events, > > > like what we did for pointer events of pen type. > > > Even though we only support one pen at this time, we are using the id > from > > > OS > > > event. We are slowly replacing the default values with real values. > > > > > > > > > > > > > > > > On Thu, May 4, 2017 at 8:30 AM, <mailto:lanwei@chromium.org> wrote: > > > > > > > > > On 2017/05/04 15:26:03, sky wrote: > > > > > > https://codereview.chromium.org/2849083002/diff/140001/ui/ > > > events/event.h > > > > > > File ui/events/event.h (right): > > > > > > > > > > > > > > > > > https://codereview.chromium.org/2849083002/diff/140001/ui/ > > > > > events/event.h#newcode484 > > > > > > ui/events/event.h:484: static const int kDefaultMousePointerId; > > > > > > Could you clarify why you are changing this? Isn't there only one > > > mouse > > > > > pointer, > > > > > > in which case kMousePointerId is a better name? > > > > > > > > > > Yes, there is only one mouse pointer, but this pointer id is not a > real > > > > > id, that > > > > > is why I change the name to kDefaultMousePointerId, to distinguish > if > > > > > later we > > > > > use the real id from the OS event. > > > > > > > > > > https://codereview.chromium.org/2849083002/ > > > > > > > > > > > > > -- > > > > You received this message because you are subscribed to the Google > Groups > > > > "Chromium-reviews" group. > > > > To unsubscribe from this group and stop receiving emails from it, > send an > > > email > > > > to mailto:chromium-reviews+unsubscribe@chromium.org. > > > > > > > > > > > > https://codereview.chromium.org/2849083002/ > > > > > > > -- > > You received this message because you are subscribed to the Google Groups > > "Chromium-reviews" group. > > To unsubscribe from this group and stop receiving emails from it, send an > email > > to mailto:chromium-reviews+unsubscribe@chromium.org. > > > > https://codereview.chromium.org/2849083002/ > -- You received this message because you are subscribed to the Google Groups "Chromium-reviews" group. To unsubscribe from this group and stop receiving emails from it, send an email to chromium-reviews+unsubscribe@chromium.org.
The CQ bit was checked by lanwei@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: win_chromium_x64_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_...)
The CQ bit was checked by lanwei@chromium.org to run a CQ dry run
Patchset #4 (id:160001) has been deleted
Dry run: CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: linux_android_rel_ng on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_androi...)
https://codereview.chromium.org/2849083002/diff/180001/ui/events/event.h File ui/events/event.h (right): https://codereview.chromium.org/2849083002/diff/180001/ui/events/event.h#newc... ui/events/event.h:484: static const int kMousePointerId; This value is serialized in mojom as an int32. It would be safer to convert PointerDetails to use int32_t rather than changing this. See https://chromium.googlesource.com/chromium/src/+/master/ui/events/mojo/event....
On 2017/05/05 22:51:46, sky wrote: > https://codereview.chromium.org/2849083002/diff/180001/ui/events/event.h > File ui/events/event.h (right): > > https://codereview.chromium.org/2849083002/diff/180001/ui/events/event.h#newc... > ui/events/event.h:484: static const int kMousePointerId; > This value is serialized in mojom as an int32. It would be safer to convert > PointerDetails to use int32_t rather than changing this. See > https://chromium.googlesource.com/chromium/src/+/master/ui/events/mojo/event.... Because the type of id in WebPointerProperties is int, so is the id in blink::PointerEvent, we want to make it consistent it in PointerDetails too. I looked at only in ui/events/mojo/event_struct_traits.cc, it constructs ui::PointerEvents from mojom::PointerData, I can add a cast from int32_t to int, what do you think?
On 2017/05/08 14:40:10, lanwei wrote: > On 2017/05/05 22:51:46, sky wrote: > > https://codereview.chromium.org/2849083002/diff/180001/ui/events/event.h > > File ui/events/event.h (right): > > > > > https://codereview.chromium.org/2849083002/diff/180001/ui/events/event.h#newc... > > ui/events/event.h:484: static const int kMousePointerId; > > This value is serialized in mojom as an int32. It would be safer to convert > > PointerDetails to use int32_t rather than changing this. See > > > https://chromium.googlesource.com/chromium/src/+/master/ui/events/mojo/event.... > > Because the type of id in WebPointerProperties is int, so is the id in > blink::PointerEvent, we want to make it consistent it in PointerDetails too. > > I looked at only in ui/events/mojo/event_struct_traits.cc, it constructs > ui::PointerEvents from mojom::PointerData, I can add a cast from int32_t to int, > what do you think? Does WebPointerProperties need to be int? Can it be int32? If we don't use int32 consistently we're bound to run into serialization issues down the line.
On 2017/05/08 16:07:37, sky wrote: > On 2017/05/08 14:40:10, lanwei wrote: > > On 2017/05/05 22:51:46, sky wrote: > > > https://codereview.chromium.org/2849083002/diff/180001/ui/events/event.h > > > File ui/events/event.h (right): > > > > > > > > > https://codereview.chromium.org/2849083002/diff/180001/ui/events/event.h#newc... > > > ui/events/event.h:484: static const int kMousePointerId; > > > This value is serialized in mojom as an int32. It would be safer to convert > > > PointerDetails to use int32_t rather than changing this. See > > > > > > https://chromium.googlesource.com/chromium/src/+/master/ui/events/mojo/event.... > > > > Because the type of id in WebPointerProperties is int, so is the id in > > blink::PointerEvent, we want to make it consistent it in PointerDetails too. > > > > I looked at only in ui/events/mojo/event_struct_traits.cc, it constructs > > ui::PointerEvents from mojom::PointerData, I can add a cast from int32_t to > int, > > what do you think? > > Does WebPointerProperties need to be int? Can it be int32? If we don't use int32 > consistently we're bound to run into serialization issues down the line. WebPointerProperties does not need to be int, we can change id in PointerDetails and WebPointerProperties to be int32_t. sadrul@ suggests we introduce a specific type for this, e.g. using PointerId = <...>; what do you think?
On 2017/05/08 17:52:49, lanwei wrote: > On 2017/05/08 16:07:37, sky wrote: > > On 2017/05/08 14:40:10, lanwei wrote: > > > On 2017/05/05 22:51:46, sky wrote: > > > > https://codereview.chromium.org/2849083002/diff/180001/ui/events/event.h > > > > File ui/events/event.h (right): > > > > > > > > > > > > > > https://codereview.chromium.org/2849083002/diff/180001/ui/events/event.h#newc... > > > > ui/events/event.h:484: static const int kMousePointerId; > > > > This value is serialized in mojom as an int32. It would be safer to > convert > > > > PointerDetails to use int32_t rather than changing this. See > > > > > > > > > > https://chromium.googlesource.com/chromium/src/+/master/ui/events/mojo/event.... > > > > > > Because the type of id in WebPointerProperties is int, so is the id in > > > blink::PointerEvent, we want to make it consistent it in PointerDetails too. > > > > > > I looked at only in ui/events/mojo/event_struct_traits.cc, it constructs > > > ui::PointerEvents from mojom::PointerData, I can add a cast from int32_t to > > int, > > > what do you think? > > > > Does WebPointerProperties need to be int? Can it be int32? If we don't use > int32 > > consistently we're bound to run into serialization issues down the line. > > WebPointerProperties does not need to be int, we can change id in PointerDetails > and WebPointerProperties to be int32_t. > sadrul@ suggests we introduce a specific type for this, e.g. using PointerId = > <...>; > what do you think? SGTM
The CQ bit was checked by lanwei@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was checked by lanwei@chromium.org to run a CQ dry run
Patchset #5 (id:200001) has been deleted
Dry run: CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: win_chromium_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_...)
LGTM! Thanks!
https://codereview.chromium.org/2849083002/diff/220001/third_party/WebKit/pub... File third_party/WebKit/public/platform/WebMouseEvent.h (right): https://codereview.chromium.org/2849083002/diff/220001/third_party/WebKit/pub... third_party/WebKit/public/platform/WebMouseEvent.h:106: WebMouseEvent(unsigned size_param, int id) should this not be PointerId https://codereview.chromium.org/2849083002/diff/220001/third_party/WebKit/pub... third_party/WebKit/public/platform/WebMouseEvent.h:113: int id) ditto
The CQ bit was checked by lanwei@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
The CQ bit was checked by lanwei@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from sadrul@chromium.org, haraken@chromium.org, dcheng@chromium.org, sky@chromium.org Link to the patchset: https://codereview.chromium.org/2849083002/#ps240001 (title: "webmouseid")
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: win_chromium_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_...)
The CQ bit was checked by lanwei@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: linux_chromium_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
The CQ bit was checked by lanwei@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
The CQ bit was checked by lanwei@chromium.org
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
CQ is committing da patch. Bot data: {"patchset_id": 240001, "attempt_start_ts": 1494946257166920, "parent_rev": "3c5da4ae54598b8ebed887a52ee9b2763abb0047", "commit_rev": "2db36b51a5de1d110a0d9dbe6969ab9603df9ad8"}
Message was sent while issue was closed.
Description was changed from ========== Add pointer id to the WebMouseEvent's constructors In order to make the WebMouseEvent's pointer id consistent with ui::MouseEvent, we add pointer id to the WebMouseEvent's constructors. Then we can enable the DCHECK of pointer id in PointerEventFactory. BUG=694742 ========== to ========== Add pointer id to the WebMouseEvent's constructors In order to make the WebMouseEvent's pointer id consistent with ui::MouseEvent, we add pointer id to the WebMouseEvent's constructors. Then we can enable the DCHECK of pointer id in PointerEventFactory. BUG=694742 Review-Url: https://codereview.chromium.org/2849083002 Cr-Commit-Position: refs/heads/master@{#472106} Committed: https://chromium.googlesource.com/chromium/src/+/2db36b51a5de1d110a0d9dbe6969... ==========
Message was sent while issue was closed.
Committed patchset #6 (id:240001) as https://chromium.googlesource.com/chromium/src/+/2db36b51a5de1d110a0d9dbe6969... |