Chromium Code Reviews| 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 419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 430 | 430 |
| 431 // This assumes convertFromContainingWindow does only translations, not scal es. | 431 // This assumes convertFromContainingWindow does only translations, not scal es. |
| 432 FloatPoint floatPos = convertHitPointToWindow(widget, point.position); | 432 FloatPoint floatPos = convertHitPointToWindow(widget, point.position); |
| 433 IntPoint flooredPoint = flooredIntPoint(floatPos); | 433 IntPoint flooredPoint = flooredIntPoint(floatPos); |
| 434 m_pos = widget->convertFromContainingWindow(flooredPoint) + (floatPos - floo redPoint); | 434 m_pos = widget->convertFromContainingWindow(flooredPoint) + (floatPos - floo redPoint); |
| 435 | 435 |
| 436 m_screenPos = FloatPoint(point.screenPosition.x, point.screenPosition.y); | 436 m_screenPos = FloatPoint(point.screenPosition.x, point.screenPosition.y); |
| 437 m_radius = scaleSizeToWindow(widget, FloatSize(point.radiusX, point.radiusY) ); | 437 m_radius = scaleSizeToWindow(widget, FloatSize(point.radiusX, point.radiusY) ); |
| 438 m_rotationAngle = point.rotationAngle; | 438 m_rotationAngle = point.rotationAngle; |
| 439 m_force = point.force; | 439 m_force = point.force; |
| 440 m_tilt = point.tilt; | |
| 441 m_tiltDirection = point.tiltDirection; | |
|
Rick Byers
2015/02/13 08:48:05
Your spec should clarify whether this is intended
d.pikalov
2015/02/13 13:31:17
Right, I updated spec with "...angle in relation t
| |
| 440 } | 442 } |
| 441 | 443 |
| 442 PlatformTouchEventBuilder::PlatformTouchEventBuilder(Widget* widget, const WebTo uchEvent& event) | 444 PlatformTouchEventBuilder::PlatformTouchEventBuilder(Widget* widget, const WebTo uchEvent& event) |
| 443 { | 445 { |
| 444 m_type = toPlatformTouchEventType(event.type); | 446 m_type = toPlatformTouchEventType(event.type); |
| 445 m_modifiers = toPlatformEventModifiers(event.modifiers); | 447 m_modifiers = toPlatformEventModifiers(event.modifiers); |
| 446 m_timestamp = event.timeStampSeconds; | 448 m_timestamp = event.timeStampSeconds; |
| 447 | 449 |
| 448 for (unsigned i = 0; i < event.touchesLength; ++i) | 450 for (unsigned i = 0; i < event.touchesLength; ++i) |
| 449 m_touchPoints.append(PlatformTouchPointBuilder(widget, event.touches[i]) ); | 451 m_touchPoints.append(PlatformTouchPointBuilder(widget, event.touches[i]) ); |
| (...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 804 modifiers = getWebInputModifiers(event); | 806 modifiers = getWebInputModifiers(event); |
| 805 | 807 |
| 806 globalX = event.screenX(); | 808 globalX = event.screenX(); |
| 807 globalY = event.screenY(); | 809 globalY = event.screenY(); |
| 808 IntPoint localPoint = convertAbsoluteLocationForRenderObject(event.absoluteL ocation(), *renderObject); | 810 IntPoint localPoint = convertAbsoluteLocationForRenderObject(event.absoluteL ocation(), *renderObject); |
| 809 x = localPoint.x(); | 811 x = localPoint.x(); |
| 810 y = localPoint.y(); | 812 y = localPoint.y(); |
| 811 } | 813 } |
| 812 | 814 |
| 813 } // namespace blink | 815 } // namespace blink |
| OLD | NEW |