| 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 : m_target(target), | 53 : m_target(target), |
| 54 m_identifier(identifier), | 54 m_identifier(identifier), |
| 55 m_clientPos(pagePos - contentsOffset(frame)), | 55 m_clientPos(pagePos - contentsOffset(frame)), |
| 56 m_screenPos(screenPos), | 56 m_screenPos(screenPos), |
| 57 m_pagePos(pagePos), | 57 m_pagePos(pagePos), |
| 58 m_radius(radius), | 58 m_radius(radius), |
| 59 m_rotationAngle(rotationAngle), | 59 m_rotationAngle(rotationAngle), |
| 60 m_force(force), | 60 m_force(force), |
| 61 m_region(region) { | 61 m_region(region) { |
| 62 float scaleFactor = frame ? frame->pageZoomFactor() : 1.0f; | 62 float scaleFactor = frame ? frame->pageZoomFactor() : 1.0f; |
| 63 m_absoluteLocation = roundedLayoutPoint(pagePos.scaledBy(scaleFactor)); | 63 m_absoluteLocation = LayoutPoint(pagePos.scaledBy(scaleFactor)); |
| 64 } | 64 } |
| 65 | 65 |
| 66 Touch::Touch(EventTarget* target, | 66 Touch::Touch(EventTarget* target, |
| 67 int identifier, | 67 int identifier, |
| 68 const FloatPoint& clientPos, | 68 const FloatPoint& clientPos, |
| 69 const FloatPoint& screenPos, | 69 const FloatPoint& screenPos, |
| 70 const FloatPoint& pagePos, | 70 const FloatPoint& pagePos, |
| 71 const FloatSize& radius, | 71 const FloatSize& radius, |
| 72 float rotationAngle, | 72 float rotationAngle, |
| 73 float force, | 73 float force, |
| (...skipping 14 matching lines...) Expand all Loading... |
| 88 : m_target(initializer.target()), | 88 : m_target(initializer.target()), |
| 89 m_identifier(initializer.identifier()), | 89 m_identifier(initializer.identifier()), |
| 90 m_clientPos(FloatPoint(initializer.clientX(), initializer.clientY())), | 90 m_clientPos(FloatPoint(initializer.clientX(), initializer.clientY())), |
| 91 m_screenPos(FloatPoint(initializer.screenX(), initializer.screenY())), | 91 m_screenPos(FloatPoint(initializer.screenX(), initializer.screenY())), |
| 92 m_pagePos(FloatPoint(initializer.pageX(), initializer.pageY())), | 92 m_pagePos(FloatPoint(initializer.pageX(), initializer.pageY())), |
| 93 m_radius(FloatSize(initializer.radiusX(), initializer.radiusY())), | 93 m_radius(FloatSize(initializer.radiusX(), initializer.radiusY())), |
| 94 m_rotationAngle(initializer.rotationAngle()), | 94 m_rotationAngle(initializer.rotationAngle()), |
| 95 m_force(initializer.force()), | 95 m_force(initializer.force()), |
| 96 m_region(initializer.region()) { | 96 m_region(initializer.region()) { |
| 97 float scaleFactor = frame ? frame->pageZoomFactor() : 1.0f; | 97 float scaleFactor = frame ? frame->pageZoomFactor() : 1.0f; |
| 98 m_absoluteLocation = roundedLayoutPoint(m_pagePos.scaledBy(scaleFactor)); | 98 m_absoluteLocation = LayoutPoint(m_pagePos.scaledBy(scaleFactor)); |
| 99 } | 99 } |
| 100 | 100 |
| 101 Touch* Touch::cloneWithNewTarget(EventTarget* eventTarget) const { | 101 Touch* Touch::cloneWithNewTarget(EventTarget* eventTarget) const { |
| 102 return new Touch(eventTarget, m_identifier, m_clientPos, m_screenPos, | 102 return new Touch(eventTarget, m_identifier, m_clientPos, m_screenPos, |
| 103 m_pagePos, m_radius, m_rotationAngle, m_force, m_region, | 103 m_pagePos, m_radius, m_rotationAngle, m_force, m_region, |
| 104 m_absoluteLocation); | 104 m_absoluteLocation); |
| 105 } | 105 } |
| 106 | 106 |
| 107 DEFINE_TRACE(Touch) { | 107 DEFINE_TRACE(Touch) { |
| 108 visitor->trace(m_target); | 108 visitor->trace(m_target); |
| 109 } | 109 } |
| 110 | 110 |
| 111 } // namespace blink | 111 } // namespace blink |
| OLD | NEW |