Changeset 88307 in webkit
- Timestamp:
- Jun 7, 2011 6:18:43 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 10 added
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r88306 r88307 1 2011-06-07 Robert Kroeger <rjkroege@chromium.org> 2 3 Reviewed by Adam Barth. 4 5 [chromium] Add a basic gesture recognizer to the Chromium platform 6 https://bugs.webkit.org/show_bug.cgi?id=54417 7 8 Shows that the basic Chromium gesture manager can correctly convert a touch 9 event sequence into a sequence of synthetic mouse events for clicking and 10 scrolling. 11 12 * fast/events/touch/touch-gesture-click-expected.txt: Added. 13 * fast/events/touch/touch-gesture-click.html: Added. 14 * fast/events/touch/touch-gesture-scroll-expected.txt: Added. 15 * fast/events/touch/touch-gesture-scroll.html: Added. 16 * platform/chromium/fast/events/touch/touch-gesture-click-expected.txt: Added. 17 * platform/chromium/fast/events/touch/touch-gesture-scroll-expected.txt: Added. 18 1 19 2011-06-07 James Kozianski <koz@chromium.org> 2 20 -
trunk/Source/WebCore/ChangeLog
r88304 r88307 1 2011-06-07 Robert Kroeger <rjkroege@chromium.org> 2 3 Reviewed by Adam Barth. 4 5 [chromium] Add a basic gesture recognizer to the Chromium platform 6 https://bugs.webkit.org/show_bug.cgi?id=54417 7 8 Adds a basic gesture recognizer to the Chromium platform. Adds an entry 9 point to the GestureRecognizer to reset any internal state on a page reset. 10 Resetting the gesture recognizer on page load is necesary for reliable 11 layout test execution and improves gesture recognizer operational 12 robustness. 13 14 Added an additional constructor to permit building a synthetic 15 PlatformWheelEvent. 16 17 Small modifications to the PlatformGestureRecognizer as required to 18 implement the simple Chromium platform gesture recognizer. 19 20 Tests: fast/events/touch/touch-gesture-click.html 21 22 * WebCore.gypi: 23 * page/EventHandler.cpp: 24 (WebCore::EventHandler::resetGestureRecognizer): 25 * page/EventHandler.h: 26 * page/FrameView.cpp: 27 (WebCore::FrameView::reset): 28 * platform/PlatformGestureRecognizer.h: 29 * platform/PlatformWheelEvent.h: 30 (WebCore::PlatformWheelEvent::PlatformWheelEvent): 31 * platform/chromium/GestureRecognizerChromium.cpp: Added. 32 (WebCore::InnerGestureRecognizer::InnerGestureRecognizer): 33 (WebCore::InnerGestureRecognizer::reset): 34 (WebCore::InnerGestureRecognizer::~InnerGestureRecognizer): 35 (WebCore::InnerGestureRecognizer::addEdgeFunction): 36 (WebCore::InnerGestureRecognizer::isInClickTimeWindow): 37 (WebCore::InnerGestureRecognizer::isInsideManhattanSquare): 38 (WebCore::InnerGestureRecognizer::dispatchSyntheticClick): 39 (WebCore::InnerGestureRecognizer::processTouchEventForGesture): 40 (WebCore::InnerGestureRecognizer::scrollViaTouchMotion): 41 (WebCore::InnerGestureRecognizer::updateValues): 42 (WebCore::InnerGestureRecognizer::signature): 43 (WebCore::touchDown): 44 (WebCore::noGesture): 45 (WebCore::click): 46 (WebCore::isClickOrScroll): 47 (WebCore::inScroll): 48 (WebCore::PlatformGestureRecognizer::create): 49 (WebCore::PlatformGestureRecognizer::PlatformGestureRecognizer): 50 (WebCore::PlatformGestureRecognizer::~PlatformGestureRecognizer): 51 (WebCore::GestureRecognizerChromium::GestureRecognizerChromium): 52 (WebCore::GestureRecognizerChromium::~GestureRecognizerChromium): 53 * platform/chromium/GestureRecognizerChromium.h: Added. 54 (WebCore::InnerGestureRecognizer::setState): 55 (WebCore::InnerGestureRecognizer::state): 56 (WebCore::GestureRecognizerChromium::reset): 57 (WebCore::GestureRecognizerChromium::processTouchEventForGesture): 58 1 59 2011-06-07 No'am Rosenthal <noam.rosenthal@nokia.com> 2 60 -
trunk/Source/WebCore/WebCore.gypi
r88286 r88307 768 768 'platform/NotImplemented.h', 769 769 'platform/PlatformGestureEvent.h', 770 'platform/PlatformGestureRecognizer.cpp',771 770 'platform/PlatformGestureRecognizer.h', 772 771 'platform/PlatformKeyboardEvent.h', … … 3814 3813 'platform/chromium/FramelessScrollView.h', 3815 3814 'platform/chromium/FramelessScrollViewClient.h', 3815 'platform/chromium/GestureRecognizerChromium.cpp', 3816 'platform/chromium/GestureRecognizerChromium.h', 3816 3817 'platform/chromium/KeyCodeConversion.h', 3817 3818 'platform/chromium/KeyCodeConversionGtk.cpp', -
trunk/Source/WebCore/page/EventHandler.cpp
r88178 r88307 3293 3293 return defaultPrevented; 3294 3294 } 3295 #endif 3296 3297 } 3295 3296 #if ENABLE(GESTURE_RECOGNIZER) 3297 void EventHandler::resetGestureRecognizer() 3298 { 3299 if (m_gestureRecognizer) 3300 m_gestureRecognizer->reset(); 3301 } 3302 #endif 3303 3304 3305 #endif 3306 3307 } -
trunk/Source/WebCore/page/EventHandler.h
r87951 r88307 167 167 #endif 168 168 169 #if ENABLE(GESTURE_RECOGNIZER) 170 void resetGestureRecognizer(); 171 #endif 172 169 173 #if ENABLE(CONTEXT_MENUS) 170 174 bool sendContextMenuEvent(const PlatformMouseEvent&); -
trunk/Source/WebCore/page/FrameView.cpp
r88284 r88307 236 236 m_firstVisuallyNonEmptyLayoutCallbackPending = true; 237 237 m_maintainScrollPositionAnchor = 0; 238 239 #if ENABLE(GESTURE_RECOGNIZER) 240 frame()->eventHandler()->resetGestureRecognizer(); 241 #endif 238 242 } 239 243 -
trunk/Source/WebCore/platform/PlatformGestureRecognizer.h
r84890 r88307 58 58 // Returns true if the event resulted in firing a synthetic event. 59 59 virtual bool processTouchEventForGesture(const PlatformTouchEvent&, EventHandler*, bool handled) = 0; 60 61 // Clears the GestureRecognizer to its initial state. 62 virtual void reset() = 0; 60 63 }; 61 64 -
trunk/Source/WebCore/platform/PlatformWheelEvent.h
r79141 r88307 107 107 } 108 108 109 PlatformWheelEvent(IntPoint position, IntPoint globalPosition, float deltaX, float deltaY, float wheelTicksX, float wheelTicksY, PlatformWheelEventGranularity granularity, bool isAccepted, bool shiftKey, bool ctrlKey, bool altKey, bool metaKey) 110 : m_position(position) 111 , m_globalPosition(globalPosition) 112 , m_deltaX(deltaX) 113 , m_deltaY(deltaY) 114 , m_wheelTicksX(wheelTicksX) 115 , m_wheelTicksY(wheelTicksY) 116 , m_granularity(granularity) 117 , m_isAccepted(isAccepted) 118 , m_shiftKey(shiftKey) 119 , m_ctrlKey(ctrlKey) 120 , m_altKey(altKey) 121 , m_metaKey(metaKey) 122 #if PLATFORM(MAC) 123 , m_hasPreciseScrollingDeltas(false) 124 , m_phase(PlatformWheelEventPhaseNone) 125 , m_momentumPhase(PlatformWheelEventPhaseNone) 126 , m_timestamp(0) 127 #endif 128 { 129 } 130 109 131 const IntPoint& pos() const { return m_position; } // PlatformWindow coordinates. 110 132 const IntPoint& globalPos() const { return m_globalPosition; } // Screen coordinates. -
trunk/Source/WebKit/chromium/ChangeLog
r88288 r88307 1 2011-06-07 Robert Kroeger <rjkroege@chromium.org> 2 3 Reviewed by Adam Barth. 4 5 [chromium] Add a basic gesture recognizer to the Chromium platform 6 https://bugs.webkit.org/show_bug.cgi?id=54417 7 8 Added unit tests for the basic chromium platform gesture recognizer. 9 10 * tests/InnerGestureRecognizerTest.cpp: Added. 11 (WebCore::InspectableInnerGestureRecognizer::InspectableInnerGestureRecognizer): 12 (WebCore::InspectableInnerGestureRecognizer::signature): 13 (WebCore::InspectableInnerGestureRecognizer::firstTouchPosition): 14 (WebCore::InspectableInnerGestureRecognizer::setFirstTouchTime): 15 (WebCore::InspectableInnerGestureRecognizer::firstTouchTime): 16 (WebCore::InspectableInnerGestureRecognizer::setLastTouchTime): 17 (WebCore::InspectableInnerGestureRecognizer::lastTouchTime): 18 (WebCore::InspectableInnerGestureRecognizer::edgeFunction): 19 (WebCore::InspectableInnerGestureRecognizer::updateValues): 20 (WebCore::InspectableInnerGestureRecognizer::addEdgeFunction): 21 (WebCore::BuildablePlatformTouchPoint::setX): 22 (WebCore::BuildablePlatformTouchPoint::setY): 23 (WebCore::BuildablePlatformTouchPoint::BuildablePlatformTouchPoint): 24 (WebCore::TestGestureRecognizer::TestGestureRecognizer): 25 (WebCore::TestGestureRecognizer::SetUp): 26 (WebCore::TestGestureRecognizer::TearDown): 27 (WebCore::TEST_F): 28 1 29 2011-06-07 Vangelis Kokkevis <vangelis@chromium.org> 2 30 -
trunk/Source/WebKit/chromium/WebKit.gypi
r87089 r88307 54 54 'webkit_unittest_files': [ 55 55 'tests/ArenaTestHelpers.h', 56 'tests/InnerGestureRecognizerTest.cpp', 56 57 'tests/CCThreadTaskTest.cpp', 57 58 'tests/CCThreadTest.cpp',
Note: See TracChangeset
for help on using the changeset viewer.