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 WebMouseEventBuilder::WebMouseEventBuilder(const Widget* widget, const WebCore::
RenderObject* renderObject, const TouchEvent& event) | 550 WebMouseEventBuilder::WebMouseEventBuilder(const Widget* widget, const WebCore::
RenderObject* renderObject, const TouchEvent& event) |
551 { | 551 { |
552 if (!event.touches()) | 552 if (!event.touches()) |
553 return; | 553 return; |
554 if (event.touches()->length() != 1) { | 554 if (event.touches()->length() != 1) { |
555 if (event.touches()->length() || event.type() != EventTypeNames::touchen
d || !event.changedTouches() || event.changedTouches()->length() != 1) | 555 if (event.touches()->length() || event.type() != EventTypeNames::touchen
d || !event.changedTouches() || event.changedTouches()->length() != 1) |
556 return; | 556 return; |
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
792 modifiers = getWebInputModifiers(event); | 792 modifiers = getWebInputModifiers(event); |
793 | 793 |
794 globalX = event.screenX(); | 794 globalX = event.screenX(); |
795 globalY = event.screenY(); | 795 globalY = event.screenY(); |
796 IntPoint localPoint = convertAbsoluteLocationForRenderObject(event.absoluteL
ocation(), *renderObject); | 796 IntPoint localPoint = convertAbsoluteLocationForRenderObject(event.absoluteL
ocation(), *renderObject); |
797 x = localPoint.x(); | 797 x = localPoint.x(); |
798 y = localPoint.y(); | 798 y = localPoint.y(); |
799 } | 799 } |
800 | 800 |
801 } // namespace blink | 801 } // namespace blink |
OLD | NEW |