| 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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 } | 91 } |
| 92 | 92 |
| 93 PlatformEvent::DispatchType toPlatformDispatchType(WebInputEvent::DispatchType t
ype) | 93 PlatformEvent::DispatchType toPlatformDispatchType(WebInputEvent::DispatchType t
ype) |
| 94 { | 94 { |
| 95 static_assert(PlatformEvent::DispatchType::Blocking == static_cast<PlatformE
vent::DispatchType>(WebInputEvent::DispatchType::Blocking), | 95 static_assert(PlatformEvent::DispatchType::Blocking == static_cast<PlatformE
vent::DispatchType>(WebInputEvent::DispatchType::Blocking), |
| 96 "Dispatch Types not equal"); | 96 "Dispatch Types not equal"); |
| 97 static_assert(PlatformEvent::DispatchType::EventNonBlocking == static_cast<P
latformEvent::DispatchType>(WebInputEvent::DispatchType::EventNonBlocking), | 97 static_assert(PlatformEvent::DispatchType::EventNonBlocking == static_cast<P
latformEvent::DispatchType>(WebInputEvent::DispatchType::EventNonBlocking), |
| 98 "Dispatch Types not equal"); | 98 "Dispatch Types not equal"); |
| 99 static_assert(PlatformEvent::DispatchType::ListenersNonBlockingPassive == st
atic_cast<PlatformEvent::DispatchType>(WebInputEvent::DispatchType::ListenersNon
BlockingPassive), | 99 static_assert(PlatformEvent::DispatchType::ListenersNonBlockingPassive == st
atic_cast<PlatformEvent::DispatchType>(WebInputEvent::DispatchType::ListenersNon
BlockingPassive), |
| 100 "Dispatch Types not equal"); | 100 "Dispatch Types not equal"); |
| 101 static_assert(PlatformEvent::DispatchType::ListenersForcedNonBlockingPassive
== static_cast<PlatformEvent::DispatchType>(WebInputEvent::DispatchType::Listen
ersForcedNonBlockingPassive), | 101 static_assert(PlatformEvent::DispatchType::ListenersForcedNonBlockingPassive
DueToFling == static_cast<PlatformEvent::DispatchType>(WebInputEvent::DispatchTy
pe::ListenersForcedNonBlockingPassiveDueToFling), |
| 102 "Dispatch Types not equal"); | 102 "Dispatch Types not equal"); |
| 103 | 103 |
| 104 return static_cast<PlatformEvent::DispatchType>(type); | 104 return static_cast<PlatformEvent::DispatchType>(type); |
| 105 } | 105 } |
| 106 | 106 |
| 107 unsigned toPlatformModifierFrom(WebMouseEvent::Button button) | 107 unsigned toPlatformModifierFrom(WebMouseEvent::Button button) |
| 108 { | 108 { |
| 109 if (button == WebMouseEvent::ButtonNone) | 109 if (button == WebMouseEvent::ButtonNone) |
| 110 return 0; | 110 return 0; |
| 111 | 111 |
| (...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 479 m_rotationAngle = point.rotationAngle; | 479 m_rotationAngle = point.rotationAngle; |
| 480 } | 480 } |
| 481 | 481 |
| 482 PlatformTouchEventBuilder::PlatformTouchEventBuilder(Widget* widget, const WebTo
uchEvent& event) | 482 PlatformTouchEventBuilder::PlatformTouchEventBuilder(Widget* widget, const WebTo
uchEvent& event) |
| 483 { | 483 { |
| 484 m_type = toPlatformTouchEventType(event.type); | 484 m_type = toPlatformTouchEventType(event.type); |
| 485 m_modifiers = event.modifiers; | 485 m_modifiers = event.modifiers; |
| 486 m_timestamp = event.timeStampSeconds; | 486 m_timestamp = event.timeStampSeconds; |
| 487 m_causesScrollingIfUncanceled = event.movedBeyondSlopRegion; | 487 m_causesScrollingIfUncanceled = event.movedBeyondSlopRegion; |
| 488 m_dispatchedDuringFling = event.dispatchedDuringFling; | 488 m_dispatchedDuringFling = event.dispatchedDuringFling; |
| 489 m_touchStartOrFirstTouchMove = event.touchStartOrFirstTouchMove; |
| 489 | 490 |
| 490 for (unsigned i = 0; i < event.touchesLength; ++i) | 491 for (unsigned i = 0; i < event.touchesLength; ++i) |
| 491 m_touchPoints.append(PlatformTouchPointBuilder(widget, event.touches[i])
); | 492 m_touchPoints.append(PlatformTouchPointBuilder(widget, event.touches[i])
); |
| 492 | 493 |
| 493 m_dispatchType = toPlatformDispatchType(event.dispatchType); | 494 m_dispatchType = toPlatformDispatchType(event.dispatchType); |
| 494 m_uniqueTouchEventId = event.uniqueTouchEventId; | 495 m_uniqueTouchEventId = event.uniqueTouchEventId; |
| 495 } | 496 } |
| 496 | 497 |
| 497 static FloatPoint convertAbsoluteLocationForLayoutObjectFloat(const LayoutPoint&
location, const LayoutItem layoutItem) | 498 static FloatPoint convertAbsoluteLocationForLayoutObjectFloat(const LayoutPoint&
location, const LayoutItem layoutItem) |
| 498 { | 499 { |
| (...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 816 break; | 817 break; |
| 817 case GestureSourceTouchscreen: | 818 case GestureSourceTouchscreen: |
| 818 sourceDevice = WebGestureDeviceTouchscreen; | 819 sourceDevice = WebGestureDeviceTouchscreen; |
| 819 break; | 820 break; |
| 820 case GestureSourceUninitialized: | 821 case GestureSourceUninitialized: |
| 821 NOTREACHED(); | 822 NOTREACHED(); |
| 822 } | 823 } |
| 823 } | 824 } |
| 824 | 825 |
| 825 } // namespace blink | 826 } // namespace blink |
| OLD | NEW |