Changeset 55146 in webkit
- Timestamp:
- Feb 23, 2010 5:12:15 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r55144 r55146 1 2010-02-23 Ben Murdoch <benm@google.com> 2 3 Reviewed by Eric Seidel. 4 5 pageX/Y co-ordinates of TouchEvent should be 0,0 6 https://bugs.webkit.org/show_bug.cgi?id=35239 7 8 Update layout tests to reflect the WebCore changes in this bug. 9 10 * fast/events/touch/basic-multi-touch-events-expected.txt: Updated. 11 * fast/events/touch/basic-single-touch-events-expected.txt: Updated. 12 * fast/events/touch/script-tests/basic-multi-touch-events.js: 13 (verifyTouchEvent): Add checking of TouchEvent.pageX/Y 14 * fast/events/touch/script-tests/basic-single-touch-events.js: 15 (verifyTouchEvent): ditto. 16 1 17 2010-02-23 Shinichiro Hamaji <hamaji@chromium.org> 2 18 -
trunk/LayoutTests/fast/events/touch/basic-multi-touch-events-expected.txt
r54817 r55146 10 10 PASS lastEvent.changedTouches.length is 2 11 11 PASS lastEvent.targetTouches.length is 2 12 PASS lastEvent.pageX is 0 13 PASS lastEvent.pageY is 0 12 14 PASS lastEvent.touches[0].pageX is 10 13 15 PASS lastEvent.touches[0].pageY is 10 … … 45 47 PASS lastEvent.changedTouches.length is 1 46 48 PASS lastEvent.targetTouches.length is 2 49 PASS lastEvent.pageX is 0 50 PASS lastEvent.pageY is 0 47 51 PASS lastEvent.touches[0].pageX is 15 48 52 PASS lastEvent.touches[0].pageY is 15 … … 65 69 PASS lastEvent.changedTouches.length is 1 66 70 PASS lastEvent.targetTouches.length is 1 71 PASS lastEvent.pageX is 0 72 PASS lastEvent.pageY is 0 67 73 PASS lastEvent.touches[0].pageX is 20 68 74 PASS lastEvent.touches[0].pageY is 30 … … 85 91 PASS lastEvent.changedTouches.length is 1 86 92 PASS lastEvent.targetTouches.length is 0 93 PASS lastEvent.pageX is 0 94 PASS lastEvent.pageY is 0 87 95 PASS lastEvent.changedTouches[0].pageX is 20 88 96 PASS lastEvent.changedTouches[0].pageY is 30 -
trunk/LayoutTests/fast/events/touch/basic-single-touch-events-expected.txt
r54817 r55146 8 8 PASS lastEvent.changedTouches.length is 1 9 9 PASS lastEvent.targetTouches.length is 1 10 PASS lastEvent.pageX is 0 11 PASS lastEvent.pageY is 0 10 12 PASS lastEvent.shiftKey is false 11 13 PASS lastEvent.touches[0].target.id is "touchtarget" … … 29 31 PASS lastEvent.changedTouches.length is 1 30 32 PASS lastEvent.targetTouches.length is 1 33 PASS lastEvent.pageX is 0 34 PASS lastEvent.pageY is 0 31 35 PASS lastEvent.touches[0].pageX is 20 32 36 PASS lastEvent.touches[0].pageY is 15 … … 42 46 PASS lastEvent.changedTouches.length is 1 43 47 PASS lastEvent.targetTouches.length is 0 48 PASS lastEvent.pageX is 0 49 PASS lastEvent.pageY is 0 44 50 PASS lastEvent.changedTouches[0].pageX is 20 45 51 PASS lastEvent.changedTouches[0].pageY is 15 … … 53 59 PASS lastEvent.changedTouches.length is 1 54 60 PASS lastEvent.targetTouches.length is 1 61 PASS lastEvent.pageX is 0 62 PASS lastEvent.pageY is 0 55 63 PASS lastEvent.targetTouches[0].target.tagName is "DIV" 56 64 PASS lastEvent.type is "touchmove" … … 58 66 PASS lastEvent.changedTouches.length is 1 59 67 PASS lastEvent.targetTouches.length is 0 68 PASS lastEvent.pageX is 0 69 PASS lastEvent.pageY is 0 60 70 PASS lastEvent.touches[0].target.tagName is "HTML" 61 71 PASS successfullyParsed is true -
trunk/LayoutTests/fast/events/touch/script-tests/basic-multi-touch-events.js
r54817 r55146 38 38 shouldBe("lastEvent.changedTouches.length", changedTouchCount.toString()); 39 39 shouldBe("lastEvent.targetTouches.length", targetTouchCount.toString()); 40 shouldBe("lastEvent.pageX", "0"); 41 shouldBe("lastEvent.pageY", "0"); 40 42 } 41 43 -
trunk/LayoutTests/fast/events/touch/script-tests/basic-single-touch-events.js
r54817 r55146 38 38 shouldBe("lastEvent.changedTouches.length", changedTouchCount.toString()); 39 39 shouldBe("lastEvent.targetTouches.length", targetTouchCount.toString()); 40 shouldBe("lastEvent.pageX", "0"); 41 shouldBe("lastEvent.pageY", "0"); 40 42 } 41 43 -
trunk/WebCore/ChangeLog
r55145 r55146 1 2010-02-23 Ben Murdoch <benm@google.com> 2 3 Reviewed by Eric Seidel. 4 5 pageX/Y co-ordinates of TouchEvent should be 0,0 6 https://bugs.webkit.org/show_bug.cgi?id=35239 7 8 The co-ordinates attached to a touch event are not used for tracking touch motion, rather the co-ordinates attached to Touches within the touch event should be used. Set the co-ordinates on the event itself to 0 to avoid confusion and match observed iPhone behavior. 9 10 * page/EventHandler.cpp: 11 (WebCore::EventHandler::handleTouchEvent): Set the pageX/Y and screenX/Y co-ordinates attached to the touch event to 0,0 to match observed behavior on the iPhone. 12 * page/EventHandler.h: Remove now unused members m_firstTouchScreenPos and m_firstTouchPagePos. 13 1 14 2010-02-23 Stephan Aßmus <superstippi@gmx.de> 2 15 -
trunk/WebCore/page/EventHandler.cpp
r55090 r55146 2590 2590 if (event.type() == TouchStart && !i) { 2591 2591 m_touchEventTarget = target; 2592 m_firstTouchScreenPos = point.screenPos();2593 m_firstTouchPagePos = pagePoint;2594 2592 } 2595 2593 … … 2621 2619 TouchEvent::create(TouchList::create().get(), TouchList::create().get(), cancelTouches.get(), 2622 2620 *eventName, m_touchEventTarget->document()->defaultView(), 2623 m_firstTouchScreenPos.x(), m_firstTouchScreenPos.y(), 2624 m_firstTouchPagePos.x(), m_firstTouchPagePos.y(), 2625 event.ctrlKey(), event.altKey(), event.shiftKey(), 2621 0, 0, 0, 0, event.ctrlKey(), event.altKey(), event.shiftKey(), 2626 2622 event.metaKey()); 2627 2623 … … 2636 2632 TouchEvent::create(touches.get(), targetTouches.get(), releasedTouches.get(), 2637 2633 *eventName, m_touchEventTarget->document()->defaultView(), 2638 m_firstTouchScreenPos.x(), m_firstTouchScreenPos.y(), 2639 m_firstTouchPagePos.x(), m_firstTouchPagePos.y(), 2640 event.ctrlKey(), event.altKey(), event.shiftKey(), 2634 0, 0, 0, 0, event.ctrlKey(), event.altKey(), event.shiftKey(), 2641 2635 event.metaKey()); 2642 2636 ExceptionCode ec = 0; … … 2656 2650 TouchEvent::create(touches.get(), targetTouches.get(), pressedTouches.get(), 2657 2651 *eventName, m_touchEventTarget->document()->defaultView(), 2658 m_firstTouchScreenPos.x(), m_firstTouchScreenPos.y(), 2659 m_firstTouchPagePos.x(), m_firstTouchPagePos.y(), 2660 event.ctrlKey(), event.altKey(), event.shiftKey(), 2652 0, 0, 0, 0, event.ctrlKey(), event.altKey(), event.shiftKey(), 2661 2653 event.metaKey()); 2662 2654 ExceptionCode ec = 0; … … 2669 2661 TouchEvent::create(touches.get(), targetTouches.get(), movedTouches.get(), 2670 2662 *eventName, m_touchEventTarget->document()->defaultView(), 2671 m_firstTouchScreenPos.x(), m_firstTouchScreenPos.y(), 2672 m_firstTouchPagePos.x(), m_firstTouchPagePos.y(), 2673 event.ctrlKey(), event.altKey(), event.shiftKey(), 2663 0, 0, 0, 0, event.ctrlKey(), event.altKey(), event.shiftKey(), 2674 2664 event.metaKey()); 2675 2665 ExceptionCode ec = 0; -
trunk/WebCore/page/EventHandler.h
r54156 r55146 410 410 #if ENABLE(TOUCH_EVENTS) 411 411 RefPtr<Node> m_touchEventTarget; 412 IntPoint m_firstTouchScreenPos;413 IntPoint m_firstTouchPagePos;414 412 #endif 415 413 };
Note: See TracChangeset
for help on using the changeset viewer.