Bug 197665 - [Pointer Events] isPrimary property of pointercancel events should match previous events for that pointer
Summary: [Pointer Events] isPrimary property of pointercancel events should match prev...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: UI Events (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Antoine Quint
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-05-07 09:39 PDT by Antoine Quint
Modified: 2019-05-08 08:48 PDT (History)
9 users (show)

See Also:


Attachments
Patch (11.04 KB, patch)
2019-05-07 09:44 PDT, Antoine Quint
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Antoine Quint 2019-05-07 09:39:46 PDT
[Pointer Events] isPrimary property of pointercancel events should match previous events for that pointer
Comment 1 Antoine Quint 2019-05-07 09:44:18 PDT
Created attachment 369296 [details]
Patch
Comment 2 Dean Jackson 2019-05-07 11:32:05 PDT
Comment on attachment 369296 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=369296&action=review

> Source/WebCore/dom/PointerEvent.h:55
> +    enum class IsPrimary : uint8_t { No, Yes };

Do we normally name these bool-like enums isFoo?
Comment 3 WebKit Commit Bot 2019-05-07 11:43:33 PDT
Comment on attachment 369296 [details]
Patch

Clearing flags on attachment: 369296

Committed r245020: <https://trac.webkit.org/changeset/245020>
Comment 4 WebKit Commit Bot 2019-05-07 11:43:35 PDT
All reviewed patches have been landed.  Closing bug.
Comment 5 Radar WebKit Bug Importer 2019-05-07 11:44:19 PDT
<rdar://problem/50548910>
Comment 6 Antoine Quint 2019-05-08 08:32:06 PDT
(In reply to Dean Jackson from comment #2)
> Comment on attachment 369296 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=369296&action=review
> 
> > Source/WebCore/dom/PointerEvent.h:55
> > +    enum class IsPrimary : uint8_t { No, Yes };
> 
> Do we normally name these bool-like enums isFoo?

I think so. This was fashioned to match these from WebCore/dom/Event.h:

    enum class IsTrusted : uint8_t { No, Yes };
    enum class IsCancelable : uint8_t { No, Yes };
    enum class IsComposed : uint8_t { No, Yes };
Comment 7 Chris Dumez 2019-05-08 08:48:52 PDT
(In reply to Dean Jackson from comment #2)
> Comment on attachment 369296 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=369296&action=review
> 
> > Source/WebCore/dom/PointerEvent.h:55
> > +    enum class IsPrimary : uint8_t { No, Yes };
> 
> Do we normally name these bool-like enums isFoo?

I personally like ": bool" better for things that are clearly booleans.