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 428 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
439 m_radius = scaleSizeToWindow(widget, FloatSize(point.radiusX, point.radiusY)
); | 439 m_radius = scaleSizeToWindow(widget, FloatSize(point.radiusX, point.radiusY)
); |
440 m_rotationAngle = point.rotationAngle; | 440 m_rotationAngle = point.rotationAngle; |
441 m_force = point.force; | 441 m_force = point.force; |
442 } | 442 } |
443 | 443 |
444 PlatformTouchEventBuilder::PlatformTouchEventBuilder(Widget* widget, const WebTo
uchEvent& event) | 444 PlatformTouchEventBuilder::PlatformTouchEventBuilder(Widget* widget, const WebTo
uchEvent& event) |
445 { | 445 { |
446 m_type = toPlatformTouchEventType(event.type); | 446 m_type = toPlatformTouchEventType(event.type); |
447 m_modifiers = toPlatformEventModifiers(event.modifiers); | 447 m_modifiers = toPlatformEventModifiers(event.modifiers); |
448 m_timestamp = event.timeStampSeconds; | 448 m_timestamp = event.timeStampSeconds; |
| 449 m_causesScrollingIfUncanceled = event.causesScrollingIfUncanceled; |
449 | 450 |
450 for (unsigned i = 0; i < event.touchesLength; ++i) | 451 for (unsigned i = 0; i < event.touchesLength; ++i) |
451 m_touchPoints.append(PlatformTouchPointBuilder(widget, event.touches[i])
); | 452 m_touchPoints.append(PlatformTouchPointBuilder(widget, event.touches[i])
); |
452 | 453 |
453 m_cancelable = event.cancelable; | 454 m_cancelable = event.cancelable; |
454 } | 455 } |
455 | 456 |
456 static int getWebInputModifiers(const UIEventWithKeyState& event) | 457 static int getWebInputModifiers(const UIEventWithKeyState& event) |
457 { | 458 { |
458 int modifiers = 0; | 459 int modifiers = 0; |
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
773 type = TouchCancel; | 774 type = TouchCancel; |
774 else { | 775 else { |
775 ASSERT_NOT_REACHED(); | 776 ASSERT_NOT_REACHED(); |
776 type = Undefined; | 777 type = Undefined; |
777 return; | 778 return; |
778 } | 779 } |
779 | 780 |
780 modifiers = getWebInputModifiers(event); | 781 modifiers = getWebInputModifiers(event); |
781 timeStampSeconds = event.timeStamp() / millisPerSecond; | 782 timeStampSeconds = event.timeStamp() / millisPerSecond; |
782 cancelable = event.cancelable(); | 783 cancelable = event.cancelable(); |
| 784 causesScrollingIfUncanceled = event.causesScrollingIfUncanceled(); |
783 | 785 |
784 addTouchPointsIfNotYetAdded(widget, toWebTouchPointState(event.type()), even
t.changedTouches(), touches, &touchesLength, layoutObject); | 786 addTouchPointsIfNotYetAdded(widget, toWebTouchPointState(event.type()), even
t.changedTouches(), touches, &touchesLength, layoutObject); |
785 addTouchPointsIfNotYetAdded(widget, WebTouchPoint::StateStationary, event.to
uches(), touches, &touchesLength, layoutObject); | 787 addTouchPointsIfNotYetAdded(widget, WebTouchPoint::StateStationary, event.to
uches(), touches, &touchesLength, layoutObject); |
786 } | 788 } |
787 | 789 |
788 WebGestureEventBuilder::WebGestureEventBuilder(const Widget* widget, const Layou
tObject* layoutObject, const GestureEvent& event) | 790 WebGestureEventBuilder::WebGestureEventBuilder(const Widget* widget, const Layou
tObject* layoutObject, const GestureEvent& event) |
789 { | 791 { |
790 if (event.type() == EventTypeNames::gestureshowpress) | 792 if (event.type() == EventTypeNames::gestureshowpress) |
791 type = GestureShowPress; | 793 type = GestureShowPress; |
792 else if (event.type() == EventTypeNames::gesturetapdown) | 794 else if (event.type() == EventTypeNames::gesturetapdown) |
(...skipping 15 matching lines...) Expand all Loading... |
808 modifiers = getWebInputModifiers(event); | 810 modifiers = getWebInputModifiers(event); |
809 | 811 |
810 globalX = event.screenX(); | 812 globalX = event.screenX(); |
811 globalY = event.screenY(); | 813 globalY = event.screenY(); |
812 IntPoint localPoint = convertAbsoluteLocationForLayoutObject(event.absoluteL
ocation(), *layoutObject); | 814 IntPoint localPoint = convertAbsoluteLocationForLayoutObject(event.absoluteL
ocation(), *layoutObject); |
813 x = localPoint.x(); | 815 x = localPoint.x(); |
814 y = localPoint.y(); | 816 y = localPoint.y(); |
815 } | 817 } |
816 | 818 |
817 } // namespace blink | 819 } // namespace blink |
OLD | NEW |