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

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

Issue 335413003: Added unprefixed version of Touch radius and force (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: incorporated review comments Created 6 years, 6 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
« no previous file with comments | « 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 735 matching lines...) Expand 10 before | Expand all | Expand 10 after
746 static void addTouchPoints(const Widget* widget, const AtomicString& touchType, TouchList* touches, WebTouchPoint* touchPoints, unsigned* touchPointsLength, con st WebCore::RenderObject* renderObject) 746 static void addTouchPoints(const Widget* widget, const AtomicString& touchType, TouchList* touches, WebTouchPoint* touchPoints, unsigned* touchPointsLength, con st WebCore::RenderObject* renderObject)
747 { 747 {
748 unsigned numberOfTouches = std::min(touches->length(), static_cast<unsigned> (WebTouchEvent::touchesLengthCap)); 748 unsigned numberOfTouches = std::min(touches->length(), static_cast<unsigned> (WebTouchEvent::touchesLengthCap));
749 for (unsigned i = 0; i < numberOfTouches; ++i) { 749 for (unsigned i = 0; i < numberOfTouches; ++i) {
750 const Touch* touch = touches->item(i); 750 const Touch* touch = touches->item(i);
751 751
752 WebTouchPoint point; 752 WebTouchPoint point;
753 point.id = touch->identifier(); 753 point.id = touch->identifier();
754 point.screenPosition = touch->screenLocation(); 754 point.screenPosition = touch->screenLocation();
755 point.position = convertAbsoluteLocationForRenderObjectFloat(touch->abso luteLocation(), *renderObject); 755 point.position = convertAbsoluteLocationForRenderObjectFloat(touch->abso luteLocation(), *renderObject);
756 point.radiusX = touch->webkitRadiusX(); 756 point.radiusX = touch->radiusX();
757 point.radiusY = touch->webkitRadiusY(); 757 point.radiusY = touch->radiusY();
758 point.rotationAngle = touch->webkitRotationAngle(); 758 point.rotationAngle = touch->webkitRotationAngle();
759 point.force = touch->webkitForce(); 759 point.force = touch->force();
760 point.state = toWebTouchPointState(touchType); 760 point.state = toWebTouchPointState(touchType);
761 761
762 touchPoints[i] = point; 762 touchPoints[i] = point;
763 } 763 }
764 *touchPointsLength = numberOfTouches; 764 *touchPointsLength = numberOfTouches;
765 } 765 }
766 766
767 WebTouchEventBuilder::WebTouchEventBuilder(const Widget* widget, const WebCore:: RenderObject* renderObject, const TouchEvent& event) 767 WebTouchEventBuilder::WebTouchEventBuilder(const Widget* widget, const WebCore:: RenderObject* renderObject, const TouchEvent& event)
768 { 768 {
769 if (event.type() == EventTypeNames::touchstart) 769 if (event.type() == EventTypeNames::touchstart)
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
812 modifiers = getWebInputModifiers(event); 812 modifiers = getWebInputModifiers(event);
813 813
814 globalX = event.screenX(); 814 globalX = event.screenX();
815 globalY = event.screenY(); 815 globalY = event.screenY();
816 IntPoint localPoint = convertAbsoluteLocationForRenderObject(event.absoluteL ocation(), *renderObject); 816 IntPoint localPoint = convertAbsoluteLocationForRenderObject(event.absoluteL ocation(), *renderObject);
817 x = localPoint.x(); 817 x = localPoint.x();
818 y = localPoint.y(); 818 y = localPoint.y();
819 } 819 }
820 820
821 } // namespace blink 821 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/dom/Touch.idl ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698