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 418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
429 m_state = toPlatformTouchPointState(point.state); | 429 m_state = toPlatformTouchPointState(point.state); |
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_tilt = point.tilt; |
439 m_force = point.force; | 440 m_force = point.force; |
440 } | 441 } |
441 | 442 |
442 PlatformTouchEventBuilder::PlatformTouchEventBuilder(Widget* widget, const WebTo
uchEvent& event) | 443 PlatformTouchEventBuilder::PlatformTouchEventBuilder(Widget* widget, const WebTo
uchEvent& event) |
443 { | 444 { |
444 m_type = toPlatformTouchEventType(event.type); | 445 m_type = toPlatformTouchEventType(event.type); |
445 m_modifiers = toPlatformEventModifiers(event.modifiers); | 446 m_modifiers = toPlatformEventModifiers(event.modifiers); |
446 m_timestamp = event.timeStampSeconds; | 447 m_timestamp = event.timeStampSeconds; |
447 | 448 |
448 for (unsigned i = 0; i < event.touchesLength; ++i) | 449 for (unsigned i = 0; i < event.touchesLength; ++i) |
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
804 modifiers = getWebInputModifiers(event); | 805 modifiers = getWebInputModifiers(event); |
805 | 806 |
806 globalX = event.screenX(); | 807 globalX = event.screenX(); |
807 globalY = event.screenY(); | 808 globalY = event.screenY(); |
808 IntPoint localPoint = convertAbsoluteLocationForRenderObject(event.absoluteL
ocation(), *renderObject); | 809 IntPoint localPoint = convertAbsoluteLocationForRenderObject(event.absoluteL
ocation(), *renderObject); |
809 x = localPoint.x(); | 810 x = localPoint.x(); |
810 y = localPoint.y(); | 811 y = localPoint.y(); |
811 } | 812 } |
812 | 813 |
813 } // namespace blink | 814 } // namespace blink |
OLD | NEW |