| Index: content/browser/renderer_host/input/web_input_event_builders_mac.mm
|
| diff --git a/content/browser/renderer_host/input/web_input_event_builders_mac.mm b/content/browser/renderer_host/input/web_input_event_builders_mac.mm
|
| index 2e8ea376b856638125284351bfa9cf527ce25316..aee06487ea8bd3c4c71949616e586938298a031f 100644
|
| --- a/content/browser/renderer_host/input/web_input_event_builders_mac.mm
|
| +++ b/content/browser/renderer_host/input/web_input_event_builders_mac.mm
|
| @@ -663,7 +663,10 @@ blink::WebKeyboardEvent WebKeyboardEventBuilder::Build(NSEvent* event) {
|
|
|
| // WebMouseEvent --------------------------------------------------------------
|
|
|
| -blink::WebMouseEvent WebMouseEventBuilder::Build(NSEvent* event, NSView* view) {
|
| +blink::WebMouseEvent WebMouseEventBuilder::Build(
|
| + NSEvent* event,
|
| + NSView* view,
|
| + blink::WebPointerProperties::PointerType pointerType) {
|
| blink::WebMouseEvent result;
|
|
|
| result.clickCount = 0;
|
| @@ -729,6 +732,20 @@ blink::WebMouseEvent WebMouseEventBuilder::Build(NSEvent* event, NSView* view) {
|
|
|
| result.timeStampSeconds = [event timestamp];
|
|
|
| + NSEventSubtype subtype = NSMouseEventSubtype;
|
| + if ([event type] != NSMouseExited && [event type] != NSMouseEntered)
|
| + subtype = [event subtype];
|
| + // For the mouse events and the touchpad events, the pointer type is mouse.
|
| + // For all tablet events, the pointer type will be just pen.
|
| + if (subtype == NSTabletPointEventSubtype ||
|
| + subtype == NSTabletProximityEventSubtype) {
|
| + result.pointerType = blink::WebPointerProperties::PointerType::Pen;
|
| + return result;
|
| + }
|
| +
|
| + // Set the pointerType based on if the pointing device enters or leaves the
|
| + // proximity of its tablet.
|
| + result.pointerType = pointerType;
|
| return result;
|
| }
|
|
|
|
|