| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2008, The Android Open Source Project | 2 * Copyright 2008, The Android Open Source Project |
| 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * * Redistributions of source code must retain the above copyright | 7 * * Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * * Redistributions in binary form must reproduce the above copyright | 9 * * Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 Touch::Touch(LocalFrame* frame, EventTarget* target, unsigned identifier, const
FloatPoint& screenPos, const FloatPoint& pagePos, const FloatSize& radius, float
rotationAngle, float force) | 36 Touch::Touch(LocalFrame* frame, EventTarget* target, unsigned identifier, const
FloatPoint& screenPos, const FloatPoint& pagePos, const FloatSize& radius, float
rotationAngle, float force) |
| 37 : m_target(target) | 37 : m_target(target) |
| 38 , m_identifier(identifier) | 38 , m_identifier(identifier) |
| 39 , m_clientPos(pagePos) | 39 , m_clientPos(pagePos) |
| 40 , m_screenPos(screenPos) | 40 , m_screenPos(screenPos) |
| 41 , m_pagePos(pagePos) | 41 , m_pagePos(pagePos) |
| 42 , m_radius(radius) | 42 , m_radius(radius) |
| 43 , m_rotationAngle(rotationAngle) | 43 , m_rotationAngle(rotationAngle) |
| 44 , m_force(force) | 44 , m_force(force) |
| 45 { | 45 { |
| 46 float scaleFactor = frame ? frame->pageZoomFactor() : 1.0f; | 46 m_absoluteLocation = roundedLayoutPoint(pagePos); |
| 47 m_absoluteLocation = roundedLayoutPoint(pagePos.scaledBy(scaleFactor)); | |
| 48 } | 47 } |
| 49 | 48 |
| 50 Touch::Touch(EventTarget* target, unsigned identifier, const FloatPoint& clientP
os, const FloatPoint& screenPos, const FloatPoint& pagePos, const FloatSize& rad
ius, float rotationAngle, float force, LayoutPoint absoluteLocation) | 49 Touch::Touch(EventTarget* target, unsigned identifier, const FloatPoint& clientP
os, const FloatPoint& screenPos, const FloatPoint& pagePos, const FloatSize& rad
ius, float rotationAngle, float force, LayoutPoint absoluteLocation) |
| 51 : m_target(target) | 50 : m_target(target) |
| 52 , m_identifier(identifier) | 51 , m_identifier(identifier) |
| 53 , m_clientPos(clientPos) | 52 , m_clientPos(clientPos) |
| 54 , m_screenPos(screenPos) | 53 , m_screenPos(screenPos) |
| 55 , m_pagePos(pagePos) | 54 , m_pagePos(pagePos) |
| 56 , m_radius(radius) | 55 , m_radius(radius) |
| 57 , m_rotationAngle(rotationAngle) | 56 , m_rotationAngle(rotationAngle) |
| 58 , m_force(force) | 57 , m_force(force) |
| 59 , m_absoluteLocation(absoluteLocation) | 58 , m_absoluteLocation(absoluteLocation) |
| 60 { | 59 { |
| 61 } | 60 } |
| 62 | 61 |
| 63 PassRefPtr<Touch> Touch::cloneWithNewTarget(EventTarget* eventTarget) const | 62 PassRefPtr<Touch> Touch::cloneWithNewTarget(EventTarget* eventTarget) const |
| 64 { | 63 { |
| 65 return adoptRef(new Touch(eventTarget, m_identifier, m_clientPos, m_screenPo
s, m_pagePos, m_radius, m_rotationAngle, m_force, m_absoluteLocation)); | 64 return adoptRef(new Touch(eventTarget, m_identifier, m_clientPos, m_screenPo
s, m_pagePos, m_radius, m_rotationAngle, m_force, m_absoluteLocation)); |
| 66 } | 65 } |
| 67 | 66 |
| 68 void Touch::trace(Visitor* visitor) | 67 void Touch::trace(Visitor* visitor) |
| 69 { | 68 { |
| 70 visitor->trace(m_target); | 69 visitor->trace(m_target); |
| 71 } | 70 } |
| 72 | 71 |
| 73 } // namespace blink | 72 } // namespace blink |
| OLD | NEW |