| 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 20 matching lines...) Expand all Loading... |
| 31 | 31 |
| 32 namespace blink { | 32 namespace blink { |
| 33 | 33 |
| 34 static FloatPoint contentsOffset(LocalFrame* frame) { | 34 static FloatPoint contentsOffset(LocalFrame* frame) { |
| 35 if (!frame) | 35 if (!frame) |
| 36 return FloatPoint(); | 36 return FloatPoint(); |
| 37 FrameView* frameView = frame->view(); | 37 FrameView* frameView = frame->view(); |
| 38 if (!frameView) | 38 if (!frameView) |
| 39 return FloatPoint(); | 39 return FloatPoint(); |
| 40 float scale = 1.0f / frame->pageZoomFactor(); | 40 float scale = 1.0f / frame->pageZoomFactor(); |
| 41 return FloatPoint(frameView->scrollPosition()).scaledBy(scale); | 41 return FloatPoint(frameView->scrollOffset()).scaledBy(scale); |
| 42 } | 42 } |
| 43 | 43 |
| 44 Touch::Touch(LocalFrame* frame, | 44 Touch::Touch(LocalFrame* frame, |
| 45 EventTarget* target, | 45 EventTarget* target, |
| 46 int identifier, | 46 int identifier, |
| 47 const FloatPoint& screenPos, | 47 const FloatPoint& screenPos, |
| 48 const FloatPoint& pagePos, | 48 const FloatPoint& pagePos, |
| 49 const FloatSize& radius, | 49 const FloatSize& radius, |
| 50 float rotationAngle, | 50 float rotationAngle, |
| 51 float force, | 51 float force, |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 |