| 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 735 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 746 unsigned numberOfTouches = std::min(touches->length(), static_cast<unsigned>
(WebTouchEvent::touchesLengthCap)); | 746 unsigned numberOfTouches = std::min(touches->length(), static_cast<unsigned>
(WebTouchEvent::touchesLengthCap)); |
| 747 for (unsigned i = 0; i < numberOfTouches; ++i) { | 747 for (unsigned i = 0; i < numberOfTouches; ++i) { |
| 748 const Touch* touch = touches->item(i); | 748 const Touch* touch = touches->item(i); |
| 749 | 749 |
| 750 WebTouchPoint point; | 750 WebTouchPoint point; |
| 751 point.id = touch->identifier(); | 751 point.id = touch->identifier(); |
| 752 point.screenPosition = touch->screenLocation(); | 752 point.screenPosition = touch->screenLocation(); |
| 753 point.position = convertAbsoluteLocationForRenderObjectFloat(touch->abso
luteLocation(), *renderObject); | 753 point.position = convertAbsoluteLocationForRenderObjectFloat(touch->abso
luteLocation(), *renderObject); |
| 754 point.radiusX = touch->radiusX(); | 754 point.radiusX = touch->radiusX(); |
| 755 point.radiusY = touch->radiusY(); | 755 point.radiusY = touch->radiusY(); |
| 756 point.rotationAngle = touch->webkitRotationAngle(); | 756 point.rotationAngle = touch->rotationAngle(); |
| 757 point.force = touch->force(); | 757 point.force = touch->force(); |
| 758 point.state = toWebTouchPointState(touchType); | 758 point.state = toWebTouchPointState(touchType); |
| 759 | 759 |
| 760 touchPoints[i] = point; | 760 touchPoints[i] = point; |
| 761 } | 761 } |
| 762 *touchPointsLength = numberOfTouches; | 762 *touchPointsLength = numberOfTouches; |
| 763 } | 763 } |
| 764 | 764 |
| 765 WebTouchEventBuilder::WebTouchEventBuilder(const Widget* widget, const RenderObj
ect* renderObject, const TouchEvent& event) | 765 WebTouchEventBuilder::WebTouchEventBuilder(const Widget* widget, const RenderObj
ect* renderObject, const TouchEvent& event) |
| 766 { | 766 { |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 810 modifiers = getWebInputModifiers(event); | 810 modifiers = getWebInputModifiers(event); |
| 811 | 811 |
| 812 globalX = event.screenX(); | 812 globalX = event.screenX(); |
| 813 globalY = event.screenY(); | 813 globalY = event.screenY(); |
| 814 IntPoint localPoint = convertAbsoluteLocationForRenderObject(event.absoluteL
ocation(), *renderObject); | 814 IntPoint localPoint = convertAbsoluteLocationForRenderObject(event.absoluteL
ocation(), *renderObject); |
| 815 x = localPoint.x(); | 815 x = localPoint.x(); |
| 816 y = localPoint.y(); | 816 y = localPoint.y(); |
| 817 } | 817 } |
| 818 | 818 |
| 819 } // namespace blink | 819 } // namespace blink |
| OLD | NEW |