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 422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
433 | 433 |
434 // This assumes convertFromContainingWindow does only translations, not scal
es. | 434 // This assumes convertFromContainingWindow does only translations, not scal
es. |
435 FloatPoint floatPos = convertHitPointToWindow(widget, point.position); | 435 FloatPoint floatPos = convertHitPointToWindow(widget, point.position); |
436 IntPoint flooredPoint = flooredIntPoint(floatPos); | 436 IntPoint flooredPoint = flooredIntPoint(floatPos); |
437 m_pos = widget->convertFromContainingWindow(flooredPoint) + (floatPos - floo
redPoint); | 437 m_pos = widget->convertFromContainingWindow(flooredPoint) + (floatPos - floo
redPoint); |
438 | 438 |
439 m_screenPos = FloatPoint(point.screenPosition.x, point.screenPosition.y); | 439 m_screenPos = FloatPoint(point.screenPosition.x, point.screenPosition.y); |
440 m_radius = scaleSizeToWindow(widget, FloatSize(point.radiusX, point.radiusY)
); | 440 m_radius = scaleSizeToWindow(widget, FloatSize(point.radiusX, point.radiusY)
); |
441 m_rotationAngle = point.rotationAngle; | 441 m_rotationAngle = point.rotationAngle; |
442 m_force = point.force; | 442 m_force = point.force; |
| 443 m_tilt = point.tilt; |
| 444 m_tiltDirection = point.tiltDirection; |
443 } | 445 } |
444 | 446 |
445 PlatformTouchEventBuilder::PlatformTouchEventBuilder(Widget* widget, const WebTo
uchEvent& event) | 447 PlatformTouchEventBuilder::PlatformTouchEventBuilder(Widget* widget, const WebTo
uchEvent& event) |
446 { | 448 { |
447 m_type = toPlatformTouchEventType(event.type); | 449 m_type = toPlatformTouchEventType(event.type); |
448 m_modifiers = toPlatformEventModifiers(event.modifiers); | 450 m_modifiers = toPlatformEventModifiers(event.modifiers); |
449 m_timestamp = event.timeStampSeconds; | 451 m_timestamp = event.timeStampSeconds; |
450 m_causesScrollingIfUncanceled = event.causesScrollingIfUncanceled; | 452 m_causesScrollingIfUncanceled = event.causesScrollingIfUncanceled; |
451 | 453 |
452 for (unsigned i = 0; i < event.touchesLength; ++i) | 454 for (unsigned i = 0; i < event.touchesLength; ++i) |
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
811 modifiers = getWebInputModifiers(event); | 813 modifiers = getWebInputModifiers(event); |
812 | 814 |
813 globalX = event.screenX(); | 815 globalX = event.screenX(); |
814 globalY = event.screenY(); | 816 globalY = event.screenY(); |
815 IntPoint localPoint = convertAbsoluteLocationForLayoutObject(event.absoluteL
ocation(), *layoutObject); | 817 IntPoint localPoint = convertAbsoluteLocationForLayoutObject(event.absoluteL
ocation(), *layoutObject); |
816 x = localPoint.x(); | 818 x = localPoint.x(); |
817 y = localPoint.y(); | 819 y = localPoint.y(); |
818 } | 820 } |
819 | 821 |
820 } // namespace blink | 822 } // namespace blink |
OLD | NEW |