Changeset 55843 in webkit
- Timestamp:
- Mar 11, 2010 7:25:15 AM (14 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r55841 r55843 1 2010-03-10 Ben Murdoch <benm@google.com> 2 3 Reviewed by Jeremy Orlow. 4 5 [Android] The platform touch events on Android are missing support 6 for key modifiers. 7 https://bugs.webkit.org/show_bug.cgi?id=35521 8 9 Add support in PlatformToucHEventAndroid for the platform supplying 10 key modifiers with touch events. 11 12 Fixes Android so it now passes basic-single-touch-events.html. 13 14 * page/EventHandler.cpp: 15 (WebCore::EventHandler::handleTouchEvent): Fix two compiler warnings. 16 * platform/PlatformTouchEvent.h: 17 (WebCore::PlatformTouchEvent::PlatformTouchEvent): Add support for 18 key modifiers on Android. 19 * platform/android/PlatformTouchEventAndroid.cpp: 20 (WebCore::PlatformTouchEvent::PlatformTouchEvent): ditto. 21 1 22 2010-03-10 Steve Block <steveblock@google.com> 2 23 -
trunk/WebCore/page/EventHandler.cpp
r55737 r55843 2611 2611 RefPtr<TouchList> targetTouches = TouchList::create(); 2612 2612 2613 for ( inti = 0; i < touches->length(); ++i) {2613 for (unsigned i = 0; i < touches->length(); ++i) { 2614 2614 if (touches->item(i)->target()->toNode()->isSameNode(touchTarget->target()->toNode())) 2615 2615 targetTouches->append(touches->item(i)); … … 2630 2630 AtomicString* eventName = 0; 2631 2631 2632 for ( inti = 0; i < points.size(); ++i) {2632 for (unsigned i = 0; i < points.size(); ++i) { 2633 2633 const PlatformTouchPoint& point = points[i]; 2634 2634 IntPoint pagePoint = documentPointForWindowPoint(m_frame, point.pos()); … … 2710 2710 0, 0, 0, 0, event.ctrlKey(), event.altKey(), event.shiftKey(), 2711 2711 event.metaKey()); 2712 2713 2712 ExceptionCode ec = 0; 2714 2713 touchEventTarget->dispatchEvent(cancelEv.get(), ec); -
trunk/WebCore/platform/PlatformTouchEvent.h
r55572 r55843 57 57 PlatformTouchEvent(QTouchEvent*); 58 58 #elif PLATFORM(ANDROID) 59 PlatformTouchEvent(const IntPoint& windowPos, TouchEventType, PlatformTouchPoint::State );59 PlatformTouchEvent(const IntPoint& windowPos, TouchEventType, PlatformTouchPoint::State, int metaState); 60 60 #endif 61 61 -
trunk/WebCore/platform/android/PlatformTouchEventAndroid.cpp
r53994 r55843 31 31 namespace WebCore { 32 32 33 PlatformTouchEvent::PlatformTouchEvent(const IntPoint& windowPos, TouchEventType type, PlatformTouchPoint::State state) 33 // These values should be kept in sync with those defined in the android.view.KeyEvent class from the Android SDK. 34 enum AndroidMetaKeyState { 35 META_SHIFT_ON = 0x01, 36 META_ALT_ON = 0x02, 37 META_SYM_ON = 0x04 38 }; 39 40 PlatformTouchEvent::PlatformTouchEvent(const IntPoint& windowPos, TouchEventType type, PlatformTouchPoint::State state, int metaState) 34 41 : m_type(type) 35 , m_ctrlKey(false)36 , m_altKey(false)37 , m_shiftKey(false)38 42 , m_metaKey(false) 39 43 { 40 44 m_touchPoints.append(PlatformTouchPoint(windowPos, state)); 45 46 m_altKey = metaState & META_ALT_ON; 47 m_shiftKey = metaState & META_SHIFT_ON; 48 m_ctrlKey = metaState & META_SYM_ON; 41 49 } 42 50
Note: See TracChangeset
for help on using the changeset viewer.