| 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 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 477 m_rotationAngle = point.rotationAngle; | 477 m_rotationAngle = point.rotationAngle; |
| 478 } | 478 } |
| 479 | 479 |
| 480 PlatformTouchEventBuilder::PlatformTouchEventBuilder(Widget* widget, const WebTo
uchEvent& event) | 480 PlatformTouchEventBuilder::PlatformTouchEventBuilder(Widget* widget, const WebTo
uchEvent& event) |
| 481 { | 481 { |
| 482 m_type = toPlatformTouchEventType(event.type); | 482 m_type = toPlatformTouchEventType(event.type); |
| 483 m_modifiers = event.modifiers; | 483 m_modifiers = event.modifiers; |
| 484 m_timestamp = event.timeStampSeconds; | 484 m_timestamp = event.timeStampSeconds; |
| 485 m_causesScrollingIfUncanceled = event.movedBeyondSlopRegion; | 485 m_causesScrollingIfUncanceled = event.movedBeyondSlopRegion; |
| 486 m_dispatchedDuringFling = event.dispatchedDuringFling; | 486 m_dispatchedDuringFling = event.dispatchedDuringFling; |
| 487 m_touchStartOrFirstTouchMove = event.touchStartOrFirstTouchMove; |
| 487 | 488 |
| 488 for (unsigned i = 0; i < event.touchesLength; ++i) | 489 for (unsigned i = 0; i < event.touchesLength; ++i) |
| 489 m_touchPoints.append(PlatformTouchPointBuilder(widget, event.touches[i])
); | 490 m_touchPoints.append(PlatformTouchPointBuilder(widget, event.touches[i])
); |
| 490 | 491 |
| 491 m_dispatchType = toPlatformDispatchType(event.dispatchType); | 492 m_dispatchType = toPlatformDispatchType(event.dispatchType); |
| 492 m_uniqueTouchEventId = event.uniqueTouchEventId; | 493 m_uniqueTouchEventId = event.uniqueTouchEventId; |
| 493 } | 494 } |
| 494 | 495 |
| 495 static FloatPoint convertAbsoluteLocationForLayoutObjectFloat(const LayoutPoint&
location, const LayoutItem layoutItem) | 496 static FloatPoint convertAbsoluteLocationForLayoutObjectFloat(const LayoutPoint&
location, const LayoutItem layoutItem) |
| 496 { | 497 { |
| (...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 818 break; | 819 break; |
| 819 case GestureSourceTouchscreen: | 820 case GestureSourceTouchscreen: |
| 820 sourceDevice = WebGestureDeviceTouchscreen; | 821 sourceDevice = WebGestureDeviceTouchscreen; |
| 821 break; | 822 break; |
| 822 case GestureSourceUninitialized: | 823 case GestureSourceUninitialized: |
| 823 NOTREACHED(); | 824 NOTREACHED(); |
| 824 } | 825 } |
| 825 } | 826 } |
| 826 | 827 |
| 827 } // namespace blink | 828 } // namespace blink |
| OLD | NEW |