| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 524 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 535 break; | 535 break; |
| 536 case MiddleButton: | 536 case MiddleButton: |
| 537 modifiers |= WebInputEvent::MiddleButtonDown; | 537 modifiers |= WebInputEvent::MiddleButtonDown; |
| 538 break; | 538 break; |
| 539 case RightButton: | 539 case RightButton: |
| 540 modifiers |= WebInputEvent::RightButtonDown; | 540 modifiers |= WebInputEvent::RightButtonDown; |
| 541 break; | 541 break; |
| 542 } | 542 } |
| 543 } else | 543 } else |
| 544 button = WebMouseEvent::ButtonNone; | 544 button = WebMouseEvent::ButtonNone; |
| 545 movementX = event.webkitMovementX(); | 545 movementX = event.movementX(); |
| 546 movementY = event.webkitMovementY(); | 546 movementY = event.movementY(); |
| 547 clickCount = event.detail(); | 547 clickCount = event.detail(); |
| 548 } | 548 } |
| 549 | 549 |
| 550 // Generate a synthetic WebMouseEvent given a TouchEvent (eg. for emulating a mo
use | 550 // Generate a synthetic WebMouseEvent given a TouchEvent (eg. for emulating a mo
use |
| 551 // with touch input for plugins that don't support touch input). | 551 // with touch input for plugins that don't support touch input). |
| 552 WebMouseEventBuilder::WebMouseEventBuilder(const Widget* widget, const WebCore::
RenderObject* renderObject, const TouchEvent& event) | 552 WebMouseEventBuilder::WebMouseEventBuilder(const Widget* widget, const WebCore::
RenderObject* renderObject, const TouchEvent& event) |
| 553 { | 553 { |
| 554 if (!event.touches()) | 554 if (!event.touches()) |
| 555 return; | 555 return; |
| 556 if (event.touches()->length() != 1) { | 556 if (event.touches()->length() != 1) { |
| (...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 805 modifiers = getWebInputModifiers(event); | 805 modifiers = getWebInputModifiers(event); |
| 806 | 806 |
| 807 globalX = event.screenX(); | 807 globalX = event.screenX(); |
| 808 globalY = event.screenY(); | 808 globalY = event.screenY(); |
| 809 IntPoint localPoint = convertAbsoluteLocationForRenderObject(event.absoluteL
ocation(), *renderObject); | 809 IntPoint localPoint = convertAbsoluteLocationForRenderObject(event.absoluteL
ocation(), *renderObject); |
| 810 x = localPoint.x(); | 810 x = localPoint.x(); |
| 811 y = localPoint.y(); | 811 y = localPoint.y(); |
| 812 } | 812 } |
| 813 | 813 |
| 814 } // namespace blink | 814 } // namespace blink |
| OLD | NEW |