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 644 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
655 } | 655 } |
656 | 656 |
657 static WebTouchPoint toWebTouchPoint(const Touch* touch, const LayoutObject* lay
outObject, WebTouchPoint::State state) | 657 static WebTouchPoint toWebTouchPoint(const Touch* touch, const LayoutObject* lay
outObject, WebTouchPoint::State state) |
658 { | 658 { |
659 WebTouchPoint point; | 659 WebTouchPoint point; |
660 point.id = touch->identifier(); | 660 point.id = touch->identifier(); |
661 point.screenPosition = touch->screenLocation(); | 661 point.screenPosition = touch->screenLocation(); |
662 point.position = convertAbsoluteLocationForLayoutObjectFloat(touch->absolute
Location(), *layoutObject); | 662 point.position = convertAbsoluteLocationForLayoutObjectFloat(touch->absolute
Location(), *layoutObject); |
663 point.radiusX = touch->radiusX(); | 663 point.radiusX = touch->radiusX(); |
664 point.radiusY = touch->radiusY(); | 664 point.radiusY = touch->radiusY(); |
665 point.rotationAngle = touch->webkitRotationAngle(); | 665 point.rotationAngle = touch->rotationAngle(); |
666 point.force = touch->force(); | 666 point.force = touch->force(); |
667 point.state = state; | 667 point.state = state; |
668 return point; | 668 return point; |
669 } | 669 } |
670 | 670 |
671 static unsigned indexOfTouchPointWithId(const WebTouchPoint* touchPoints, unsign
ed touchPointsLength, unsigned id) | 671 static unsigned indexOfTouchPointWithId(const WebTouchPoint* touchPoints, unsign
ed touchPointsLength, unsigned id) |
672 { | 672 { |
673 for (unsigned i = 0; i < touchPointsLength; ++i) { | 673 for (unsigned i = 0; i < touchPointsLength; ++i) { |
674 if (touchPoints[i].id == static_cast<int>(id)) | 674 if (touchPoints[i].id == static_cast<int>(id)) |
675 return i; | 675 return i; |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
752 modifiers = getWebInputModifiers(event); | 752 modifiers = getWebInputModifiers(event); |
753 | 753 |
754 globalX = event.screenX(); | 754 globalX = event.screenX(); |
755 globalY = event.screenY(); | 755 globalY = event.screenY(); |
756 IntPoint localPoint = convertAbsoluteLocationForLayoutObject(event.absoluteL
ocation(), *layoutObject); | 756 IntPoint localPoint = convertAbsoluteLocationForLayoutObject(event.absoluteL
ocation(), *layoutObject); |
757 x = localPoint.x(); | 757 x = localPoint.x(); |
758 y = localPoint.y(); | 758 y = localPoint.y(); |
759 } | 759 } |
760 | 760 |
761 } // namespace blink | 761 } // namespace blink |
OLD | NEW |