OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv
ed. | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv
ed. |
3 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) | 3 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) |
4 * Copyright (C) 2012 Digia Plc. and/or its subsidiary(-ies) | 4 * Copyright (C) 2012 Digia Plc. and/or its subsidiary(-ies) |
5 * | 5 * |
6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
8 * are met: | 8 * are met: |
9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 3726 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3737 // pagePoint should always be relative to the target elements | 3737 // pagePoint should always be relative to the target elements |
3738 // containing frame. | 3738 // containing frame. |
3739 FloatPoint pagePoint = targetFrame->view()->windowToContents(point.pos()
); | 3739 FloatPoint pagePoint = targetFrame->view()->windowToContents(point.pos()
); |
3740 | 3740 |
3741 float scaleFactor = 1.0f / targetFrame->pageZoomFactor(); | 3741 float scaleFactor = 1.0f / targetFrame->pageZoomFactor(); |
3742 | 3742 |
3743 FloatPoint adjustedPagePoint = pagePoint.scaledBy(scaleFactor); | 3743 FloatPoint adjustedPagePoint = pagePoint.scaledBy(scaleFactor); |
3744 FloatSize adjustedRadius = point.radius().scaledBy(scaleFactor); | 3744 FloatSize adjustedRadius = point.radius().scaledBy(scaleFactor); |
3745 | 3745 |
3746 RefPtrWillBeRawPtr<Touch> touch = Touch::create( | 3746 RefPtrWillBeRawPtr<Touch> touch = Touch::create( |
3747 targetFrame, touchTarget.get(), point.id(), point.screenPos(), adjus
tedPagePoint, adjustedRadius, point.rotationAngle(), point.force()); | 3747 targetFrame, touchTarget.get(), point.id(), point.screenPos(), adjus
tedPagePoint, adjustedRadius, point.rotationAngle(), point.force(), point.tilt()
, point.tiltDirection()); |
3748 | 3748 |
3749 // Ensure this target's touch list exists, even if it ends up empty, so | 3749 // Ensure this target's touch list exists, even if it ends up empty, so |
3750 // it can always be passed to TouchEvent::Create below. | 3750 // it can always be passed to TouchEvent::Create below. |
3751 TargetTouchesHeapMap::iterator targetTouchesIterator = touchesByTarget.f
ind(touchTarget.get()); | 3751 TargetTouchesHeapMap::iterator targetTouchesIterator = touchesByTarget.f
ind(touchTarget.get()); |
3752 if (targetTouchesIterator == touchesByTarget.end()) { | 3752 if (targetTouchesIterator == touchesByTarget.end()) { |
3753 touchesByTarget.set(touchTarget.get(), TouchList::create()); | 3753 touchesByTarget.set(touchTarget.get(), TouchList::create()); |
3754 targetTouchesIterator = touchesByTarget.find(touchTarget.get()); | 3754 targetTouchesIterator = touchesByTarget.find(touchTarget.get()); |
3755 } | 3755 } |
3756 | 3756 |
3757 // touches and targetTouches should only contain information about | 3757 // touches and targetTouches should only contain information about |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3919 | 3919 |
3920 // If it's in the direction to hide the top controls, only consume when the
frame can also scroll. | 3920 // If it's in the direction to hide the top controls, only consume when the
frame can also scroll. |
3921 if (m_frame->view()->scrollPosition().y() < m_frame->view()->maximumScrollPo
sition().y()) | 3921 if (m_frame->view()->scrollPosition().y() < m_frame->view()->maximumScrollPo
sition().y()) |
3922 return true; | 3922 return true; |
3923 | 3923 |
3924 return false; | 3924 return false; |
3925 } | 3925 } |
3926 | 3926 |
3927 | 3927 |
3928 } // namespace blink | 3928 } // namespace blink |
OLD | NEW |