Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(502)

Side by Side Diff: Source/web/WebInputEventConversion.cpp

Issue 1149563003: Make Touch.radiusX/Y float and make Touch.webkit* aliases in the IDL (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« Source/core/dom/Touch.idl ('K') | « Source/core/dom/Touch.idl ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« Source/core/dom/Touch.idl ('K') | « Source/core/dom/Touch.idl ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698