-
commit-queue@webkit.org authored
https://bugs.webkit.org/show_bug.cgi?id=65044 Source/WebCore: Patch by Robert Kroeger <rjkroege@chromium.org> on 2011-08-02 Reviewed by Adam Barth. Divided the gesture recognizer up to correct a layering violation by moving gesture implementation from it to EventHandler::handleGestureEvent so that the gesture recognizer could simply be an engine for generating gesture events from touch events. * dom/WheelEvent.cpp: (WebCore::WheelEvent::WheelEvent): (WebCore::WheelEvent::initWheelEvent): * dom/WheelEvent.h: Added symbolic contstant for tick multiplier. * page/EventHandler.cpp: (WebCore::EventHandler::EventHandler): Removed construction of gesture recognizer. (WebCore::EventHandler::handleGestureEvent): Extended for new gesture events added in this patch. (WebCore::EventHandler::handleTouchEvent): Removed call into gesture recognizer. * page/EventHandler.h: * page/FrameView.cpp: (WebCore::FrameView::reset): Removed code to reset gesture recognizer. * platform/PlatformGestureEvent.h: (WebCore::PlatformGestureEvent::PlatformGestureEvent): (WebCore::PlatformGestureEvent::deltaX): (WebCore::PlatformGestureEvent::deltaY): (WebCore::PlatformGestureEvent::shiftKey): (WebCore::PlatformGestureEvent::ctrlKey): (WebCore::PlatformGestureEvent::altKey): (WebCore::PlatformGestureEvent::metaKey): Added additional gesture types and parameters. * platform/PlatformGestureRecognizer.h: * platform/chromium/FramelessScrollView.h: Added support for displatching gesture and touch events. * platform/chromium/GestureRecognizerChromium.cpp: (WebCore::InnerGestureRecognizer::InnerGestureRecognizer): (WebCore::InnerGestureRecognizer::reset): (WebCore::InnerGestureRecognizer::constructClickGestureEvent): (WebCore::InnerGestureRecognizer::processTouchEventForGestures): Removed all depedencies on EventHandler. Instead, create gesture events from touch event stream. (WebCore::InnerGestureRecognizer::constructScrollGesture): (WebCore::touchDown): (WebCore::noGesture): (WebCore::click): (WebCore::isClickOrScroll): (WebCore::inScroll): (WebCore::GestureRecognizerChromium::processTouchEventForGestures): (WebCore::GestureRecognizerChromium::reset): * platform/chromium/GestureRecognizerChromium.h: * platform/chromium/PopupMenuChromium.cpp: Added support to handle touch events and gesture events. (WebCore::PopupContainer::handleTouchEvent): (WebCore::PopupContainer::handleGestureEvent): (WebCore::PopupListBox::handleTouchEvent): (WebCore::PopupListBox::handleGestureEvent): * platform/chromium/PopupMenuChromium.h: * platform/mac/ScrollAnimatorMac.mm: (WebCore::ScrollAnimatorMac::handleGestureEvent): Ignores the newly added gesture event types. Source/WebKit/chromium: Reviewed by Adam Barth. Moved gesture recognition higher up the event delivery code path so that recognition of gestures is completely separated from gesture handling. Patch by Robert Kroeger <rjkroege@chromium.org> on 2011-08-02 * features.gypi: * src/WebFrameImpl.cpp: (WebKit::WebFrameImpl::createFrameView): Added code to reset the gesture recognizer to preserve parallel layout test execution. * src/WebPopupMenuImpl.cpp: Support dispatching touch and gesture events to Popups. (WebKit::WebPopupMenuImpl::WebPopupMenuImpl): (WebKit::WebPopupMenuImpl::TouchEvent): (WebKit::WebPopupMenuImpl::handleInputEvent): * src/WebPopupMenuImpl.h: * src/WebViewImpl.cpp: (WebKit::WebViewImpl::WebViewImpl): Added gesture recognition creation. (WebKit::WebViewImpl::touchEvent): Added recognition of gestures and dispatch of gesture events. (WebKit::WebViewImpl::resetGestureRecognizer): * src/WebViewImpl.h: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@92234 268f45cc-cd09-0410-ab3c-d52691b4dbfc
a2899d96