haikuwebkit/LayoutTests/fast/events/mouse-force-down-expected.txt

2 lines
50 B
Plaintext
Raw Permalink Normal View History

Force mouse events should go through normal mouse event handling code paths https://bugs.webkit.org/show_bug.cgi?id=143749 -and corresponding- rdar://problem/20472895 Reviewed by Dean Jackson. Source/WebCore: This patch moves all of the code to dispatch mouseforcedown, mouseforceup, and mouseforcechanged into normal mouse event dispatching code. This patch leaves behind the cancel and click events because we plan to remove those, and it also leaves mouseforcewillbegin because that is necessarily a very different event more tied to the NSImmediateActionGestureRecognizer than these other events which are tied to NSResponder’s pressureChangeWithEvent. New helper functions. * dom/Document.cpp: (WebCore::Document::hasListenerTypeForEventType): * dom/Document.h: * dom/Element.cpp: (WebCore::isForceEvent): Move the code to ensure the force events have listeners in order to fire to dispatchMouseEvent, and delete the old implementations. (WebCore::Element::dispatchMouseEvent): (WebCore::Element::dispatchMouseForceChanged): Deleted. (WebCore::Element::dispatchMouseForceDown): Deleted. (WebCore::Element::dispatchMouseForceUp): Deleted. * dom/Element.h: Perform a hit test and pipe the events through dispatchMouseEvent(). * page/EventHandler.cpp: (WebCore::EventHandler::handleMouseForceEvent): * page/EventHandler.h: New types for the new events. * platform/PlatformEvent.h: Forward to EventHandler. * replay/UserInputBridge.cpp: (WebCore::UserInputBridge::handleMouseForceEvent): * replay/UserInputBridge.h: Source/WebKit2: This patch makes pressureChangeWithEvent create NativeWebMouseEvents with the NSEventTypePressures that is gets and sends those down to the web process. Re-name pressureEvent to lastPressureEvent. Now that event can sometimes be an NSEventTypePressure, the new name makes it clear how the second parameter differs from the first. * Shared/NativeWebMouseEvent.h: New event types for the new types of events. * Shared/WebEvent.h: * Shared/WebEventConversion.cpp: (WebKit::WebKit2PlatformMouseEvent::WebKit2PlatformMouseEvent): * Shared/mac/NativeWebMouseEventMac.mm: (WebKit::NativeWebMouseEvent::NativeWebMouseEvent): * Shared/mac/WebEventFactory.h: All of the square-peg, round-hole problems of massaging the NSEventTypePressures events into WebMouseEvents is taken care of here. * Shared/mac/WebEventFactory.mm: (WebKit::mouseButtonForEvent): (WebKit::globalPointForEvent): (WebKit::pointForEvent): (WebKit::WebEventFactory::createWebMouseEvent): Instead of calling the old inputDeviceForceDidChange, create a NativeWebMouseEvent and handle it. * UIProcess/API/mac/WKView.mm: (-[WKView pressureChangeWithEvent:]): Handle the new types. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::didReceiveEvent): Can delete inputDeviceForceDidChange since it’s no longer used. (WebKit::WebPageProxy::inputDeviceForceDidChange): Deleted. * UIProcess/WebPageProxy.h: Handle the new types of mouse events properly. * WebProcess/WebPage/WebPage.cpp: (WebKit::handleMouseEvent): Delete inputDeviceForceDidChange() and m_lastForceStage. * WebProcess/WebPage/WebPage.h: * WebProcess/WebPage/WebPage.messages.in: * WebProcess/WebPage/mac/WebPageMac.mm: (WebKit::WebPage::inputDeviceForceDidChange): Deleted. Handle new WebEvent types. * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp: Tools: Add mouseForceDown/mouseForceUp/mouseForceChanged support to WebKitTestRunner. Since there is not a way to create an NSEventTypePressure from scratch, we subclass NSEvent and override all of the critical methods. * WebKitTestRunner/EventSenderProxy.h: * WebKitTestRunner/InjectedBundle/Bindings/EventSendingController.idl: * WebKitTestRunner/InjectedBundle/EventSendingController.cpp: (WTR::EventSendingController::mouseForceDown): (WTR::EventSendingController::mouseForceUp): (WTR::EventSendingController::mouseForceChanged): * WebKitTestRunner/InjectedBundle/EventSendingController.h: * WebKitTestRunner/TestController.cpp: (WTR::TestController::didReceiveSynchronousMessageFromInjectedBundle): * WebKitTestRunner/mac/EventSenderProxy.mm: (-[EventSenderPressureEvent initAtLocation:globalLocation:stage:pressure:phase:time:eventNumber:]): (-[EventSenderPressureEvent timestamp]): (-[EventSenderPressureEvent type]): (-[EventSenderPressureEvent locationInWindow]): (-[EventSenderPressureEvent location]): (-[EventSenderPressureEvent stage]): (-[EventSenderPressureEvent pressure]): (-[EventSenderPressureEvent phase]): (-[EventSenderPressureEvent eventNumber]): (WTR::EventSenderProxy::mouseForceDown): (WTR::EventSenderProxy::mouseForceUp): (WTR::EventSenderProxy::mouseForceChanged): LayoutTests: Just a few new tests. More to come. * fast/events/mouse-force-changed-expected.txt: Added. * fast/events/mouse-force-changed.html: Added. * fast/events/mouse-force-down-expected.txt: Added. * fast/events/mouse-force-down.html: Added. * fast/events/mouse-force-up-expected.txt: Added. * fast/events/mouse-force-up.html: Added. Right now the new tests will only work on Mac 10.10.3 and beyond. * platform/efl/TestExpectations: * platform/gtk/TestExpectations: * platform/ios-simulator/TestExpectations: * platform/mac-mavericks/TestExpectations: * platform/win/TestExpectations: Canonical link: https://commits.webkit.org/161898@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@182963 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-04-17 19:55:55 +00:00
Success! The mouseforcedown event was dispatched.