Changeset 89212 in webkit
- Timestamp:
- Jun 18, 2011 9:13:49 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r89204 r89212 1 2011-06-18 Yufeng Shen <miletus@chromium.org> 2 3 Reviewed by Darin Fisher. 4 5 Adding "force" filed to Touch Event 6 https://bugs.webkit.org/show_bug.cgi?id=62766 7 8 * fast/events/touch/document-create-touch-expected.txt: 9 * fast/events/touch/script-tests/document-create-touch.js: 10 1 11 2011-06-18 Alice Boxhall <aboxhall@chromium.org> 2 12 -
trunk/LayoutTests/fast/events/touch/document-create-touch-expected.txt
r86700 r89212 15 15 PASS touch.webkitRadiusY is 3 16 16 PASS touch.webkitRotationAngle is 10 17 PASS touch.webkitForce is 10 17 18 PASS emptyTouch is non-null. 18 19 PASS emptyTouch.target is null … … 25 26 PASS emptyTouch.webkitRadiusY is 0 26 27 PASS emptyTouch.webkitRotationAngle is NaN 28 PASS emptyTouch.webkitForce is NaN 27 29 PASS badParamsTouch is non-null. 28 30 PASS badParamsTouch.target is null … … 35 37 PASS badParamsTouch.webkitRadiusY is 0 36 38 PASS badParamsTouch.webkitRotationAngle is NaN 39 PASS badParamsTouch.webkitForce is NaN 37 40 PASS successfullyParsed is true 38 41 -
trunk/LayoutTests/fast/events/touch/script-tests/document-create-touch.js
r86700 r89212 10 10 11 11 var target = document.getElementById("box"); 12 var touch = document.createTouch(window, target, 1, 100, 101, 102, 103, 5, 3, 10 );12 var touch = document.createTouch(window, target, 1, 100, 101, 102, 103, 5, 3, 10, 10); 13 13 shouldBeNonNull("touch"); 14 14 shouldBe("touch.target", "box"); … … 21 21 shouldBe("touch.webkitRadiusY", "3"); 22 22 shouldBe("touch.webkitRotationAngle", "10"); 23 shouldBe("touch.webkitForce", "10"); 23 24 24 25 var emptyTouch = document.createTouch(); … … 33 34 shouldBe("emptyTouch.webkitRadiusY", "0"); 34 35 shouldBeNaN("emptyTouch.webkitRotationAngle"); 36 shouldBeNaN("emptyTouch.webkitForce"); 35 37 36 38 // Try invoking with incorrect parameter types. 37 var badParamsTouch = document.createTouch(function(x) { return x; }, 12, 'a', 'b', 'c', function(x) { return x; }, 104, 'a', 'b', 'c' );39 var badParamsTouch = document.createTouch(function(x) { return x; }, 12, 'a', 'b', 'c', function(x) { return x; }, 104, 'a', 'b', 'c', 'd'); 38 40 shouldBeNonNull("badParamsTouch"); 39 41 shouldBeNull("badParamsTouch.target"); … … 46 48 shouldBe("badParamsTouch.webkitRadiusY", "0"); 47 49 shouldBeNaN("badParamsTouch.webkitRotationAngle"); 50 shouldBeNaN("badParamsTouch.webkitForce"); 48 51 49 52 successfullyParsed = true; -
trunk/Source/WebCore/ChangeLog
r89205 r89212 1 2011-06-18 Yufeng Shen <miletus@chromium.org> 2 3 Reviewed by Darin Fisher. 4 5 Adding "force" filed to Touch Event 6 https://bugs.webkit.org/show_bug.cgi?id=62766 7 8 * dom/Document.cpp: 9 (WebCore::Document::createTouch): 10 * dom/Document.h: 11 * dom/Document.idl: 12 * dom/Touch.cpp: 13 (WebCore::Touch::Touch): 14 * dom/Touch.h: 15 (WebCore::Touch::create): 16 (WebCore::Touch::webkitForce): 17 * dom/Touch.idl: 18 * page/EventHandler.cpp: 19 (WebCore::EventHandler::handleTouchEvent): 20 * platform/PlatformTouchPoint.h: 21 (WebCore::PlatformTouchPoint::force): 22 1 23 2011-06-18 Jer Noble <jer.noble@apple.com> 2 24 -
trunk/Source/WebCore/dom/Document.cpp
r89205 r89212 4987 4987 4988 4988 #if ENABLE(TOUCH_EVENTS) 4989 PassRefPtr<Touch> Document::createTouch(DOMWindow* window, EventTarget* target, int identifier, int pageX, int pageY, int screenX, int screenY, int radiusX, int radiusY, float rotationAngle, ExceptionCode&) const4989 PassRefPtr<Touch> Document::createTouch(DOMWindow* window, EventTarget* target, int identifier, int pageX, int pageY, int screenX, int screenY, int radiusX, int radiusY, float rotationAngle, float force, ExceptionCode&) const 4990 4990 { 4991 4991 // FIXME: It's not clear from the documentation at … … 4995 4995 // Ditto for the createTouchList method below. 4996 4996 Frame* frame = window ? window->frame() : this->frame(); 4997 return Touch::create(frame, target, identifier, screenX, screenY, pageX, pageY, radiusX, radiusY, rotationAngle );4997 return Touch::create(frame, target, identifier, screenX, screenY, pageX, pageY, radiusX, radiusY, rotationAngle, force); 4998 4998 } 4999 4999 -
trunk/Source/WebCore/dom/Document.h
r89205 r89212 1065 1065 1066 1066 #if ENABLE(TOUCH_EVENTS) 1067 PassRefPtr<Touch> createTouch(DOMWindow*, EventTarget*, int identifier, int pageX, int pageY, int screenX, int screenY, int radiusX, int radiusY, float rotationAngle, ExceptionCode&) const;1067 PassRefPtr<Touch> createTouch(DOMWindow*, EventTarget*, int identifier, int pageX, int pageY, int screenX, int screenY, int radiusX, int radiusY, float rotationAngle, float force, ExceptionCode&) const; 1068 1068 PassRefPtr<TouchList> createTouchList(ExceptionCode&) const; 1069 1069 #endif -
trunk/Source/WebCore/dom/Document.idl
r89148 r89212 328 328 in long webkitRadiusX, 329 329 in long webkitRadiusY, 330 in float webkitRotationAngle) 330 in float webkitRotationAngle, 331 in float webkitForce) 331 332 raises (DOMException); 332 333 [ReturnsNew, EnabledAtRuntime, Custom] TouchList createTouchList() -
trunk/Source/WebCore/dom/Touch.cpp
r86700 r89212 55 55 } 56 56 57 Touch::Touch(Frame* frame, EventTarget* target, unsigned identifier, int screenX, int screenY, int pageX, int pageY, int radiusX, int radiusY, float rotationAngle )57 Touch::Touch(Frame* frame, EventTarget* target, unsigned identifier, int screenX, int screenY, int pageX, int pageY, int radiusX, int radiusY, float rotationAngle, float force) 58 58 : m_target(target) 59 59 , m_identifier(identifier) … … 67 67 , m_radiusY(radiusY) 68 68 , m_rotationAngle(rotationAngle) 69 , m_force(force) 69 70 { 70 71 } -
trunk/Source/WebCore/dom/Touch.h
r86700 r89212 42 42 static PassRefPtr<Touch> create(Frame* frame, EventTarget* target, 43 43 unsigned identifier, int screenX, int screenY, int pageX, int pageY, 44 int radiusX, int radiusY, float rotationAngle )44 int radiusX, int radiusY, float rotationAngle, float force) 45 45 { 46 46 return adoptRef(new Touch(frame, target, identifier, screenX, 47 screenY, pageX, pageY, radiusX, radiusY, rotationAngle ));47 screenY, pageX, pageY, radiusX, radiusY, rotationAngle, force)); 48 48 } 49 49 … … 59 59 int webkitRadiusY() const { return m_radiusY; } 60 60 float webkitRotationAngle() const { return m_rotationAngle; } 61 float webkitForce() const { return m_force; } 61 62 62 63 private: 63 64 Touch(Frame* frame, EventTarget* target, unsigned identifier, 64 65 int screenX, int screenY, int pageX, int pageY, 65 int radiusX, int radiusY, float rotationAngle );66 int radiusX, int radiusY, float rotationAngle, float force); 66 67 67 68 RefPtr<EventTarget> m_target; … … 76 77 int m_radiusY; 77 78 float m_rotationAngle; 79 float m_force; 78 80 }; 79 81 -
trunk/Source/WebCore/dom/Touch.idl
r89190 r89212 41 41 readonly attribute int webkitRadiusY; 42 42 readonly attribute float webkitRotationAngle; 43 readonly attribute float webkitForce; 43 44 }; 44 45 } -
trunk/Source/WebCore/page/EventHandler.cpp
r88307 r89212 3228 3228 point.screenPos().x(), point.screenPos().y(), 3229 3229 adjustedPageX, adjustedPageY, 3230 point.radiusX(), point.radiusY(), point.rotationAngle() );3230 point.radiusX(), point.radiusY(), point.rotationAngle(), point.force()); 3231 3231 3232 3232 // Ensure this target's touch list exists, even if it ends up empty, so it can always be passed to TouchEvent::Create below. -
trunk/Source/WebCore/platform/PlatformTouchPoint.h
r86700 r89212 63 63 int radiusY() const { return m_radiusY; } 64 64 float rotationAngle() const { return m_rotationAngle; } 65 float force() const { return m_force; } 65 66 66 67 protected: … … 72 73 int m_radiusX; 73 74 float m_rotationAngle; 75 float m_force; 74 76 }; 75 77 -
trunk/Source/WebKit/chromium/ChangeLog
r89188 r89212 1 2011-06-18 Yufeng Shen <miletus@chromium.org> 2 3 Reviewed by Darin Fisher. 4 5 Adding "force" filed to Touch Event 6 https://bugs.webkit.org/show_bug.cgi?id=62766 7 8 * public/WebTouchPoint.h: 9 (WebKit::WebTouchPoint::WebTouchPoint): 10 * src/WebInputEventConversion.cpp: 11 (WebKit::PlatformTouchPointBuilder::PlatformTouchPointBuilder): 12 1 13 2011-06-17 Chris Rogers <crogers@google.com> 2 14 -
trunk/Source/WebKit/chromium/public/WebTouchPoint.h
r86700 r89212 51 51 , radiusY(0) 52 52 , rotationAngle(0) 53 , force(0) 53 54 { 54 55 } … … 71 72 int radiusY; 72 73 float rotationAngle; 74 float force; 73 75 }; 74 76 -
trunk/Source/WebKit/chromium/src/WebInputEventConversion.cpp
r86700 r89212 216 216 m_radiusX = point.radiusX; 217 217 m_rotationAngle = point.rotationAngle; 218 m_force = point.force; 218 219 } 219 220
Note: See TracChangeset
for help on using the changeset viewer.