| 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 1899 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1910 IntPoint touchCenter = m_frame->view()->contentsToWindow(result.roundedPoint
InMainFrame()); | 1910 IntPoint touchCenter = m_frame->view()->contentsToWindow(result.roundedPoint
InMainFrame()); |
| 1911 IntRect touchRect = m_frame->view()->contentsToWindow(result.hitTestLocation
().boundingBox()); | 1911 IntRect touchRect = m_frame->view()->contentsToWindow(result.hitTestLocation
().boundingBox()); |
| 1912 | 1912 |
| 1913 Vector<RefPtr<Node>, 11> nodes; | 1913 Vector<RefPtr<Node>, 11> nodes; |
| 1914 copyToVector(result.rectBasedTestResult(), nodes); | 1914 copyToVector(result.rectBasedTestResult(), nodes); |
| 1915 | 1915 |
| 1916 // FIXME: the explicit Vector conversion copies into a temporary and is wast
eful. | 1916 // FIXME: the explicit Vector conversion copies into a temporary and is wast
eful. |
| 1917 return findBestClickableCandidate(targetNode, targetPoint, touchCenter, touc
hRect, Vector<RefPtr<Node> > (nodes)); | 1917 return findBestClickableCandidate(targetNode, targetPoint, touchCenter, touc
hRect, Vector<RefPtr<Node> > (nodes)); |
| 1918 } | 1918 } |
| 1919 | 1919 |
| 1920 bool EventHandler::bestZoomableAreaForTouchPoint(const IntPoint& touchCenter, co
nst IntSize& touchRadius, IntRect& targetArea, Node*& targetNode) | |
| 1921 { | |
| 1922 HitTestResult result = hitTestResultAtPoint(touchCenter, HitTestRequest::Rea
dOnly | HitTestRequest::Active, touchRadius); | |
| 1923 | |
| 1924 IntRect touchRect(touchCenter - touchRadius, touchRadius + touchRadius); | |
| 1925 Vector<RefPtr<Node>, 11> nodes; | |
| 1926 copyToVector(result.rectBasedTestResult(), nodes); | |
| 1927 | |
| 1928 // FIXME: the explicit Vector conversion copies into a temporary and is wast
eful. | |
| 1929 return findBestZoomableArea(targetNode, targetArea, touchCenter, touchRect,
Vector<RefPtr<Node> >(nodes)); | |
| 1930 } | |
| 1931 | |
| 1932 GestureEventWithHitTestResults EventHandler::targetGestureEvent(const PlatformGe
stureEvent& gestureEvent, bool readOnly) | 1920 GestureEventWithHitTestResults EventHandler::targetGestureEvent(const PlatformGe
stureEvent& gestureEvent, bool readOnly) |
| 1933 { | 1921 { |
| 1934 // Scrolling events get hit tested per frame (like wheel events do). | 1922 // Scrolling events get hit tested per frame (like wheel events do). |
| 1935 ASSERT(!gestureEvent.isScrollEvent()); | 1923 ASSERT(!gestureEvent.isScrollEvent()); |
| 1936 | 1924 |
| 1937 HitTestRequest::HitTestRequestType hitType = getHitTypeForGestureType(gestur
eEvent.type()); | 1925 HitTestRequest::HitTestRequestType hitType = getHitTypeForGestureType(gestur
eEvent.type()); |
| 1938 double activeInterval = 0; | 1926 double activeInterval = 0; |
| 1939 bool shouldKeepActiveForMinInterval = false; | 1927 bool shouldKeepActiveForMinInterval = false; |
| 1940 if (readOnly) { | 1928 if (readOnly) { |
| 1941 hitType |= HitTestRequest::ReadOnly; | 1929 hitType |= HitTestRequest::ReadOnly; |
| (...skipping 781 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2723 unsigned EventHandler::accessKeyModifiers() | 2711 unsigned EventHandler::accessKeyModifiers() |
| 2724 { | 2712 { |
| 2725 #if OS(MACOSX) | 2713 #if OS(MACOSX) |
| 2726 return PlatformEvent::CtrlKey | PlatformEvent::AltKey; | 2714 return PlatformEvent::CtrlKey | PlatformEvent::AltKey; |
| 2727 #else | 2715 #else |
| 2728 return PlatformEvent::AltKey; | 2716 return PlatformEvent::AltKey; |
| 2729 #endif | 2717 #endif |
| 2730 } | 2718 } |
| 2731 | 2719 |
| 2732 } // namespace blink | 2720 } // namespace blink |
| OLD | NEW |