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 3719 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3730 // pagePoint should always be relative to the target elements | 3730 // pagePoint should always be relative to the target elements |
3731 // containing frame. | 3731 // containing frame. |
3732 FloatPoint pagePoint = targetFrame->view()->windowToContents(point.pos()
); | 3732 FloatPoint pagePoint = targetFrame->view()->windowToContents(point.pos()
); |
3733 | 3733 |
3734 float scaleFactor = 1.0f / targetFrame->pageZoomFactor(); | 3734 float scaleFactor = 1.0f / targetFrame->pageZoomFactor(); |
3735 | 3735 |
3736 FloatPoint adjustedPagePoint = pagePoint.scaledBy(scaleFactor); | 3736 FloatPoint adjustedPagePoint = pagePoint.scaledBy(scaleFactor); |
3737 FloatSize adjustedRadius = point.radius().scaledBy(scaleFactor); | 3737 FloatSize adjustedRadius = point.radius().scaledBy(scaleFactor); |
3738 | 3738 |
3739 RefPtrWillBeRawPtr<Touch> touch = Touch::create( | 3739 RefPtrWillBeRawPtr<Touch> touch = Touch::create( |
3740 targetFrame, touchTarget.get(), point.id(), point.screenPos(), adjus
tedPagePoint, adjustedRadius, point.rotationAngle(), point.force()); | 3740 targetFrame, touchTarget.get(), point.id(), point.screenPos(), adjus
tedPagePoint, adjustedRadius, point.rotationAngle(), point.force(), point.tilt()
, point.tiltDirection()); |
3741 | 3741 |
3742 // Ensure this target's touch list exists, even if it ends up empty, so | 3742 // Ensure this target's touch list exists, even if it ends up empty, so |
3743 // it can always be passed to TouchEvent::Create below. | 3743 // it can always be passed to TouchEvent::Create below. |
3744 TargetTouchesHeapMap::iterator targetTouchesIterator = touchesByTarget.f
ind(touchTarget.get()); | 3744 TargetTouchesHeapMap::iterator targetTouchesIterator = touchesByTarget.f
ind(touchTarget.get()); |
3745 if (targetTouchesIterator == touchesByTarget.end()) { | 3745 if (targetTouchesIterator == touchesByTarget.end()) { |
3746 touchesByTarget.set(touchTarget.get(), TouchList::create()); | 3746 touchesByTarget.set(touchTarget.get(), TouchList::create()); |
3747 targetTouchesIterator = touchesByTarget.find(touchTarget.get()); | 3747 targetTouchesIterator = touchesByTarget.find(touchTarget.get()); |
3748 } | 3748 } |
3749 | 3749 |
3750 // touches and targetTouches should only contain information about | 3750 // touches and targetTouches should only contain information about |
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3906 unsigned EventHandler::accessKeyModifiers() | 3906 unsigned EventHandler::accessKeyModifiers() |
3907 { | 3907 { |
3908 #if OS(MACOSX) | 3908 #if OS(MACOSX) |
3909 return PlatformEvent::CtrlKey | PlatformEvent::AltKey; | 3909 return PlatformEvent::CtrlKey | PlatformEvent::AltKey; |
3910 #else | 3910 #else |
3911 return PlatformEvent::AltKey; | 3911 return PlatformEvent::AltKey; |
3912 #endif | 3912 #endif |
3913 } | 3913 } |
3914 | 3914 |
3915 } // namespace blink | 3915 } // namespace blink |
OLD | NEW |