[webkit-reviews] review granted: [Bug 178214] [Mac] Add support for MouseEvent.buttons : [Attachment 323596] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Oct 12 16:38:16 PDT 2017


Ryosuke Niwa <rniwa at webkit.org> has granted Chris Dumez <cdumez at apple.com>'s
request for review:
Bug 178214: [Mac] Add support for MouseEvent.buttons
https://bugs.webkit.org/show_bug.cgi?id=178214

Attachment 323596: Patch

https://bugs.webkit.org/attachment.cgi?id=323596&action=review




--- Comment #11 from Ryosuke Niwa <rniwa at webkit.org> ---
Comment on attachment 323596
  --> https://bugs.webkit.org/attachment.cgi?id=323596
Patch

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

> Source/WebCore/platform/mac/PlatformEventFactoryMac.mm:134
> +    return static_cast<unsigned short>([NSEvent pressedMouseButtons]);

According to
https://developer.apple.com/documentation/appkit/nsevent/1527943-pressedmousebu
ttons?language=objc
pressedMouseButtons could contain values with 1 >> n where n is greater than 2
but not necessarily 3
so we have to make sure to coerce back those values to 4.


More information about the webkit-reviews mailing list